0

I am new to openstack, trying to use Ceilometer python API to pull some data from a testbed server but I get this error I do not understand, what does it need as an endpoint?

raise exceptions.EndpointNotFound()
keystoneclient.openstack.common.apiclient.exceptions.EndpointNotFound

My code is very simple,

import ceilometerclient
import ceilometerclient.client
import ceilometerclient.v2 as c_client


OS_USERNAME="myusername"
OS_PASSWORD="mypassword"
OS_TENANT_NAME="myproject"
OS_AUTH_URL="url"

cclient = ceilometerclient.client.get_client(2, os_username=OS_USERNAME, os_password=OS_PASSWORD, os_tenant_name=OS_TENANT_NAME, os_auth_url=OS_AUTH_URL)

samples = cclient.meters.list()
for s in sample:
    print s;
    print;
Imi
  • 529
  • 2
  • 8
  • 23

1 Answers1

0

An "endpoint" simply means "the URL at which you contact a service". In OpenStack, the keystone service maintains a "catalog" of API endpoints. When you create a Ceilometer client object, it asks the service catalog for the URL of the metering service.

If this service were not listed in your Keystone catalog, you would see this error.

You can see the endpoints currently configured in your catalog by running openstack endpoint list (if you have the openstack unified client available):

$ openstack endpoint list
+------...+-----------+--------------+---------------+
| ID   ...| Region    | Service Name | Service Type  |
+------...+-----------+--------------+---------------+
| c700a...| RegionOne | myservice    | messagequeue  |
| 4bd81...| RegionOne | keystone     | identity      |
| a2e5f...| RegionOne | nova         | compute       |
| 30483...| RegionOne | heat         | orchestration |
| f4ab0...| RegionOne | neutron      | network       |
| 482d9...| RegionOne | cinder       | volume        |
| e2615...| RegionOne | myservice    | messagequeue  |
| e7ef8...| RegionOne | ceilometer   | metering      |
| 41a1d...| RegionOne | nova_ec2     | ec2           |
| 9a7b8...| RegionOne | glance       | image         |
| 5bb58...| RegionOne | cinder_v2    | volumev2      |
+------...+-----------+--------------+---------------+

If you don't have the unified client available, you can use a combination of keystone service-list and keystone endpoint-list to get the same information.

If your environment doesn't list the metering service, you probably need to follow these instructions (look for the step labelled " the Telemetry Service with the Identity Service so that other OpenStack services can locate it").

larsks
  • 277,717
  • 41
  • 399
  • 399
  • okay, I understand the url part but how can I add an endpoint to my code,OS_ENDPOIN="url" does not work, – Imi Mar 20 '15 at 10:11