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

View File

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

View File

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

View File

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

View File

@ -21,6 +21,10 @@ parameters:
description: The name of the undercloud Neutron control plane description: The name of the undercloud Neutron control plane
default: ctlplane default: ctlplane
type: string 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: FixedIPs:
description: > description: >
Control the IP allocation for the VIP port. E.g. Control the IP allocation for the VIP port. E.g.
@ -34,6 +38,20 @@ parameters:
default: 0 default: 0
type: number 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: resources:
{{network.name}}Port: {{network.name}}Port:
@ -41,7 +59,11 @@ resources:
properties: properties:
network: {get_param: {{network.name}}NetName} network: {get_param: {{network.name}}NetName}
name: {get_param: PortName} 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 replacement_policy: AUTO
outputs: outputs:

View File

@ -26,6 +26,10 @@ parameters:
description: The name of the undercloud Neutron control plane description: The name of the undercloud Neutron control plane
default: ctlplane default: ctlplane
type: string 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 IPPool: # Set in <Role>IPs map, see environments/ips-from-pool-all.yaml
default: {} default: {}
type: json type: json

View File

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

View File

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

View File

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

View File

@ -231,6 +231,11 @@ parameters:
container: overcloud-compute container: overcloud-compute
object: 0 object: 0
default: {} 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 %} {% if role.uses_deprecated_params is defined %}
parameter_groups: parameter_groups:
@ -310,6 +315,7 @@ resources:
key_name: {get_param: KeyName} key_name: {get_param: KeyName}
networks: networks:
- network: ctlplane - network: ctlplane
subnet: {get_param: {{role.name}}ControlPlaneSubnet}
user_data_format: SOFTWARE_CONFIG user_data_format: SOFTWARE_CONFIG
user_data: {get_resource: UserData} user_data: {get_resource: UserData}
name: name: