Comment 3 for bug 1039720

Revision history for this message
dan wendlandt (danwent) wrote : Re: [Bug 1039720] Re: specifying multi value options

getting this type of syntax documented as part of our Admin docs will
be critical. There are a lot of fairly common operations that require
non-trivial commands (e.g., show all ports on a network, or show all
ports for VM X).

On Thu, Aug 23, 2012 at 11:09 AM, Gary Kotton
<email address hidden> wrote:
> Here are a few things I have done in the past (not sure if it is what you ar looking for)
> quantumv2 update_port portid --fixed_ips list=true type=dict ip_address=ip1,subnet_id=id1 ip_address=ip2,subnet_id=id2
> quantumv2 update_port portid --fixed_ips type=dict ip_address=ip1,subnet_id=id1 ip_address=ip2,subnet_id=id2
> Thanks
> Gary
>
> --
> You received this bug notification because you are a member of Quantum
> Bugs, which is subscribed to python-quantumclient.
> https://bugs.launchpad.net/bugs/1039720
>
> Title:
> specifying multi value options
>
> Status in Python client library for Quantum:
> New
>
> Bug description:
> arosen@awesome:/opt/stack/python-quantumclient$ quantum port-create --fixed_ip 10.0.0.111 --fixed_ip 10.0.0.112 c4864d8a-91e2-4c59-9b38-4d94c0385b6e
> need more than 1 value to unpack
>
> arosen@awesome:/opt/stack/python-quantumclient$ quantum -v port-create --fixed_ip 10.0.0.111 --fixed_ip 10.0.0.112 c4864d8a-91e2-4c59-9b38-4d94c0385b6e
> DEBUG: quantumclient.quantum.v2_0.port.CreatePort get_data(Namespace(admin_state_down=True, columns=[], device_id=None, fixed_ip=['10.0.0.111', '10.0.0.112'], formatter='table', mac_address=None, name=None, network_id='c4864d8a-91e2-4c59-9b38-4d94c0385b6e', prefix='', request_format='json', tenant_id=None, value_specs=[], variables=[]))
> DEBUG: quantumclient.client REQ: curl -i http://127.0.0.1:5000/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-quantumclient"
>
> DEBUG: quantumclient.client REQ BODY: {"auth": {"tenantName": "demo",
> "passwordCredentials": {"username": "demo", "password": "password"}}}
>
> DEBUG: quantumclient.client RESP:{'date': 'Tue, 21 Aug 2012 20:08:00
> GMT', 'transfer-encoding': 'chunked', 'status': '200', 'content-type':
> 'application/json', 'vary': 'X-Auth-Token'}
>
> DEBUG: quantumclient.client RESP BODY:{"access": {"token": {"expires":
> "2012-08-22T20:08:00Z", "id": "6c91eb8ff4c84275861c513b0fe7c1d2",
> "tenant": {"enabled": true, "description": null, "name": "demo", "id":
> "eb3f6c689e9047608fb1b25a3c8b936d"}}, "serviceCatalog": [{"endpoints":
> [{"adminURL":
> "http://172.17.114.159:8774/v2/eb3f6c689e9047608fb1b25a3c8b936d",
> "region": "RegionOne", "publicURL":
> "http://172.17.114.159:8774/v2/eb3f6c689e9047608fb1b25a3c8b936d",
> "internalURL":
> "http://172.17.114.159:8774/v2/eb3f6c689e9047608fb1b25a3c8b936d"}],
> "endpoints_links": [], "type": "compute", "name": "Compute Service"},
> {"endpoints": [{"adminURL": "http://172.17.114.159:9696/", "region":
> "RegionOne", "publicURL": "http://172.17.114.159:9696/",
> "internalURL": "http://172.17.114.159:9696/"}], "endpoints_links": [],
> "type": "network", "name": "Quantum Service"}, {"endpoints":
> [{"adminURL": "http://172.17.114.159:3333", "region": "RegionOne",
> "publicURL": "http://172.17.114.159:3333", "internalURL":
> "http://172.17.114.159:3333"}], "endpoints_links": [], "type": "s3",
> "name": "S3 Service"}, {"endpoints": [{"adminURL":
> "http://172.17.114.159:9292", "region": "RegionOne", "publicURL":
> "http://172.17.114.159:9292", "internalURL":
> "http://172.17.114.159:9292"}], "endpoints_links": [], "type":
> "image", "name": "Image Service"}, {"endpoints": [{"adminURL":
> "http://172.17.114.159:8776/v1/eb3f6c689e9047608fb1b25a3c8b936d",
> "region": "RegionOne", "publicURL":
> "http://172.17.114.159:8776/v1/eb3f6c689e9047608fb1b25a3c8b936d",
> "internalURL":
> "http://172.17.114.159:8776/v1/eb3f6c689e9047608fb1b25a3c8b936d"}],
> "endpoints_links": [], "type": "volume", "name": "Volume Service"},
> {"endpoints": [{"adminURL":
> "http://172.17.114.159:8773/services/Admin", "region": "RegionOne",
> "publicURL": "http://172.17.114.159:8773/services/Cloud",
> "internalURL": "http://172.17.114.159:8773/services/Cloud"}],
> "endpoints_links": [], "type": "ec2", "name": "EC2 Service"},
> {"endpoints": [{"adminURL": "http://172.17.114.159:35357/v2.0",
> "region": "RegionOne", "publicURL": "http://172.17.114.159:5000/v2.0",
> "internalURL": "http://172.17.114.159:5000/v2.0"}], "endpoints_links":
> [], "type": "identity", "name": "Identity Service"}], "user":
> {"username": "demo", "roles_links": [], "id":
> "12ce227e181846f7bea097b323d91c53", "roles": [{"name": "Member"},
> {"name": "anotherrole"}], "name": "demo"}, "metadata": {"is_admin": 0,
> "roles": ["0e49d26f9f324b51a999c8e39826f2b0",
> "9376caf4f51341cc806d659a7e4da0be"]}}}
>
> DEBUG: quantumclient.client REQ: curl -i
> http://172.17.114.159:9696/v2.0/networks.json?fields=id&id=c4864d8a-
> 91e2-4c59-9b38-4d94c0385b6e -X GET -H "User-Agent: python-
> quantumclient" -H "Content-Type: application/json" -H "Accept:
> application/json" -H "X-Auth-Token: 6c91eb8ff4c84275861c513b0fe7c1d2"
>
> DEBUG: quantumclient.client RESP:{'date': 'Tue, 21 Aug 2012 20:08:00
> GMT', 'status': '200', 'content-length': '62', 'content-type':
> 'application/json; charset=UTF-8', 'content-location':
> u'http://172.17.114.159:9696/v2.0/networks.json?fields=id&id=c4864d8a-
> 91e2-4c59-9b38-4d94c0385b6e'}
>
> DEBUG: quantumclient.client RESP BODY:{"networks": [{"id": "c4864d8a-
> 91e2-4c59-9b38-4d94c0385b6e"}]}
>
> ERROR: cliff.app need more than 1 value to unpack
> DEBUG: quantumclient.shell clean_up CreatePort
> DEBUG: quantumclient.shell got an error: need more than 1 value to unpack
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/python-quantumclient/+bug/1039720/+subscriptions

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Wendlandt
Nicira, Inc: www.nicira.com
twitter: danwendlandt
~~~~~~~~~~~~~~~~~~~~~~~~~~~