Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

CLOUD-4195 do not return haproxy ingress network #160

Merged
merged 1 commit into from
Feb 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions haproxy/helper/swarm_mode_link_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ def get_swarm_mode_haproxy_id_nets(docker, haproxy_container_short_id):
logger.info("Dockercloud haproxy is not running in a service in SwarmMode")
return "", set()

haproxy_nets = set([network.get("NetworkID", "") for network in
haproxy_container.get("NetworkSettings", {}).get("Networks", {}).values()])
haproxy_nets = set([network.get("NetworkID", "") for name, network in
haproxy_container.get("NetworkSettings", {}).get("Networks", {}).iteritems()
if name != "ingress"])

return haproxy_service_id, haproxy_nets

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/helper/test_swarm_mode_link_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@
'container_name': u'app.3.31b6fuwub6dcgdrvy0kivxvug'}}
expected_linked_tasks = {u'7y45xdhy929wzcq94wqdqb8d3': {}, u'bbref0yvjbix87pv6xz1jc3pr': {},
u'31b6fuwub6dcgdrvy0kivxvug': {}}
expected_nets = {"b951j4at14qali5nxevshec93", "0l130ctu8xay6vfft1mb4tjv0"}
expected_nets = {"0l130ctu8xay6vfft1mb4tjv0"}
expected_service_id = "07ql4q5a48seh1uhcr2m7ngar"


Expand Down