Exemplo n.º 1
0
    def validate(self):
        res = super(SecurityGroup, self).validate()
        if res:
            return res

        if (self.properties[self.SECURITY_GROUP_EGRESS] and
                not self.is_using_neutron()):
            raise exception.EgressRuleNotAllowed()
Exemplo n.º 2
0
    def validate(self):
        res = super(SecurityGroup, self).validate()
        if res:
            return res

        if self.properties[self.SECURITY_GROUP_EGRESS] and not \
                self.properties[self.VPC_ID]:
            raise exception.EgressRuleNotAllowed()
Exemplo n.º 3
0
    def validate(self):
        res = super(SecurityGroup, self).validate()
        if res:
            return res

        if self.properties['SecurityGroupEgress'] and not (
                self.properties['VpcId']
                and clients.neutronclient is not None):
            raise exception.EgressRuleNotAllowed()