- vnfc['cloud-config'] = dict()
- vnfc_cloud_config_init = True
- vnfc['cloud-config']['user-data'] = cloud_init(rift_vnfd.id, vdu)
-
- if vdu.has_field("custom_boot_data"):
- if vdu.custom_boot_data.has_field('custom_drive'):
- if vdu.custom_boot_data.custom_drive is True:
- if vnfc_cloud_config_init is False:
- vnfc['cloud-config'] = dict()
- vnfc_cloud_config_init = True
- vnfc['cloud-config']['config-drive'] = vdu.custom_boot_data.custom_drive
- if vdu.custom_boot_data.has_field('custom_meta_data'):
- if vnfc_cloud_config_init is False:
- vnfc['cloud-config'] = dict()
- vnfc_cloud_config_init = True
- vnfc['cloud-config']['meta-data'] = list()
- for metaitem in vdu.custom_boot_data.custom_meta_data:
- openmano_metaitem = dict()
- openmano_metaitem['key'] = metaitem.name
- openmano_metaitem['value'] = metaitem.value
- vnfc['cloud-config']['meta-data'].append(openmano_metaitem)
+ vnfc['boot-data'] = dict()
+ vnfc_boot_data_init = True
+ vnfc['boot-data']['user-data'] = cloud_init(rift_vnfd.id, vdu)
+
+ if vdu.has_field("supplemental_boot_data"):
+ if vdu.supplemental_boot_data.has_field('boot_data_drive'):
+ if vdu.supplemental_boot_data.boot_data_drive is True:
+ if vnfc_boot_data_init is False:
+ vnfc['boot-data'] = dict()
+ vnfc_boot_data_init = True
+ vnfc['boot-data']['boot-data-drive'] = vdu.supplemental_boot_data.boot_data_drive
+
+ if vdu.supplemental_boot_data.has_field('config_file'):
+ om_cfgfile_list = list()
+ for custom_config_file in vdu.supplemental_boot_data.config_file:
+ cfg_source = config_file_init(rift_vnfd.id, vdu, custom_config_file.source)
+ om_cfgfile_list.append({"dest":custom_config_file.dest, "content": cfg_source})
+ vnfc['boot-data']['config-files'] = om_cfgfile_list
+