diff --git a/src/aosm/azext_aosm/build_processors/vhd_processor.py b/src/aosm/azext_aosm/build_processors/vhd_processor.py index 9458b585a67..476232959cb 100644 --- a/src/aosm/azext_aosm/build_processors/vhd_processor.py +++ b/src/aosm/azext_aosm/build_processors/vhd_processor.py @@ -193,7 +193,7 @@ def generate_parameters_file(self) -> LocalFileBuilder: else: params = '{}' logger.info( - "Created parameters file for Nexus image." + "Created parameters file for VHD image." ) return LocalFileBuilder( Path( diff --git a/src/aosm/azext_aosm/cli_handlers/onboarding_core_vnf_handler.py b/src/aosm/azext_aosm/cli_handlers/onboarding_core_vnf_handler.py index 34aecd003b6..44aeef92b41 100644 --- a/src/aosm/azext_aosm/cli_handlers/onboarding_core_vnf_handler.py +++ b/src/aosm/azext_aosm/cli_handlers/onboarding_core_vnf_handler.py @@ -72,7 +72,7 @@ def _get_processor_list(self) -> List[AzureCoreArmBuildProcessor | VHDProcessor] arm_input = ArmTemplateInput( artifact_name=arm_template.artifact_name, artifact_version=arm_template.version, - default_config=None, + default_config={"imageName": self.config.nf_name + "Image"}, template_path=Path(arm_template.file_path).absolute(), ) processor_list.append( @@ -146,6 +146,9 @@ def _get_default_config(self, vhd) -> Dict[str, Any]: default_config.update({"image_hyper_v_generation": "V1"}) if vhd.image_api_version: default_config.update({"image_api_version": vhd.image_api_version}) + + # Add imageName + default_config["imageName"] = self.config.nf_name + 'Image' return default_config def _generate_type_specific_nf_application(self, processor) -> Tuple[List, List]: diff --git a/src/aosm/azext_aosm/configuration_models/onboarding_vnf_input_config.py b/src/aosm/azext_aosm/configuration_models/onboarding_vnf_input_config.py index 97f52dea77f..295affe969f 100644 --- a/src/aosm/azext_aosm/configuration_models/onboarding_vnf_input_config.py +++ b/src/aosm/azext_aosm/configuration_models/onboarding_vnf_input_config.py @@ -112,15 +112,6 @@ class OnboardingCoreVNFInputConfig(OnboardingNFDBaseInputConfig): ) }, ) - image_name_parameter: str = field( - default="", - metadata={ - "comment": ( - "The parameter name in the VM ARM template which " - "specifies the name of the image to use for the VM." - ) - }, - ) arm_templates: List[ArmTemplatePropertiesConfig] = field( default_factory=lambda: [ArmTemplatePropertiesConfig()], @@ -160,8 +151,6 @@ def sa_manifest_name(self) -> str: def validate(self): """Validate the configuration.""" super().validate() - if not self.image_name_parameter: - raise ValidationError("image_name_parameter must be set") if not self.arm_templates: raise ValidationError("arm_template must be set") if not self.vhd: @@ -177,16 +166,6 @@ def validate(self): class OnboardingNexusVNFInputConfig(OnboardingNFDBaseInputConfig): """Input configuration for onboarding VNFs.""" - image_name_parameter: str = field( - default="", - metadata={ - "comment": ( - "The parameter name in the VM ARM template which " - "specifies the name of the image to use for the VM." - ) - }, - ) - arm_templates: List[ArmTemplatePropertiesConfig] = field( default_factory=lambda: [ArmTemplatePropertiesConfig()], metadata={ @@ -226,8 +205,6 @@ def sa_manifest_name(self) -> str: def validate(self): """Validate the configuration.""" super().validate() - if not self.image_name_parameter: - raise ValidationError("image_name_parameter must be set") if not self.arm_templates: raise ValidationError("arm_template must be set") if not self.images: