Merge "Do not call remove_router_lport in remove_router_interface"
This commit is contained in:
commit
b26ee8872b
@ -1848,8 +1848,6 @@ class NvpPluginV2(db_base_plugin_v2.NeutronDbPluginV2,
|
|||||||
self.cluster, router_id, "NoSourceNatRule",
|
self.cluster, router_id, "NoSourceNatRule",
|
||||||
max_num_expected=1, min_num_expected=0,
|
max_num_expected=1, min_num_expected=0,
|
||||||
destination_ip_addresses=subnet['cidr'])
|
destination_ip_addresses=subnet['cidr'])
|
||||||
nvplib.delete_router_lport(self.cluster,
|
|
||||||
router_id, lrouter_port_id)
|
|
||||||
except NvpApiClient.ResourceNotFound:
|
except NvpApiClient.ResourceNotFound:
|
||||||
raise nvp_exc.NvpPluginException(
|
raise nvp_exc.NvpPluginException(
|
||||||
err_msg=(_("Logical router port resource %s not found "
|
err_msg=(_("Logical router port resource %s not found "
|
||||||
|
@ -7,7 +7,13 @@
|
|||||||
"_href": "/ws.v1/lswitch/%(ls_uuid)s/lport/%(uuid)s/status",
|
"_href": "/ws.v1/lswitch/%(ls_uuid)s/lport/%(uuid)s/status",
|
||||||
"_schema": "/ws.v1/schema/LogicalSwitchPortStatus"},
|
"_schema": "/ws.v1/schema/LogicalSwitchPortStatus"},
|
||||||
"LogicalSwitchConfig":
|
"LogicalSwitchConfig":
|
||||||
{"uuid": "%(ls_uuid)s"}
|
{"uuid": "%(ls_uuid)s"},
|
||||||
|
"LogicalPortAttachment":
|
||||||
|
{
|
||||||
|
"type": "%(att_type)s",
|
||||||
|
%(att_info_json)s
|
||||||
|
"schema": "/ws.v1/schema/%(att_type)s"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"tags":
|
"tags":
|
||||||
[{"scope": "q_port_id", "tag": "%(neutron_port_id)s"},
|
[{"scope": "q_port_id", "tag": "%(neutron_port_id)s"},
|
||||||
|
@ -194,6 +194,8 @@ class FakeClient:
|
|||||||
fake_lport['neutron_port_id'] = self._get_tag(fake_lport,
|
fake_lport['neutron_port_id'] = self._get_tag(fake_lport,
|
||||||
'q_port_id')
|
'q_port_id')
|
||||||
fake_lport['neutron_device_id'] = self._get_tag(fake_lport, 'vm_id')
|
fake_lport['neutron_device_id'] = self._get_tag(fake_lport, 'vm_id')
|
||||||
|
fake_lport['att_type'] = "NoAttachment"
|
||||||
|
fake_lport['att_info_json'] = ''
|
||||||
self._fake_lswitch_lport_dict[fake_lport['uuid']] = fake_lport
|
self._fake_lswitch_lport_dict[fake_lport['uuid']] = fake_lport
|
||||||
|
|
||||||
fake_lswitch = self._fake_lswitch_dict[ls_uuid]
|
fake_lswitch = self._fake_lswitch_dict[ls_uuid]
|
||||||
@ -543,6 +545,13 @@ class FakeClient:
|
|||||||
relations_2 = {}
|
relations_2 = {}
|
||||||
relations_2['LogicalPortAttachment'] = body_2
|
relations_2['LogicalPortAttachment'] = body_2
|
||||||
resource_2['_relations'] = relations_2
|
resource_2['_relations'] = relations_2
|
||||||
|
resource['peer_port_uuid'] = body_2['peer_port_uuid']
|
||||||
|
resource['att_info_json'] = (
|
||||||
|
"\"peer_port_uuid\": \"%s\"," %
|
||||||
|
resource_2['uuid'])
|
||||||
|
resource_2['att_info_json'] = (
|
||||||
|
"\"peer_port_uuid\": \"%s\"," %
|
||||||
|
body_2['peer_port_uuid'])
|
||||||
elif body_2['type'] == "L3GatewayAttachment":
|
elif body_2['type'] == "L3GatewayAttachment":
|
||||||
resource['attachment_gwsvc_uuid'] = (
|
resource['attachment_gwsvc_uuid'] = (
|
||||||
body_2['l3_gateway_service_uuid'])
|
body_2['l3_gateway_service_uuid'])
|
||||||
@ -550,6 +559,10 @@ class FakeClient:
|
|||||||
elif body_2['type'] == "L2GatewayAttachment":
|
elif body_2['type'] == "L2GatewayAttachment":
|
||||||
resource['attachment_gwsvc_uuid'] = (
|
resource['attachment_gwsvc_uuid'] = (
|
||||||
body_2['l2_gateway_service_uuid'])
|
body_2['l2_gateway_service_uuid'])
|
||||||
|
elif body_2['type'] == "VifAttachment":
|
||||||
|
resource['vif_uuid'] = body_2['vif_uuid']
|
||||||
|
resource['att_info_json'] = (
|
||||||
|
"\"vif_uuid\": \"%s\"," % body_2['vif_uuid'])
|
||||||
|
|
||||||
if not is_attachment:
|
if not is_attachment:
|
||||||
response = response_template % resource
|
response = response_template % resource
|
||||||
|
Loading…
x
Reference in New Issue
Block a user