Esempio n. 1
0
def get_ofc_id(session, resource, neutron_id):
    ofc_item = get_ofc_item(session, resource, neutron_id)
    if ofc_item:
        return ofc_item.ofc_id
    else:
        raise nexc.OFCMappingNotFound(resource=resource,
                                      neutron_id=neutron_id)
Esempio n. 2
0
def get_ofc_id_lookup_both(session, resource, neutron_id):
    ofc_id = get_ofc_id(session, resource, neutron_id)
    # Lookup old style of OFC mapping table
    if not ofc_id:
        ofc_id = get_ofc_id(session, resource, neutron_id, old_style=True)
    if not ofc_id:
        raise nexc.OFCMappingNotFound(resource=resource, neutron_id=neutron_id)
    return ofc_id
Esempio n. 3
0
 def test_delete_port_for_noofcmap_ofc_port(self):
     self._test_delete_port_for_disappeared_ofc_port(
         nexc.OFCMappingNotFound(resource='port', neutron_id='port1'))