if not local_vlan:
continue
net_uuid = local_vlan_map.get('net_uuid')
- if (net_uuid and net_uuid not in self.local_vlan_map
+ if (net_uuid and net_uuid not in self._local_vlan_hints
and local_vlan != DEAD_VLAN_TAG):
- segmentation_id = local_vlan_map.get('segmentation_id')
- if segmentation_id == 'None':
- # Backward compatible check when we used to store the
- # string 'None' in OVS
- segmentation_id = None
- if segmentation_id is not None:
- segmentation_id = int(segmentation_id)
- self.provision_local_vlan(local_vlan_map['net_uuid'],
- local_vlan_map['network_type'],
- local_vlan_map['physical_network'],
- segmentation_id,
- local_vlan)
+ self.available_local_vlans.remove(local_vlan)
+ self._local_vlan_hints[local_vlan_map['net_uuid']] = \
+ local_vlan
+
+ def _dispose_local_vlan_hints(self):
+ self.available_local_vlans.update(self._local_vlan_hints.values())
+ self._local_vlan_hints = {}
def setup_rpc(self):
- self.agent_id = 'ovs-agent-%s' % self.conf.host
- self.topic = topics.AGENT
self.plugin_rpc = OVSPluginApi(topics.PLUGIN)
self.sg_plugin_rpc = sg_rpc.SecurityGroupServerRpcApi(topics.PLUGIN)
self.dvr_plugin_rpc = dvr_rpc.DVRServerRpcApi(topics.PLUGIN)