Using the Glance CLI Tool

Asked by LaMonf on 2012-06-13


I try to install Openstack on my virtual machine using the script.

I got an error about the glance CLI tool <hich does not recognise the subcommand add !
Here is the trace of the script :

 glance add --silent-upload -A name=cirros-0.3.0-x86_64-uec-kernel is_public=true container_format=aki disk_format=aki
usage: glance [--os-username OS_USERNAME] [--os-password OS_PASSWORD]
              [--os-tenant-id OS_TENANT_ID] [--os-tenant-name OS_TENANT_NAME]
              [--os-auth-url OS_AUTH_URL] [--os-region-name OS_REGION_NAME]
              [--os-auth-token OS_AUTH_TOKEN] [--os-image-url OS_IMAGE_URL]
              [--os-image-api-version OS_IMAGE_API_VERSION]
              [--os-service-type OS_SERVICE_TYPE]
              <subcommand> ...
glance: error: argument <subcommand>: invalid choice: 'add'

I just re-install the last version of glance ....

How idea how to fix this issue ?
thanks !

Question information

English Edit question
Glance Edit question
No assignee Edit question
Last query:
Last reply:
Eoghan Glynn (eglynn) said : #1

This is because devstack uses the new python-glanceclient CLI by default instead of the legacy CLI.

The equivalent command with the new CLI would be:

  glance image-create --name cirros-0.3.0-x86_64-uec-kernel --public --container_format=aki --disk_format=aki

If you really want to use the legacy version, you call it directly from /opt/stack/glance/bin/glance. But note that this will be removed for the Folsom release so it would make sense to get used to the new CLI.

Can you help with this problem?

Provide an answer of your own, or ask LaMonf for more information if necessary.

To post a message you must log in.