def _get_available_nuage_policy_groups(self, vsd_mapping, vsd_filters):
        vsd_filters['externalID'] = None
        vsd_id = vsd_mapping['nuage_subnet_id']
        vsd_subnet = self.vsdclient.get_nuage_subnet_by_id(vsd_id)
        if not vsd_subnet:
            raise exceptions.VsdSubnetNotFound(id=vsd_id)

        return self.vsdclient.get_policy_groups_by_subnet(
            vsd_subnet, **vsd_filters)
Exemplo n.º 2
0
    def _get_available_nuage_floatingips(self, vsd_mapping, filters):
        vsd_filters = self.osfilters_to_vsdfilters(filters)
        vsd_id = vsd_mapping['nuage_subnet_id']
        vsd_subnet = self.vsdclient.get_subnet_or_domain_subnet_by_id(vsd_id)
        if not vsd_subnet:
            raise exceptions.VsdSubnetNotFound(id=vsd_id)
        if vsd_subnet['type'] == constants.L2DOMAIN:
            return []

        domain_id = self.vsdclient.get_router_by_domain_subnet_id(
            vsd_subnet['ID'])
        return self.vsdclient.get_nuage_domain_floatingips(
            domain_id, assigned=False, externalID=None, **vsd_filters)
Exemplo n.º 3
0
 def _get_available_nuage_policy_groups(self, vsd_mapping, vsd_filters):
     vsd_filters['externalID'] = None
     vsd_id = vsd_mapping['nuage_subnet_id']
     vsd_subnet = self.vsdclient.get_subnet_or_domain_subnet_by_id(vsd_id)
     if not vsd_subnet:
         raise exceptions.VsdSubnetNotFound(id=vsd_id)
     if vsd_subnet['type'] == constants.L2DOMAIN:
         return self.vsdclient.get_nuage_l2domain_policy_groups(
             vsd_subnet['ID'], **vsd_filters)
     else:
         domain_id = self.vsdclient.get_router_by_domain_subnet_id(
             vsd_subnet['ID'])
         return self.vsdclient.get_nuage_domain_policy_groups(
             domain_id, **vsd_filters)