aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/patches
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-10-17 18:12:25 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-10-18 22:30:22 +0000
commitf0dbe42bdb6739e30b018f4aff33d2fe75befc5a (patch)
tree039c68e9e7886e8198578973c6e6ee46f2bbedac /mcp/patches
parent0d8c30e7544a801af6303fb037dfa90ec074c8fd (diff)
[baremetal] PDF-based network config
This change extends current PDF/IDF support with: - dynamic interface / vlan definition; - dynamic interface and/or bridge allocation of installer networks on top of interfaces (physical or vlans); This allows us to drop hardcoded interface names and vlan / bridge configuration in favor of a runtime determined model based on PDF/IDF. For now, we duplicate common jinja variable definitions in each template, but this will later be moved to a common include file. JIRA: FUEL-275 Change-Id: Ia80a66dbdf898b0bd0a4fb99d069ce9ebe33fa65 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> (cherry picked from commit c360b972649028d2613fc8561899c2c8b7f71832)
Diffstat (limited to 'mcp/patches')
-rw-r--r--mcp/patches/pharos/0002-PDF-generate_config-Fix-abspath-for-j-arg.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/mcp/patches/pharos/0002-PDF-generate_config-Fix-abspath-for-j-arg.patch b/mcp/patches/pharos/0002-PDF-generate_config-Fix-abspath-for-j-arg.patch
new file mode 100644
index 000000000..da6e2166b
--- /dev/null
+++ b/mcp/patches/pharos/0002-PDF-generate_config-Fix-abspath-for-j-arg.patch
@@ -0,0 +1,39 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: Copyright (c) 2017 Mirantis Inc., Enea AB and others.
+:
+: All rights reserved. This program and the accompanying materials
+: are made available under the terms of the Apache License, Version 2.0
+: which accompanies this distribution, and is available at
+: http://www.apache.org/licenses/LICENSE-2.0
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Tue, 17 Oct 2017 18:21:07 +0200
+Subject: [PATCH] PDF: generate_config: Fix abspath for '-j' arg
+
+Change-Id: I8a9076e7965bfd2bee7d298eb8e3b11e62ae66e7
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ config/utils/generate_config.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/config/utils/generate_config.py b/config/utils/generate_config.py
+index 18af98d..22a27d3 100755
+--- a/config/utils/generate_config.py
++++ b/config/utils/generate_config.py
+@@ -38,7 +38,7 @@ def dpkg_arch(arch, to_dpkg=True):
+ else:
+ return ARCH_DPKG_TABLE[arch]
+
+-ENV = Environment(loader=FileSystemLoader('./'))
++ENV = Environment(loader=FileSystemLoader(os.path.dirname(ARGS.jinja2)))
+ ENV.filters['ipaddr_index'] = ipaddr_index
+ ENV.filters['dpkg_arch'] = dpkg_arch
+
+@@ -56,6 +56,6 @@ if os.path.exists(IDF_PATH):
+ # print(DICT)
+
+ # Render template and print generated conf to console
+-TEMPLATE = ENV.get_template(ARGS.jinja2)
++TEMPLATE = ENV.get_template(os.path.basename(ARGS.jinja2))
+ #pylint: disable=superfluous-parens
+ print(TEMPLATE.render(conf=DICT))