NSX|V: add in exclusive DHCP support
Via the configuration variable exclusive_dhcp_edge enable a tenant to create a exclusive DHCP edge. This can be global or via AZ. DocImpact Change-Id: Ia5220302114d73fa89b3f3ea86141cb3208fe885
This commit is contained in:
parent
e016bb7558
commit
c33810b865
@ -0,0 +1,8 @@
|
||||
---
|
||||
prelude: >
|
||||
Add support for exclusive DHCP edges.
|
||||
features:
|
||||
- |
|
||||
The NSX-v will now enable a tenant to deploy a exclusive DHCP edge. This
|
||||
is either via the global configuration variable ``exclusive_dhcp_edge`` or
|
||||
per AZ. By default this is disabled.
|
@ -663,6 +663,9 @@ nsxv_opts = [
|
||||
"connectivity between hosts on same network via "
|
||||
"their floating ips. If True, floating ip will "
|
||||
"be associated with all router interfaces.")),
|
||||
cfg.BoolOpt('exclusive_dhcp_edge',
|
||||
default=False,
|
||||
help=_("(Optional) Have exclusive DHCP edge per network.")),
|
||||
]
|
||||
|
||||
# define the configuration of each availability zone.
|
||||
@ -718,6 +721,9 @@ nsxv_az_opts = [
|
||||
cfg.StrOpt('dvs_id',
|
||||
help=_('(Optional) DVS MoRef ID for DVS connected to '
|
||||
'Management / Edge cluster')),
|
||||
cfg.BoolOpt('exclusive_dhcp_edge',
|
||||
default=False,
|
||||
help=_("(Optional) Have exclusive DHCP edge per network.")),
|
||||
]
|
||||
|
||||
# Register the configuration options
|
||||
|
@ -65,6 +65,7 @@ class NsxVAvailabilityZone(common_az.ConfiguredAvailabilityZone):
|
||||
self.vdn_scope_id = cfg.CONF.nsxv.vdn_scope_id
|
||||
self.dvs_id = cfg.CONF.nsxv.dvs_id
|
||||
self.edge_host_groups = cfg.CONF.nsxv.edge_host_groups
|
||||
self.exclusive_dhcp_edge = cfg.CONF.nsxv.exclusive_dhcp_edge
|
||||
|
||||
# No support for metadata per az
|
||||
self.az_metadata_support = False
|
||||
@ -121,6 +122,8 @@ class NsxVAvailabilityZone(common_az.ConfiguredAvailabilityZone):
|
||||
if not self.edge_host_groups:
|
||||
self.edge_host_groups = cfg.CONF.nsxv.edge_host_groups
|
||||
|
||||
self.exclusive_dhcp_edge = az_info.get('exclusive_dhcp_edge', False)
|
||||
|
||||
# Support for metadata per az only if configured, and different
|
||||
# from the global one
|
||||
self.mgt_net_proxy_ips = az_info.get('mgt_net_proxy_ips')
|
||||
@ -178,6 +181,7 @@ class NsxVAvailabilityZone(common_az.ConfiguredAvailabilityZone):
|
||||
self.vdn_scope_id = cfg.CONF.nsxv.vdn_scope_id
|
||||
self.dvs_id = cfg.CONF.nsxv.dvs_id
|
||||
self.edge_host_groups = cfg.CONF.nsxv.edge_host_groups
|
||||
self.exclusive_dhcp_edge = cfg.CONF.nsxv.exclusive_dhcp_edge
|
||||
|
||||
def supports_metadata(self):
|
||||
# Return True if this az has it's own metadata configuration
|
||||
|
@ -1123,8 +1123,10 @@ class EdgeManager(object):
|
||||
free_number = ((vcns_const.MAX_VNIC_NUM - 1) *
|
||||
vcns_const.MAX_TUNNEL_NUM -
|
||||
len(edge_vnic_bindings))
|
||||
# metadata internal network will use one vnic
|
||||
if free_number <= (vcns_const.MAX_TUNNEL_NUM - 1):
|
||||
# metadata internal network will use one vnic or
|
||||
# exclusive_dhcp_edge is set for the AZ
|
||||
if (free_number <= (vcns_const.MAX_TUNNEL_NUM - 1) or
|
||||
availability_zone.exclusive_dhcp_edge):
|
||||
conflict_edge_ids.append(dhcp_edge_id)
|
||||
|
||||
for net_id in conflicting_nets:
|
||||
|
Loading…
Reference in New Issue
Block a user