Esempio 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()
Esempio 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()
Esempio 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()