Merge "Add subnet property to ctlplane network for server resources"

This commit is contained in:
Zuul 2018-02-08 01:27:21 +00:00 committed by Gerrit Code Review
commit e8c37e90a4
11 changed files with 122 additions and 5 deletions

View File

@ -9,6 +9,10 @@ parameters:
replacement_policy:
type: string
default: AUTO
ControlPlaneSubnet:
default: ctlplane-subnet
description: The name of the undercloud Neutron control plane subnet
type: string
resources:
@ -16,6 +20,7 @@ resources:
type: OS::Neutron::Port
properties:
network: ctlplane
fixed_ips: [{subnet: {get_param: ControlPlaneSubnet}}]
name:
list_join:
- '-'

View File

@ -48,6 +48,10 @@ parameters:
deployment_swift_data:
type: json
default: {}
ControlPlaneSubnet:
default: ctlplane-subnet
description: The name of the undercloud Neutron control plane subnet
type: string
resources:
deployed-server:
@ -122,6 +126,7 @@ resources:
type: OS::TripleO::DeployedServer::ControlPlanePort
properties:
network: ctlplane
fixed_ips: [{subnet: {get_param: ControlPlaneSubnet}}]
name:
list_join:
- '-'

View File

@ -25,6 +25,10 @@ parameters:
description: The name of the undercloud Neutron control plane
default: ctlplane
type: string
ControlPlaneSubnet:
description: The name of the undercloud Neutron control plane subnet
default: ctlplane-subnet
type: string
FixedIPs:
description: >
Control the IP allocation for the VIP port. E.g.
@ -32,13 +36,23 @@ parameters:
default: []
type: json
conditions:
fixed_ip_not_set:
equals:
- get_param: FixedIPs
- []
resources:
VipPort:
type: OS::TripleO::Network::Ports::ControlPlaneVipPort
properties:
network: {get_param: ControlPlaneNetwork}
name: {get_param: PortName}
fixed_ips: {get_param: FixedIPs}
fixed_ips:
if:
- fixed_ip_not_set
- [{subnet: {get_param: ControlPlaneSubnet}}]
- get_param: FixedIPs
replacement_policy: AUTO
outputs:

View File

@ -24,6 +24,10 @@ parameters:
description: The name of the undercloud Neutron control plane
default: ctlplane
type: string
ControlPlaneSubnet: # Here for compatibility with ctlplane_vip.yaml
description: The name of the undercloud Neutron control plane subnet
default: ctlplane-subnet
type: string
FixedIPs: # Here for compatibility with ctlplane_vip.yaml
description: >
Control the IP allocation for the VIP port. E.g.

View File

@ -15,6 +15,10 @@ parameters:
description: The name of the undercloud Neutron control plane
default: ctlplane
type: string
ControlPlaneSubnet:
description: The name of the undercloud Neutron control plane subnet
default: ctlplane-subnet
type: string
PortName:
description: Name of the port
default: ''

View File

@ -21,6 +21,10 @@ parameters:
description: The name of the undercloud Neutron control plane
default: ctlplane
type: string
ControlPlaneSubnet: # Here for compatibility with ctlplane_vip.yaml
description: The name of the undercloud Neutron control plane subnet
default: ctlplane-subnet
type: string
FixedIPs:
description: >
Control the IP allocation for the VIP port. E.g.
@ -34,6 +38,20 @@ parameters:
default: 0
type: number
conditions:
network_is_ctlplane:
equals:
- get_param: {{network.name}}NetName
- ctlplane
fixed_ip_not_set:
equals:
- get_param: FixedIPs
- []
net_is_ctlplane_and_fixed_ip_not_set:
and:
- network_is_ctlplane
- fixed_ip_not_set
resources:
{{network.name}}Port:
@ -41,7 +59,11 @@ resources:
properties:
network: {get_param: {{network.name}}NetName}
name: {get_param: PortName}
fixed_ips: {get_param: FixedIPs}
fixed_ips:
if:
- net_is_ctlplane_and_fixed_ip_not_set
- [{subnet: {get_param: ControlPlaneSubnet}}]
- get_param: FixedIPs
replacement_policy: AUTO
outputs:

View File

