Installation of this client is very similar to the existing steps to install OpenStack clients, but I will put my methods of doing it here for quick reference.

Quick Install Steps (the TL;DR)

This will create a new directory, install the client and extensions, as well as give you a little file to start working on for the profile.

If you want to be safe use this to install into a virtualenv:

[code lang=text]
mkdir neutronclient && cd neutronclient
virtualenv –prompt='(neutronclient)' .venv
source .venv/bin/activate
pip install rackspace-neutronclient
wget http://tinyurl.com/neutron-profile
[/code]

If you don’t want to be safe and fill your system with random things:

[code lang=text]
sudo pip install rackspace-neutronclient
wget http://tinyurl.com/neutron-profile
[/code]

Make edits to the neutron-profile file you just downloaded and you should be set to go.

Installing the Client with Extensions

Assuming you’re in a virtualenv, which I highly recommend, you can just run these commands without using sudo:

[code lang=text]
pip install rackspace-neutronclient
[/code]

Using the client

Because we didn’t rename the binary installed by the package the client will still be named neutron. This may cause some issues (see Troubleshooting).

For these examples os-auth-url needs to be given.

Example: Creating a network

[code lang=text]
neutron –os-auth-url https://identity.api.rackspacecloud.com/v2.0 –os-auth-strategy rackspace –os-username USERNAME –os-password API_KEY net-create test_net_name
[/code]

Example: Listing Networks

[code lang=text]
neutron –os-auth-url https://identity.api.rackspacecloud.com/v2.0 –os-auth-strategy rackspace –os-username USERNAME –os-password API_KEY net-list
[/code]

Using the client with Environment Args

If you don’t want to pass the arguments to the client as above you may also put all that information into your environment. This is very similar to the way it works with the nova client.

Create a new file or put the following into your ~/.bash_profile:

[code lang=text]
export OS_AUTH_URL=https://identity.api.rackspacecloud.com/v2.0/
export OS_AUTH_STRATEGY=rackspace
export OS_REGION_NAME=DFW
export OS_USERNAME=<username>
export OS_TENANT_NAME=<tenant_id>
export OS_PROJECT_ID=<tenant_id>
export OS_PASSWORD=<api_key>
export OS_NO_CACHE=1
[/code]

GOTCHA: OS_AUTH_STRATEGY entry is different than OS_AUTH_SYSTEM.

Then source the file (or ~/.bash_profile). You should now be able to do the above commands like so:

Example: Creating a network

[code lang=text]
neutron net-create test_net_name
[/code]

Example: Listing Networks

[code lang=text]
neutron net-list
[/code]

Using the Client with supernova

The instructions on how to do this were taken from here. If you’ve never used supernova before:

  1. You really should
  2. You should read how to use it before continuing

So you’re a supernova expert now? Ok. You should have a .supernova file. Insert into that file a new section like so (note: this is the most of the above script without the exports):

[code lang=text]
[neutron-dfw]
OS_EXECUTABLE=neutron
OS_AUTH_URL=https://identity.api.rackspacecloud.com/v2.0/
OS_AUTH_STRATEGY=rackspace
OS_REGION_NAME=DFW
OS_USERNAME=<username>
OS_TENANT_NAME=<tenant_id>
OS_PROJECT_ID=<tenant_id>
OS_PASSWORD=<api_key>
OS_NO_CACHE=1
[/code]

The relevant part is the OS_EXECUTABLE entry.

GOTCHA: OS_AUTH_STRATEGY entry is different than OS_AUTH_SYSTEM.

You should now be able to use supernova.

Example: Creating a network

[code lang=text]
supernova neutron-dfw net-create test_net_name
[/code]

Example: Listing Networks

[code lang=text]
supernova neutron-dfw net-list
[/code]

Troubleshooting

The client is upgraded often, so if you’re running into any troubles the first thing you want to do is (prefix sudo if necessary):

[code lang=text]
pip install –upgrade rackspace-neutronclient
[/code]

Otherwise, a vast majority of the problems encountered are due to having python-neutronclient (upstream client) and rackspace-python-neutronclient (forked client) installed at the same time.

If you are having any problems first try the following and reinstall using the above instructions:

[code lang=text]
pip uninstall -y python-neutronclient
pip uninstall -y rackspace-neutronclient
pip uninstall -y rackspace-auth-neutronclientext
[/code]

When both are installed, what is happening?

Because the forked client uses the exact code as the upstream code they are placed into the site-packages (libs) in the same place. The one installed last will be what is used. Even more troublesome is that if you uninstall one of the clients you are removing code that both depend on. Always uninstall both if having problems.

Leave a Reply