This script creates a network (net1) and configures the external network. Then a router is created with its gateway is set to the external network and it is given an interface on net1. An instance is created with an nic connected to net1, and a floating IP is created and associated with the port the vm's nic is plugged into. Here is the CLI doing the same.
Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts
Thursday, 4 April 2013
Using the python-quantumclient
I was not able to find any doc except this, so I used the client source for clues on the functions/arguments and the API guide for the make-up of the request/response dictionaries.
This script creates a network (net1) and configures the external network. Then a router is created with its gateway is set to the external network and it is given an interface on net1. An instance is created with an nic connected to net1, and a floating IP is created and associated with the port the vm's nic is plugged into. Here is the CLI doing the same.
This script creates a network (net1) and configures the external network. Then a router is created with its gateway is set to the external network and it is given an interface on net1. An instance is created with an nic connected to net1, and a floating IP is created and associated with the port the vm's nic is plugged into. Here is the CLI doing the same.
Thursday, 21 March 2013
Eventlet snippets
OpenStack services use the green threads model as described here. I found an excellent explanation of Eventlet in a video by Donovan Preston. I have typed in some of the snippets he uses here.
Paste config in OpenStack
If you are new to OpenStack you may be wondering what ini files like this are all about. OpenStack services (Nova, Glance, Quantum etc) use Paste Deployment to wire up middleware like authorisation, API extensions, request rate limiting etc. It helps to have a basic knowledge of this stuff for installing and troubleshooting. This post is a simple example based on this presentation. Here I have put the various parts in different modules.