One of the things I can't get used to in OpenStack is that over on side A something has a particular name and mode of access while over on side B the same thing has a different name and mode of access.
For example if you want to add some user created metadata to an instance, so that it can be identified by that info later you do something like this:
client.servers.create_server(
server['name'], image_id, flavor_id,
meta={'metering.server_group': server['owner']}
)
Later, in ceilomter, if you want to query for samples that are in that server group you can do something like this:
r, body = client.telemetry.list_samples(
'vcpus', query=('metadata.user_metadata.server_group', 'eq',
server['owner'])
)
Few things going on here:
- If you don't prepend the metadata with
metering
it won't be passed in the resource_metadata stored along with samples. - meh