Using the Glance CLI Tool

Asked by LaMonf on 2012-06-13

Hello,

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

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

[OutPut]
 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'
[/OutPut]

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

How idea how to fix this issue ?
thanks !

Question information

Language:
English Edit question
Status:
Answered
For:
Glance Edit question
Assignee:
No assignee Edit question
Last query:
2012-06-13
Last reply:
2012-06-14
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.