-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
docker python client v2.4.2
python v2.7.12
docker v17.03.1-ce
Ubuntu 16.04
PR #1649 updated the check_resource
decorator to handle different resource names. Container network API functions connect_container_to_network()
and disconnect_container_from_network()
check 'image' as resource ID and not 'container'.
Reproduce using the following snippet:
import docker
cli = docker.APIClient(base_url='unix:///var/run/docker.sock')
cli.pull(repository='ubuntu', tag='latest')
name = 'my_ubuntu'
container = cli.create_container(image='ubuntu:latest', name=name)
cli.connect_container_to_network(container=name, net_id='bridge')
This causes:
Traceback (most recent call last):
File "test.py", line 8, in <module>
cli.connect_container_to_network(container=name, net_id='bridge')
File "/home/mberry/scratch/virtualenv/docker_py/local/lib/python2.7/site-packages/docker/utils/decorators.py", line 17, in wrapped
'Resource ID was not provided'
docker.errors.NullResource: Resource ID was not provided
Metadata
Metadata
Assignees
Labels
No labels