aboutsummaryrefslogtreecommitdiffstats
path: root/network_data.yaml
diff options
context:
space:
mode:
authorDan Sneddon <dsneddon@redhat.com>2017-06-19 11:34:05 -0700
committerDan Sneddon <dsneddon@redhat.com>2017-07-26 11:43:12 -0700
commit6d68ce08e193043e144533b1e38b66457af1e4db (patch)
treefd5bcbcd959c85bed0915e686441a1961f2d9b44 /network_data.yaml
parentdad8c01aaa56bdaad182f65fd6c652844ab73c3e (diff)
Render isolated network templates using jinja2
This change adds templates that are used to create network and port definition templates for each network that is defined in network_data.yaml. In order to render the templates, additional fields have been added to the network_data.yaml file. If this optional data is present, it will be used to populate the default parameter values in the network template. The only required parameters in the network_data.yaml file is the network name. If the network will have IPv6 addresses, then ipv6: true must be set on the network. The existing networks have been modeled in the network_data.yaml, but until these templates are removed from the j2_excludes.yaml file they will not be generated on the fly. Any additional networks will have templates generated. This change also removes an unnecessary conditional from the networks.j2.yaml file, since InternalApiNetwork doesn't need to be reformatted as InternalNetwork (it's only used in this one file). A follow-up patch will remove the existing network definitions so all networks are created dynamically. Change-Id: If074f87494a46305c990a0ea332c7b576d3c6ed8 Depends-On: Iab8aca2f1fcaba0c8f109717a4b3068f629c9aab Partially-Implements: blueprint composable-networks
Diffstat (limited to 'network_data.yaml')
-rw-r--r--network_data.yaml37
1 files changed, 33 insertions, 4 deletions
diff --git a/network_data.yaml b/network_data.yaml
index 23c231f9..947769ae 100644
--- a/network_data.yaml
+++ b/network_data.yaml
@@ -5,30 +5,59 @@
# name: Name of the network (mandatory)
# name_lower: lowercase version of name used for filenames
# (optional, defaults to name.lower())
-# vlan: vlan for the network (optional)
-# gateway: gateway for the network (optional)
# enabled: Is the network enabled (optional, defaults to true)
+# ipv6: Does this network use IPv6 IPs? (optional, defaults to false)
+# (optional, may use parameter defaults in environment to set)
+# vlan: vlan for the network (optional)
# vip: Enable creation of a virtual IP on this network
-# [TODO] (dsneddon@redhat.com) - Enable dynamic creation of VIP ports, to support
-# VIPs on non-default networks. See https://bugs.launchpad.net/tripleo/+bug/1667104
+# [TODO] (dsneddon@redhat.com) - Enable dynamic creation of VIP ports,
+# to support VIPs on non-default networks.
+# See https://bugs.launchpad.net/tripleo/+bug/1667104
+# ip_subnet: IP/CIDR, e.g. '192.168.24.0/24' (optional, may use parameter defaults)
+# allocation_pools: IP range list e.g. [{'start':'10.0.0.4', 'end':'10.0.0.250}]
+# gateway_ip: gateway for the network (optional, may use parameter defaults)
+# NOTE: IP-related values set parameter defaults in templates, may be overridden.
+#
+# Example:
+# - name Example
+# vip: false
+# ip_subnet: '10.0.2.0/24'
+# allocation_pools: [{'start': '10.0.2.4', 'end': '10.0.2.250'}]
+# gateway_ip: '10.0.2.254'
#
+# TODO (dsneddon) remove existing templates from j2_excludes.yaml
+# and generate all templates dynamically.
+
- name: External
vip: true
name_lower: external
+ ip_subnet: '10.0.0.0/24'
+ allocation_pools: [{'start': '10.0.0.4', 'end': '10.0.0.250'}]
+ gateway_ip: '10.0.0.1'
- name: InternalApi
name_lower: internal_api
vip: true
+ ip_subnet: '172.16.2.0/24'
+ allocation_pools: [{'start': '172.16.2.4', 'end': '172.16.2.250'}]
- name: Storage
vip: true
name_lower: storage
+ ip_subnet: '172.16.1.0/24'
+ allocation_pools: [{'start': '172.16.1.4', 'end': '172.16.1.250'}]
- name: StorageMgmt
name_lower: storage_mgmt
vip: true
+ ip_subnet: '172.16.3.0/24'
+ allocation_pools: [{'start': '172.16.3.4', 'end': '172.16.3.250'}]
- name: Tenant
vip: false # Tenant network does not use VIPs
name_lower: tenant
+ ip_subnet: '172.16.0.0/24'
+ allocation_pools: [{'start': '172.16.0.4', 'end': '172.16.0.250'}]
- name: Management
# Management network is disabled by default
enabled: false
vip: false # Management network does not use VIPs
name_lower: management
+ ip_subnet: '10.0.1.0/24'
+ allocation_pools: [{'start': '10.0.1.4', 'end': '10.0.1.250'}]