From 4b11912d2dc915d642d82e6da0c94e185ec66c99 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Sun, 10 Sep 2017 23:33:36 +0200 Subject: reclass, states: Parametrize runtime configuration mcpcontrol virsh network, as well as MaaS PXE network are installer specific, and not POD specific. Therefore, these should be easily parametrized without the PDF, using only installer inputs (e.g. env vars passed via Jenkins). - add new reclass class; - parametrize at runtime new reclass class based on global vars; - factor out MaaS deploy address / config using new mechanism; - parametrize at runtime virsh network definitions based on template; - add new "maas.pxe_route" sls for configuring routing on cfg01; - replace env vars with the new sls in "maas" state; NOTE: baremetal parametrization will be handled later. Change-Id: Ifd61143d818fb088b3f4395388ba769bbc49156e Signed-off-by: Alexandru Avadanii --- mcp/patches/0005-maas-module-Obtain-fabric-ID-from-CIDR.patch | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'mcp/patches') diff --git a/mcp/patches/0005-maas-module-Obtain-fabric-ID-from-CIDR.patch b/mcp/patches/0005-maas-module-Obtain-fabric-ID-from-CIDR.patch index 5c77a63da..9489b9089 100644 --- a/mcp/patches/0005-maas-module-Obtain-fabric-ID-from-CIDR.patch +++ b/mcp/patches/0005-maas-module-Obtain-fabric-ID-from-CIDR.patch @@ -20,9 +20,17 @@ Signed-off-by: Guillermo Herrero --- diff --git a/_modules/maas.py b/_modules/maas.py -index d3227ca..8a2243d 100644 --- a/_modules/maas.py +++ b/_modules/maas.py +@@ -126,6 +126,8 @@ + + def process_single(name, config_data): + self._update = False ++ if isinstance(config_data, dict) and 'name' in config_data: ++ name = config_data['name'] + try: + data = self.fill_data(name, config_data, **extra) + if data is None: @@ -198,7 +198,8 @@ def fill_data(self, name, subnet, fabrics): data = { -- cgit 1.2.3-korg