Ask Your Question

How does horizon forward data taken in dashboard to neutron ?

asked 2013-11-11 03:40:42 -0500

updated 2014-01-22 15:12:50 -0500

Evgeny gravatar image

Hi! In the following file /opt/stack/python-neutronclient/neutronclient/

the HTTPClient class has a _cs_request method defined. I see that all the data that's entered in the dashboard passes all the way upto here. I am kinda stuck with the following line:

resp, body = self.request(*args, **kargs)

I can't find out what happens after this point. If someone could tell where this method is defined it would be very helpful. If you need more information about how we reach here, I can tell you.

Prasoon Telang

edit retag flag offensive close merge delete


It must be in the parent class, which is Http from the httplib2 module.

darragh-oreilly gravatar imagedarragh-oreilly ( 2013-11-11 04:45:56 -0500 )edit

Hello darragh-oreilly, thanks for the reply. I need another small help. *args when I run is equal to a list = ['http://<horizon_ip>:9696//v2.0/networks.json', 'POST'] and **kargs has 'body' and 'headers' as keys. Which file/method is this kargs argument sent to?

prasoontelang gravatar imageprasoontelang ( 2013-11-11 08:25:19 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2013-11-11 09:35:52 -0500

darragh-oreilly gravatar image

HTTPClient is a subclass of Http from the httplib2 module. It is the request() method in class Http that is called by _cs_request().

It passes the ReST request to the Neutron service(port 9696). If the request is to create a new network, then the request and response JSON is described here.

The method that gets called on the Neutron server depends on which plugin you are using. For the OpenvSwitch plugin it would be create_network() in neutron/plugins/openvswitch/

On the client side you can see more info by using the CLI instead of Horizon and using the --verbose argument:

$ neutron --verbose net-create net1
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2013-11-11 03:40:42 -0500

Seen: 181 times

Last updated: Nov 11 '13