Skip to content

Commit

Permalink
changed artifact name and processor name ti nf name from nsd
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan committed May 3, 2024
1 parent a5a480e commit 85d416b
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions src/aosm/azext_aosm/cli_handlers/onboarding_nsd_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ def _get_processor_list(self) -> list:
resource_element.properties.file_path
).absolute(),
)
# TODO: generalise for nexus in nexus ready stories
# For NSDs, we don't have the option to expose ARM template parameters. This could be supported by
# adding an 'expose_all_parameters' option to NSD input.jsonc file, as we have for NFD input files.
# For now, we prefer this simpler interface for NSDs, but we might need to revisit in the future.
Expand All @@ -115,14 +114,6 @@ def _get_processor_list(self) -> list:
)
elif resource_element.resource_element_type == "NF":
assert isinstance(resource_element.properties, NetworkFunctionPropertiesConfig)
# TODO: change artifact name and version to the nfd name and version or justify why it was this
# in the first place
# AC4 note: I couldn't find a reference in the old code, but this
# does ring a bell. Was it so the artifact manifest didn't get broken with changes to NF versions?
# I.e., you could make an NF version change in CGV, and the artifact manifest, which is immutable,
# would still be valid?
# I am concerned that if we have multiple NFs we will have clashing artifact names.
# I'm not changing the behaviour right now as it's too high risk, but we should look again here.
nfdv_object = self._get_nfdv(resource_element.properties)

# Add nfvi_type to list for creating nfvisFromSite later
Expand All @@ -131,11 +122,8 @@ def _get_processor_list(self) -> list:
self.nfvi_types.append(nfdv_object.properties.network_function_template.nfvi_type)

nfd_input = NFDInput(
# This would be the alternative if we swap from nsd name/version to nfd.
# artifact_name=resource_element.properties.name,
# artifact_version=resource_element.properties.version,
artifact_name=self.config.nsd_name,
artifact_version=self.config.nsd_version,
artifact_name=resource_element.properties.name,
artifact_version=resource_element.properties.version,
default_config={"location": self.config.location},
network_function_definition=nfdv_object,
arm_template_output_path=Path(
Expand All @@ -145,7 +133,7 @@ def _get_processor_list(self) -> list:
),
)
nfd_processor = NFDProcessor(
name=self.config.nsd_name, input_artifact=nfd_input
name=resource_element.properties.name, input_artifact=nfd_input
)
processor_list.append(nfd_processor)
else:
Expand Down

0 comments on commit 85d416b

Please sign in to comment.