def added(self, router_key, value):
token1, token2 = self.parse_key(router_key)
if token1 and token2:
if token1 != 'floatingip':
port_id = token2
router_data = jsonutils.loads(value)
self.data.vppf.ensure_router_interface_on_host(
port_id, router_data)
if router_data.get('net_type') == 'vxlan':
self.data.add_gpe_remote_mapping(
router_data['segmentation_id'],
router_data['loopback_mac'],
router_data['gateway_ip'])
else:
floating_ip = token2
floatingip_dict = jsonutils.loads(value)
self.data.vppf.associate_floatingip(floating_ip,
floatingip_dict)
评论列表
文章目录