Enable setting default rules for default security group

Registered by Lingxian Kong

We already have this feature in nova when using nova as security driver implementation, providing a hook mechanism to add customized rules when creating default security groups, so that we don't have to remind users to modify default security group at the first time they create instances.

But This feature has been lost when neutron is used. It's worthwhile for this useful feature to be reimplemented in neutron.

Blueprint information

Status:
Complete
Approver:
Kyle Mestery
Priority:
Undefined
Drafter:
Lingxian Kong
Direction:
Needs approval
Assignee:
Lingxian Kong
Definition:
Obsolete
Series goal:
None
Implementation:
Not started
Milestone target:
None
Completed by
Armando Migliaccio

Related branches

Sprints

Whiteboard

Nov-09-2015(armax): If someone is interested in pursuing it, this must be re-submitted according to guidelines defined in [1]

[1] http://docs.openstack.org/developer/neutron/policies/blueprints.html

-----------------

09-Jun (mestery): Please file a specification in neutron-specs for this BP. Once it's approved, we can target this to a milestone. The process for specs in neutron is outlined here: https://wiki.openstack.org/wiki/Blueprints#Neutron
2014/6/10(kong) thanks, mestery, I will propose the specification ASAP.

related nova bp: https://blueprints.launchpad.net/nova/+spec/default-rules-for-default-security-group

Gerrit topic: https://review.openstack.org/#q,topic:bp/default-rules-for-default-security-group,n,z

Addressed by: https://review.openstack.org/98966
    Enable setting default rules for default security group

Addressed by: https://review.openstack.org/99320
    Add database model for default-rules-for-default-security-group

12-Jul (wei-wang): I think get default security group rules from config is enough, since we don't change it very often. And thanks to neutron-server's stateless, we can easily restart neutron-server to get newest default security group rules without user's perception(suppose we have two neutron-server behind a load-balancer).
Besides, I think this feature is pretty important to private cloud user, since customers of private cloud "just want a vm" to ssh/rdp, provide http/https service..., administrator need to satisfy their requirements without modify code.
If @kong have no time to implement this, I'd like to do this job. :-D

Addressed by: https://review.openstack.org/200847
    Enable setting default rules for default security group

Addressed by: https://review.openstack.org/245537
    Create default sg rules when create a sg

(?)

Work Items

Work items:
Implement config read and parse module: TODO
Implement inject rules to default security group : TODO