Hey, It looks like your service catalog is empty and that is the problem. Libcloud can't find compute endpoint in the service catalog.
There are two solutions to the problem: 1. Populate the service catalog and instruct Libcloud to find the corresponding entry with the ex_ arguments. 2. Specify ex_force_base_url argument. If you specify this argument, Libcloud skips service catalog introspection and simply hits and uses the URL you specify. On Thu, Oct 3, 2013 at 11:30 PM, Venkata Siva Satya < [email protected]> wrote: > Hi, > > I am trying to create a openstack node using local openstack provider. The > below code snippet shows the way I am creating the openstack driver. > I followed the link - > > http://ci.apache.org/projects/libcloud/docs/compute/examples.html#create-an-openstack-node-using-a-local-openstack-provider > > self.driver = get_driver(Provider.OPENSTACK) > conn = self.driver(self.user, self.key,ex_force_auth_url=' > http://192.168.216.164:5000/v2.0', ex_force_auth_version='2.0_password') > images = conn.list_images() > > But when I debugged it using pdb, I see that while executing > conn.list_images(), it is throwing the following error. > > **** LibcloudError: <LibcloudError in None 'Could not find specified > endpoint'>* > > The LIBCLOUD_DEBUG output and pdb output is as shown below. Could you > please help me with this error. > > Thanks, > Phani > > > (Pdb) pprint(vars(conn)) > {'_ex_force_api_version': 'None', > '_ex_force_auth_url': 'http://192.168.216.164:5000/v2.0', > '_ex_force_auth_version': '2.0_password', > 'api_version': None, > 'connection': <libcloud.compute.drivers.openstack.OpenStack_1_1_Connection > object at 0x2a40d50>, > 'key': 'admin', > 'secret': 'password', > 'secure': True} > (Pdb) p conn.list_images() > *** LibcloudError: <LibcloudError in None 'Could not find specified > endpoint'> > (Pdb) c > > > The LIBCLOUD_DEBUG output is as follows. > > # -------- begin 21514936 request ---------- > curl -i -X POST -H 'Host: 192.168.216.164:5000' -H 'Accept-Encoding: > gzip,deflate' -H 'X-LC-Request-ID: 21514936' -H 'Content-Type: > application/json; charset=UTF-8' -H 'Content-Length: 80' -H 'Accept: > application/json' -H 'User-Agent: libcloud/0.13.1 (OpenStack) ' > --data-binary '{"auth": {"passwordCredentials": {"username": "admin", > "password": "password"}}}' --compress > http://192.168.216.164:5000/v2.0/tokens > # -------- begin 21514936:21515656 response ---------- > HTTP/1.1 200 OK > Date: Thu, 03 Oct 2013 04:05:49 GMT > Content-Type: application/json > Content-Length: 1309 > Vary: X-Auth-Token > > {"access": {"token": {"issued_at": "2013-10-03T04:05:49.442720", "expires": > "2013-10-04T04:05:49Z", "id": > > "MIIC8QYJKoZIhvcNAQcCoIIC4jCCAt4CAQExCTAHBgUrDgMCGjCCAUcGCSqGSIb3DQEHAaCCATgEggE0eyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxMy0xMC0wM1QwNDowNTo0OS40NDI3MjAiLCAiZXhwaXJlcyI6ICIyMDEzLTEwLTA0VDA0OjA1OjQ5WiIsICJpZCI6ICJwbGFjZWhvbGRlciJ9LCAic2VydmljZUNhdGFsb2ciOiBbXSwgInVzZXIiOiB7InVzZXJuYW1lIjogImFkbWluIiwgInJvbGVzX2xpbmtzIjogW10sICJpZCI6ICJkMWQ2NTlmOTlmMzA0NDdjOTM0YzVhNWI2M2E4NTJkMyIsICJyb2xlcyI6IFtdLCAibmFtZSI6ICJhZG1pbiJ9LCAibWV0YWRhdGEiOiB7ImlzX2FkbWluIjogMCwgInJvbGVzIjogW119fX0xggGBMIIBfQIBATBcMFcxCzAJBgNVBAYTAlVTMQ4wDAYDVQQIDAVVbnNldDEOMAwGA1UEBwwFVW5zZXQxDjAMBgNVBAoMBVVuc2V0MRgwFgYDVQQDDA93d3cuZXhhbXBsZS5jb20CAQEwBwYFKw4DAhowDQYJKoZIhvcNAQEBBQAEggEAYnkp2UpdEDuGje7kulFxmg8f72saVlwkDXnrgwhmJPP5lHjbfofFYq7EBmwYFI1fdFDlzNKw321OVTQKXGPkKMMT76QEHTC1TG-7u8dShBCnDfEumykYXRWL9Qmh-Jjg0bUY41lvjhwUi7fKJxQkYZ1B1aQLAGORnKR9F9Eafvayq8gx7k74TVBas-vuWqhYS0Vk6o5VHUWhK1HNepr79Ay5cuG9CAd7UgRiaMNZXO1LIHziBZZpTA4l1Y34sfaxXdoQqfr3LJpOvViUbOs0PLOaj6fKJPMCQJA68g3c85ZEqr0HI8+qZNVXQejawyTp23vuq5Msj91NaOvgwuPdvA=="}, > "serviceCatalog": [], "user": {"username": "admin", "roles_links": [], > "id": "d1d659f99f30447c934c5a5b63a852d3", "roles": [], "name": "admin"}, > "metadata": {"is_admin": 0, "roles": []}}} >
