Add trace logging of dockerng.networks result

Added during debugging of failing test to determine what
dockerng.networks is expected to return, keeping as it seems useful.
This commit is contained in:
Andrew Bulford 2017-06-30 10:57:47 +01:00
parent 515c612808
commit 0ef6cf634c

View file

@ -2242,6 +2242,9 @@ def network_present(name, driver=None, containers=None):
# map containers to container's Ids.
containers = [__salt__['dockerng.inspect_container'](c)['Id'] for c in containers]
networks = __salt__['dockerng.networks'](names=[name])
log.trace(
'dockerng.network_present: current networks: {0}'.format(networks)
)
# networks will contain all Docker networks which partially match 'name'.
# We need to loop through to find the matching network, if there is one.
@ -2311,6 +2314,9 @@ def network_absent(name, driver=None):
'comment': ''}
networks = __salt__['dockerng.networks'](names=[name])
log.trace(
'dockerng.network_present: current networks: {0}'.format(networks)
)
# networks will contain all Docker networks which partially match 'name'.
# We need to loop through to find the matching network, if there is one.