+ if vduinfo.has_field('supplemental_boot_data'):
+ if vduinfo.supplemental_boot_data.has_field('custom_meta_data'):
+ for custom_meta_item in vduinfo.supplemental_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.supplemental_boot_data.has_field('config_file'):
+ for custom_config_file in vduinfo.supplemental_boot_data.config_file:
+ files[custom_config_file.dest] = custom_config_file.source
+
+ if vduinfo.supplemental_boot_data.has_field('boot_data_drive'):
+ if vduinfo.supplemental_boot_data.boot_data_drive is True:
+ config_drive = True
+