예제 #1
0
 def test_security_group_rule_updated(self):
     name = 'webservers'
     description = 'my webservers'
     with self.security_group(name, description) as sg:
         with self.security_group(name, description) as sg2:
             security_group_id = sg['security_group']['id']
             direction = "ingress"
             source_group_id = sg2['security_group']['id']
             protocol = 'tcp'
             port_range_min = 88
             port_range_max = 88
             with self.security_group_rule(security_group_id, direction,
                                           protocol, port_range_min,
                                           port_range_max,
                                           source_group_id=source_group_id
                                           ):
                 pass
         self.notifier.assert_has_calls(
             [call.security_groups_rule_updated(mock.ANY,
                                                [security_group_id]),
              call.security_groups_rule_updated(mock.ANY,
                                                [security_group_id])])
예제 #2
0
 def test_security_groups_rule_updated(self):
     self.rpc.security_groups_rule_updated(None, security_groups=["fake_sgid"])
     self.rpc.agent.assert_has_calls([call.security_groups_rule_updated(["fake_sgid"])])