From a0805a01542505301918cacb5db6216814c40023 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Wed, 28 Jun 2017 20:48:38 +0200 Subject: MCP: Remove all Fuel patches and plugins Chances are none of the old patches / plugins can be reused as-is, so remove all of them and prepare for the switch to MCP. Change-Id: I999927a43b438d9bda9ff118731e2af4b1fa8caa Signed-off-by: Alexandru Avadanii --- .../0010-reap.py-Support-reading-MTU-values.patch | 104 --------------------- 1 file changed, 104 deletions(-) delete mode 100644 patches/opnfv-fuel/0010-reap.py-Support-reading-MTU-values.patch (limited to 'patches/opnfv-fuel/0010-reap.py-Support-reading-MTU-values.patch') diff --git a/patches/opnfv-fuel/0010-reap.py-Support-reading-MTU-values.patch b/patches/opnfv-fuel/0010-reap.py-Support-reading-MTU-values.patch deleted file mode 100644 index c55824bd..00000000 --- a/patches/opnfv-fuel/0010-reap.py-Support-reading-MTU-values.patch +++ /dev/null @@ -1,104 +0,0 @@ --:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --: Copyright (c) 2017 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: Catalina Focsa -Date: Wed, 3 May 2017 14:53:30 +0200 -Subject: [PATCH] reap.py: Support reading MTU values - -Add an interfaces_properties list containing -mtu data for each interface - -JIRA: ARMBAND-251 - -Signed-off-by: Catalina Focsa ---- - deploy/reap.py | 34 ++++++++++++++++++++++++++++++++++ - 1 file changed, 34 insertions(+) - -diff --git a/deploy/reap.py b/deploy/reap.py -index be72918..fe6bebf 100644 ---- a/deploy/reap.py -+++ b/deploy/reap.py -@@ -143,6 +143,31 @@ class Reap(object): - interfaces[if_name] = interface - return if_name, mac - -+ def reap_properties(self, node_id, properties): -+ properties_name = None -+ node_file = glob.glob('%s/deployment_%s/%s.yaml' -+ % (self.temp_dir, self.env_id, node_id)) -+ with open(node_file[0]) as f: -+ node_config = yaml.load(f) -+ -+ interface = {'interfaces': node_config['network_scheme']['interfaces']} -+ interface_properties = {k:v for k, v in interface['interfaces'].items()} -+ -+ mtu_properties = {} -+ for k, v in interface_properties.items(): -+ if 'mtu' in v: -+ mtu_properties[k]={'mtu':v['mtu']} -+ else: -+ mtu_properties[k] = 'null' -+ interface_properties = mtu_properties -+ -+ properties_name = self.check_dict_exists(properties, interface) if properties else None -+ if not properties_name: -+ properties_name = 'interfaces_properties' -+ properties[properties_name] = interface_properties -+ return properties_name, interface_properties -+ -+ - def reap_transformation(self, node_id, roles, transformations): - main_role = 'controller' if 'controller' in roles else 'compute' - node_file = glob.glob('%s/deployment_%s/%s.yaml' -@@ -172,8 +197,10 @@ class Reap(object): - min_node = min(real_node_ids) - interfaces = {} - transformations = {} -+ properties = {} - dea_nodes = [] - dha_nodes = [] -+ properties_nodes = [] - - for real_node_id in real_node_ids: - node_id = real_node_id - min_node + 1 -@@ -185,14 +212,19 @@ class Reap(object): - dea_node = {'id': node_id, - 'role': roles} - dha_node = {'id': node_id} -+ properties_node = {'id': node_id} - if_name, mac = self.reap_interface(real_node_id, interfaces) - log('reap transformation for node %s' % real_node_id) -+ pr_name, interface_properties = self.reap_properties(real_node_id, properties) - tr_name = self.reap_transformation(real_node_id, roles, - transformations) - dea_node.update( - {'interfaces': if_name, -+ 'properties': pr_name, - 'transformations': tr_name}) - -+ properties_node.update({'interface_configuration': interface_properties}) -+ - dha_node.update( - {'pxeMac': mac if mac else None, - 'ipmiIp': None, -@@ -203,10 +235,12 @@ class Reap(object): - - dea_nodes.append(dea_node) - dha_nodes.append(dha_node) -+ properties_nodes.append(properties_node) - - self.write_yaml(self.dha_file, {'nodes': dha_nodes}, False) - self.write_yaml(self.dea_file, {'nodes': dea_nodes}) - self.write_yaml(self.dea_file, interfaces) -+ self.write_yaml(self.dea_file, {'interfaces_properties': properties_nodes}) - self.write_yaml(self.dea_file, transformations) - self.reap_fuel_node_info() - self.write_yaml(self.dha_file, {'disks': DISKS}) --- -1.9.1 -- cgit 1.2.3-korg