简体   繁体   中英

How to Retrieve List of Servers from Rackspace via OpenStack Nova Client?

I'm trying to use the OpenStack Nova client to run operations on my Rackspace account. The closest I was able to get was this blog post. However, it doesn't seem to work now. Does anyone know how to do this? Thanks.

http://www.zippykid.com/2011/10/06/using-the-rackspace-cloud-control-panel-via-openstack-cli-tools-on-os-x-lion-and-other-unixes/

You should be able to download and install the nova command-line client to operate with any OpenStack endpoint. So a couple of things to check:

To get the client from source:

git clone https://github.com/openstack/python-novaclient
cd python-novaclient
(sudo) python setup.py install

To get the client from PyPi:

pip install python-novaclient

Make sure you're working from an OpenStack endpoint - as I last heard, not all systems at Rackspace were running over openstack. While the APIs are darned similar, they're not guaranteed to be identical.

There's a --debug option on using the nova commandline that will show you the HTTP request and response while making the calls to manage your environment that may be useful in determining what's going wrong.

I'm afraid this is getting you to where we can determine why its not working, but without a bit more detail I can't assert what's actually broken.

There is a good guide at Rackspace Blog here .

Basically, add these lines to your /etc/profile :

export OS_AUTH_SYSTEM=rackspace
export OS_REGION_NAME=IAD (or any other region you have)
export OS_PASSWORD=<YOUR_API_PASSWORD>
export OS_AUTH_URL=https://identity.api.rackspacecloud.com/v2.0/
export OS_VERSION=2.0
export OS_USERNAME=<YOUR_API_USERNAME>
export OS_TENANT_NAME=<YOU CUSTOMER ID>
export OS_SERVICE_NAME=cloudserversOpenStack

Then run:

$ nova list

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM