Esempio n. 1
0
 def _get_peer_cidrs(self, endpoint_group):
     if endpoint_group['type'] != constants.CIDR_ENDPOINT:
         raise vpnaas.WrongEndpointGroupType(
             group_type=endpoint_group['type'],
             which=endpoint_group['id'],
             expected=constants.CIDR_ENDPOINT)
     return endpoint_group['endpoints']
Esempio n. 2
0
 def _get_local_subnets(self, context, endpoint_group):
     if endpoint_group['type'] != constants.SUBNET_ENDPOINT:
         raise vpnaas.WrongEndpointGroupType(
             group_type=endpoint_group['type'],
             which=endpoint_group['id'],
             expected=constants.SUBNET_ENDPOINT)
     subnet_ids = endpoint_group['endpoints']
     return context.session.query(models_v2.Subnet).filter(
         models_v2.Subnet.id.in_(subnet_ids)).all()