Ask Your Question

Adding Egress security group using nova python sdk

asked 2016-05-09 06:56:42 -0600

keerthivasanselvaraj gravatar image


I am trying to add security rules to the default group using the below command

sec_group = nova.security_groups.find(name = "default") "nova.security_group_rules.create(,ip_protocol="udp",from_port="5201",to_port="5201")"

The above command will add the Ingress rule type, and i am not able to add egress rule using the sdk. I there any way to do this.

By default It choose Custom rule type and port range (from_port and to_port). How do i create rule for a specific port.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-05-09 09:11:12 -0600

dbaxps gravatar image
edit flag offensive delete link more


Thanks man..

keerthivasanselvaraj gravatar imagekeerthivasanselvaraj ( 2016-05-09 09:37:52 -0600 )edit

The above bug mentioned about, python-openstackclient. Is there any patch for python-novaclient ?

keerthivasanselvaraj gravatar imagekeerthivasanselvaraj ( 2016-05-09 09:40:39 -0600 )edit

Better check python-neutronclient. Neutron CLI understand "--direction egress".

dbaxps gravatar imagedbaxps ( 2016-05-09 10:17:04 -0600 )edit

Thanks. I got it

keerthivasanselvaraj gravatar imagekeerthivasanselvaraj ( 2016-05-10 00:45:04 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-05-09 06:56:42 -0600

Seen: 464 times

Last updated: May 09 '16