Add and associate security group rule with group.

Fixes: bug #1176095 #1176098
Change-Id: I254aca213ae40326ed6e9c00bc35d63ff0805c9f