Set aarch64 deploys to UEFI 29/41429/3
authorDan Radez <dradez@redhat.com>
Wed, 6 Sep 2017 17:32:47 +0000 (13:32 -0400)
committerTim Rozet <trozet@redhat.com>
Tue, 19 Sep 2017 20:24:55 +0000 (20:24 +0000)
Change-Id: I6b037ccd38fa68e5f863566a1c9a3ed4399bab84
Signed-off-by: Dan Radez <dradez@redhat.com>
apex/inventory/inventory.py
apex/overcloud/overcloud_deploy.py

index dd731a8..71f8e52 100644 (file)
@@ -48,6 +48,10 @@ class Inventory(dict):
             if 'cpus' in node:
                 node['cpu'] = node['cpus']
 
+            # aarch64 is always uefi
+            if 'arch' in node and node['arch'] == 'aarch64':
+                node['capabilities'] += ',boot_mode:uefi'
+
             for i in ('ipmi_ip', 'ipmi_pass', 'ipmi_user', 'mac_address',
                       'disk_device'):
                 if i == 'disk_device' and 'disk_device' in node.keys():
@@ -69,7 +73,6 @@ class Inventory(dict):
                                      'for non-HA baremetal deployment')
 
         if virtual:
-            self['arch'] = platform.machine()
             self['host-ip'] = '192.168.122.1'
             self['power_manager'] = \
                 'nova.virt.baremetal.virtual_power_driver.VirtualPowerManager'
index d37d73c..f7a8b95 100644 (file)
@@ -122,9 +122,9 @@ def create_deploy_cmd(ds, ns, inv, tmp_dir,
     num_control = 0
     num_compute = 0
     for node in nodes:
-        if node['capabilities'] == 'profile:control':
+        if 'profile:control' in node['capabilities']:
             num_control += 1
-        elif node['capabilities'] == 'profile:compute':
+        elif 'profile:compute' in node['capabilities']:
             num_compute += 1
         else:
             # TODO(trozet) do we want to allow capabilities to not exist?