+ if vduinfo.has_field('custom_boot_data'):
+ if vduinfo.custom_boot_data.has_field('custom_meta_data'):
+ for custom_meta_item in vduinfo.custom_boot_data.custom_meta_data:
+ if custom_meta_item.data_type == "STRING":
+ metadata[custom_meta_item.name] = custom_meta_item.value
+ elif custom_meta_item.data_type == "JSON":
+ metadata[custom_meta_item.name] = tornado.escape.json_decode(custom_meta_item.value)
+ else:
+ raise OpenstackCALOperationFailure("Create-vdu operation failed. Unsupported data-type {} for custom-meta-data name {} ".format(custom_meta_item.data_type, custom_meta_item.name))
+ if vduinfo.custom_boot_data.has_field('custom_config_files'):
+ for custom_config_file in vduinfo.custom_boot_data.custom_config_files:
+ files[custom_config_file.dest] = custom_config_file.source
+
+ if vduinfo.custom_boot_data.has_field('custom_drive'):
+ if vduinfo.custom_boot_data.custom_drive is True:
+ config_drive = True
+