Enable dpdk property on interface 29/26929/1
authorMichael Polenchuk <mpolenchuk@mirantis.com>
Thu, 12 Jan 2017 09:06:54 +0000 (13:06 +0400)
committerMichael Polenchuk <mpolenchuk@mirantis.com>
Thu, 12 Jan 2017 09:14:39 +0000 (13:14 +0400)
Set dpdk property in network attributes since
interface_properties have been removed in scope of
nics-and-nodes-attributes-via-plugin blueprint.

JIRA: FUEL-243
Change-Id: I7873d3a5c738d421f64237ff41d937856012d65a
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
deploy/cloud/configure_nodes.py
deploy/config/labs/devel-pipeline/default/fuel/config/dea-pod-override.yaml
deploy/config/labs/devel-pipeline/elx/fuel/config/dea-pod-override.yaml
deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dea-pod-override.yaml
deploy/config/labs/devel-pipeline/intel-sc/fuel/config/dea-pod-override.yaml

index f9f65af..eabec39 100644 (file)
@@ -142,7 +142,8 @@ class ConfigureNodes(object):
     #   ens5:
     #   - interface_properties:
     #       dpdk:
-    #         enabled: true
+    #         enabled:
+    #           value: true
     #   - private
     #   ens6:
     #   - public
@@ -169,19 +170,19 @@ class ConfigureNodes(object):
             if interface['name'] in interface_config:
                 for prop in interface_config[interface['name']]:
                     net = {}
-                    #net name
+                    # net name
                     if isinstance(prop, six.string_types):
                         net['id'] = net_name_id[prop]
                         net['name'] = prop
                         interface['assigned_networks'].append(net)
-                    #network properties
+                    # network properties
                     elif isinstance(prop, dict):
-                        if not 'interface_properties' in prop:
-                            log('Interface configuration contain unknow dict: %s' % prop)
+                        if 'interface_properties' not in prop:
+                            log('Interface configuration contains unknown dict: %s' % prop)
                             continue
-                        interface['interface_properties'] = \
-                        self._merge_dicts(interface.get('interface_properties', {}),
-                                          prop.get('interface_properties', {}))
+                        interface['attributes'] = self._merge_dicts(
+                            interface.get('attributes', {}),
+                            prop.get('interface_properties', {}))
 
         with io.open(interface_yaml, 'w') as stream:
             yaml.dump(interfaces, stream, default_flow_style=False)
@@ -198,4 +199,3 @@ class ConfigureNodes(object):
                 continue
             result[k] = copy.deepcopy(v)
         return result
-
index 32b2cfb..852b363 100644 (file)
@@ -35,7 +35,8 @@ interfaces_dpdk:
   - private
   - interface_properties:
       dpdk:
-        enabled: true
+        enabled:
+          value: true
   ens6:
   - public
 interfaces_vlan:
index cb80e38..150d4ed 100644 (file)
@@ -35,7 +35,8 @@ interfaces_dpdk:
   - private
   - interface_properties:
       dpdk:
-        enabled: true
+        enabled:
+          value: true
   ens6:
   - public
 interfaces_vlan:
index 92cc0e6..be80b97 100644 (file)
@@ -35,7 +35,8 @@ interfaces_dpdk:
   - private
   - interface_properties:
       dpdk:
-        enabled: true
+        enabled:
+          value: true
   ens6:
   - public
 interfaces_vlan:
index ed7c63f..35a2201 100644 (file)
@@ -35,7 +35,8 @@ interfaces_dpdk:
   - private
   - interface_properties:
       dpdk:
-        enabled: true
+        enabled:
+          value: true
   ens6:
   - public
 interfaces_vlan: