Skip to content

Instantly share code, notes, and snippets.

@thesurlydev
Created March 7, 2013 18:53
Show Gist options
  • Save thesurlydev/5110689 to your computer and use it in GitHub Desktop.
Save thesurlydev/5110689 to your computer and use it in GitHub Desktop.
getting this running 'nova network-show' and 'nova network-list'. following: https://github.com/openstack/heat/blob/master/docs/GettingStarted.rst#readme
REQ: curl -i http://localhost:8774/v1.1/90b1f0954ba641b6b8b3e41094da6fc4/os-networks -X GET -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: 6a7e6a5794fc43bc8a379b75d151f54d"
connect: (localhost, 8774) ************
send: u'GET /v1.1/90b1f0954ba641b6b8b3e41094da6fc4/os-networks HTTP/1.1\r\nHost: localhost:8774\r\nx-auth-project-id: admin\r\nx-auth-token: 6a7e6a5794fc43bc8a379b75d151f54d\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: X-Compute-Request-Id: req-6ca271a9-5326-43af-894f-ffcb4e734599
header: Content-Type: application/json
header: Content-Length: 653
header: Date: Thu, 07 Mar 2013 18:50:38 GMT
RESP:{'status': '200', 'content-length': '653', 'content-location': u'http://localhost:8774/v1.1/90b1f0954ba641b6b8b3e41094da6fc4/os-networks', 'x-compute-request-id': 'req-6ca271a9-5326-43af-894f-ffcb4e734599', 'date': 'Thu, 07 Mar 2013 18:50:38 GMT', 'content-type': 'application/json'} {"networks": [{"bridge": "demonetbr0", "vpn_public_port": null, "dhcp_start": "10.0.0.2", "bridge_interface": null, "updated_at": null, "id": "384cdce1-fdcc-4368-8bb9-75675b25c7d3", "cidr_v6": null, "deleted_at": null, "gateway": "10.0.0.1", "rxtx_base": null, "label": "demonet", "priority": null, "project_id": null, "vpn_private_address": null, "deleted": false, "vlan": null, "broadcast": "10.0.0.255", "netmask": "255.255.255.0", "injected": false, "cidr": "10.0.0.0/24", "vpn_public_address": null, "multi_host": false, "dns2": null, "created_at": timestamp(1361919182.0), "host": null, "gateway_v6": null, "netmask_v6": null, "dns1": "8.8.4.4"}]}
DEBUG (shell:543) string indices must be integers, not str
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line 540, in main
OpenStackComputeShell().main(sys.argv[1:])
File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line 476, in main
args.func(self.cs, args)
File "/usr/lib/python2.7/site-packages/novaclient/v1_1/shell.py", line 501, in do_network_list
network_list = cs.networks.list()
File "/usr/lib/python2.7/site-packages/novaclient/v1_1/networks.py", line 49, in list
return self._list("/os-networks", "networks")
File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 67, in _list
data = body[response_key]
TypeError: string indices must be integers, not str
ERROR: string indices must be integers, not str
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment