Support specification of separate IP allocation pool for Neutron

Allows us to define separate IP ranges for use by Kayobe control plane and Neutron
This commit is contained in:
Mark Goddard 2017-04-01 09:16:54 +01:00
parent 175bb0aa5e
commit 518be97adb
3 changed files with 18 additions and 2 deletions

View File

@ -78,6 +78,16 @@ def net_allocation_pool_end(context, name, inventory_hostname=None):
return net_attr(context, name, 'allocation_pool_end', inventory_hostname) return net_attr(context, name, 'allocation_pool_end', inventory_hostname)
@jinja2.contextfilter
def net_neutron_allocation_pool_start(context, name, inventory_hostname=None):
return net_attr(context, name, 'neutron_allocation_pool_start', inventory_hostname)
@jinja2.contextfilter
def net_neutron_allocation_pool_end(context, name, inventory_hostname=None):
return net_attr(context, name, 'neutron_allocation_pool_end', inventory_hostname)
@jinja2.contextfilter @jinja2.contextfilter
def net_vlan(context, name, inventory_hostname=None): def net_vlan(context, name, inventory_hostname=None):
return net_attr(context, name, 'vlan', inventory_hostname) return net_attr(context, name, 'vlan', inventory_hostname)
@ -221,6 +231,8 @@ class FilterModule(object):
'net_gateway': net_gateway, 'net_gateway': net_gateway,
'net_allocation_pool_start': net_allocation_pool_start, 'net_allocation_pool_start': net_allocation_pool_start,
'net_allocation_pool_end': net_allocation_pool_end, 'net_allocation_pool_end': net_allocation_pool_end,
'net_neutron_allocation_pool_start': net_neutron_allocation_pool_start,
'net_neutron_allocation_pool_end': net_neutron_allocation_pool_end,
'net_vlan': net_vlan, 'net_vlan': net_vlan,
'net_mtu': net_mtu, 'net_mtu': net_mtu,
'net_interface_obj': net_interface_obj, 'net_interface_obj': net_interface_obj,

View File

@ -19,5 +19,5 @@
neutron_net_subnet_name: "{{ kolla_ironic_provisioning_network }}" neutron_net_subnet_name: "{{ kolla_ironic_provisioning_network }}"
neutron_net_cidr: "{{ provision_wl_net_name | net_cidr }}" neutron_net_cidr: "{{ provision_wl_net_name | net_cidr }}"
neutron_net_gateway_ip: "{{ provision_wl_net_name | net_gateway }}" neutron_net_gateway_ip: "{{ provision_wl_net_name | net_gateway }}"
neutron_net_allocation_pool_start: "{{ provision_wl_net_name | net_allocation_pool_start }}" neutron_net_allocation_pool_start: "{{ provision_wl_net_name | net_neutron_allocation_pool_start }}"
neutron_net_allocation_pool_end: "{{ provision_wl_net_name | net_allocation_pool_end }}" neutron_net_allocation_pool_end: "{{ provision_wl_net_name | net_neutron_allocation_pool_end }}"

View File

@ -44,6 +44,8 @@
# provision_wl_net_cidr: # provision_wl_net_cidr:
# provision_wl_net_allocation_pool_start: # provision_wl_net_allocation_pool_start:
# provision_wl_net_allocation_pool_end: # provision_wl_net_allocation_pool_end:
# provision_wl_net_neutron_allocation_pool_start:
# provision_wl_net_neutron_allocation_pool_end:
# provision_wl_net_gateway: # provision_wl_net_gateway:
# provision_wl_net_vlan: # provision_wl_net_vlan:
# provision_wl_net_mtu: # provision_wl_net_mtu:
@ -64,6 +66,8 @@
# external_net_cidr: # external_net_cidr:
# external_net_allocation_pool_start: # external_net_allocation_pool_start:
# external_net_allocation_pool_end: # external_net_allocation_pool_end:
# external_net_neutron_allocation_pool_start:
# external_net_neutron_allocation_pool_end:
# external_net_gateway: # external_net_gateway:
# external_net_vlan: # external_net_vlan:
# external_net_mtu: # external_net_mtu: