Add network data for use with openshift deployments

Provide a network data file with only the External, InternalApi and the
Storage networks for use with OpenShift deployments.

Take out the IPv6 addresses from the network data until OpenShift can
be deployed in an IPv6 environment.

This also disables the validation for the network_data_openshift.yaml
since it expects network_data files to only add new networks to the
existing pre-defined overcloud networks and we're doing the opposite
here -- only keeping a subset of the networks.

Change-Id: I6d8c08c12ae9002e6386f26c5a8bcf70b8eda4b7
This commit is contained in:
Martin André 2018-10-29 09:57:57 +01:00
parent 1ef3efc61f
commit 306162694a
2 changed files with 79 additions and 1 deletions

View File

@ -0,0 +1,75 @@
# List of networks, used for j2 templating of enabled networks
# Supported values:
# name: Name of the network (mandatory)
# name_lower: lowercase version of name used for filenames
# (optional, defaults to name.lower())
# service_net_map_replace: if name_lower is set to a custom name this should be set
# to original default (optional). This field is only necessary when
# changing the default network names, not when adding a new custom network.
# enabled: Is the network enabled (optional, defaults to true)
# NOTE: False will use noop.yaml for unused legacy networks to support upgrades.
# vlan: vlan for the network (optional)
# vip: Enable creation of a virtual IP on this network
# ip_subnet: IP/CIDR, e.g. '' or '2001:db8:fd00:1000::/64'
# (optional, may use parameter defaults instead)
# allocation_pools: IP range list e.g. [{'start':'', 'end':''}]
# gateway_ip: gateway for the network (optional, may use parameter defaults)
# routes: Optional, list of networks that should be routed via network gateway.
# Example: [{'destination':'', 'nexthop':''}]
# A single /16 supernet route could be used for 255 smaller /24 subnets.
# ipv6_subnet: Optional, sets default IPv6 subnet if IPv4 is already defined.
# ipv6_allocation_pools: Set default IPv6 allocation pools if IPv4 allocation pools
# are already defined.
# gateway_ipv6: Set an IPv6 gateway if IPv4 gateway already defined.
# ipv6: If ip_subnet not defined, this specifies that the network is IPv6-only.
# NOTE: IP-related values set parameter defaults in templates, may be overridden,
# either by operators, or e.g in environments/network-isolation-v6.yaml where we
# set some default IPv6 addresses.
# compat_name: for existing stack you may need to override the default
# transformation for the resource's name.
# Example:
# - name Example
# vip: false
# ip_subnet: ''
# allocation_pools: [{'start': '', 'end': ''}]
# gateway_ip: ''
# To support backward compatibility, two versions of the network definitions
# will be created, network/<network>.yaml and network/<network>_v6.yaml. Only
# one of these files may be used in the deployment at a time, since the
# parameters used for configuration are the same in both files. In the
# future, this behavior may be changed to create only one file for custom
# networks. You may specify IPv6 addresses for ip_subnet, allocation_pools,
# and gateway_ip if no IPv4 addresses are used for a custom network, or set
# ipv6: true, and the network/<network>.yaml file will be configured as IPv6.
# For configuring both IPv4 and IPv6 on the same interface, use two separate
# networks, and then assign both IPs to the same interface in a custom NIC
# configuration templates.
# The ordering of the networks below will determine the order in which NICs
# are assigned in the network/config/multiple-nics templates, beginning with
# NIC2, Control Plane is always NIC1.
- name: Storage
vip: true
vlan: 30
name_lower: storage
ip_subnet: ''
allocation_pools: [{'start': '', 'end': ''}]
- name: InternalApi
name_lower: internal_api
vip: true
vlan: 20
ip_subnet: ''
allocation_pools: [{'start': '', 'end': ''}]
- name: External
vip: true
name_lower: external
vlan: 10
ip_subnet: ''
allocation_pools: [{'start': '', 'end': ''}]
gateway_ip: ''

View File

@ -1111,8 +1111,11 @@ def validate(filename, param_map):
# NOTE(hjensas): The routed network data example is very different ...
# We need to develop a more advanced validator, probably using a schema
# definition instead.
# NOTE(mandre): Same goes for the openshift network data where it
# contains only a subset of the overcloud networks.
if (filename.startswith('./network_data_') and
not filename.endswith('routed.yaml')):
not (filename.endswith('routed.yaml') or
result = validate_network_data_file(filename)
retval |= result