#
# 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
#
#
# 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.
#
# @author: Girish Moodalbail, Oracle, Inc.
OPTS = [
"the keystone catalog")),
# Keystone V3 Password authentication plugin related options
]
"""Driver used to manage Solaris OVS VNICs.
add it as a port of OVS bridge.
TODO(gmoodalb): More methods to implement here for MITAKA??
"""
# TODO(gmoodalb): dnsmasq uses old style `ifreq', so 16 is the maximum
# length including the NUL character. If we change it to use new style
# `lifreq', then we will be able to extend the length to 32 characters.
self._neutron_client = None
if self._neutron_client:
return self._neutron_client
)
return self._neutron_client
"""Set the L3 settings for the interface using data from the port.
"""
if addrconf:
# TODO(gmoodalb): - probably take PREFIX?? for L3
"""Plug in the interface."""
return
if bridge is None:
# check if bridge exists
if network is None:
vid = None
lower_link = None
lower_link = 'ovs.vxlan1'
# For integration bridge the ovs agent will take care of
# adding the vlan id
# need to determine the bridge mapping
try:
raise
if not other_config:
msg = (_("'other_config' column in 'Open_vSwitch' OVSDB table "
"is not configured. Please configure it so that "
"lower-link can be determined for the VNICs"))
if not bridge_mappings:
msg = (_("'bridge_mappings' info is not set in 'other_config' "
"column of 'Open_vSwitch' OVSDB table. Please "
"configure it so that lower-link can be determined "
"for the VNICs"))
if phys_network not in bridge_mapping:
continue
break
else:
# TYPE_GRE and TYPE_LOCAL
# if lower_link is not set or empty, we need to fail
if not lower_link:
msg = (_("Failed to determine the lower_link for VNIC "
"%s on physical_network %s") %
if vif_type == 'binding_failed':
msg = (_('Port binding has failed for %s. Ensure that '
'correctly configured. Port will not have network '
'connectivity') % datalink_name)
if mtu:
'iface-status': 'active',
'attached-mac': mac_address})]
"""Unplug the interface."""
# remove any IP addresses on top of this datalink, otherwise we will
# get 'device busy' error while deleting the datalink
if bridge is None:
# check if bridge exists
try:
except RuntimeError as err:
(datalink_name, err))
"""Whether to use gateway IPs instead of unique IP allocations.
In each place where the DHCP agent runs, and for each subnet for
which DHCP is handling out IP addresses, the DHCP port needs -
at the Linux level - to have an IP address within that subnet.
Generally this needs to be a unique Neutron-allocated IP
address, because the subnet's underlying L2 domain is bridged
across multiple compute hosts and network nodes, and for HA
there may be multiple DHCP agents running on that same bridged
L2 domain.
but for the same network - are _not_ bridged to each other,
they do not need each to have a unique IP address. Instead
they can all share the same address from the relevant subnet.
This works, without creating any ambiguity, because those
ports are not all present on the same L2 domain, and because
no data within the network is ever sent to that address.
(DHCP requests are broadcast, and it is the network's job to
ensure that such a broadcast will reach at least one of the
available DHCP servers. DHCP responses will be sent _from_
the DHCP port address.)
Specifically, for networking backends where it makes sense,
the DHCP agent allows all DHCP ports to use the subnet's
gateway IP address, and thereby to completely avoid any unique
IP address allocation. This behaviour is selected by running
the DHCP agent with a configured interface driver whose
'use_gateway_ips' property is True.
When an operator deploys Neutron with an interface driver that
makes use_gateway_ips True, they should also ensure that a
gateway IP address is defined for each DHCP-enabled subnet,
and that the gateway IP address doesn't change during the
subnet's lifetime.
"""
return False