openstacksdk: NotFoundException:

asked 2016-08-23 12:01:25 -0500

bdastur gravatar image

updated 2016-08-23 17:41:03 -0500

smaffulli gravatar image

Attempting to use the openstacksdk python APIs to list servers, and getting a 404 Not Found.

Here is my code:

from openstack import connection
from openstack import profile

self.profile = profile.Profile()
self.profile.set_region(self.profile.ALL, "reg1")
self.profile.set_version('identity', 3)

self.osconnection = connection.Connection(

for server in self.osconnection.compute.servers():
print "server: ", server

Exception :


ERROR: test_basic (osshell_ut.OSShellUt)
Traceback (most recent call last):
  File "", line 12, in test_basic
    res = resource.OSResource()
  File "/Users/behzad_dastur/CODE/osshellaug22/os-shell/osshell/", line 63, in __init__
    for server in self.osconnection.compute.servers():
  File "/Users/behzad_dastur/pyenvironments/osenv1/lib/python2.7/site-packages/openstack/", line 709, in list
  File "/Users/behzad_dastur/pyenvironments/osenv1/lib/python2.7/site-packages/keystoneauth1/", line 668, in get
    retval = self.request(url, 'GET', **kwargs)
  File "/Users/behzad_dastur/pyenvironments/osenv1/lib/python2.7/site-packages/openstack/", line 39, in map_exceptions_wrapper
    return func(*args, **kwargs)
  File "/Users/behzad_dastur/pyenvironments/osenv1/lib/python2.7/site-packages/openstack/", line 248, in request
    return super(Session, self).request(*args, **kwargs)
  File "/Users/behzad_dastur/pyenvironments/osenv1/lib/python2.7/site-packages/positional/", line 101, in inner
    return wrapped(*args, **kwargs)
  File "/Users/behzad_dastur/pyenvironments/osenv1/lib/python2.7/site-packages/keystoneauth1/", line 484, in request
  File "/Users/behzad_dastur/pyenvironments/osenv1/lib/python2.7/site-packages/openstack/", line 237, in get_endpoint
  File "/Users/behzad_dastur/pyenvironments/osenv1/lib/python2.7/site-packages/openstack/", line 123, in _get_endpoint_versions
    response = self.get(root_endpoint)
  File "/Users/behzad_dastur/pyenvironments/osenv1/lib/python2.7/site-packages/keystoneauth1/", line 668, in get
    retval = self.request(url, 'GET', **kwargs)
  File "/Users/behzad_dastur/pyenvironments/osenv1/lib/python2.7/site-packages/openstack/", line 46, in map_exceptions_wrapper
    http_status=e.http_status, cause=e)
NotFoundException: NotFoundException: Not Found, <html>
  <title>404 Not Found</title>
  <h1>404 Not Found</h1>
  The resource could not be found.<br /><br />



Not clear what am I missing. I can use the openstack CLI and get the server list successfully with the same rc credentials.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-08-23 17:42:35 -0500

smaffulli gravatar image

Make sure that really exists and try removing the /v3 in auth_url.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-08-23 12:01:25 -0500

Seen: 447 times

Last updated: Aug 23 '16