# limitations under the License.
import json
+import platform
from jinja2 import Environment
from cmframework.apis import cmansibleinventoryconfig
def handle(self):
usersconf = self.confman.get_users_config_handler()
+ hostsconf = self.confman.get_hosts_config_handler()
admin_user = usersconf.get_admin_user()
self.add_global_var("home_dir", "/home/" + admin_user)
all_vars = self.inventory['all']['vars']
properties = {
"capabilities": "boot_option:local",
- "cpu_arch": "x86_64",
+ "cpu_arch": platform.machine(),
"cpus": 8,
"disk_size": 40,
"ram": 16384
"virtmedia_deploy_iso": "file:///opt/images/ironic-deploy.iso",
}
+ # aarch64 platforms only support EFI bootloaders
+ if platform.machine() == 'aarch64':
+ properties["capabilities"] += ",boot_mode:uefi"
+
if utils.is_virtualized():
driver = "ssh_virtmedia"
properties["root_device"] = {"by_path": host_hdd_mapping['os']}
power["ipmi_address"] = all_vars['hosts'][host]['hwmgmt']['address']
power["ipmi_password"] = all_vars['hosts'][host]['hwmgmt']['password']
power["ipmi_username"] = all_vars['hosts'][host]['hwmgmt']['user']
+ power["ipmi_priv_level"] = hostsconf.get_hwmgmt_priv_level(host)
power["product_family"] = all_vars['hw_inventory_details'][host]['product_family']
power["vendor"] = all_vars['hw_inventory_details'][host]['vendor']