Ask Your Question

Neutron Port Create

asked 2014-01-08 05:06:20 -0600

akilesh1597 gravatar image

I see that neutron port-create does not create a port on openvswith. Instead it only creates it in db. I would like to know what has to be done to really create a ovs port. I want a service to bind to the port I created. Below is my guess of how to solve the problem.

Correct me If I am wrong.

  1. Use Neutron port create to get mac address and fixed ip of the device
  2. Create a tap device with the mac address and assign the fixed ip to it
  3. Add the tap device to openvswitch using ovs-vsctl add-port
  4. Bind my program to the port and proceed.

If any one got any suggestion for better strategy please do let me know.

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted

answered 2014-01-08 07:21:30 -0600

Check out agent/linux/ The drivers defined here implement plug/unplug operation which do what you are trying to achieve.

edit flag offensive delete link more

answered 2014-01-09 02:15:54 -0600

gongysh gravatar image
def _ovs_add_port(self, bridge, device_name, port_id, mac_address,
    cmd = ['ovs-vsctl', '--', '--may-exist',
           'add-port', bridge, device_name]
    if internal:
        cmd += ['--', 'set', 'Interface', device_name, 'type=internal']
    cmd += ['--', 'set', 'Interface', device_name,
            'external-ids:iface-id=%s' % port_id,
            '--', 'set', 'Interface', device_name,
            '--', 'set', 'Interface', device_name,
            'external-ids:attached-mac=%s' % mac_address]
    utils.execute(cmd, self.root_helper)
edit flag offensive delete link more

answered 2014-01-12 08:15:55 -0600

salvatore-orlando gravatar image

This question has probably been answered here as well: (

edit flag offensive delete link more

answered 2014-01-12 12:38:01 -0600

akilesh1597 gravatar image

Thanks Salvatore Orlando, that solved my question.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-01-08 05:06:20 -0600

Seen: 1,673 times

Last updated: Jan 12 '14