Hyper-V Network Virtualization (HNV) was first introduced in Windows Hyper-V / Server 2012 and has the purpose of enabling the virtualization of Layer 2 and Layer 3 networking models. One of the HNV configuration approches is called NVGRE (Network Virtualization through GRE). Adds NVGRE related Utils and Ops class. Adds check in HyperVMechanismDriver if the given agent has NVGRE in it's reported configuration, in order to properly bind NVGRE neutron ports. Adds neutron_client implementation to fetch necessary information for NVGRE CustomerRoutes and LookupRecords. Emits ``lookup_update`` notifications when a new LookupRecord is updated. Registers HyperVNeutronAgent to ``lookup_update`` notifications and updates the given LookupRecord locally. Adds handle for ``tunnel_update`` notifications. Emits ``tunnel_update`` notification when HyperVNeutronAgent starts, in order for OpenVSwitch agents to create their own tunnels towards the agent. Implements: blueprint hyper-v-nvgre Change-Id: I8cf07770ae567ad3a1f3c906417e94133b00958c
34 lines
1016 B
Python
34 lines
1016 B
Python
# Copyright 2013 Cloudbase Solutions SRL
|
|
# All Rights Reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
# Topic for tunnel notifications between the plugin and agent
|
|
AGENT_TOPIC = 'q-agent-notifier'
|
|
|
|
TUNNEL = 'tunnel'
|
|
LOOKUP = 'lookup'
|
|
|
|
UPDATE = 'update'
|
|
|
|
# Special vlan_id value in ovs_vlan_allocations table indicating flat network
|
|
FLAT_VLAN_ID = -1
|
|
TRUNK_ENDPOINT_MODE = 5
|
|
|
|
TYPE_FLAT = 'flat'
|
|
TYPE_LOCAL = 'local'
|
|
TYPE_VLAN = 'vlan'
|
|
TYPE_NVGRE = 'gre'
|
|
|
|
IPV4_DEFAULT = '0.0.0.0'
|