Bug 919568

Summary: nova network-show doesn't work in fedora 18
Product: [Fedora] Fedora Reporter: Steven Dake <sdake>
Component: python-novaclientAssignee: Mark McLoughlin <markmc>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: apevec, Jan.van.Eldik, jose.castro.leon, markmc, p, shane
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-05 19:46:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Steven Dake 2013-03-08 19:31:25 UTC
Description of problem:
nova network-show returns attribute error

Version-Release number of selected component (if applicable):
python-novaclient-2.10.0-1.fc18.noarch

How reproducible:
100%

Steps to Reproduce:
1. run nova network-show demonet
2.
3.
  
Actual results:
backtrace:
[sdake@bigiron tools]$ nova --debug network-show 1

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-novaclient" -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "verybadpass"}}}'

RESP: [200] {'date': 'Fri, 08 Mar 2013 19:27:28 GMT', 'transfer-encoding': 'chunked', 'content-type': 'application/json', 'vary': 'X-Auth-Token'}
RESP BODY: {"access": {"token": {"expires": "2013-03-09T19:27:28Z", "id": "2c0813b7ee0f49eabab3a0f6f187e29e", "tenant": {"enabled": true, "description": null, "name": "admin", "id": "efa9138535674b05a2fc60329a53d690"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://localhost:8774/v1.1/efa9138535674b05a2fc60329a53d690", "region": "RegionOne", "internalURL": "http://localhost:8774/v1.1/efa9138535674b05a2fc60329a53d690", "id": "41c534b2851b4898b26a729c6872d2a3", "publicURL": "http://localhost:8774/v1.1/efa9138535674b05a2fc60329a53d690"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://localhost:9292/v1", "region": "RegionOne", "internalURL": "http://localhost:9292/v1", "id": "9cd367fb790a429cba57f081652aab98", "publicURL": "http://localhost:9292/v1"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://localhost:8000/v1", "region": "RegionOne", "internalURL": "http://localhost:8000/v1", "id": "02ddbb66627948b48f3b64d30de68b35", "publicURL": "http://localhost:8000/v1"}], "endpoints_links": [], "type": "cloudformation", "name": "heat-cfn"}, {"endpoints": [{"adminURL": "http://localhost:8776/v1/efa9138535674b05a2fc60329a53d690", "region": "RegionOne", "internalURL": "http://localhost:8776/v1/efa9138535674b05a2fc60329a53d690", "id": "d212844839ee415bb8c8223a13cf23a9", "publicURL": "http://localhost:8776/v1/efa9138535674b05a2fc60329a53d690"}], "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": [{"adminURL": "http://localhost:8773/services/Admin", "region": "RegionOne", "internalURL": "http://localhost:8773/services/Cloud", "id": "d3275f5ab49c4bb2aa7f17245b86460a", "publicURL": "http://localhost:8773/services/Cloud"}], "endpoints_links": [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://localhost:8004/v1/efa9138535674b05a2fc60329a53d690", "region": "RegionOne", "internalURL": "http://localhost:8004/v1/efa9138535674b05a2fc60329a53d690", "id": "087d0ef5d228473f8bc352dc662acafd", "publicURL": "http://localhost:8004/v1/efa9138535674b05a2fc60329a53d690"}], "endpoints_links": [], "type": "orchestration", "name": "heat"}, {"endpoints": [{"adminURL": "http://localhost:35357/v2.0", "region": "RegionOne", "internalURL": "http://localhost:5000/v2.0", "id": "27ca87deeac14544921ce71b466af097", "publicURL": "http://localhost:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "admin", "roles_links": [], "id": "75fbc1ebc82b47c29b98d64baf6b9582", "roles": [{"name": "KeystoneAdmin"}, {"name": "admin"}, {"name": "KeystoneServiceAdmin"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["a3f9b7aa600a4a928184b2a741078109", "9706404251934362b626fca58a132f19", "c7413fc8428e46e099caf5669d36451a"]}}}


REQ: curl -i http://localhost:8774/v1.1/efa9138535674b05a2fc60329a53d690/os-networks/1 -X GET -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: 2c0813b7ee0f49eabab3a0f6f187e29e"

RESP: [404] {'date': 'Fri, 08 Mar 2013 19:27:28 GMT', 'content-length': '78', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-5b233e6e-c77c-44c7-8d74-a5061c8244e2'}
RESP BODY: {"itemNotFound": {"message": "The resource could not be found.", "code": 404}}


REQ: curl -i http://localhost:8774/v1.1/efa9138535674b05a2fc60329a53d690/os-networks -X GET -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: 2c0813b7ee0f49eabab3a0f6f187e29e"

RESP: [200] {'date': 'Fri, 08 Mar 2013 19:27:28 GMT', 'x-compute-request-id': 'req-2237e538-7dc2-47cd-8218-cb6998f02d79', 'content-type': 'application/json', 'content-length': '688'}
RESP BODY: {"networks": [{"bridge": "demonetbr0", "vpn_public_port": null, "dhcp_start": "10.0.0.2", "bridge_interface": null, "updated_at": timestamp(1361071767.0), "id": "b950dfa8-c974-42c9-811b-d43510d1f582", "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(1360995029.0), "host": "bigiron.broked.org", "gateway_v6": null, "netmask_v6": null, "dns1": "8.8.4.4"}]}

DEBUG (shell:732) 'NoneType' object has no attribute '__getitem__'
Traceback (most recent call last):
  File "/opt/stack/python-novaclient/novaclient/shell.py", line 729, in main
    OpenStackComputeShell().main(sys.argv[1:])
  File "/opt/stack/python-novaclient/novaclient/shell.py", line 665, in main
    args.func(self.cs, args)
  File "/opt/stack/python-novaclient/novaclient/v1_1/shell.py", line 583, in do_network_show
    network = utils.find_resource(cs.networks, args.network)
  File "/opt/stack/python-novaclient/novaclient/utils.py", line 220, in find_resource
    return manager.find(human_id=name_or_id)
  File "/opt/stack/python-novaclient/novaclient/base.py", line 176, in find
    matches = self.findall(**kwargs)
  File "/opt/stack/python-novaclient/novaclient/base.py", line 196, in findall
    for obj in self.list():
  File "/opt/stack/python-novaclient/novaclient/v1_1/networks.py", line 50, in list
    return self._list("/os-networks", "networks")
  File "/opt/stack/python-novaclient/novaclient/base.py", line 67, in _list
    data = body[response_key]
TypeError: 'NoneType' object has no attribute '__getitem__'
ERROR: 'NoneType' object has no attribute '__getitem__'
[sdake@bigiron tools]$ nova --debug network-show demonet

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-novaclient" -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "verybadpass"}}}'

RESP: [200] {'date': 'Fri, 08 Mar 2013 19:27:39 GMT', 'transfer-encoding': 'chunked', 'content-type': 'application/json', 'vary': 'X-Auth-Token'}
RESP BODY: {"access": {"token": {"expires": "2013-03-09T19:27:39Z", "id": "f0f32afef0c747598fc28a324d95b2ae", "tenant": {"enabled": true, "description": null, "name": "admin", "id": "efa9138535674b05a2fc60329a53d690"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://localhost:8774/v1.1/efa9138535674b05a2fc60329a53d690", "region": "RegionOne", "internalURL": "http://localhost:8774/v1.1/efa9138535674b05a2fc60329a53d690", "id": "41c534b2851b4898b26a729c6872d2a3", "publicURL": "http://localhost:8774/v1.1/efa9138535674b05a2fc60329a53d690"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://localhost:9292/v1", "region": "RegionOne", "internalURL": "http://localhost:9292/v1", "id": "9cd367fb790a429cba57f081652aab98", "publicURL": "http://localhost:9292/v1"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://localhost:8000/v1", "region": "RegionOne", "internalURL": "http://localhost:8000/v1", "id": "02ddbb66627948b48f3b64d30de68b35", "publicURL": "http://localhost:8000/v1"}], "endpoints_links": [], "type": "cloudformation", "name": "heat-cfn"}, {"endpoints": [{"adminURL": "http://localhost:8776/v1/efa9138535674b05a2fc60329a53d690", "region": "RegionOne", "internalURL": "http://localhost:8776/v1/efa9138535674b05a2fc60329a53d690", "id": "d212844839ee415bb8c8223a13cf23a9", "publicURL": "http://localhost:8776/v1/efa9138535674b05a2fc60329a53d690"}], "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": [{"adminURL": "http://localhost:8773/services/Admin", "region": "RegionOne", "internalURL": "http://localhost:8773/services/Cloud", "id": "d3275f5ab49c4bb2aa7f17245b86460a", "publicURL": "http://localhost:8773/services/Cloud"}], "endpoints_links": [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://localhost:8004/v1/efa9138535674b05a2fc60329a53d690", "region": "RegionOne", "internalURL": "http://localhost:8004/v1/efa9138535674b05a2fc60329a53d690", "id": "087d0ef5d228473f8bc352dc662acafd", "publicURL": "http://localhost:8004/v1/efa9138535674b05a2fc60329a53d690"}], "endpoints_links": [], "type": "orchestration", "name": "heat"}, {"endpoints": [{"adminURL": "http://localhost:35357/v2.0", "region": "RegionOne", "internalURL": "http://localhost:5000/v2.0", "id": "27ca87deeac14544921ce71b466af097", "publicURL": "http://localhost:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "admin", "roles_links": [], "id": "75fbc1ebc82b47c29b98d64baf6b9582", "roles": [{"name": "KeystoneAdmin"}, {"name": "admin"}, {"name": "KeystoneServiceAdmin"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["a3f9b7aa600a4a928184b2a741078109", "9706404251934362b626fca58a132f19", "c7413fc8428e46e099caf5669d36451a"]}}}


REQ: curl -i http://localhost:8774/v1.1/efa9138535674b05a2fc60329a53d690/os-networks -X GET -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: f0f32afef0c747598fc28a324d95b2ae"

RESP: [200] {'date': 'Fri, 08 Mar 2013 19:27:39 GMT', 'x-compute-request-id': 'req-0dcccd06-6770-4b58-99e1-553f4b7659ee', 'content-type': 'application/json', 'content-length': '688'}
RESP BODY: {"networks": [{"bridge": "demonetbr0", "vpn_public_port": null, "dhcp_start": "10.0.0.2", "bridge_interface": null, "updated_at": timestamp(1361071767.0), "id": "b950dfa8-c974-42c9-811b-d43510d1f582", "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(1360995029.0), "host": "bigiron.broked.org", "gateway_v6": null, "netmask_v6": null, "dns1": "8.8.4.4"}]}

DEBUG (shell:732) 'NoneType' object has no attribute '__getitem__'
Traceback (most recent call last):
  File "/opt/stack/python-novaclient/novaclient/shell.py", line 729, in main
    OpenStackComputeShell().main(sys.argv[1:])
  File "/opt/stack/python-novaclient/novaclient/shell.py", line 665, in main
    args.func(self.cs, args)
  File "/opt/stack/python-novaclient/novaclient/v1_1/shell.py", line 583, in do_network_show
    network = utils.find_resource(cs.networks, args.network)
  File "/opt/stack/python-novaclient/novaclient/utils.py", line 220, in find_resource
    return manager.find(human_id=name_or_id)
  File "/opt/stack/python-novaclient/novaclient/base.py", line 176, in find
    matches = self.findall(**kwargs)
  File "/opt/stack/python-novaclient/novaclient/base.py", line 196, in findall
    for obj in self.list():
  File "/opt/stack/python-novaclient/novaclient/v1_1/networks.py", line 50, in list
    return self._list("/os-networks", "networks")
  File "/opt/stack/python-novaclient/novaclient/base.py", line 67, in _list
    data = body[response_key]
TypeError: 'NoneType' object has no attribute '__getitem__'
ERROR: 'NoneType' object has no attribute '__getitem__'


Expected results:
should work

Additional info:

Comment 1 Fedora End Of Life 2013-12-21 11:59:06 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2014-02-05 19:46:32 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.