@ -26,6 +26,10 @@ parameters:
description: The name of the undercloud Neutron control plane
default: ctlplane
type: string
ControlPlaneSubnet: # Here for compatibility with ctlplane_vip.yaml
description: The name of the undercloud Neutron control plane subnet
default: ctlplane-subnet
type: string
IPPool: # Set in <Role>IPs map, see environments/ips-from-pool-all.yaml
default: {}
type: json

View File

@ -25,6 +25,10 @@ parameters:
description: The name of the undercloud Neutron control plane
default: ctlplane
type: string
ControlPlaneSubnet:
description: The name of the undercloud Neutron control plane subnet
default: ctlplane-subnet
type: string
FixedIPs:
description: >
Control the IP allocation for the VIP port. E.g.
@ -32,13 +36,31 @@ parameters:
default: []
type: json
conditions:
network_is_ctlplane:
equals:
- get_param: NetworkName
- ctlplane
fixed_ip_not_set:
equals:
- get_param: FixedIPs
- []
net_is_ctlplane_and_fixed_ip_not_set:
and:
- network_is_ctlplane
- fixed_ip_not_set
resources:
VipPort:
type: OS::Neutron::Port
properties:
network: {get_param: NetworkName}
name: {get_param: PortName}
fixed_ips: {get_param: FixedIPs}
fixed_ips:
if:
- net_is_ctlplane_and_fixed_ip_not_set
- [{subnet: {get_param: ControlPlaneSubnet}}]
- get_param: FixedIPs
replacement_policy: AUTO
outputs:

View File

@ -25,6 +25,10 @@ parameters:
description: The name of the undercloud Neutron control plane
default: ctlplane
type: string
ControlPlaneSubnet:
description: The name of the undercloud Neutron control plane subnet
default: ctlplane-subnet
type: string
FixedIPs:
description: >
Control the IP allocation for the VIP port. E.g.
@ -32,13 +36,31 @@ parameters:
default: []
type: json
conditions:
network_is_ctlplane:
equals:
- get_param: NetworkName
- ctlplane
fixed_ip_not_set:
equals:
- get_param: FixedIPs
- []
net_is_ctlplane_and_fixed_ip_not_set:
and:
- network_is_ctlplane
- fixed_ip_not_set
resources:
VipPort:
type: OS::Neutron::Port
properties:
network: {get_param: NetworkName}
name: {get_param: PortName}
fixed_ips: {get_param: FixedIPs}
fixed_ips:
if:
- net_is_ctlplane_and_fixed_ip_not_set
- [{subnet: {get_param: ControlPlaneSubnet}}]
- get_param: FixedIPs
replacement_policy: AUTO
outputs:

View File

@ -94,6 +94,10 @@ parameters:
default: nic1
description: Which interface to add to the NeutronPhysicalBridge.
type: string
ControlPlaneSubnet:
description: The name of the undercloud Neutron control plane subnet
default: ctlplane-subnet
type: string
ControlFixedIPs:
default: []
description: >
@ -255,6 +259,7 @@ parameter_groups:
conditions:
add_vips_to_etc_hosts: {equals : [{get_param: AddVipsToEtcHosts}, True]}
control_fixed_ip_not_set: {equals : [{get_param: ControlFixedIPs}, []]}
resources:
@ -749,7 +754,11 @@ resources:
properties:
name: control_virtual_ip
network: {get_param: NeutronControlPlaneID}
fixed_ips: {get_param: ControlFixedIPs}
fixed_ips:
if:
- control_fixed_ip_not_set
- [{subnet: {get_param: ControlPlaneSubnet}}]
- get_param: ControlFixedIPs
replacement_policy: AUTO
RedisVirtualIP:

View File

@ -231,6 +231,11 @@ parameters:
container: overcloud-compute
object: 0
default: {}
{{role.name}}ControlPlaneSubnet:
default: ctlplane-subnet
description: |
Name of the subnet on ctlplane network for this role.
type: string
{% if role.uses_deprecated_params is defined %}
parameter_groups:
@ -310,6 +315,7 @@ resources:
key_name: {get_param: KeyName}
networks:
- network: ctlplane
subnet: {get_param: {{role.name}}ControlPlaneSubnet}
user_data_format: SOFTWARE_CONFIG
user_data: {get_resource: UserData}
name: