diff --git a/src/aosm/README.md b/src/aosm/README.md index be26a8ecbcf..f11d8cdc6bb 100644 --- a/src/aosm/README.md +++ b/src/aosm/README.md @@ -198,17 +198,3 @@ az config set logging.enable_log_file=false ## Development Information about setting up and maintaining a development environment for this extension can be found [here](./development.md). - -## Linting -Please run mypy on your changes and fix up any issues before merging. -```bash -cd src/aosm -mypy . --ignore-missing-imports --no-namespace-packages --exclude "azext_aosm/vendored_sdks/*" -``` - -## Pipelines -The pipelines for the Azure CLI run in ADO, not in github. -To trigger a pipeline you need to create a PR against main. -Until we do the initial merge to main we don't want to have a PR to main for every code review. -Instead we have a single PR for the `add-aosm-extension` branch: https://github.com/Azure/azure-cli-extensions/pull/6426 -Once you have merged your changes to `add-aosm-extension` then look at the Azure Pipelines under https://github.com/Azure/azure-cli-extensions/pull/6426/checks, click on the link that says ` errors / warnings`. diff --git a/src/aosm/azext_aosm/_configuration.py b/src/aosm/azext_aosm/_configuration.py index 645e7897dab..58455889b7a 100644 --- a/src/aosm/azext_aosm/_configuration.py +++ b/src/aosm/azext_aosm/_configuration.py @@ -34,13 +34,9 @@ "Name of the Publisher resource you want your definition published to. " "Will be created if it does not exist." ), - "publisher_name_nsd": ( - "Name of the Publisher resource you want your design published to. " - "This should be the same as the publisher used for your NFDVs" - ), "publisher_resource_group_name_nsd": "Resource group for the Publisher resource.", "nf_name": "Name of NF definition", - "version": "Version of the NF definition", + "version": "Version of the NF definition in A.B.C format.", "acr_artifact_store_name": ( "Name of the ACR Artifact Store resource. Will be created if it does not exist." ), @@ -70,25 +66,6 @@ "nsd_version": ( "Version of the NSD to be created. This should be in the format A.B.C" ), - "network_function_definition_group_name": ( - "Existing Network Function Definition Group Name. " - "This can be created using the 'az aosm nfd' commands." - ), - "network_function_definition_version_name": ( - "Existing Network Function Definition Version Name. " - "This can be created using the 'az aosm nfd' commands." - ), - "network_function_definition_offering_location": ( - "Offering location of the Network Function Definition" - ), - "network_function_type": ( - "Type of nf in the definition. Valid values are 'cnf' or 'vnf'" - ), - "multiple_instances": ( - "Set to true or false. Whether the NSD should allow arbitrary numbers of this " - "type of NF. If set to false only a single instance will be allowed. Only " - "supported on VNFs, must be set to false on CNFs." - ), "helm_package_name": "Name of the Helm package", "path_to_chart": ( "File path of Helm Chart on local disk. Accepts .tgz, .tar or .tar.gz" @@ -123,11 +100,12 @@ @dataclass class ArtifactConfig: - # artifact.py checks for the presence of the default descriptions, change there if - # you change the descriptions. + # artifact.py checks for the presence of the default descriptions, change + # there if you change the descriptions. + artifact_name: str = DESCRIPTION_MAP["artifact_name"] file_path: Optional[str] = DESCRIPTION_MAP["file_path"] blob_sas_url: Optional[str] = DESCRIPTION_MAP["blob_sas_url"] - version: str = DESCRIPTION_MAP["artifact_version"] + version: Optional[str] = DESCRIPTION_MAP["artifact_version"] @dataclass @@ -174,8 +152,10 @@ def output_directory_for_build(self) -> Path: raise NotImplementedError("Subclass must define property") @property - def acr_manifest_name(self) -> str: - """Base class method to ensure subclasses implement this function.""" + def acr_manifest_names(self) -> List[str]: + """ + The list of ACR manifest names. + """ raise NotImplementedError("Subclass must define property") @@ -198,144 +178,15 @@ def nfdg_name(self) -> str: return f"{self.nf_name}-nfdg" @property - def acr_manifest_name(self) -> str: - """Return the ACR manifest name from the NFD name.""" - sanitized_nf_name = self.nf_name.lower().replace("_", "-") - return f"{sanitized_nf_name}-acr-manifest-{self.version.replace('.', '-')}" - - -@dataclass -class NSConfiguration(Configuration): - # pylint: disable=too-many-instance-attributes - location: str = DESCRIPTION_MAP["location"] - publisher_name: str = DESCRIPTION_MAP["publisher_name_nsd"] - publisher_resource_group_name: str = DESCRIPTION_MAP[ - "publisher_resource_group_name_nsd" - ] - acr_artifact_store_name: str = DESCRIPTION_MAP["acr_artifact_store_name"] - network_function_definition_group_name: str = DESCRIPTION_MAP[ - "network_function_definition_group_name" - ] - network_function_definition_version_name: str = DESCRIPTION_MAP[ - "network_function_definition_version_name" - ] - network_function_definition_offering_location: str = DESCRIPTION_MAP[ - "network_function_definition_offering_location" - ] - network_function_type: str = DESCRIPTION_MAP["network_function_type"] - nsdg_name: str = DESCRIPTION_MAP["nsdg_name"] - nsd_version: str = DESCRIPTION_MAP["nsd_version"] - nsdv_description: str = DESCRIPTION_MAP["nsdv_description"] - multiple_instances: Union[str, bool] = DESCRIPTION_MAP["multiple_instances"] - - def validate(self): - """Validate that all of the configuration parameters are set.""" - - # Exemption for pylint as explicitly including the empty string makes the code clearer - # pylint: disable=simplifiable-condition - - if self.location == DESCRIPTION_MAP["location"] or "": - raise ValueError("Location must be set") - if self.publisher_name == DESCRIPTION_MAP["publisher_name_nsd"] or "": - raise ValueError("Publisher name must be set") - if ( - self.publisher_resource_group_name - == DESCRIPTION_MAP["publisher_resource_group_name_nsd"] - or "" - ): - raise ValueError("Publisher resource group name must be set") - if ( - self.acr_artifact_store_name == DESCRIPTION_MAP["acr_artifact_store_name"] - or "" - ): - raise ValueError("ACR Artifact Store name must be set") - if ( - self.network_function_definition_group_name - == DESCRIPTION_MAP["network_function_definition_group_name"] - or "" - ): - raise ValueError("Network Function Definition Group name must be set") - if ( - self.network_function_definition_version_name - == DESCRIPTION_MAP["network_function_definition_version_name"] - or "" - ): - raise ValueError("Network Function Definition Version name must be set") - if ( - self.network_function_definition_offering_location - == DESCRIPTION_MAP["network_function_definition_offering_location"] - or "" - ): - raise ValueError( - "Network Function Definition Offering Location must be set" - ) - - if self.network_function_type not in [CNF, VNF]: - raise ValueError("Network Function Type must be cnf or vnf") - - if self.nsdg_name == DESCRIPTION_MAP["nsdg_name"] or "": - raise ValueError("NSDG name must be set") - - if self.nsd_version == DESCRIPTION_MAP["nsd_version"] or "": - raise ValueError("NSD Version must be set") - - if not isinstance(self.multiple_instances, bool): - raise ValueError("multiple_instances must be a boolean") - - # There is currently a NFM bug that means that multiple copies of the same NF - # cannot be deployed to the same custom location: - # https://portal.microsofticm.com/imp/v3/incidents/details/405078667/home - if self.network_function_type == CNF and self.multiple_instances: - raise ValueError("Multiple instances is not supported on CNFs.") - - @property - def output_directory_for_build(self) -> Path: - """Return the local folder for generating the bicep template to.""" - current_working_directory = os.getcwd() - return Path(f"{current_working_directory}/{NSD_OUTPUT_BICEP_PREFIX}") - - @property - def resource_element_name(self) -> str: - """Return the name of the resource element.""" - return f"{self.nsdg_name.lower()}-resource-element" - - @property - def network_function_name(self) -> str: - """Return the name of the NFVI used for the NSDV.""" - return f"{self.nsdg_name}_NF" - - @property - def acr_manifest_name(self) -> str: - """Return the ACR manifest name from the NFD name.""" - sanitised_nf_name = self.network_function_name.lower().replace("_", "-") - return ( - f"{sanitised_nf_name}-nsd-acr-manifest-{self.nsd_version.replace('.', '-')}" - ) - - @property - def nfvi_site_name(self) -> str: - """Return the name of the NFVI used for the NSDV.""" - return f"{self.nsdg_name}_NFVI" - - @property - def cg_schema_name(self) -> str: - """Return the name of the Configuration Schema used for the NSDV.""" - return f"{self.nsdg_name.replace('-', '_')}_ConfigGroupSchema" - - @property - def arm_template(self) -> ArtifactConfig: - """Return the parameters of the ARM template to be uploaded as part of the NSDV.""" - artifact = ArtifactConfig() - artifact.version = self.nsd_version - artifact.file_path = os.path.join( - self.output_directory_for_build, NF_DEFINITION_JSON_FILENAME - ) - return artifact + def acr_manifest_names(self) -> List[str]: + """ + Return the ACR manifest name from the NFD name. - @property - def arm_template_artifact_name(self) -> str: - """Return the artifact name for the ARM template.""" - return f"{self.network_function_definition_group_name}-nfd-artifact" + This is returned in a list for consistency with the NSConfiguration, where there + can be multiple ACR manifests. + """ + sanitized_nf_name = self.nf_name.lower().replace("_", "-") + return [f"{sanitized_nf_name}-acr-manifest-{self.version.replace('.', '-')}"] @dataclass @@ -473,6 +324,194 @@ def validate(self): ) +NFD_NAME = "The name of the existing Network Function Definition Group to deploy using this NSD" +NFD_VERSION = ( + "The version of the existing Network Function Definition to base this NSD on. " + "This NSD will be able to deploy any NFDV with deployment parameters compatible " + "with this version." +) +NFD_LOCATION = "The region that the NFDV is published to." +PUBLISHER_RESOURCE_GROUP = "The resource group that the publisher is hosted in." +PUBLISHER_NAME = "The name of the publisher that this NFDV is published under." +NFD_TYPE = "Type of Network Function. Valid values are 'cnf' or 'vnf'" +MULTIPLE_INSTANCES = ( + "Set to true or false. Whether the NSD should allow arbitrary numbers of this " + "type of NF. If set to false only a single instance will be allowed. Only " + "supported on VNFs, must be set to false on CNFs." +) + + +@dataclass +class NFDRETConfiguration: + """ + The configuration required for an NFDV that you want to include in an NSDV. + """ + + publisher: str = PUBLISHER_NAME + publisher_resource_group: str = PUBLISHER_RESOURCE_GROUP + name: str = NFD_NAME + version: str = NFD_VERSION + publisher_offering_location: str = NFD_LOCATION + type: str = NFD_TYPE + multiple_instances: Union[str, bool] = MULTIPLE_INSTANCES + + def validate(self) -> None: + """ + Validate the configuration passed in. + + :raises ValidationError for any invalid config + """ + if self.name == NFD_NAME: + raise ValidationError("Network function definition name must be set") + + if self.publisher == PUBLISHER_NAME: + raise ValidationError(f"Publisher name must be set for {self.name}") + + if self.publisher_resource_group == PUBLISHER_RESOURCE_GROUP: + raise ValidationError( + f"Publisher resource group name must be set for {self.name}" + ) + + if self.version == NFD_VERSION: + raise ValidationError( + f"Network function definition version must be set for {self.name}" + ) + + if self.publisher_offering_location == NFD_LOCATION: + raise ValidationError( + f"Network function definition offering location must be set, for {self.name}" + ) + + if self.type not in [CNF, VNF]: + raise ValueError( + f"Network Function Type must be cnf or vnf for {self.name}" + ) + + if not isinstance(self.multiple_instances, bool): + raise ValueError( + f"multiple_instances must be a boolean for for {self.name}" + ) + + # There is currently a NFM bug that means that multiple copies of the same NF + # cannot be deployed to the same custom location: + # https://portal.microsofticm.com/imp/v3/incidents/details/405078667/home + if self.type == CNF and self.multiple_instances: + raise ValueError("Multiple instances is not supported on CNFs.") + + @property + def build_output_folder_name(self) -> Path: + """Return the local folder for generating the bicep template to.""" + current_working_directory = os.getcwd() + return Path(current_working_directory, NSD_OUTPUT_BICEP_PREFIX) + + @property + def arm_template(self) -> ArtifactConfig: + """ + Return the parameters of the ARM template for this RET to be uploaded as part of + the NSDV. + """ + artifact = ArtifactConfig() + artifact.artifact_name = f"{self.name.lower()}_nf_artifact" + + # We want the ARM template version to match the NSD version, but we don't have + # that information here. + artifact.version = None + artifact.file_path = os.path.join( + self.build_output_folder_name, NF_DEFINITION_JSON_FILENAME + ) + return artifact + + @property + def nf_bicep_filename(self) -> str: + """Return the name of the bicep template for deploying the NFs.""" + return f"{self.name}_nf.bicep" + + @property + def resource_element_name(self) -> str: + """Return the name of the resource element.""" + artifact_name = self.arm_template.artifact_name + return f"{artifact_name}_resource_element" + + def acr_manifest_name(self, nsd_version: str) -> str: + """Return the ACR manifest name from the NFD name.""" + return ( + f"{self.name.lower().replace('_', '-')}" + f"-nf-acr-manifest-{nsd_version.replace('.', '-')}" + ) + + +@dataclass +class NSConfiguration(Configuration): + network_functions: List[NFDRETConfiguration] = field( + default_factory=lambda: [ + NFDRETConfiguration(), + ] + ) + nsdg_name: str = DESCRIPTION_MAP["nsdg_name"] + nsd_version: str = DESCRIPTION_MAP["nsd_version"] + nsdv_description: str = DESCRIPTION_MAP["nsdv_description"] + + def __post_init__(self): + """ + Covert things to the correct format. + """ + if self.network_functions and isinstance(self.network_functions[0], dict): + nf_ret_list = [ + NFDRETConfiguration(**config) for config in self.network_functions + ] + self.network_functions = nf_ret_list + + def validate(self): + # validate that all of the configuration parameters are set + + if self.location in (DESCRIPTION_MAP["location"], ""): + raise ValueError("Location must be set") + if self.publisher_name in (DESCRIPTION_MAP["publisher_name"], ""): + raise ValueError("Publisher name must be set") + if self.publisher_resource_group_name in ( + DESCRIPTION_MAP["publisher_resource_group_name_nsd"], + "", + ): + raise ValueError("Publisher resource group name must be set") + if self.acr_artifact_store_name in ( + DESCRIPTION_MAP["acr_artifact_store_name"], + "", + ): + raise ValueError("ACR Artifact Store name must be set") + if self.network_functions in ([], None): + raise ValueError(("At least one network function must be included.")) + + for configuration in self.network_functions: + configuration.validate() + if self.nsdg_name in (DESCRIPTION_MAP["nsdg_name"], ""): + raise ValueError("NSD name must be set") + if self.nsd_version in (DESCRIPTION_MAP["nsd_version"], ""): + raise ValueError("NSD Version must be set") + + @property + def output_directory_for_build(self) -> Path: + """Return the local folder for generating the bicep template to.""" + current_working_directory = os.getcwd() + return Path(current_working_directory, NSD_OUTPUT_BICEP_PREFIX) + + @property + def nfvi_site_name(self) -> str: + """Return the name of the NFVI used for the NSDV.""" + return f"{self.nsdg_name}_NFVI" + + @property + def cg_schema_name(self) -> str: + """Return the name of the Configuration Schema used for the NSDV.""" + return f"{self.nsdg_name.replace('-', '_')}_ConfigGroupSchema" + + @property + def acr_manifest_names(self) -> List[str]: + """ + The list of ACR manifest names for all the NF ARM templates. + """ + return [nf.acr_manifest_name(self.nsd_version) for nf in self.network_functions] + + def get_configuration( configuration_type: str, config_file: Optional[str] = None ) -> Configuration: diff --git a/src/aosm/azext_aosm/_help.py b/src/aosm/azext_aosm/_help.py index afb4b08f19d..9c6af2022b8 100644 --- a/src/aosm/azext_aosm/_help.py +++ b/src/aosm/azext_aosm/_help.py @@ -3,7 +3,6 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- - from knack.help_files import helps helps[ diff --git a/src/aosm/azext_aosm/_params.py b/src/aosm/azext_aosm/_params.py index c6ec0c2fbc2..8d1e79ced2b 100644 --- a/src/aosm/azext_aosm/_params.py +++ b/src/aosm/azext_aosm/_params.py @@ -111,7 +111,16 @@ def load_arguments(self: AzCommandsLoader, _): " alternative parameters." ), ) - c.argument("skip", arg_type=nf_skip_steps, help="Optional skip steps. 'bicep-publish' will skip deploying the bicep template; 'artifact-upload' will skip uploading any artifacts; 'image-upload' will skip uploading the VHD image (for VNFs) or the container images (for CNFs).") + c.argument( + "skip", + arg_type=nf_skip_steps, + help=( + "Optional skip steps. 'bicep-publish' will skip deploying the bicep " + "template; 'artifact-upload' will skip uploading any artifacts; " + "'image-upload' will skip uploading the VHD image (for VNFs) or the " + "container images (for CNFs)." + ), + ) with self.argument_context("aosm nsd") as c: c.argument( diff --git a/src/aosm/azext_aosm/custom.py b/src/aosm/azext_aosm/custom.py index fb94b5e20fe..bdc0fc754cc 100644 --- a/src/aosm/azext_aosm/custom.py +++ b/src/aosm/azext_aosm/custom.py @@ -379,8 +379,14 @@ def publish_design( deployer.deploy_nsd_from_bicep() + def _generate_nsd(config: NSConfiguration, api_clients: ApiClients, force: bool = False): """Generate a Network Service Design for the given config.""" + if config: + nsd_generator = NSDGenerator(config=config, api_clients=api_clients) + else: + raise CLIInternalError("Generate NSD called without a config file") + if os.path.exists(config.output_directory_for_build): if not force: carry_on = input( @@ -391,5 +397,5 @@ def _generate_nsd(config: NSConfiguration, api_clients: ApiClients, force: bool raise UnclassifiedUserFault("User aborted! ") shutil.rmtree(config.output_directory_for_build) - nsd_generator = NSDGenerator(api_clients, config) + nsd_generator.generate_nsd() diff --git a/src/aosm/azext_aosm/delete/delete.py b/src/aosm/azext_aosm/delete/delete.py index f1442d7c930..1bdae9d0ac2 100644 --- a/src/aosm/azext_aosm/delete/delete.py +++ b/src/aosm/azext_aosm/delete/delete.py @@ -98,8 +98,8 @@ def delete_nsd(self, force: bool = False) -> None: if not force: print( "Are you sure you want to delete the NSD Version" - f" {self.config.nsd_version}, the associated manifest" - f" {self.config.acr_manifest_name} and configuration group schema" + f" {self.config.nsd_version}, the associated manifests" + f" {self.config.acr_manifest_names} and configuration group schema" f" {self.config.cg_schema_name}?" ) print("There is no undo. Type 'delete' to confirm") @@ -172,10 +172,10 @@ def delete_artifact_manifest(self, store_type: str) -> None: if store_type == "sa": assert isinstance(self.config, VNFConfiguration) store_name = self.config.blob_artifact_store_name - manifest_name = self.config.sa_manifest_name + manifest_names = [self.config.sa_manifest_name] elif store_type == "acr": store_name = self.config.acr_artifact_store_name - manifest_name = self.config.acr_manifest_name + manifest_names = self.config.acr_manifest_names else: from azure.cli.core.azclierror import CLIInternalError @@ -183,27 +183,27 @@ def delete_artifact_manifest(self, store_type: str) -> None: "Delete artifact manifest called for invalid store type. Valid types" " are sa and acr." ) - message = ( - f"Delete Artifact manifest {manifest_name} from artifact store {store_name}" - ) - logger.debug(message) - print(message) - try: - poller = self.api_clients.aosm_client.artifact_manifests.begin_delete( - resource_group_name=self.config.publisher_resource_group_name, - publisher_name=self.config.publisher_name, - artifact_store_name=store_name, - artifact_manifest_name=manifest_name, - ) - poller.result() - print("Deleted Artifact Manifest") - except Exception: - logger.error( - "Failed to delete Artifact manifest %s from artifact store %s", - manifest_name, - store_name, - ) - raise + + for manifest_name in manifest_names: + message = f"Delete Artifact manifest {manifest_name} from artifact store {store_name}" + logger.debug(message) + print(message) + try: + poller = self.api_clients.aosm_client.artifact_manifests.begin_delete( + resource_group_name=self.config.publisher_resource_group_name, + publisher_name=self.config.publisher_name, + artifact_store_name=store_name, + artifact_manifest_name=manifest_name, + ) + poller.result() + print("Deleted Artifact Manifest") + except Exception: + logger.error( + "Failed to delete Artifact manifest %s from artifact store %s", + manifest_name, + store_name, + ) + raise def delete_nsdg(self) -> None: """Delete the NSDG.""" diff --git a/src/aosm/azext_aosm/deploy/deploy_with_arm.py b/src/aosm/azext_aosm/deploy/deploy_with_arm.py index 83ee6bc2853..02240830fff 100644 --- a/src/aosm/azext_aosm/deploy/deploy_with_arm.py +++ b/src/aosm/azext_aosm/deploy/deploy_with_arm.py @@ -3,7 +3,6 @@ # License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------- """Contains class for deploying generated definitions using ARM.""" -from dataclasses import dataclass import json import os import shutil @@ -33,7 +32,6 @@ CNF_MANIFEST_BICEP_TEMPLATE_FILENAME, DeployableResourceTypes, IMAGE_UPLOAD, - NF_DEFINITION_BICEP_FILENAME, NSD, NSD_ARTIFACT_MANIFEST_BICEP_FILENAME, NSD_BICEP_FILENAME, @@ -47,35 +45,46 @@ logger = get_logger(__name__) -@dataclass -class DeployerViaArm: +class DeployerViaArm: # pylint: disable=too-many-instance-attributes """ A class to deploy Artifact Manifests, NFDs and NSDs from bicep templates using ARM. Uses the SDK to pre-deploy less complex resources and then ARM to deploy the bicep templates. - - :param api_clients: ApiClients object for AOSM and ResourceManagement - :param config: The configuration for this NF - :param bicep_path: The path to the bicep template of the nfdv - :param parameters_json_file: path to an override file of set parameters for the nfdv - :param manifest_bicep_path: The path to the bicep template of the manifest - :param manifest_parameters_json_file: path to an override file of set parameters for - the manifest - :param skip: options to skip, either publish bicep or upload artifacts - :param cli_ctx: The CLI context. Only used with CNFs. """ - api_clients: ApiClients - resource_type: DeployableResourceTypes - config: Configuration - bicep_path: Optional[str] = None - parameters_json_file: Optional[str] = None - manifest_bicep_path: Optional[str] = None - manifest_parameters_json_file: Optional[str] = None - skip: Optional[SkipSteps] = None - cli_ctx: Optional[object] = None - - def __post_init__(self): + + def __init__( + self, + api_clients: ApiClients, + resource_type: DeployableResourceTypes, + config: Configuration, + bicep_path: Optional[str] = None, + parameters_json_file: Optional[str] = None, + manifest_bicep_path: Optional[str] = None, + manifest_parameters_json_file: Optional[str] = None, + skip: Optional[SkipSteps] = None, + cli_ctx: Optional[object] = None, + ): + """ + :param api_clients: ApiClients object for AOSM and ResourceManagement + :param config: The configuration for this NF + :param bicep_path: The path to the bicep template of the nfdv + :param parameters_json_file: path to an override file of set parameters for the nfdv + :param manifest_bicep_path: The path to the bicep template of the manifest + :param manifest_parameters_json_file: path to an override file of set parameters for + the manifest + :param skip: options to skip, either publish bicep or upload artifacts + :param cli_ctx: The CLI context. Only used with CNFs. + """ + self.api_clients = api_clients + self.resource_type = resource_type + self.config = config + self.bicep_path = bicep_path + self.parameters_json_file = parameters_json_file + self.manifest_bicep_path = manifest_bicep_path + self.manifest_parameters_json_file = manifest_parameters_json_file + self.skip = skip + self.cli_ctx = cli_ctx self.pre_deployer = PreDeployerViaSDK(self.api_clients, self.config) def deploy_nfd_from_bicep(self) -> None: @@ -117,7 +126,8 @@ def deploy_nfd_from_bicep(self) -> None: print(message) logger.info(message) logger.debug( - "Parameters used for NF definition bicep deployment: %s", self.parameters + "Parameters used for NF definition bicep deployment: %s", + self.parameters, ) self.deploy_bicep_template(bicep_path, self.parameters) @@ -150,7 +160,7 @@ def _vnfd_artifact_upload(self) -> None: self.config, self.api_clients, self.config.acr_artifact_store_name, - self.config.acr_manifest_name, + self.config.acr_manifest_names[0], ) vhd_artifact = storage_account_manifest.artifacts[0] @@ -194,7 +204,7 @@ def _cnfd_artifact_upload(self) -> None: self.config, self.api_clients, self.config.acr_artifact_store_name, - self.config.acr_manifest_name, + self.config.acr_manifest_names[0], ) artifact_dictionary = {} @@ -314,7 +324,6 @@ def construct_parameters(self) -> Dict[str, Any]: "nsDesignGroup": {"value": self.config.nsdg_name}, "nsDesignVersion": {"value": self.config.nsd_version}, "nfviSiteName": {"value": self.config.nfvi_site_name}, - "armTemplateVersion": {"value": self.config.arm_template.version}, } raise TypeError( "Unexpected config type. Expected [VNFConfiguration|CNFConfiguration|NSConfiguration]," @@ -330,7 +339,7 @@ def construct_manifest_parameters(self) -> Dict[str, Any]: "publisherName": {"value": self.config.publisher_name}, "acrArtifactStoreName": {"value": self.config.acr_artifact_store_name}, "saArtifactStoreName": {"value": self.config.blob_artifact_store_name}, - "acrManifestName": {"value": self.config.acr_manifest_name}, + "acrManifestName": {"value": self.config.acr_manifest_names[0]}, "saManifestName": {"value": self.config.sa_manifest_name}, "nfName": {"value": self.config.nf_name}, "vhdVersion": {"value": self.config.vhd.version}, @@ -342,17 +351,24 @@ def construct_manifest_parameters(self) -> Dict[str, Any]: "location": {"value": self.config.location}, "publisherName": {"value": self.config.publisher_name}, "acrArtifactStoreName": {"value": self.config.acr_artifact_store_name}, - "acrManifestName": {"value": self.config.acr_manifest_name}, + "acrManifestName": {"value": self.config.acr_manifest_names[0]}, } if self.resource_type == NSD: assert isinstance(self.config, NSConfiguration) + + arm_template_names = [ + nf.arm_template.artifact_name for nf in self.config.network_functions + ] + + # Set the artifact version to be the same as the NSD version, so that they + # don't get over written when a new NSD is published. return { "location": {"value": self.config.location}, "publisherName": {"value": self.config.publisher_name}, "acrArtifactStoreName": {"value": self.config.acr_artifact_store_name}, - "acrManifestName": {"value": self.config.acr_manifest_name}, - "armTemplateName": {"value": self.config.arm_template_artifact_name}, - "armTemplateVersion": {"value": self.config.arm_template.version}, + "acrManifestNames": {"value": self.config.acr_manifest_names}, + "armTemplateNames": {"value": arm_template_names}, + "armTemplateVersion": {"value": self.config.nsd_version}, } raise ValueError("Unknown configuration type") @@ -380,9 +396,11 @@ def deploy_nsd_from_bicep(self) -> None: if deploy_manifest_template: self.deploy_manifest_template() else: - print( - f"Artifact manifests {self.config.acr_manifest_name} already exists" + logger.debug( + "Artifact manifests %s already exist", + self.config.acr_manifest_names, ) + print("Artifact manifests already exist") message = ( f"Deploy bicep template for NSDV {self.config.nsd_version} " @@ -401,31 +419,33 @@ def deploy_nsd_from_bicep(self) -> None: print("Done") return - acr_manifest = ArtifactManifestOperator( - self.config, - self.api_clients, - self.config.acr_artifact_store_name, - self.config.acr_manifest_name, - ) - - arm_template_artifact = acr_manifest.artifacts[0] + for manifest, nf in zip( + self.config.acr_manifest_names, self.config.network_functions + ): + acr_manifest = ArtifactManifestOperator( + self.config, + self.api_clients, + self.config.acr_artifact_store_name, + manifest, + ) - # Convert the NF bicep to ARM - arm_template_artifact_json = self.convert_bicep_to_arm( - os.path.join( - self.config.output_directory_for_build, NF_DEFINITION_BICEP_FILENAME + # Convert the NF bicep to ARM + arm_template_artifact_json = self.convert_bicep_to_arm( + os.path.join( + self.config.output_directory_for_build, nf.nf_bicep_filename + ) ) - ) - assert ( - self.config.arm_template.file_path - ), "Config missing ARM template file path" - with open(self.config.arm_template.file_path, "w", encoding="utf-8") as file: - file.write(json.dumps(arm_template_artifact_json, indent=4)) + arm_template_artifact = acr_manifest.artifacts[0] - print("Uploading ARM template artifact") - arm_template_artifact.upload(self.config.arm_template) - print("Done") + # appease mypy + assert nf.arm_template.file_path, "Config missing ARM template file path" + with open(nf.arm_template.file_path, "w", encoding="utf-8") as file: + file.write(json.dumps(arm_template_artifact_json, indent=4)) + + print(f"Uploading ARM template artifact: {nf.arm_template.file_path}") + arm_template_artifact.upload(nf.arm_template) + print("Done") def deploy_manifest_template(self) -> None: """ @@ -481,6 +501,7 @@ def deploy_bicep_template( :return Any output that the template produces """ logger.info("Deploy %s", bicep_template_path) + logger.debug("Parameters: %s", parameters) arm_template_json = self.convert_bicep_to_arm(bicep_template_path) return self.validate_and_deploy_arm_template( diff --git a/src/aosm/azext_aosm/deploy/pre_deploy.py b/src/aosm/azext_aosm/deploy/pre_deploy.py index ea5147fc44d..7bc3743ae34 100644 --- a/src/aosm/azext_aosm/deploy/pre_deploy.py +++ b/src/aosm/azext_aosm/deploy/pre_deploy.py @@ -12,7 +12,6 @@ from azext_aosm._configuration import ( Configuration, - NSConfiguration, VNFConfiguration, CNFConfiguration, ) @@ -65,11 +64,6 @@ def ensure_resource_group_exists(self, resource_group_name: str) -> None: if not self.api_clients.resource_client.resource_groups.check_existence( resource_group_name ): - if isinstance(self.config, NSConfiguration): - raise AzCLIError( - f"Resource Group {resource_group_name} does not exist. Please" - " create it before running this command." - ) logger.info("RG %s not found. Create it.", resource_group_name) print(f"Creating resource group {resource_group_name}.") rg_params: ResourceGroup = ResourceGroup(location=self.config.location) @@ -110,12 +104,7 @@ def ensure_publisher_exists( f"Publisher {publisher.name} exists in resource group" f" {resource_group_name}" ) - except azure_exceptions.ResourceNotFoundError as ex: - if isinstance(self.config, NSConfiguration): - raise AzCLIError( - f"Publisher {publisher_name} does not exist. Please create it" - " before running this command." - ) from ex + except azure_exceptions.ResourceNotFoundError: # Create the publisher logger.info("Creating publisher %s if it does not exist", publisher_name) print( @@ -388,12 +377,18 @@ def do_config_artifact_manifests_exist( self, ) -> bool: """Returns True if all required manifests exist, False otherwise.""" - acr_manny_exists: bool = self.does_artifact_manifest_exist( - rg_name=self.config.publisher_resource_group_name, - publisher_name=self.config.publisher_name, - store_name=self.config.acr_artifact_store_name, - manifest_name=self.config.acr_manifest_name, - ) + all_acr_mannys_exist = True + any_acr_mannys_exist: bool = not self.config.acr_manifest_names + + for manifest in self.config.acr_manifest_names: + acr_manny_exists: bool = self.does_artifact_manifest_exist( + rg_name=self.config.publisher_resource_group_name, + publisher_name=self.config.publisher_name, + store_name=self.config.acr_artifact_store_name, + manifest_name=manifest, + ) + all_acr_mannys_exist &= acr_manny_exists + any_acr_mannys_exist |= acr_manny_exists if isinstance(self.config, VNFConfiguration): sa_manny_exists: bool = self.does_artifact_manifest_exist( @@ -402,13 +397,13 @@ def do_config_artifact_manifests_exist( store_name=self.config.blob_artifact_store_name, manifest_name=self.config.sa_manifest_name, ) - if acr_manny_exists and sa_manny_exists: + if all_acr_mannys_exist and sa_manny_exists: return True - if acr_manny_exists or sa_manny_exists: + if any_acr_mannys_exist or sa_manny_exists: raise AzCLIError( - "Only one artifact manifest exists. Cannot proceed. Please delete" - " the NFDV using `az aosm nfd delete` and start the publish again" - " from scratch." + "Only a subset of artifact manifest exists. Cannot proceed. Please delete" + " the NFDV or NSDV as appropriate using the `az aosm nfd delete` or " + "`az aosm nsd delete` command." ) return False diff --git a/src/aosm/azext_aosm/generate_nfd/cnf_nfd_generator.py b/src/aosm/azext_aosm/generate_nfd/cnf_nfd_generator.py index 16f947f72b8..d1cd1be1620 100644 --- a/src/aosm/azext_aosm/generate_nfd/cnf_nfd_generator.py +++ b/src/aosm/azext_aosm/generate_nfd/cnf_nfd_generator.py @@ -172,10 +172,8 @@ def generate_nfd(self) -> None: f"Generated NFD bicep template created in {self.output_directory}" ) print( - "Please review these templates." - "If you are happy with them, you should manually deploy your bicep " - "templates and upload your charts and images to your " - "artifact store." + "Please review these templates. When you are happy with them run " + "`az aosm nfd publish` with the same arguments." ) except InvalidTemplateError as e: raise e diff --git a/src/aosm/azext_aosm/generate_nfd/templates/cnfdefinition.bicep.j2 b/src/aosm/azext_aosm/generate_nfd/templates/cnfdefinition.bicep.j2 index 7c12e53c320..493630937bc 100644 --- a/src/aosm/azext_aosm/generate_nfd/templates/cnfdefinition.bicep.j2 +++ b/src/aosm/azext_aosm/generate_nfd/templates/cnfdefinition.bicep.j2 @@ -8,7 +8,7 @@ param publisherName string param acrArtifactStoreName string @description('Name of an existing Network Function Definition Group') param nfDefinitionGroup string -@description('The version of the NFDV you want to deploy, in format A-B-C') +@description('The version of the NFDV you want to deploy, in format A.B.C') param nfDefinitionVersion string // Created by the az aosm definition publish command before the template is deployed diff --git a/src/aosm/azext_aosm/generate_nfd/templates/vnfdefinition.bicep b/src/aosm/azext_aosm/generate_nfd/templates/vnfdefinition.bicep index 0439097e8d0..f6466ab6a06 100644 --- a/src/aosm/azext_aosm/generate_nfd/templates/vnfdefinition.bicep +++ b/src/aosm/azext_aosm/generate_nfd/templates/vnfdefinition.bicep @@ -12,7 +12,7 @@ param saArtifactStoreName string param nfName string @description('Name of an existing Network Function Definition Group') param nfDefinitionGroup string -@description('The version of the NFDV you want to deploy, in format A-B-C') +@description('The version of the NFDV you want to deploy, in format A.B.C') param nfDefinitionVersion string @description('The version that you want to name the NFM VHD artifact, in format A-B-C. e.g. 6-13-0') param vhdVersion string diff --git a/src/aosm/azext_aosm/generate_nsd/nf_ret.py b/src/aosm/azext_aosm/generate_nsd/nf_ret.py new file mode 100644 index 00000000000..8a476181d12 --- /dev/null +++ b/src/aosm/azext_aosm/generate_nsd/nf_ret.py @@ -0,0 +1,183 @@ +# -------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT +# License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------- +"""Handles the creation of a resource element template for a network function.""" + +import json + +from typing import Dict, Any, List, Union +from knack.log import get_logger + +from azext_aosm._configuration import NFDRETConfiguration +from azext_aosm.util.constants import CNF, VNF +from azext_aosm.util.management_clients import ApiClients +from azext_aosm.vendored_sdks.models import NetworkFunctionDefinitionVersion, NFVIType + + +logger = get_logger(__name__) + + +class NFRETGenerator: + """ + Represents a single network function resource element template withing an NSD. + """ + + def __init__( + self, api_clients: ApiClients, config: NFDRETConfiguration, cg_schema_name: str + ) -> None: + self.config = config + self.cg_schema_name = cg_schema_name + nfdv = self._get_nfdv(config, api_clients) + print( + f"Finding the deploy parameters for {self.config.name}:{self.config.version}" + ) + + if not nfdv.deploy_parameters: + raise NotImplementedError( + f"NFDV {self.config.name} has no deploy parameters, cannot generate NSD." + ) + self.deploy_parameters: Dict[str, Any] = json.loads(nfdv.deploy_parameters) + + self.nfd_group_name = self.config.name.replace("-", "_") + self.nfdv_parameter_name = f"{self.nfd_group_name}_nfd_version" + self.config_mapping_filename = f"{self.config.name}_config_mapping.json" + + @staticmethod + def _get_nfdv( + config: NFDRETConfiguration, api_clients + ) -> NetworkFunctionDefinitionVersion: + """Get the existing NFDV resource object.""" + print( + "Reading existing NFDV resource object " + f"{config.version} from group {config.name}" + ) + nfdv_object = api_clients.aosm_client.network_function_definition_versions.get( + resource_group_name=config.publisher_resource_group, + publisher_name=config.publisher, + network_function_definition_group_name=config.name, + network_function_definition_version_name=config.version, + ) + return nfdv_object + + @property + def config_mappings(self) -> Dict[str, Any]: + """ + Return the contents of the config mapping file for this RET. + + Output will look something like: + { + "deploymentParameters": [ + "{configurationparameters('foo_ConfigGroupSchema').bar.deploymentParameters}" + ], + "nginx_nfdg_nfd_version": "{configurationparameters('foo_ConfigGroupSchema').bar.bar_nfd_version}", + "managedIdentity": "{configurationparameters('foo_ConfigGroupSchema').managedIdentity}", + "customLocationId": "{configurationparameters('foo_ConfigGroupSchema').bar.customLocationId}" + } + """ + nf = self.config.name + + logger.debug("Create %s", self.config_mapping_filename) + + deployment_parameters: Union[ + str, List[str] + ] = f"{{configurationparameters('{self.cg_schema_name}').{nf}.deploymentParameters}}" + + if not self.config.multiple_instances: + assert isinstance(deployment_parameters, str) + deployment_parameters = [deployment_parameters] + + version_parameter = ( + f"{{configurationparameters('{self.cg_schema_name}')." + f"{nf}.{self.nfdv_parameter_name}}}" + ) + + config_mappings = { + "deploymentParameters": deployment_parameters, + self.nfdv_parameter_name: version_parameter, + "managedIdentity": f"{{configurationparameters('{self.cg_schema_name}').managedIdentity}}", + } + + if self.config.type == CNF: + config_mappings[ + "customLocationId" + ] = f"{{configurationparameters('{self.cg_schema_name}').{nf}.customLocationId}}" + + return config_mappings + + @property + def nf_bicep_substitutions(self) -> Dict[str, Any]: + """Returns the jinja2 parameters for the NF bicep template template.""" + return { + "network_function_name": self.config.name, + "publisher_name": self.config.publisher, + "network_function_definition_group_name": (self.config.name), + "network_function_definition_version_parameter": (self.nfdv_parameter_name), + "network_function_definition_offering_location": ( + self.config.publisher_offering_location + ), + # Ideally we would use the network_function_type from reading the actual + # NF, as we do for deployParameters, but the SDK currently doesn't + # support this and needs to be rebuilt to do so. + "nfvi_type": ( + NFVIType.AZURE_CORE.value # type: ignore[attr-defined] # pylint: disable=no-member + if self.config.type == VNF + else NFVIType.AZURE_ARC_KUBERNETES.value # type: ignore[attr-defined] # pylint: disable=no-member + ), + "CNF": self.config.type == CNF, + } + + @property + def config_schema_snippet(self) -> Dict[str, Any]: + """ + Return the CGS snippet for this NF. + """ + nfdv_version_description_string = ( + f"The version of the {self.config.name} " + "NFD to use. This version must be compatible with (have the same " + "parameters exposed as) " + f"{self.config.name}." + ) + + if self.config.multiple_instances: + deploy_parameters = { + "type": "array", + "items": { + "type": "object", + "properties": self.deploy_parameters["properties"], + }, + } + else: + deploy_parameters = { + "type": "object", + "properties": self.deploy_parameters["properties"], + } + + nf_schema: Dict[str, Any] = { + "type": "object", + "properties": { + "deploymentParameters": deploy_parameters, + self.nfdv_parameter_name: { + "type": "string", + "description": nfdv_version_description_string, + }, + }, + "required": ["deploymentParameters", self.nfdv_parameter_name], + } + + if self.config.type == CNF: + custom_location_description_string = ( + "The custom location ID of the ARC-Enabled AKS Cluster to deploy the CNF " + "to. Should be of the form " + "'/subscriptions/{subscriptionId}/resourcegroups" + "/{resourceGroupName}/providers/microsoft.extendedlocation/" + "customlocations/{customLocationName}'" + ) + + nf_schema["properties"]["customLocationId"] = { + "type": "string", + "description": custom_location_description_string, + } + nf_schema["required"].append("customLocationId") + + return nf_schema diff --git a/src/aosm/azext_aosm/generate_nsd/nsd_generator.py b/src/aosm/azext_aosm/generate_nsd/nsd_generator.py index 1dd2e04825d..986c26faa71 100644 --- a/src/aosm/azext_aosm/generate_nsd/nsd_generator.py +++ b/src/aosm/azext_aosm/generate_nsd/nsd_generator.py @@ -8,28 +8,24 @@ import shutil import tempfile from functools import cached_property -from typing import Any, Dict, Optional +from typing import Any, Dict from jinja2 import Template from knack.log import get_logger from azext_aosm._configuration import NSConfiguration +from azext_aosm.generate_nsd.nf_ret import NFRETGenerator from azext_aosm.util.constants import ( - CNF, CONFIG_MAPPINGS_DIR_NAME, - NF_DEFINITION_BICEP_FILENAME, NF_TEMPLATE_JINJA2_SOURCE_TEMPLATE, NSD_ARTIFACT_MANIFEST_BICEP_FILENAME, NSD_ARTIFACT_MANIFEST_SOURCE_TEMPLATE_FILENAME, - NSD_CONFIG_MAPPING_FILENAME, NSD_BICEP_FILENAME, NSD_DEFINITION_JINJA2_SOURCE_TEMPLATE, SCHEMAS_DIR_NAME, TEMPLATES_DIR_NAME, - VNF, ) from azext_aosm.util.management_clients import ApiClients -from azext_aosm.vendored_sdks.models import NetworkFunctionDefinitionVersion, NFVIType logger = get_logger(__name__) @@ -43,7 +39,7 @@ } -class NSDGenerator: +class NSDGenerator: # pylint: disable=too-few-public-methods """ NSD Generator. @@ -59,39 +55,11 @@ class NSDGenerator: def __init__(self, api_clients: ApiClients, config: NSConfiguration): self.config = config self.nsd_bicep_template_name = NSD_DEFINITION_JINJA2_SOURCE_TEMPLATE - self.nf_bicep_template_name = NF_TEMPLATE_JINJA2_SOURCE_TEMPLATE self.nsd_bicep_output_name = NSD_BICEP_FILENAME - nfdv = self._get_nfdv(config, api_clients) - print("Finding the deploy parameters of the NFDV resource") - if not nfdv.deploy_parameters: - raise NotImplementedError( - "NFDV has no deploy parameters, cannot generate NSD." - ) - self.deploy_parameters: Optional[Dict[str, Any]] = json.loads( - nfdv.deploy_parameters - ) - self.nf_type = self.config.network_function_definition_group_name.replace( - "-", "_" - ) - self.nfdv_parameter_name = f"{self.nf_type}_nfd_version" - - # pylint: disable=no-self-use - def _get_nfdv( - self, config: NSConfiguration, api_clients - ) -> NetworkFunctionDefinitionVersion: - """Get the existing NFDV resource object.""" - print( - "Reading existing NFDV resource object " - f"{config.network_function_definition_version_name} from group " - f"{config.network_function_definition_group_name}" - ) - nfdv_object = api_clients.aosm_client.network_function_definition_versions.get( - resource_group_name=config.publisher_resource_group_name, - publisher_name=config.publisher_name, - network_function_definition_group_name=config.network_function_definition_group_name, - network_function_definition_version_name=config.network_function_definition_version_name, - ) - return nfdv_object + self.nf_ret_generators = [ + NFRETGenerator(api_clients, nf_config, self.config.cg_schema_name) + for nf_config in self.config.network_functions + ] def generate_nsd(self) -> None: """Generate a NSD templates which includes an Artifact Manifest, NFDV and NF templates.""" @@ -99,16 +67,13 @@ def generate_nsd(self) -> None: # Create temporary folder. with tempfile.TemporaryDirectory() as tmpdirname: - self.tmp_folder_name = ( - tmpdirname # pylint: disable=attribute-defined-outside-init - ) - - self.create_config_group_schema_files() - self.write_nsd_manifest() - self.write_nf_bicep() - self.write_nsd_bicep() + self._write_config_group_schema_json(tmpdirname) + self._write_config_mapping_files(tmpdirname) + self._write_nsd_manifest(tmpdirname) + self._write_nf_bicep_files(tmpdirname) + self._write_nsd_bicep(tmpdirname) - self.copy_to_output_folder() + self._copy_to_output_folder(tmpdirname) print( "Generated NSD bicep templates created in" f" {self.config.output_directory_for_build}" @@ -119,21 +84,13 @@ def generate_nsd(self) -> None: ) @cached_property - def config_group_schema_dict(self) -> Dict[str, Any]: + def _config_group_schema_dict(self) -> Dict[str, Any]: """ :return: The Config Group Schema as a dictionary. - This function cannot be called before deployment parameters have been supplied. + See src/aosm/azext_aosm/tests/latest/nsd_output/*/schemas for examples of the + output from this function. """ - assert self.deploy_parameters - - nfdv_version_description_string = ( - f"The version of the {self.config.network_function_definition_group_name} " - "NFD to use. This version must be compatible with (have the same " - "parameters exposed as) " - f"{self.config.network_function_definition_version_name}." - ) - managed_identity_description_string = ( "The managed identity to use to deploy NFs within this SNS. This should " "be of the form '/subscriptions/{subscriptionId}/resourceGroups/" @@ -142,186 +99,127 @@ def config_group_schema_dict(self) -> Dict[str, Any]: "If you wish to use a system assigned identity, set this to a blank string." ) - if self.config.multiple_instances: - deploy_parameters = { - "type": "array", - "items": { - "type": "object", - "properties": self.deploy_parameters["properties"], - }, - } - else: - deploy_parameters = { - "type": "object", - "properties": self.deploy_parameters["properties"], + properties = { + nf.config.name: nf.config_schema_snippet for nf in self.nf_ret_generators + } + + properties.update( + { + "managedIdentity": { + "type": "string", + "description": managed_identity_description_string, + } } + ) + + required = [nf.config.name for nf in self.nf_ret_generators] + required.append("managedIdentity") cgs_dict: Dict[str, Any] = { "$schema": "https://json-schema.org/draft-07/schema#", "title": self.config.cg_schema_name, "type": "object", - "properties": { - self.config.network_function_definition_group_name: { - "type": "object", - "properties": { - "deploymentParameters": deploy_parameters, - self.nfdv_parameter_name: { - "type": "string", - "description": nfdv_version_description_string, - }, - }, - "required": ["deploymentParameters", self.nfdv_parameter_name], - }, - "managedIdentity": { - "type": "string", - "description": managed_identity_description_string, - }, - }, - "required": [ - self.config.network_function_definition_group_name, - "managedIdentity", - ], + "properties": properties, + "required": required, } - if self.config.network_function_type == CNF: - nf_schema = cgs_dict["properties"][ - self.config.network_function_definition_group_name - ] - custom_location_description_string = ( - "The custom location ID of the ARC-Enabled AKS Cluster to deploy the CNF " - "to. Should be of the form " - "'/subscriptions/{subscriptionId}/resourcegroups" - "/{resourceGroupName}/providers/microsoft.extendedlocation/" - "customlocations/{customLocationName}'" - ) - - nf_schema["properties"]["customLocationId"] = { - "type": "string", - "description": custom_location_description_string, - } - nf_schema["required"].append("customLocationId") - return cgs_dict - def create_config_group_schema_files(self) -> None: - """Create the Schema and configMappings json files.""" - temp_schemas_folder_path = os.path.join(self.tmp_folder_name, SCHEMAS_DIR_NAME) + def _write_config_group_schema_json(self, output_directory) -> None: + """Create a file containing the json schema for the CGS.""" + temp_schemas_folder_path = os.path.join(output_directory, SCHEMAS_DIR_NAME) os.mkdir(temp_schemas_folder_path) - self.write_schema(temp_schemas_folder_path) - - temp_mappings_folder_path = os.path.join( - self.tmp_folder_name, CONFIG_MAPPINGS_DIR_NAME - ) - os.mkdir(temp_mappings_folder_path) - self.write_config_mappings(temp_mappings_folder_path) - - def write_schema(self, folder_path: str) -> None: - """ - Write out the NSD Config Group Schema JSON file. - :param folder_path: The folder to put this file in. - """ logger.debug("Create %s.json", self.config.cg_schema_name) - schema_path = os.path.join(folder_path, f"{self.config.cg_schema_name}.json") + schema_path = os.path.join( + temp_schemas_folder_path, f"{self.config.cg_schema_name}.json" + ) with open(schema_path, "w", encoding="utf-8") as _file: - _file.write(json.dumps(self.config_group_schema_dict, indent=4)) + _file.write(json.dumps(self._config_group_schema_dict, indent=4)) logger.debug("%s created", schema_path) - def write_config_mappings(self, folder_path: str) -> None: + def _write_config_mapping_files(self, output_directory) -> None: """ - Write out the NSD configMappings.json file. - - :param folder_path: The folder to put this file in. + Write out a config mapping file for each NF. """ - nf = self.config.network_function_definition_group_name - - logger.debug("Create %s", NSD_CONFIG_MAPPING_FILENAME) - - deployment_parameters = f"{{configurationparameters('{self.config.cg_schema_name}').{nf}.deploymentParameters}}" - - if not self.config.multiple_instances: - deployment_parameters = f"[{deployment_parameters}]" + temp_mappings_folder_path = os.path.join( + output_directory, CONFIG_MAPPINGS_DIR_NAME + ) - config_mappings = { - "deploymentParameters": deployment_parameters, - self.nfdv_parameter_name: ( - f"{{configurationparameters('{self.config.cg_schema_name}').{nf}.{self.nfdv_parameter_name}}}" - ), - "managedIdentity": f"{{configurationparameters('{self.config.cg_schema_name}').managedIdentity}}", - } + os.mkdir(temp_mappings_folder_path) - if self.config.network_function_type == CNF: - config_mappings[ - "customLocationId" - ] = f"{{configurationparameters('{self.config.cg_schema_name}').{nf}.customLocationId}}" + for nf in self.nf_ret_generators: + config_mappings_path = os.path.join( + temp_mappings_folder_path, nf.config_mapping_filename + ) - config_mappings_path = os.path.join(folder_path, NSD_CONFIG_MAPPING_FILENAME) + with open(config_mappings_path, "w", encoding="utf-8") as _file: + _file.write(json.dumps(nf.config_mappings, indent=4)) - with open(config_mappings_path, "w", encoding="utf-8") as _file: - _file.write(json.dumps(config_mappings, indent=4)) + logger.debug("%s created", config_mappings_path) - logger.debug("%s created", config_mappings_path) + def _write_nf_bicep_files(self, output_directory) -> None: + """ + Write bicep files for deploying NFs. - def write_nf_bicep(self) -> None: - """Write out the Network Function bicep file.""" - self.generate_bicep( - self.nf_bicep_template_name, - NF_DEFINITION_BICEP_FILENAME, - { - "network_function_name": self.config.network_function_name, - "publisher_name": self.config.publisher_name, - "network_function_definition_group_name": ( - self.config.network_function_definition_group_name - ), - "network_function_definition_version_parameter": ( - self.nfdv_parameter_name - ), - "network_function_definition_offering_location": ( - self.config.network_function_definition_offering_location - ), - "location": self.config.location, - # Ideally we would use the network_function_type from reading the actual - # NF, as we do for deployParameters, but the SDK currently doesn't - # support this and needs to be rebuilt to do so. - "nfvi_type": ( - NFVIType.AZURE_CORE.value # type: ignore[attr-defined] - if self.config.network_function_type == VNF - else NFVIType.AZURE_ARC_KUBERNETES.value # type: ignore[attr-defined] - ), - "CNF": self.config.network_function_type == CNF, - }, - ) + In the publish step these bicep files will be uploaded to the publisher storage + account as artifacts. + """ + for nf in self.nf_ret_generators: + substitutions = {"location": self.config.location} + substitutions.update(nf.nf_bicep_substitutions) + + self._generate_bicep( + NF_TEMPLATE_JINJA2_SOURCE_TEMPLATE, + os.path.join(output_directory, nf.config.nf_bicep_filename), + substitutions, + ) - def write_nsd_bicep(self) -> None: + def _write_nsd_bicep(self, output_directory) -> None: """Write out the NSD bicep file.""" + ret_names = [nf.config.resource_element_name for nf in self.nf_ret_generators] + arm_template_names = [ + nf.config.arm_template.artifact_name for nf in self.nf_ret_generators + ] + config_mapping_files = [ + nf.config_mapping_filename for nf in self.nf_ret_generators + ] + + # We want the armTemplateVersion to be the same as the NSD Version. That means + # that if we create a new NSDV then the existing artifacts won't be overwritten. params = { "nfvi_site_name": self.config.nfvi_site_name, - "armTemplateName": self.config.arm_template_artifact_name, - "armTemplateVersion": self.config.arm_template.version, + "armTemplateNames": arm_template_names, + "armTemplateVersion": self.config.nsd_version, "cg_schema_name": self.config.cg_schema_name, "nsdv_description": self.config.nsdv_description, - "ResourceElementName": self.config.resource_element_name, + "ResourceElementName": ret_names, + "configMappingFiles": config_mapping_files, + "nf_count": len(self.nf_ret_generators), } - self.generate_bicep( - self.nsd_bicep_template_name, self.nsd_bicep_output_name, params + self._generate_bicep( + self.nsd_bicep_template_name, + os.path.join(output_directory, self.nsd_bicep_output_name), + params, ) - def write_nsd_manifest(self) -> None: + def _write_nsd_manifest(self, output_directory) -> None: """Write out the NSD manifest bicep file.""" logger.debug("Create NSD manifest") - self.generate_bicep( + self._generate_bicep( NSD_ARTIFACT_MANIFEST_SOURCE_TEMPLATE_FILENAME, - NSD_ARTIFACT_MANIFEST_BICEP_FILENAME, + os.path.join(output_directory, NSD_ARTIFACT_MANIFEST_BICEP_FILENAME), {}, ) - def generate_bicep( - self, template_name: str, output_file_name: str, params: Dict[Any, Any] + @staticmethod + def _generate_bicep( + template_name: str, output_file_name: str, params: Dict[Any, Any] ) -> None: """ Render the bicep templates with the correct parameters and copy them into the build output folder. @@ -343,19 +241,17 @@ def generate_bicep( # Render all the relevant parameters in the bicep template rendered_template = bicep_template.render(**params) - bicep_file_build_path = os.path.join(self.tmp_folder_name, output_file_name) - - with open(bicep_file_build_path, "w", encoding="utf-8") as file: + with open(output_file_name, "w", encoding="utf-8") as file: file.write(rendered_template) - def copy_to_output_folder(self) -> None: + def _copy_to_output_folder(self, temp_dir) -> None: """Copy the bicep templates, config mappings and schema into the build output folder.""" logger.info("Create NSD bicep %s", self.config.output_directory_for_build) os.mkdir(self.config.output_directory_for_build) shutil.copytree( - self.tmp_folder_name, + temp_dir, self.config.output_directory_for_build, dirs_exist_ok=True, ) diff --git a/src/aosm/azext_aosm/generate_nsd/templates/artifact_manifest_template.bicep b/src/aosm/azext_aosm/generate_nsd/templates/artifact_manifest_template.bicep index 4dcdcf18114..7abba315154 100644 --- a/src/aosm/azext_aosm/generate_nsd/templates/artifact_manifest_template.bicep +++ b/src/aosm/azext_aosm/generate_nsd/templates/artifact_manifest_template.bicep @@ -7,9 +7,9 @@ param publisherName string @description('Name of an existing ACR-backed Artifact Store, deployed under the publisher.') param acrArtifactStoreName string @description('Name of the manifest to deploy for the ACR-backed Artifact Store') -param acrManifestName string +param acrManifestNames array @description('The name under which to store the ARM template') -param armTemplateName string +param armTemplateNames array @description('The version that you want to name the NFM template artifact, in format A.B.C. e.g. 6.13.0. If testing for development, you can use any numbers you like.') param armTemplateVersion string @@ -23,17 +23,17 @@ resource acrArtifactStore 'Microsoft.HybridNetwork/publishers/artifactStores@202 name: acrArtifactStoreName } -resource acrArtifactManifest 'Microsoft.Hybridnetwork/publishers/artifactStores/artifactManifests@2023-04-01-preview' = { +resource acrArtifactManifests 'Microsoft.Hybridnetwork/publishers/artifactStores/artifactManifests@2023-04-01-preview' = [for (values, i) in armTemplateNames: { parent: acrArtifactStore - name: acrManifestName + name: acrManifestNames[i] location: location properties: { artifacts: [ { - artifactName: armTemplateName + artifactName: armTemplateNames[i] artifactType: 'ArmTemplate' artifactVersion: armTemplateVersion } ] } -} +}] diff --git a/src/aosm/azext_aosm/generate_nsd/templates/nsd_template.bicep.j2 b/src/aosm/azext_aosm/generate_nsd/templates/nsd_template.bicep.j2 index 665294d296e..f707069674c 100644 --- a/src/aosm/azext_aosm/generate_nsd/templates/nsd_template.bicep.j2 +++ b/src/aosm/azext_aosm/generate_nsd/templates/nsd_template.bicep.j2 @@ -16,10 +16,6 @@ param nsDesignGroup string param nsDesignVersion string @description('Name of the nfvi site') param nfviSiteName string = '{{nfvi_site_name}}' -@description('The version that you want to name the NF template artifact, in format A.B.C. e.g. 6.13.0. If testing for development, you can use any numbers you like.') -param armTemplateVersion string = '{{armTemplateVersion}}' -@description('Name of the NF template artifact') -var armTemplateName = '{{armTemplateName}}' // The publisher resource is the top level AOSM resource under which all other designer resources // are created. @@ -80,8 +76,9 @@ resource nsdVersion 'Microsoft.Hybridnetwork/publishers/networkservicedesigngrou // This field lists the templates that will be deployed by AOSM and the config mappings // to the values in the CG schemas. resourceElementTemplates: [ +{%- for index in range(nf_count) %} { - name: '{{ResourceElementName}}' + name: '{{ResourceElementName[index]}}' // The type of resource element can be ArmResourceDefinition, ConfigurationDefinition or NetworkFunctionDefinition. type: 'NetworkFunctionDefinition' // The configuration object may be different for different types of resource element. @@ -91,20 +88,21 @@ resource nsdVersion 'Microsoft.Hybridnetwork/publishers/networkservicedesigngrou artifactStoreReference: { id: acrArtifactStore.id } - artifactName: armTemplateName - artifactVersion: armTemplateVersion + artifactName: '{{armTemplateNames[index]}}' + artifactVersion: '{{armTemplateVersion}}' } templateType: 'ArmTemplate' // The parameter values map values from the CG schema, to values required by the template // deployed by this resource element. - parameterValues: string(loadJsonContent('configMappings/configMappings.json')) + parameterValues: string(loadJsonContent('configMappings/{{configMappingFiles[index]}}')) } dependsOnProfile: { installDependsOn: [] uninstallDependsOn: [] updateDependsOn: [] } - } + } +{%- endfor %} ] } } diff --git a/src/aosm/azext_aosm/tests/latest/mock_nsd/input.json b/src/aosm/azext_aosm/tests/latest/mock_nsd/input.json index 93132cd558b..81d0247e8ea 100644 --- a/src/aosm/azext_aosm/tests/latest/mock_nsd/input.json +++ b/src/aosm/azext_aosm/tests/latest/mock_nsd/input.json @@ -3,12 +3,18 @@ "publisher_name": "jamie-mobile-publisher", "publisher_resource_group_name": "Jamie-publisher", "acr_artifact_store_name": "ubuntu-acr", - "network_function_definition_group_name": "ubuntu-vm-nfdg", - "network_function_definition_version_name": "1.0.0", - "network_function_definition_offering_location": "eastus", - "network_function_type": "vnf", + "network_functions": [ + { + "name": "ubuntu-vm-nfdg", + "version": "1.0.0", + "publisher_offering_location": "eastus", + "type": "vnf", + "multiple_instances": false, + "publisher": "jamie-mobile-publisher", + "publisher_resource_group": "Jamie-publisher" + } + ], "nsdg_name": "ubuntu", "nsd_version": "1.0.0", - "nsdv_description": "Plain ubuntu VM", - "multiple_instances": false + "nsdv_description": "Plain ubuntu VM" } \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/mock_nsd/input_multi_nf_nsd.json b/src/aosm/azext_aosm/tests/latest/mock_nsd/input_multi_nf_nsd.json new file mode 100644 index 00000000000..6286059d0fe --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/mock_nsd/input_multi_nf_nsd.json @@ -0,0 +1,29 @@ +{ + "publisher_name": "jamie-publisher", + "publisher_resource_group_name": "Jamie-multi-NF", + "acr_artifact_store_name": "acr", + "location": "eastus", + "network_functions": [ + { + "publisher": "reference-publisher", + "publisher_resource_group": "Reference-publisher", + "name": "nginx-nfdg", + "version": "1.0.0", + "publisher_offering_location": "eastus", + "type": "cnf", + "multiple_instances": false + }, + { + "publisher": "reference-publisher", + "publisher_resource_group": "Reference-publisher", + "name": "ubuntu-nfdg", + "version": "1.0.0", + "publisher_offering_location": "eastus", + "type": "vnf", + "multiple_instances": false + } + ], + "nsdg_name": "multinf", + "nsd_version": "1.0.1", + "nsdv_description": "Test deploying multiple NFs" +} diff --git a/src/aosm/azext_aosm/tests/latest/mock_nsd/input_multiple_instances.json b/src/aosm/azext_aosm/tests/latest/mock_nsd/input_multiple_instances.json index 90566c3bbdd..40289d8f8df 100644 --- a/src/aosm/azext_aosm/tests/latest/mock_nsd/input_multiple_instances.json +++ b/src/aosm/azext_aosm/tests/latest/mock_nsd/input_multiple_instances.json @@ -3,12 +3,18 @@ "publisher_name": "jamie-mobile-publisher", "publisher_resource_group_name": "Jamie-publisher", "acr_artifact_store_name": "ubuntu-acr", - "network_function_definition_group_name": "ubuntu-vm-nfdg", - "network_function_definition_version_name": "1.0.0", - "network_function_definition_offering_location": "eastus", - "network_function_type": "vnf", + "network_functions": [ + { + "name": "ubuntu-vm-nfdg", + "version": "1.0.0", + "publisher_offering_location": "eastus", + "type": "vnf", + "multiple_instances": true, + "publisher": "jamie-mobile-publisher", + "publisher_resource_group": "Jamie-publisher" + } + ], "nsdg_name": "ubuntu", "nsd_version": "1.0.0", - "nsdv_description": "Plain ubuntu VM", - "multiple_instances": true + "nsdv_description": "Plain ubuntu VM" } \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build/artifact_manifest.bicep b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build/artifact_manifest.bicep new file mode 100644 index 00000000000..3192c4ce035 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build/artifact_manifest.bicep @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. + +// This file creates an Artifact Manifest for a NSD +param location string +@description('Name of an existing publisher, expected to be in the resource group where you deploy the template') +param publisherName string +@description('Name of an existing ACR-backed Artifact Store, deployed under the publisher.') +param acrArtifactStoreName string +@description('Name of the manifest to deploy for the ACR-backed Artifact Store') +param acrManifestNames array +@description('The name under which to store the ARM template') +param armTemplateNames array +@description('The version that you want to name the NFM template artifact, in format A.B.C. e.g. 6.13.0. If testing for development, you can use any numbers you like.') +param armTemplateVersion string + +resource publisher 'Microsoft.HybridNetwork/publishers@2023-04-01-preview' existing = { + name: publisherName + scope: resourceGroup() +} + +resource acrArtifactStore 'Microsoft.HybridNetwork/publishers/artifactStores@2023-04-01-preview' existing = { + parent: publisher + name: acrArtifactStoreName +} + +resource acrArtifactManifests 'Microsoft.Hybridnetwork/publishers/artifactStores/artifactManifests@2023-04-01-preview' = [for (values, i) in armTemplateNames: { + parent: acrArtifactStore + name: acrManifestNames[i] + location: location + properties: { + artifacts: [ + { + artifactName: armTemplateNames[i] + artifactType: 'ArmTemplate' + artifactVersion: armTemplateVersion + } + ] + } +}] \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build/configMappings/ubuntu-vm-nfdg_config_mapping.json b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build/configMappings/ubuntu-vm-nfdg_config_mapping.json new file mode 100644 index 00000000000..2361fbd1490 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build/configMappings/ubuntu-vm-nfdg_config_mapping.json @@ -0,0 +1,7 @@ +{ + "deploymentParameters": [ + "{configurationparameters('ubuntu_ConfigGroupSchema').ubuntu-vm-nfdg.deploymentParameters}" + ], + "ubuntu_vm_nfdg_nfd_version": "{configurationparameters('ubuntu_ConfigGroupSchema').ubuntu-vm-nfdg.ubuntu_vm_nfdg_nfd_version}", + "managedIdentity": "{configurationparameters('ubuntu_ConfigGroupSchema').managedIdentity}" +} \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build/nsd_definition.bicep b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build/nsd_definition.bicep new file mode 100644 index 00000000000..8969b671381 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build/nsd_definition.bicep @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Highly Confidential Material +// +// Bicep template to create an Artifact Manifest, Config Group Schema and NSDV. +// +// Requires an existing NFDV from which the values will be populated. + +param location string +@description('Name of an existing publisher, expected to be in the resource group where you deploy the template') +param publisherName string +@description('Name of an existing ACR-backed Artifact Store, deployed under the publisher.') +param acrArtifactStoreName string +@description('Name of an existing Network Service Design Group') +param nsDesignGroup string +@description('The version of the NSDV you want to create, in format A.B.C') +param nsDesignVersion string +@description('Name of the nfvi site') +param nfviSiteName string = 'ubuntu_NFVI' + +// The publisher resource is the top level AOSM resource under which all other designer resources +// are created. +resource publisher 'Microsoft.HybridNetwork/publishers@2023-04-01-preview' existing = { + name: publisherName + scope: resourceGroup() +} + +// The artifact store is the resource in which all the artifacts required to deploy the NF are stored. +// The artifact store is created by the az aosm CLI before this template is deployed. +resource acrArtifactStore 'Microsoft.HybridNetwork/publishers/artifactStores@2023-04-01-preview' existing = { + parent: publisher + name: acrArtifactStoreName +} + +// Created up-front, the NSD Group is the parent resource under which all NSD versions will be created. +resource nsdGroup 'Microsoft.Hybridnetwork/publishers/networkservicedesigngroups@2023-04-01-preview' existing = { + parent: publisher + name: nsDesignGroup +} + +// The configuration group schema defines the configuration required to deploy the NSD. The NSD references this object in the +// `configurationgroupsSchemaReferences` and references the values in the schema in the `parameterValues`. +// The operator will create a config group values object that will satisfy this schema. +resource cgSchema 'Microsoft.Hybridnetwork/publishers/configurationGroupSchemas@2023-04-01-preview' = { + parent: publisher + name: 'ubuntu_ConfigGroupSchema' + location: location + properties: { + schemaDefinition: string(loadJsonContent('schemas/ubuntu_ConfigGroupSchema.json')) + } +} + +// The NSD version +resource nsdVersion 'Microsoft.Hybridnetwork/publishers/networkservicedesigngroups/networkservicedesignversions@2023-04-01-preview' = { + parent: nsdGroup + name: nsDesignVersion + location: location + properties: { + description: 'Plain ubuntu VM' + // The version state can be Preview, Active or Deprecated. + // Once in an Active state, the NSDV becomes immutable. + versionState: 'Preview' + // The `configurationgroupsSchemaReferences` field contains references to the schemas required to + // be filled out to configure this NSD. + configurationGroupSchemaReferences: { + ubuntu_ConfigGroupSchema: { + id: cgSchema.id + } + } + // This details the NFVIs that should be available in the Site object created by the operator. + nfvisFromSite: { + nfvi1: { + name: nfviSiteName + type: 'AzureCore' + } + } + // This field lists the templates that will be deployed by AOSM and the config mappings + // to the values in the CG schemas. + resourceElementTemplates: [ + { + name: 'ubuntu-vm-nfdg_nf_artifact_resource_element' + // The type of resource element can be ArmResourceDefinition, ConfigurationDefinition or NetworkFunctionDefinition. + type: 'NetworkFunctionDefinition' + // The configuration object may be different for different types of resource element. + configuration: { + // This field points AOSM at the artifact in the artifact store. + artifactProfile: { + artifactStoreReference: { + id: acrArtifactStore.id + } + artifactName: 'ubuntu-vm-nfdg_nf_artifact' + artifactVersion: '1.0.0' + } + templateType: 'ArmTemplate' + // The parameter values map values from the CG schema, to values required by the template + // deployed by this resource element. + parameterValues: string(loadJsonContent('configMappings/ubuntu-vm-nfdg_config_mapping.json')) + } + dependsOnProfile: { + installDependsOn: [] + uninstallDependsOn: [] + updateDependsOn: [] + } + } + ] + } +} \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build/schemas/ubuntu_ConfigGroupSchema.json b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build/schemas/ubuntu_ConfigGroupSchema.json new file mode 100644 index 00000000000..287fa0a6106 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build/schemas/ubuntu_ConfigGroupSchema.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema#", + "title": "ubuntu_ConfigGroupSchema", + "type": "object", + "properties": { + "ubuntu-vm-nfdg": { + "type": "object", + "properties": { + "deploymentParameters": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "subnetName": { + "type": "string" + }, + "virtualNetworkId": { + "type": "string" + }, + "sshPublicKeyAdmin": { + "type": "string" + } + } + }, + "ubuntu_vm_nfdg_nfd_version": { + "type": "string", + "description": "The version of the ubuntu-vm-nfdg NFD to use. This version must be compatible with (have the same parameters exposed as) ubuntu-vm-nfdg." + } + }, + "required": [ + "deploymentParameters", + "ubuntu_vm_nfdg_nfd_version" + ] + }, + "managedIdentity": { + "type": "string", + "description": "The managed identity to use to deploy NFs within this SNS. This should be of the form '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. If you wish to use a system assigned identity, set this to a blank string." + } + }, + "required": [ + "ubuntu-vm-nfdg", + "managedIdentity" + ] +} \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build/ubuntu-vm-nfdg_nf.bicep b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build/ubuntu-vm-nfdg_nf.bicep new file mode 100644 index 00000000000..50f2db8e097 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build/ubuntu-vm-nfdg_nf.bicep @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Highly Confidential Material +// +// The template that the NSD invokes to create the Network Function from a published NFDV. + +@description('Publisher where the NFD is published') +param publisherName string = 'jamie-mobile-publisher' + +@description('NFD Group name for the Network Function') +param networkFunctionDefinitionGroupName string = 'ubuntu-vm-nfdg' + +@description('NFD version') +param ubuntu_vm_nfdg_nfd_version string + +@description('Offering location for the Network Function') +param networkFunctionDefinitionOfferingLocation string = 'eastus' + +@description('The managed identity that should be used to create the NF.') +param managedIdentity string + +param location string = 'eastus' + +param nfviType string = 'AzureCore' + +param resourceGroupId string = resourceGroup().id + +param deploymentParameters array + +var identityObject = (managedIdentity == '') ? { + type: 'SystemAssigned' +} : { + type: 'UserAssigned' + userAssignedIdentities: { + '${managedIdentity}': {} + } +} + +resource nf_resource 'Microsoft.HybridNetwork/networkFunctions@2023-04-01-preview' = [for (values, i) in deploymentParameters: { + name: 'ubuntu-vm-nfdg${i}' + location: location + identity: identityObject + properties: { + publisherName: publisherName + publisherScope: 'Private' + networkFunctionDefinitionGroupName: networkFunctionDefinitionGroupName + networkFunctionDefinitionVersion: ubuntu_vm_nfdg_nfd_version + networkFunctionDefinitionOfferingLocation: networkFunctionDefinitionOfferingLocation + nfviType: nfviType + nfviId: resourceGroupId + allowSoftwareUpdate: true + deploymentValues: string(values) + } +}] \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/artifact_manifest.bicep b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/artifact_manifest.bicep new file mode 100644 index 00000000000..3192c4ce035 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/artifact_manifest.bicep @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. + +// This file creates an Artifact Manifest for a NSD +param location string +@description('Name of an existing publisher, expected to be in the resource group where you deploy the template') +param publisherName string +@description('Name of an existing ACR-backed Artifact Store, deployed under the publisher.') +param acrArtifactStoreName string +@description('Name of the manifest to deploy for the ACR-backed Artifact Store') +param acrManifestNames array +@description('The name under which to store the ARM template') +param armTemplateNames array +@description('The version that you want to name the NFM template artifact, in format A.B.C. e.g. 6.13.0. If testing for development, you can use any numbers you like.') +param armTemplateVersion string + +resource publisher 'Microsoft.HybridNetwork/publishers@2023-04-01-preview' existing = { + name: publisherName + scope: resourceGroup() +} + +resource acrArtifactStore 'Microsoft.HybridNetwork/publishers/artifactStores@2023-04-01-preview' existing = { + parent: publisher + name: acrArtifactStoreName +} + +resource acrArtifactManifests 'Microsoft.Hybridnetwork/publishers/artifactStores/artifactManifests@2023-04-01-preview' = [for (values, i) in armTemplateNames: { + parent: acrArtifactStore + name: acrManifestNames[i] + location: location + properties: { + artifacts: [ + { + artifactName: armTemplateNames[i] + artifactType: 'ArmTemplate' + artifactVersion: armTemplateVersion + } + ] + } +}] \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/configMappings/ubuntu-vm-nfdg_config_mapping.json b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/configMappings/ubuntu-vm-nfdg_config_mapping.json new file mode 100644 index 00000000000..3da468b8b29 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/configMappings/ubuntu-vm-nfdg_config_mapping.json @@ -0,0 +1,5 @@ +{ + "deploymentParameters": "{configurationparameters('ubuntu_ConfigGroupSchema').ubuntu-vm-nfdg.deploymentParameters}", + "ubuntu_vm_nfdg_nfd_version": "{configurationparameters('ubuntu_ConfigGroupSchema').ubuntu-vm-nfdg.ubuntu_vm_nfdg_nfd_version}", + "managedIdentity": "{configurationparameters('ubuntu_ConfigGroupSchema').managedIdentity}" +} \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/nsd_definition.bicep b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/nsd_definition.bicep new file mode 100644 index 00000000000..8969b671381 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/nsd_definition.bicep @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Highly Confidential Material +// +// Bicep template to create an Artifact Manifest, Config Group Schema and NSDV. +// +// Requires an existing NFDV from which the values will be populated. + +param location string +@description('Name of an existing publisher, expected to be in the resource group where you deploy the template') +param publisherName string +@description('Name of an existing ACR-backed Artifact Store, deployed under the publisher.') +param acrArtifactStoreName string +@description('Name of an existing Network Service Design Group') +param nsDesignGroup string +@description('The version of the NSDV you want to create, in format A.B.C') +param nsDesignVersion string +@description('Name of the nfvi site') +param nfviSiteName string = 'ubuntu_NFVI' + +// The publisher resource is the top level AOSM resource under which all other designer resources +// are created. +resource publisher 'Microsoft.HybridNetwork/publishers@2023-04-01-preview' existing = { + name: publisherName + scope: resourceGroup() +} + +// The artifact store is the resource in which all the artifacts required to deploy the NF are stored. +// The artifact store is created by the az aosm CLI before this template is deployed. +resource acrArtifactStore 'Microsoft.HybridNetwork/publishers/artifactStores@2023-04-01-preview' existing = { + parent: publisher + name: acrArtifactStoreName +} + +// Created up-front, the NSD Group is the parent resource under which all NSD versions will be created. +resource nsdGroup 'Microsoft.Hybridnetwork/publishers/networkservicedesigngroups@2023-04-01-preview' existing = { + parent: publisher + name: nsDesignGroup +} + +// The configuration group schema defines the configuration required to deploy the NSD. The NSD references this object in the +// `configurationgroupsSchemaReferences` and references the values in the schema in the `parameterValues`. +// The operator will create a config group values object that will satisfy this schema. +resource cgSchema 'Microsoft.Hybridnetwork/publishers/configurationGroupSchemas@2023-04-01-preview' = { + parent: publisher + name: 'ubuntu_ConfigGroupSchema' + location: location + properties: { + schemaDefinition: string(loadJsonContent('schemas/ubuntu_ConfigGroupSchema.json')) + } +} + +// The NSD version +resource nsdVersion 'Microsoft.Hybridnetwork/publishers/networkservicedesigngroups/networkservicedesignversions@2023-04-01-preview' = { + parent: nsdGroup + name: nsDesignVersion + location: location + properties: { + description: 'Plain ubuntu VM' + // The version state can be Preview, Active or Deprecated. + // Once in an Active state, the NSDV becomes immutable. + versionState: 'Preview' + // The `configurationgroupsSchemaReferences` field contains references to the schemas required to + // be filled out to configure this NSD. + configurationGroupSchemaReferences: { + ubuntu_ConfigGroupSchema: { + id: cgSchema.id + } + } + // This details the NFVIs that should be available in the Site object created by the operator. + nfvisFromSite: { + nfvi1: { + name: nfviSiteName + type: 'AzureCore' + } + } + // This field lists the templates that will be deployed by AOSM and the config mappings + // to the values in the CG schemas. + resourceElementTemplates: [ + { + name: 'ubuntu-vm-nfdg_nf_artifact_resource_element' + // The type of resource element can be ArmResourceDefinition, ConfigurationDefinition or NetworkFunctionDefinition. + type: 'NetworkFunctionDefinition' + // The configuration object may be different for different types of resource element. + configuration: { + // This field points AOSM at the artifact in the artifact store. + artifactProfile: { + artifactStoreReference: { + id: acrArtifactStore.id + } + artifactName: 'ubuntu-vm-nfdg_nf_artifact' + artifactVersion: '1.0.0' + } + templateType: 'ArmTemplate' + // The parameter values map values from the CG schema, to values required by the template + // deployed by this resource element. + parameterValues: string(loadJsonContent('configMappings/ubuntu-vm-nfdg_config_mapping.json')) + } + dependsOnProfile: { + installDependsOn: [] + uninstallDependsOn: [] + updateDependsOn: [] + } + } + ] + } +} \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/schemas/ubuntu_ConfigGroupSchema.json b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/schemas/ubuntu_ConfigGroupSchema.json new file mode 100644 index 00000000000..5393c2ba01f --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/schemas/ubuntu_ConfigGroupSchema.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema#", + "title": "ubuntu_ConfigGroupSchema", + "type": "object", + "properties": { + "ubuntu-vm-nfdg": { + "type": "object", + "properties": { + "deploymentParameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "subnetName": { + "type": "string" + }, + "virtualNetworkId": { + "type": "string" + }, + "sshPublicKeyAdmin": { + "type": "string" + } + } + } + }, + "ubuntu_vm_nfdg_nfd_version": { + "type": "string", + "description": "The version of the ubuntu-vm-nfdg NFD to use. This version must be compatible with (have the same parameters exposed as) ubuntu-vm-nfdg." + } + }, + "required": [ + "deploymentParameters", + "ubuntu_vm_nfdg_nfd_version" + ] + }, + "managedIdentity": { + "type": "string", + "description": "The managed identity to use to deploy NFs within this SNS. This should be of the form '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. If you wish to use a system assigned identity, set this to a blank string." + } + }, + "required": [ + "ubuntu-vm-nfdg", + "managedIdentity" + ] +} \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/ubuntu-vm-nfdg_nf.bicep b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/ubuntu-vm-nfdg_nf.bicep new file mode 100644 index 00000000000..50f2db8e097 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/ubuntu-vm-nfdg_nf.bicep @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Highly Confidential Material +// +// The template that the NSD invokes to create the Network Function from a published NFDV. + +@description('Publisher where the NFD is published') +param publisherName string = 'jamie-mobile-publisher' + +@description('NFD Group name for the Network Function') +param networkFunctionDefinitionGroupName string = 'ubuntu-vm-nfdg' + +@description('NFD version') +param ubuntu_vm_nfdg_nfd_version string + +@description('Offering location for the Network Function') +param networkFunctionDefinitionOfferingLocation string = 'eastus' + +@description('The managed identity that should be used to create the NF.') +param managedIdentity string + +param location string = 'eastus' + +param nfviType string = 'AzureCore' + +param resourceGroupId string = resourceGroup().id + +param deploymentParameters array + +var identityObject = (managedIdentity == '') ? { + type: 'SystemAssigned' +} : { + type: 'UserAssigned' + userAssignedIdentities: { + '${managedIdentity}': {} + } +} + +resource nf_resource 'Microsoft.HybridNetwork/networkFunctions@2023-04-01-preview' = [for (values, i) in deploymentParameters: { + name: 'ubuntu-vm-nfdg${i}' + location: location + identity: identityObject + properties: { + publisherName: publisherName + publisherScope: 'Private' + networkFunctionDefinitionGroupName: networkFunctionDefinitionGroupName + networkFunctionDefinitionVersion: ubuntu_vm_nfdg_nfd_version + networkFunctionDefinitionOfferingLocation: networkFunctionDefinitionOfferingLocation + nfviType: nfviType + nfviId: resourceGroupId + allowSoftwareUpdate: true + deploymentValues: string(values) + } +}] \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/artifact_manifest.bicep b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/artifact_manifest.bicep new file mode 100644 index 00000000000..3192c4ce035 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/artifact_manifest.bicep @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. + +// This file creates an Artifact Manifest for a NSD +param location string +@description('Name of an existing publisher, expected to be in the resource group where you deploy the template') +param publisherName string +@description('Name of an existing ACR-backed Artifact Store, deployed under the publisher.') +param acrArtifactStoreName string +@description('Name of the manifest to deploy for the ACR-backed Artifact Store') +param acrManifestNames array +@description('The name under which to store the ARM template') +param armTemplateNames array +@description('The version that you want to name the NFM template artifact, in format A.B.C. e.g. 6.13.0. If testing for development, you can use any numbers you like.') +param armTemplateVersion string + +resource publisher 'Microsoft.HybridNetwork/publishers@2023-04-01-preview' existing = { + name: publisherName + scope: resourceGroup() +} + +resource acrArtifactStore 'Microsoft.HybridNetwork/publishers/artifactStores@2023-04-01-preview' existing = { + parent: publisher + name: acrArtifactStoreName +} + +resource acrArtifactManifests 'Microsoft.Hybridnetwork/publishers/artifactStores/artifactManifests@2023-04-01-preview' = [for (values, i) in armTemplateNames: { + parent: acrArtifactStore + name: acrManifestNames[i] + location: location + properties: { + artifacts: [ + { + artifactName: armTemplateNames[i] + artifactType: 'ArmTemplate' + artifactVersion: armTemplateVersion + } + ] + } +}] \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/artifact_manifest.json b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/artifact_manifest.json new file mode 100644 index 00000000000..3f0f76a43a0 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/artifact_manifest.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "metadata": { + "_generator": { + "name": "bicep", + "version": "0.15.31.15270", + "templateHash": "12504378736665252435" + } + }, + "parameters": { + "location": { + "type": "string" + }, + "publisherName": { + "type": "string", + "metadata": { + "description": "Name of an existing publisher, expected to be in the resource group where you deploy the template" + } + }, + "acrArtifactStoreName": { + "type": "string", + "metadata": { + "description": "Name of an existing ACR-backed Artifact Store, deployed under the publisher." + } + }, + "acrManifestNames": { + "type": "array", + "metadata": { + "description": "Name of the manifest to deploy for the ACR-backed Artifact Store" + } + }, + "armTemplateNames": { + "type": "array", + "metadata": { + "description": "The name under which to store the ARM template" + } + }, + "armTemplateVersion": { + "type": "string", + "metadata": { + "description": "The version that you want to name the NFM template artifact, in format A.B.C. e.g. 6.13.0. If testing for development, you can use any numbers you like." + } + } + }, + "resources": [ + { + "copy": { + "name": "acrArtifactManifests", + "count": "[length(parameters('armTemplateNames'))]" + }, + "type": "Microsoft.Hybridnetwork/publishers/artifactStores/artifactManifests", + "apiVersion": "2023-04-01-preview", + "name": "[format('{0}/{1}/{2}', parameters('publisherName'), parameters('acrArtifactStoreName'), parameters('acrManifestNames')[copyIndex()])]", + "location": "[parameters('location')]", + "properties": { + "artifacts": [ + { + "artifactName": "[parameters('armTemplateNames')[copyIndex()]]", + "artifactType": "ArmTemplate", + "artifactVersion": "[parameters('armTemplateVersion')]" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/configMappings/nginx-nfdg_config_mapping.json b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/configMappings/nginx-nfdg_config_mapping.json new file mode 100644 index 00000000000..615db31757f --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/configMappings/nginx-nfdg_config_mapping.json @@ -0,0 +1,8 @@ +{ + "deploymentParameters": [ + "{configurationparameters('multinf_ConfigGroupSchema').nginx-nfdg.deploymentParameters}" + ], + "nginx_nfdg_nfd_version": "{configurationparameters('multinf_ConfigGroupSchema').nginx-nfdg.nginx_nfdg_nfd_version}", + "managedIdentity": "{configurationparameters('multinf_ConfigGroupSchema').managedIdentity}", + "customLocationId": "{configurationparameters('multinf_ConfigGroupSchema').nginx-nfdg.customLocationId}" +} \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/configMappings/ubuntu-nfdg_config_mapping.json b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/configMappings/ubuntu-nfdg_config_mapping.json new file mode 100644 index 00000000000..0d21991ea43 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/configMappings/ubuntu-nfdg_config_mapping.json @@ -0,0 +1,7 @@ +{ + "deploymentParameters": [ + "{configurationparameters('multinf_ConfigGroupSchema').ubuntu-nfdg.deploymentParameters}" + ], + "ubuntu_nfdg_nfd_version": "{configurationparameters('multinf_ConfigGroupSchema').ubuntu-nfdg.ubuntu_nfdg_nfd_version}", + "managedIdentity": "{configurationparameters('multinf_ConfigGroupSchema').managedIdentity}" +} \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/nginx-nfdg_nf.bicep b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/nginx-nfdg_nf.bicep new file mode 100644 index 00000000000..621e3fc6222 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/nginx-nfdg_nf.bicep @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Highly Confidential Material +// +// The template that the NSD invokes to create the Network Function from a published NFDV. + +@description('Publisher where the NFD is published') +param publisherName string = 'reference-publisher' + +@description('NFD Group name for the Network Function') +param networkFunctionDefinitionGroupName string = 'nginx-nfdg' + +@description('NFD version') +param nginx_nfdg_nfd_version string + +@description('Offering location for the Network Function') +param networkFunctionDefinitionOfferingLocation string = 'eastus' + +@description('The managed identity that should be used to create the NF.') +param managedIdentity string +@description('The custom location of the ARC-enabled AKS cluster to create the NF.') +param customLocationId string + +param location string = 'eastus' + +param nfviType string = 'AzureArcKubernetes' + +param resourceGroupId string = resourceGroup().id + +param deploymentParameters array + +var identityObject = (managedIdentity == '') ? { + type: 'SystemAssigned' +} : { + type: 'UserAssigned' + userAssignedIdentities: { + '${managedIdentity}': {} + } +} + +resource nf_resource 'Microsoft.HybridNetwork/networkFunctions@2023-04-01-preview' = [for (values, i) in deploymentParameters: { + name: 'nginx-nfdg${i}' + location: location + identity: identityObject + properties: { + publisherName: publisherName + publisherScope: 'Private' + networkFunctionDefinitionGroupName: networkFunctionDefinitionGroupName + networkFunctionDefinitionVersion: nginx_nfdg_nfd_version + networkFunctionDefinitionOfferingLocation: networkFunctionDefinitionOfferingLocation + nfviType: nfviType + nfviId: customLocationId + allowSoftwareUpdate: true + deploymentValues: string(values) + } +}] \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/nginx-nfdg_nf.json b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/nginx-nfdg_nf.json new file mode 100644 index 00000000000..b57e6b6896d --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/nginx-nfdg_nf.json @@ -0,0 +1,94 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "metadata": { + "_generator": { + "name": "bicep", + "version": "0.15.31.15270", + "templateHash": "8770084774585620869" + } + }, + "parameters": { + "publisherName": { + "type": "string", + "defaultValue": "reference-publisher", + "metadata": { + "description": "Publisher where the NFD is published" + } + }, + "networkFunctionDefinitionGroupName": { + "type": "string", + "defaultValue": "nginx-nfdg", + "metadata": { + "description": "NFD Group name for the Network Function" + } + }, + "nginx_nfdg_nfd_version": { + "type": "string", + "metadata": { + "description": "NFD version" + } + }, + "networkFunctionDefinitionOfferingLocation": { + "type": "string", + "defaultValue": "eastus", + "metadata": { + "description": "Offering location for the Network Function" + } + }, + "managedIdentity": { + "type": "string", + "metadata": { + "description": "The managed identity that should be used to create the NF." + } + }, + "customLocationId": { + "type": "string", + "metadata": { + "description": "The custom location of the ARC-enabled AKS cluster to create the NF." + } + }, + "location": { + "type": "string", + "defaultValue": "eastus" + }, + "nfviType": { + "type": "string", + "defaultValue": "AzureArcKubernetes" + }, + "resourceGroupId": { + "type": "string", + "defaultValue": "[resourceGroup().id]" + }, + "deploymentParameters": { + "type": "array" + } + }, + "variables": { + "identityObject": "[if(equals(parameters('managedIdentity'), ''), createObject('type', 'SystemAssigned'), createObject('type', 'UserAssigned', 'userAssignedIdentities', createObject(format('{0}', parameters('managedIdentity')), createObject())))]" + }, + "resources": [ + { + "copy": { + "name": "nf_resource", + "count": "[length(parameters('deploymentParameters'))]" + }, + "type": "Microsoft.HybridNetwork/networkFunctions", + "apiVersion": "2023-04-01-preview", + "name": "[format('nginx-nfdg{0}', copyIndex())]", + "location": "[parameters('location')]", + "identity": "[variables('identityObject')]", + "properties": { + "publisherName": "[parameters('publisherName')]", + "publisherScope": "Private", + "networkFunctionDefinitionGroupName": "[parameters('networkFunctionDefinitionGroupName')]", + "networkFunctionDefinitionVersion": "[parameters('nginx_nfdg_nfd_version')]", + "networkFunctionDefinitionOfferingLocation": "[parameters('networkFunctionDefinitionOfferingLocation')]", + "nfviType": "[parameters('nfviType')]", + "nfviId": "[parameters('customLocationId')]", + "allowSoftwareUpdate": true, + "deploymentValues": "[string(parameters('deploymentParameters')[copyIndex()])]" + } + } + ] +} \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/nsd_definition.bicep b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/nsd_definition.bicep new file mode 100644 index 00000000000..e40f9b8dd73 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/nsd_definition.bicep @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Highly Confidential Material +// +// Bicep template to create an Artifact Manifest, Config Group Schema and NSDV. +// +// Requires an existing NFDV from which the values will be populated. + +param location string +@description('Name of an existing publisher, expected to be in the resource group where you deploy the template') +param publisherName string +@description('Name of an existing ACR-backed Artifact Store, deployed under the publisher.') +param acrArtifactStoreName string +@description('Name of an existing Network Service Design Group') +param nsDesignGroup string +@description('The version of the NSDV you want to create, in format A.B.C') +param nsDesignVersion string +@description('Name of the nfvi site') +param nfviSiteName string = 'multinf_NFVI' + +// The publisher resource is the top level AOSM resource under which all other designer resources +// are created. +resource publisher 'Microsoft.HybridNetwork/publishers@2023-04-01-preview' existing = { + name: publisherName + scope: resourceGroup() +} + +// The artifact store is the resource in which all the artifacts required to deploy the NF are stored. +// The artifact store is created by the az aosm CLI before this template is deployed. +resource acrArtifactStore 'Microsoft.HybridNetwork/publishers/artifactStores@2023-04-01-preview' existing = { + parent: publisher + name: acrArtifactStoreName +} + +// Created up-front, the NSD Group is the parent resource under which all NSD versions will be created. +resource nsdGroup 'Microsoft.Hybridnetwork/publishers/networkservicedesigngroups@2023-04-01-preview' existing = { + parent: publisher + name: nsDesignGroup +} + +// The configuration group schema defines the configuration required to deploy the NSD. The NSD references this object in the +// `configurationgroupsSchemaReferences` and references the values in the schema in the `parameterValues`. +// The operator will create a config group values object that will satisfy this schema. +resource cgSchema 'Microsoft.Hybridnetwork/publishers/configurationGroupSchemas@2023-04-01-preview' = { + parent: publisher + name: 'multinf_ConfigGroupSchema' + location: location + properties: { + schemaDefinition: string(loadJsonContent('schemas/multinf_ConfigGroupSchema.json')) + } +} + +// The NSD version +resource nsdVersion 'Microsoft.Hybridnetwork/publishers/networkservicedesigngroups/networkservicedesignversions@2023-04-01-preview' = { + parent: nsdGroup + name: nsDesignVersion + location: location + properties: { + description: 'Test deploying multiple NFs' + // The version state can be Preview, Active or Deprecated. + // Once in an Active state, the NSDV becomes immutable. + versionState: 'Preview' + // The `configurationgroupsSchemaReferences` field contains references to the schemas required to + // be filled out to configure this NSD. + configurationGroupSchemaReferences: { + multinf_ConfigGroupSchema: { + id: cgSchema.id + } + } + // This details the NFVIs that should be available in the Site object created by the operator. + nfvisFromSite: { + nfvi1: { + name: nfviSiteName + type: 'AzureCore' + } + } + // This field lists the templates that will be deployed by AOSM and the config mappings + // to the values in the CG schemas. + resourceElementTemplates: [ + { + name: 'nginx-nfdg_nf_artifact_resource_element' + // The type of resource element can be ArmResourceDefinition, ConfigurationDefinition or NetworkFunctionDefinition. + type: 'NetworkFunctionDefinition' + // The configuration object may be different for different types of resource element. + configuration: { + // This field points AOSM at the artifact in the artifact store. + artifactProfile: { + artifactStoreReference: { + id: acrArtifactStore.id + } + artifactName: 'nginx-nfdg_nf_artifact' + artifactVersion: '1.0.1' + } + templateType: 'ArmTemplate' + // The parameter values map values from the CG schema, to values required by the template + // deployed by this resource element. + parameterValues: string(loadJsonContent('configMappings/nginx-nfdg_config_mapping.json')) + } + dependsOnProfile: { + installDependsOn: [] + uninstallDependsOn: [] + updateDependsOn: [] + } + } + { + name: 'ubuntu-nfdg_nf_artifact_resource_element' + // The type of resource element can be ArmResourceDefinition, ConfigurationDefinition or NetworkFunctionDefinition. + type: 'NetworkFunctionDefinition' + // The configuration object may be different for different types of resource element. + configuration: { + // This field points AOSM at the artifact in the artifact store. + artifactProfile: { + artifactStoreReference: { + id: acrArtifactStore.id + } + artifactName: 'ubuntu-nfdg_nf_artifact' + artifactVersion: '1.0.1' + } + templateType: 'ArmTemplate' + // The parameter values map values from the CG schema, to values required by the template + // deployed by this resource element. + parameterValues: string(loadJsonContent('configMappings/ubuntu-nfdg_config_mapping.json')) + } + dependsOnProfile: { + installDependsOn: [] + uninstallDependsOn: [] + updateDependsOn: [] + } + } + ] + } +} \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/nsd_definition.json b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/nsd_definition.json new file mode 100644 index 00000000000..d8194be7d20 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/nsd_definition.json @@ -0,0 +1,216 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "metadata": { + "_generator": { + "name": "bicep", + "version": "0.15.31.15270", + "templateHash": "15013200147840669823" + } + }, + "parameters": { + "location": { + "type": "string" + }, + "publisherName": { + "type": "string", + "metadata": { + "description": "Name of an existing publisher, expected to be in the resource group where you deploy the template" + } + }, + "acrArtifactStoreName": { + "type": "string", + "metadata": { + "description": "Name of an existing ACR-backed Artifact Store, deployed under the publisher." + } + }, + "nsDesignGroup": { + "type": "string", + "metadata": { + "description": "Name of an existing Network Service Design Group" + } + }, + "nsDesignVersion": { + "type": "string", + "metadata": { + "description": "The version of the NSDV you want to create, in format A.B.C" + } + }, + "nfviSiteName": { + "type": "string", + "defaultValue": "multinf_NFVI", + "metadata": { + "description": "Name of the nfvi site" + } + } + }, + "variables": { + "$fxv#0": { + "$schema": "https://json-schema.org/draft-07/schema#", + "title": "multinf_ConfigGroupSchema", + "type": "object", + "properties": { + "nginx-nfdg": { + "type": "object", + "properties": { + "deploymentParameters": { + "type": "object", + "properties": { + "serviceAccount_create": { + "type": "boolean" + }, + "service_port": { + "type": "integer" + } + } + }, + "nginx_nfdg_nfd_version": { + "type": "string", + "description": "The version of the nginx-nfdg NFD to use. This version must be compatible with (have the same parameters exposed as) nginx-nfdg." + }, + "customLocationId": { + "type": "string", + "description": "The custom location ID of the ARC-Enabled AKS Cluster to deploy the CNF to. Should be of the form '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.extendedlocation/customlocations/{customLocationName}'" + } + }, + "required": [ + "deploymentParameters", + "nginx_nfdg_nfd_version", + "customLocationId" + ] + }, + "ubuntu-nfdg": { + "type": "object", + "properties": { + "deploymentParameters": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "subnetName": { + "type": "string" + }, + "virtualNetworkId": { + "type": "string" + }, + "sshPublicKeyAdmin": { + "type": "string" + } + } + }, + "ubuntu_nfdg_nfd_version": { + "type": "string", + "description": "The version of the ubuntu-nfdg NFD to use. This version must be compatible with (have the same parameters exposed as) ubuntu-nfdg." + } + }, + "required": [ + "deploymentParameters", + "ubuntu_nfdg_nfd_version" + ] + }, + "managedIdentity": { + "type": "string", + "description": "The managed identity to use to deploy NFs within this SNS. This should be of the form '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. If you wish to use a system assigned identity, set this to a blank string." + } + }, + "required": [ + "nginx-nfdg", + "ubuntu-nfdg", + "managedIdentity" + ] + }, + "$fxv#1": { + "deploymentParameters": [ + "{configurationparameters('multinf_ConfigGroupSchema').nginx-nfdg.deploymentParameters}" + ], + "nginx_nfdg_nfd_version": "{configurationparameters('multinf_ConfigGroupSchema').nginx-nfdg.nginx_nfdg_nfd_version}", + "managedIdentity": "{configurationparameters('multinf_ConfigGroupSchema').managedIdentity}", + "customLocationId": "{configurationparameters('multinf_ConfigGroupSchema').nginx-nfdg.customLocationId}" + }, + "$fxv#2": { + "deploymentParameters": [ + "{configurationparameters('multinf_ConfigGroupSchema').ubuntu-nfdg.deploymentParameters}" + ], + "ubuntu_nfdg_nfd_version": "{configurationparameters('multinf_ConfigGroupSchema').ubuntu-nfdg.ubuntu_nfdg_nfd_version}", + "managedIdentity": "{configurationparameters('multinf_ConfigGroupSchema').managedIdentity}" + } + }, + "resources": [ + { + "type": "Microsoft.Hybridnetwork/publishers/configurationGroupSchemas", + "apiVersion": "2023-04-01-preview", + "name": "[format('{0}/{1}', parameters('publisherName'), 'multinf_ConfigGroupSchema')]", + "location": "[parameters('location')]", + "properties": { + "schemaDefinition": "[string(variables('$fxv#0'))]" + } + }, + { + "type": "Microsoft.Hybridnetwork/publishers/networkservicedesigngroups/networkservicedesignversions", + "apiVersion": "2023-04-01-preview", + "name": "[format('{0}/{1}/{2}', parameters('publisherName'), parameters('nsDesignGroup'), parameters('nsDesignVersion'))]", + "location": "[parameters('location')]", + "properties": { + "description": "Test deploying multiple NFs", + "versionState": "Preview", + "configurationGroupSchemaReferences": { + "multinf_ConfigGroupSchema": { + "id": "[resourceId('Microsoft.Hybridnetwork/publishers/configurationGroupSchemas', parameters('publisherName'), 'multinf_ConfigGroupSchema')]" + } + }, + "nfvisFromSite": { + "nfvi1": { + "name": "[parameters('nfviSiteName')]", + "type": "AzureCore" + } + }, + "resourceElementTemplates": [ + { + "name": "nginx-nfdg_nf_artifact_resource_element", + "type": "NetworkFunctionDefinition", + "configuration": { + "artifactProfile": { + "artifactStoreReference": { + "id": "[resourceId('Microsoft.HybridNetwork/publishers/artifactStores', parameters('publisherName'), parameters('acrArtifactStoreName'))]" + }, + "artifactName": "nginx-nfdg_nf_artifact", + "artifactVersion": "1.0.1" + }, + "templateType": "ArmTemplate", + "parameterValues": "[string(variables('$fxv#1'))]" + }, + "dependsOnProfile": { + "installDependsOn": [], + "uninstallDependsOn": [], + "updateDependsOn": [] + } + }, + { + "name": "ubuntu-nfdg_nf_artifact_resource_element", + "type": "NetworkFunctionDefinition", + "configuration": { + "artifactProfile": { + "artifactStoreReference": { + "id": "[resourceId('Microsoft.HybridNetwork/publishers/artifactStores', parameters('publisherName'), parameters('acrArtifactStoreName'))]" + }, + "artifactName": "ubuntu-nfdg_nf_artifact", + "artifactVersion": "1.0.1" + }, + "templateType": "ArmTemplate", + "parameterValues": "[string(variables('$fxv#2'))]" + }, + "dependsOnProfile": { + "installDependsOn": [], + "uninstallDependsOn": [], + "updateDependsOn": [] + } + } + ] + }, + "dependsOn": [ + "[resourceId('Microsoft.Hybridnetwork/publishers/configurationGroupSchemas', parameters('publisherName'), 'multinf_ConfigGroupSchema')]" + ] + } + ] +} \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/schemas/multinf_ConfigGroupSchema.json b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/schemas/multinf_ConfigGroupSchema.json new file mode 100644 index 00000000000..1d120f6c538 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/schemas/multinf_ConfigGroupSchema.json @@ -0,0 +1,75 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema#", + "title": "multinf_ConfigGroupSchema", + "type": "object", + "properties": { + "nginx-nfdg": { + "type": "object", + "properties": { + "deploymentParameters": { + "type": "object", + "properties": { + "serviceAccount_create": { + "type": "boolean" + }, + "service_port": { + "type": "integer" + } + } + }, + "nginx_nfdg_nfd_version": { + "type": "string", + "description": "The version of the nginx-nfdg NFD to use. This version must be compatible with (have the same parameters exposed as) nginx-nfdg." + }, + "customLocationId": { + "type": "string", + "description": "The custom location ID of the ARC-Enabled AKS Cluster to deploy the CNF to. Should be of the form '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.extendedlocation/customlocations/{customLocationName}'" + } + }, + "required": [ + "deploymentParameters", + "nginx_nfdg_nfd_version", + "customLocationId" + ] + }, + "ubuntu-nfdg": { + "type": "object", + "properties": { + "deploymentParameters": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "subnetName": { + "type": "string" + }, + "virtualNetworkId": { + "type": "string" + }, + "sshPublicKeyAdmin": { + "type": "string" + } + } + }, + "ubuntu_nfdg_nfd_version": { + "type": "string", + "description": "The version of the ubuntu-nfdg NFD to use. This version must be compatible with (have the same parameters exposed as) ubuntu-nfdg." + } + }, + "required": [ + "deploymentParameters", + "ubuntu_nfdg_nfd_version" + ] + }, + "managedIdentity": { + "type": "string", + "description": "The managed identity to use to deploy NFs within this SNS. This should be of the form '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. If you wish to use a system assigned identity, set this to a blank string." + } + }, + "required": [ + "nginx-nfdg", + "ubuntu-nfdg", + "managedIdentity" + ] +} \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/ubuntu-nfdg_nf.bicep b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/ubuntu-nfdg_nf.bicep new file mode 100644 index 00000000000..e3baa6eff89 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/ubuntu-nfdg_nf.bicep @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Highly Confidential Material +// +// The template that the NSD invokes to create the Network Function from a published NFDV. + +@description('Publisher where the NFD is published') +param publisherName string = 'reference-publisher' + +@description('NFD Group name for the Network Function') +param networkFunctionDefinitionGroupName string = 'ubuntu-nfdg' + +@description('NFD version') +param ubuntu_nfdg_nfd_version string + +@description('Offering location for the Network Function') +param networkFunctionDefinitionOfferingLocation string = 'eastus' + +@description('The managed identity that should be used to create the NF.') +param managedIdentity string + +param location string = 'eastus' + +param nfviType string = 'AzureCore' + +param resourceGroupId string = resourceGroup().id + +param deploymentParameters array + +var identityObject = (managedIdentity == '') ? { + type: 'SystemAssigned' +} : { + type: 'UserAssigned' + userAssignedIdentities: { + '${managedIdentity}': {} + } +} + +resource nf_resource 'Microsoft.HybridNetwork/networkFunctions@2023-04-01-preview' = [for (values, i) in deploymentParameters: { + name: 'ubuntu-nfdg${i}' + location: location + identity: identityObject + properties: { + publisherName: publisherName + publisherScope: 'Private' + networkFunctionDefinitionGroupName: networkFunctionDefinitionGroupName + networkFunctionDefinitionVersion: ubuntu_nfdg_nfd_version + networkFunctionDefinitionOfferingLocation: networkFunctionDefinitionOfferingLocation + nfviType: nfviType + nfviId: resourceGroupId + allowSoftwareUpdate: true + deploymentValues: string(values) + } +}] \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/ubuntu-nfdg_nf.json b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/ubuntu-nfdg_nf.json new file mode 100644 index 00000000000..cf7ca8cbf83 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/ubuntu-nfdg_nf.json @@ -0,0 +1,88 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "metadata": { + "_generator": { + "name": "bicep", + "version": "0.15.31.15270", + "templateHash": "3539324333261838845" + } + }, + "parameters": { + "publisherName": { + "type": "string", + "defaultValue": "reference-publisher", + "metadata": { + "description": "Publisher where the NFD is published" + } + }, + "networkFunctionDefinitionGroupName": { + "type": "string", + "defaultValue": "ubuntu-nfdg", + "metadata": { + "description": "NFD Group name for the Network Function" + } + }, + "ubuntu_nfdg_nfd_version": { + "type": "string", + "metadata": { + "description": "NFD version" + } + }, + "networkFunctionDefinitionOfferingLocation": { + "type": "string", + "defaultValue": "eastus", + "metadata": { + "description": "Offering location for the Network Function" + } + }, + "managedIdentity": { + "type": "string", + "metadata": { + "description": "The managed identity that should be used to create the NF." + } + }, + "location": { + "type": "string", + "defaultValue": "eastus" + }, + "nfviType": { + "type": "string", + "defaultValue": "AzureCore" + }, + "resourceGroupId": { + "type": "string", + "defaultValue": "[resourceGroup().id]" + }, + "deploymentParameters": { + "type": "array" + } + }, + "variables": { + "identityObject": "[if(equals(parameters('managedIdentity'), ''), createObject('type', 'SystemAssigned'), createObject('type', 'UserAssigned', 'userAssignedIdentities', createObject(format('{0}', parameters('managedIdentity')), createObject())))]" + }, + "resources": [ + { + "copy": { + "name": "nf_resource", + "count": "[length(parameters('deploymentParameters'))]" + }, + "type": "Microsoft.HybridNetwork/networkFunctions", + "apiVersion": "2023-04-01-preview", + "name": "[format('ubuntu-nfdg{0}', copyIndex())]", + "location": "[parameters('location')]", + "identity": "[variables('identityObject')]", + "properties": { + "publisherName": "[parameters('publisherName')]", + "publisherScope": "Private", + "networkFunctionDefinitionGroupName": "[parameters('networkFunctionDefinitionGroupName')]", + "networkFunctionDefinitionVersion": "[parameters('ubuntu_nfdg_nfd_version')]", + "networkFunctionDefinitionOfferingLocation": "[parameters('networkFunctionDefinitionOfferingLocation')]", + "nfviType": "[parameters('nfviType')]", + "nfviId": "[parameters('resourceGroupId')]", + "allowSoftwareUpdate": true, + "deploymentValues": "[string(parameters('deploymentParameters')[copyIndex()])]" + } + } + ] +} \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/recordings/test_vnf_nsd_publish_and_delete.yaml b/src/aosm/azext_aosm/tests/latest/recordings/test_vnf_nsd_publish_and_delete.yaml new file mode 100644 index 00000000000..63e709c2093 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/recordings/test_vnf_nsd_publish_and_delete.yaml @@ -0,0 +1,4964 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: HEAD + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test?api-version=2022-09-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 27 Jul 2023 08:36:40 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test","name":"patrykkulik-test","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"autoDelete":"true","expiresOn":"2023-08-20T10:48:11.8928180Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '301' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:36:40 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher?api-version=2023-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher","name":"ubuntuPublisher","type":"microsoft.hybridnetwork/publishers","location":"uksouth","systemData":{"createdBy":"patrykkulik@microsoft.com","createdByType":"User","createdAt":"2023-07-24T10:35:08.3094719Z","lastModifiedBy":"patrykkulik@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-24T10:35:08.3094719Z"},"properties":{"scope":"Private","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '550' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:36:39 GMT + etag: + - '"0b00b59c-0000-1100-0000-64be53e60000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr?api-version=2023-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr","name":"ubuntu-acr","type":"microsoft.hybridnetwork/publishers/artifactstores","location":"uksouth","systemData":{"createdBy":"patrykkulik@microsoft.com","createdByType":"User","createdAt":"2023-07-24T10:36:42.2618346Z","lastModifiedBy":"b8ed041c-aa91-418e-8f47-20c70abc2de1","lastModifiedByType":"Application","lastModifiedAt":"2023-07-26T13:47:35.8021183Z"},"properties":{"storeType":"AzureContainerRegistry","replicationStrategy":"SingleReplication","managedResourceGroupConfiguration":{"name":"ubuntu-acr-HostedResources-7510103F","location":"uksouth"},"provisioningState":"Succeeded","storageResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ubuntu-acr-HostedResources-7510103F/providers/Microsoft.ContainerRegistry/registries/UbuntupublisherUbuntuAcr2315dcfa83"}}' + headers: + cache-control: + - no-cache + content-length: + - '978' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:36:40 GMT + etag: + - '"010076a6-0000-1100-0000-64c123f70000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-blob-store?api-version=2023-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-blob-store","name":"ubuntu-blob-store","type":"microsoft.hybridnetwork/publishers/artifactstores","location":"uksouth","systemData":{"createdBy":"patrykkulik@microsoft.com","createdByType":"User","createdAt":"2023-07-24T10:40:16.8226627Z","lastModifiedBy":"b8ed041c-aa91-418e-8f47-20c70abc2de1","lastModifiedByType":"Application","lastModifiedAt":"2023-07-26T13:45:04.3464487Z"},"properties":{"storeType":"AzureStorageAccount","replicationStrategy":"SingleReplication","managedResourceGroupConfiguration":{"name":"ubuntu-blob-store-HostedResources-07BDF073","location":"uksouth"},"provisioningState":"Succeeded","storageResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ubuntu-blob-store-HostedResources-07BDF073/providers/Microsoft.Storage/storageAccounts/07bdf073ubuntublobstorea"}}' + headers: + cache-control: + - no-cache + content-length: + - '988' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:36:40 GMT + etag: + - '"0100a7a4-0000-1100-0000-64c123600000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkFunctionDefinitionGroups/ubuntu-vm-nfdg?api-version=2023-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkFunctionDefinitionGroups/ubuntu-vm-nfdg","name":"ubuntu-vm-nfdg","type":"microsoft.hybridnetwork/publishers/networkfunctiondefinitiongroups","location":"uksouth","systemData":{"createdBy":"patrykkulik@microsoft.com","createdByType":"User","createdAt":"2023-07-24T10:42:52.0873069Z","lastModifiedBy":"patrykkulik@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-24T10:42:52.0873069Z"},"properties":{"description":null,"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '629' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:36:40 GMT + etag: + - '"0f00e901-0000-1100-0000-64be55b40000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-acr-manifest-1-0-0?api-version=2023-04-01-preview + response: + body: + string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-acr-manifest-1-0-0'' + under resource group ''patrykkulik-test'' was not found. For more details + please go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + cache-control: + - no-cache + content-length: + - '311' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:36:40 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-failure-cause: + - gateway + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-blob-store/artifactManifests/ubuntu-vm-sa-manifest-1-0-0?api-version=2023-04-01-preview + response: + body: + string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-blob-store/artifactManifests/ubuntu-vm-sa-manifest-1-0-0'' + under resource group ''patrykkulik-test'' was not found. For more details + please go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + cache-control: + - no-cache + content-length: + - '317' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:36:40 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-failure-cause: + - gateway + status: + code: 404 + message: Not Found +- request: + body: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "metadata": {"_generator": {"name": "bicep", "version": + "0.15.31.15270", "templateHash": "17926458934195505860"}}, "parameters": {"location": + {"type": "string"}, "publisherName": {"type": "string", "metadata": {"description": + "Name of an existing publisher, expected to be in the resource group where you + deploy the template"}}, "acrArtifactStoreName": {"type": "string", "metadata": + {"description": "Name of an existing ACR-backed Artifact Store, deployed under + the publisher."}}, "saArtifactStoreName": {"type": "string", "metadata": {"description": + "Name of an existing Storage Account-backed Artifact Store, deployed under the + publisher."}}, "acrManifestName": {"type": "string", "metadata": {"description": + "Name of the manifest to deploy for the ACR-backed Artifact Store"}}, "saManifestName": + {"type": "string", "metadata": {"description": "Name of the manifest to deploy + for the Storage Account-backed Artifact Store"}}, "nfName": {"type": "string", + "metadata": {"description": "Name of Network Function. Used predominantly as + a prefix for other variable names"}}, "vhdVersion": {"type": "string", "metadata": + {"description": "The version that you want to name the NFM VHD artifact, in + format A-B-C. e.g. 6-13-0"}}, "armTemplateVersion": {"type": "string", "metadata": + {"description": "The name under which to store the ARM template"}}}, "resources": + [{"type": "Microsoft.Hybridnetwork/publishers/artifactStores/artifactManifests", + "apiVersion": "2023-04-01-preview", "name": "[format(''{0}/{1}/{2}'', parameters(''publisherName''), + parameters(''saArtifactStoreName''), parameters(''saManifestName''))]", "location": + "[parameters(''location'')]", "properties": {"artifacts": [{"artifactName": + "[format(''{0}-vhd'', parameters(''nfName''))]", "artifactType": "VhdImageFile", + "artifactVersion": "[parameters(''vhdVersion'')]"}]}}, {"type": "Microsoft.Hybridnetwork/publishers/artifactStores/artifactManifests", + "apiVersion": "2023-04-01-preview", "name": "[format(''{0}/{1}/{2}'', parameters(''publisherName''), + parameters(''acrArtifactStoreName''), parameters(''acrManifestName''))]", "location": + "[parameters(''location'')]", "properties": {"artifacts": [{"artifactName": + "[format(''{0}-arm-template'', parameters(''nfName''))]", "artifactType": "ArmTemplate", + "artifactVersion": "[parameters(''armTemplateVersion'')]"}]}}]}, "parameters": + {"location": {"value": "uksouth"}, "publisherName": {"value": "ubuntuPublisher"}, + "acrArtifactStoreName": {"value": "ubuntu-acr"}, "saArtifactStoreName": {"value": + "ubuntu-blob-store"}, "acrManifestName": {"value": "ubuntu-vm-acr-manifest-1-0-0"}, + "saManifestName": {"value": "ubuntu-vm-sa-manifest-1-0-0"}, "nfName": {"value": + "ubuntu-vm"}, "vhdVersion": {"value": "1-0-0"}, "armTemplateVersion": {"value": + "1.0.0"}}, "mode": "Incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + Content-Length: + - '2910' + Content-Type: + - application/json + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment/validate?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Resources/deployments/AOSM_CLI_deployment_1690447004","name":"AOSM_CLI_deployment_1690447004","type":"Microsoft.Resources/deployments","properties":{"templateHash":"17926458934195505860","parameters":{"location":{"type":"String","value":"uksouth"},"publisherName":{"type":"String","value":"ubuntuPublisher"},"acrArtifactStoreName":{"type":"String","value":"ubuntu-acr"},"saArtifactStoreName":{"type":"String","value":"ubuntu-blob-store"},"acrManifestName":{"type":"String","value":"ubuntu-vm-acr-manifest-1-0-0"},"saManifestName":{"type":"String","value":"ubuntu-vm-sa-manifest-1-0-0"},"nfName":{"type":"String","value":"ubuntu-vm"},"vhdVersion":{"type":"String","value":"1-0-0"},"armTemplateVersion":{"type":"String","value":"1.0.0"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"0001-01-01T00:00:00Z","duration":"PT0S","correlationId":"d2488805-2ca3-400c-bc0d-f185e5b3771e","providers":[{"namespace":"Microsoft.Hybridnetwork","resourceTypes":[{"resourceType":"publishers/artifactStores/artifactManifests","locations":["uksouth"]}]}],"dependencies":[],"validatedResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-blob-store/artifactManifests/ubuntu-vm-sa-manifest-1-0-0"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-acr-manifest-1-0-0"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '1669' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:36:46 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "metadata": {"_generator": {"name": "bicep", "version": + "0.15.31.15270", "templateHash": "17926458934195505860"}}, "parameters": {"location": + {"type": "string"}, "publisherName": {"type": "string", "metadata": {"description": + "Name of an existing publisher, expected to be in the resource group where you + deploy the template"}}, "acrArtifactStoreName": {"type": "string", "metadata": + {"description": "Name of an existing ACR-backed Artifact Store, deployed under + the publisher."}}, "saArtifactStoreName": {"type": "string", "metadata": {"description": + "Name of an existing Storage Account-backed Artifact Store, deployed under the + publisher."}}, "acrManifestName": {"type": "string", "metadata": {"description": + "Name of the manifest to deploy for the ACR-backed Artifact Store"}}, "saManifestName": + {"type": "string", "metadata": {"description": "Name of the manifest to deploy + for the Storage Account-backed Artifact Store"}}, "nfName": {"type": "string", + "metadata": {"description": "Name of Network Function. Used predominantly as + a prefix for other variable names"}}, "vhdVersion": {"type": "string", "metadata": + {"description": "The version that you want to name the NFM VHD artifact, in + format A-B-C. e.g. 6-13-0"}}, "armTemplateVersion": {"type": "string", "metadata": + {"description": "The name under which to store the ARM template"}}}, "resources": + [{"type": "Microsoft.Hybridnetwork/publishers/artifactStores/artifactManifests", + "apiVersion": "2023-04-01-preview", "name": "[format(''{0}/{1}/{2}'', parameters(''publisherName''), + parameters(''saArtifactStoreName''), parameters(''saManifestName''))]", "location": + "[parameters(''location'')]", "properties": {"artifacts": [{"artifactName": + "[format(''{0}-vhd'', parameters(''nfName''))]", "artifactType": "VhdImageFile", + "artifactVersion": "[parameters(''vhdVersion'')]"}]}}, {"type": "Microsoft.Hybridnetwork/publishers/artifactStores/artifactManifests", + "apiVersion": "2023-04-01-preview", "name": "[format(''{0}/{1}/{2}'', parameters(''publisherName''), + parameters(''acrArtifactStoreName''), parameters(''acrManifestName''))]", "location": + "[parameters(''location'')]", "properties": {"artifacts": [{"artifactName": + "[format(''{0}-arm-template'', parameters(''nfName''))]", "artifactType": "ArmTemplate", + "artifactVersion": "[parameters(''armTemplateVersion'')]"}]}}]}, "parameters": + {"location": {"value": "uksouth"}, "publisherName": {"value": "ubuntuPublisher"}, + "acrArtifactStoreName": {"value": "ubuntu-acr"}, "saArtifactStoreName": {"value": + "ubuntu-blob-store"}, "acrManifestName": {"value": "ubuntu-vm-acr-manifest-1-0-0"}, + "saManifestName": {"value": "ubuntu-vm-sa-manifest-1-0-0"}, "nfName": {"value": + "ubuntu-vm"}, "vhdVersion": {"value": "1-0-0"}, "armTemplateVersion": {"value": + "1.0.0"}}, "mode": "Incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + Content-Length: + - '2910' + Content-Type: + - application/json + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Resources/deployments/AOSM_CLI_deployment_1690447004","name":"AOSM_CLI_deployment_1690447004","type":"Microsoft.Resources/deployments","properties":{"templateHash":"17926458934195505860","parameters":{"location":{"type":"String","value":"uksouth"},"publisherName":{"type":"String","value":"ubuntuPublisher"},"acrArtifactStoreName":{"type":"String","value":"ubuntu-acr"},"saArtifactStoreName":{"type":"String","value":"ubuntu-blob-store"},"acrManifestName":{"type":"String","value":"ubuntu-vm-acr-manifest-1-0-0"},"saManifestName":{"type":"String","value":"ubuntu-vm-sa-manifest-1-0-0"},"nfName":{"type":"String","value":"ubuntu-vm"},"vhdVersion":{"type":"String","value":"1-0-0"},"armTemplateVersion":{"type":"String","value":"1.0.0"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2023-07-27T08:36:48.6118905Z","duration":"PT0.0063159S","correlationId":"a9bc5b50-ec08-4f91-81a5-e48f781a16df","providers":[{"namespace":"Microsoft.Hybridnetwork","resourceTypes":[{"resourceType":"publishers/artifactStores/artifactManifests","locations":["uksouth"]}]}],"dependencies":[]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/AOSM_CLI_deployment_1690447004/operationStatuses/08585111598778298583?api-version=2022-09-01 + cache-control: + - no-cache + content-length: + - '1201' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:36:48 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585111598778298583?api-version=2022-09-01 + response: + body: + string: '{"status":"Accepted"}' + headers: + cache-control: + - no-cache + content-length: + - '21' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:36:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585111598778298583?api-version=2022-09-01 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:37:18 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Resources/deployments/AOSM_CLI_deployment_1690447004","name":"AOSM_CLI_deployment_1690447004","type":"Microsoft.Resources/deployments","properties":{"templateHash":"17926458934195505860","parameters":{"location":{"type":"String","value":"uksouth"},"publisherName":{"type":"String","value":"ubuntuPublisher"},"acrArtifactStoreName":{"type":"String","value":"ubuntu-acr"},"saArtifactStoreName":{"type":"String","value":"ubuntu-blob-store"},"acrManifestName":{"type":"String","value":"ubuntu-vm-acr-manifest-1-0-0"},"saManifestName":{"type":"String","value":"ubuntu-vm-sa-manifest-1-0-0"},"nfName":{"type":"String","value":"ubuntu-vm"},"vhdVersion":{"type":"String","value":"1-0-0"},"armTemplateVersion":{"type":"String","value":"1.0.0"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2023-07-27T08:37:10.4524442Z","duration":"PT21.8468696S","correlationId":"a9bc5b50-ec08-4f91-81a5-e48f781a16df","providers":[{"namespace":"Microsoft.Hybridnetwork","resourceTypes":[{"resourceType":"publishers/artifactStores/artifactManifests","locations":["uksouth"]}]}],"dependencies":[],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-acr-manifest-1-0-0"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-blob-store/artifactManifests/ubuntu-vm-sa-manifest-1-0-0"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '1683' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:37:19 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "metadata": {"_generator": {"name": "bicep", "version": + "0.15.31.15270", "templateHash": "9758159467150602695"}}, "parameters": {"location": + {"type": "string"}, "publisherName": {"type": "string", "metadata": {"description": + "Name of an existing publisher, expected to be in the resource group where you + deploy the template"}}, "acrArtifactStoreName": {"type": "string", "metadata": + {"description": "Name of an existing ACR-backed Artifact Store, deployed under + the publisher."}}, "saArtifactStoreName": {"type": "string", "metadata": {"description": + "Name of an existing Storage Account-backed Artifact Store, deployed under the + publisher."}}, "nfName": {"type": "string", "metadata": {"description": "Name + of Network Function. Used predominantly as a prefix for other variable names"}}, + "nfDefinitionGroup": {"type": "string", "metadata": {"description": "Name of + an existing Network Function Definition Group"}}, "nfDefinitionVersion": {"type": + "string", "metadata": {"description": "The version of the NFDV you want to deploy, + in format A.B.C"}}, "vhdVersion": {"type": "string", "metadata": {"description": + "The version that you want to name the NFM VHD artifact, in format A-B-C. e.g. + 6-13-0"}}, "armTemplateVersion": {"type": "string", "metadata": {"description": + "The version that you want to name the NFM template artifact, in format A.B.C. + e.g. 6.13.0. If testing for development, you can use any numbers you like."}}}, + "variables": {"$fxv#0": {"$schema": "https://json-schema.org/draft-07/schema#", + "title": "DeployParametersSchema", "type": "object", "properties": {"location": + {"type": "string"}, "subnetName": {"type": "string"}, "ubuntuVmName": {"type": + "string"}, "virtualNetworkId": {"type": "string"}, "sshPublicKeyAdmin": {"type": + "string"}}}, "$fxv#1": {"imageName": "ubuntu-vmImage", "azureDeployLocation": + "{deployParameters.location}"}, "$fxv#2": {"location": "{deployParameters.location}", + "subnetName": "{deployParameters.subnetName}", "ubuntuVmName": "{deployParameters.ubuntuVmName}", + "virtualNetworkId": "{deployParameters.virtualNetworkId}", "sshPublicKeyAdmin": + "{deployParameters.sshPublicKeyAdmin}", "imageName": "ubuntu-vmImage"}}, "resources": + [{"type": "Microsoft.Hybridnetwork/publishers/networkfunctiondefinitiongroups/networkfunctiondefinitionversions", + "apiVersion": "2023-04-01-preview", "name": "[format(''{0}/{1}/{2}'', parameters(''publisherName''), + parameters(''nfDefinitionGroup''), parameters(''nfDefinitionVersion''))]", "location": + "[parameters(''location'')]", "properties": {"versionState": "Preview", "deployParameters": + "[string(variables(''$fxv#0''))]", "networkFunctionType": "VirtualNetworkFunction", + "networkFunctionTemplate": {"nfviType": "AzureCore", "networkFunctionApplications": + [{"artifactType": "VhdImageFile", "name": "[format(''{0}Image'', parameters(''nfName''))]", + "dependsOnProfile": null, "artifactProfile": {"vhdArtifactProfile": {"vhdName": + "[format(''{0}-vhd'', parameters(''nfName''))]", "vhdVersion": "[parameters(''vhdVersion'')]"}, + "artifactStore": {"id": "[resourceId(''Microsoft.HybridNetwork/publishers/artifactStores'', + parameters(''publisherName''), parameters(''saArtifactStoreName''))]"}}, "deployParametersMappingRuleProfile": + {"vhdImageMappingRuleProfile": {"userConfiguration": "[string(variables(''$fxv#1''))]"}, + "applicationEnablement": "Unknown"}}, {"artifactType": "ArmTemplate", "name": + "[parameters(''nfName'')]", "dependsOnProfile": null, "artifactProfile": {"templateArtifactProfile": + {"templateName": "[format(''{0}-arm-template'', parameters(''nfName''))]", "templateVersion": + "[parameters(''armTemplateVersion'')]"}, "artifactStore": {"id": "[resourceId(''Microsoft.HybridNetwork/publishers/artifactStores'', + parameters(''publisherName''), parameters(''acrArtifactStoreName''))]"}}, "deployParametersMappingRuleProfile": + {"templateMappingRuleProfile": {"templateParameters": "[string(variables(''$fxv#2''))]"}, + "applicationEnablement": "Unknown"}}]}}}]}, "parameters": {"location": {"value": + "uksouth"}, "publisherName": {"value": "ubuntuPublisher"}, "acrArtifactStoreName": + {"value": "ubuntu-acr"}, "saArtifactStoreName": {"value": "ubuntu-blob-store"}, + "nfName": {"value": "ubuntu-vm"}, "nfDefinitionGroup": {"value": "ubuntu-vm-nfdg"}, + "nfDefinitionVersion": {"value": "1.0.0"}, "vhdVersion": {"value": "1-0-0"}, + "armTemplateVersion": {"value": "1.0.0"}}, "mode": "Incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + Content-Length: + - '4485' + Content-Type: + - application/json + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment/validate?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Resources/deployments/AOSM_CLI_deployment_1690447044","name":"AOSM_CLI_deployment_1690447044","type":"Microsoft.Resources/deployments","properties":{"templateHash":"9758159467150602695","parameters":{"location":{"type":"String","value":"uksouth"},"publisherName":{"type":"String","value":"ubuntuPublisher"},"acrArtifactStoreName":{"type":"String","value":"ubuntu-acr"},"saArtifactStoreName":{"type":"String","value":"ubuntu-blob-store"},"nfName":{"type":"String","value":"ubuntu-vm"},"nfDefinitionGroup":{"type":"String","value":"ubuntu-vm-nfdg"},"nfDefinitionVersion":{"type":"String","value":"1.0.0"},"vhdVersion":{"type":"String","value":"1-0-0"},"armTemplateVersion":{"type":"String","value":"1.0.0"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"0001-01-01T00:00:00Z","duration":"PT0S","correlationId":"119d45df-88d3-4f39-bead-9af25f73854b","providers":[{"namespace":"Microsoft.Hybridnetwork","resourceTypes":[{"resourceType":"publishers/networkfunctiondefinitiongroups/networkfunctiondefinitionversions","locations":["uksouth"]}]}],"dependencies":[],"validatedResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/networkfunctiondefinitiongroups/ubuntu-vm-nfdg/networkfunctiondefinitionversions/1.0.0"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '1453' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:37:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "metadata": {"_generator": {"name": "bicep", "version": + "0.15.31.15270", "templateHash": "9758159467150602695"}}, "parameters": {"location": + {"type": "string"}, "publisherName": {"type": "string", "metadata": {"description": + "Name of an existing publisher, expected to be in the resource group where you + deploy the template"}}, "acrArtifactStoreName": {"type": "string", "metadata": + {"description": "Name of an existing ACR-backed Artifact Store, deployed under + the publisher."}}, "saArtifactStoreName": {"type": "string", "metadata": {"description": + "Name of an existing Storage Account-backed Artifact Store, deployed under the + publisher."}}, "nfName": {"type": "string", "metadata": {"description": "Name + of Network Function. Used predominantly as a prefix for other variable names"}}, + "nfDefinitionGroup": {"type": "string", "metadata": {"description": "Name of + an existing Network Function Definition Group"}}, "nfDefinitionVersion": {"type": + "string", "metadata": {"description": "The version of the NFDV you want to deploy, + in format A.B.C"}}, "vhdVersion": {"type": "string", "metadata": {"description": + "The version that you want to name the NFM VHD artifact, in format A-B-C. e.g. + 6-13-0"}}, "armTemplateVersion": {"type": "string", "metadata": {"description": + "The version that you want to name the NFM template artifact, in format A.B.C. + e.g. 6.13.0. If testing for development, you can use any numbers you like."}}}, + "variables": {"$fxv#0": {"$schema": "https://json-schema.org/draft-07/schema#", + "title": "DeployParametersSchema", "type": "object", "properties": {"location": + {"type": "string"}, "subnetName": {"type": "string"}, "ubuntuVmName": {"type": + "string"}, "virtualNetworkId": {"type": "string"}, "sshPublicKeyAdmin": {"type": + "string"}}}, "$fxv#1": {"imageName": "ubuntu-vmImage", "azureDeployLocation": + "{deployParameters.location}"}, "$fxv#2": {"location": "{deployParameters.location}", + "subnetName": "{deployParameters.subnetName}", "ubuntuVmName": "{deployParameters.ubuntuVmName}", + "virtualNetworkId": "{deployParameters.virtualNetworkId}", "sshPublicKeyAdmin": + "{deployParameters.sshPublicKeyAdmin}", "imageName": "ubuntu-vmImage"}}, "resources": + [{"type": "Microsoft.Hybridnetwork/publishers/networkfunctiondefinitiongroups/networkfunctiondefinitionversions", + "apiVersion": "2023-04-01-preview", "name": "[format(''{0}/{1}/{2}'', parameters(''publisherName''), + parameters(''nfDefinitionGroup''), parameters(''nfDefinitionVersion''))]", "location": + "[parameters(''location'')]", "properties": {"versionState": "Preview", "deployParameters": + "[string(variables(''$fxv#0''))]", "networkFunctionType": "VirtualNetworkFunction", + "networkFunctionTemplate": {"nfviType": "AzureCore", "networkFunctionApplications": + [{"artifactType": "VhdImageFile", "name": "[format(''{0}Image'', parameters(''nfName''))]", + "dependsOnProfile": null, "artifactProfile": {"vhdArtifactProfile": {"vhdName": + "[format(''{0}-vhd'', parameters(''nfName''))]", "vhdVersion": "[parameters(''vhdVersion'')]"}, + "artifactStore": {"id": "[resourceId(''Microsoft.HybridNetwork/publishers/artifactStores'', + parameters(''publisherName''), parameters(''saArtifactStoreName''))]"}}, "deployParametersMappingRuleProfile": + {"vhdImageMappingRuleProfile": {"userConfiguration": "[string(variables(''$fxv#1''))]"}, + "applicationEnablement": "Unknown"}}, {"artifactType": "ArmTemplate", "name": + "[parameters(''nfName'')]", "dependsOnProfile": null, "artifactProfile": {"templateArtifactProfile": + {"templateName": "[format(''{0}-arm-template'', parameters(''nfName''))]", "templateVersion": + "[parameters(''armTemplateVersion'')]"}, "artifactStore": {"id": "[resourceId(''Microsoft.HybridNetwork/publishers/artifactStores'', + parameters(''publisherName''), parameters(''acrArtifactStoreName''))]"}}, "deployParametersMappingRuleProfile": + {"templateMappingRuleProfile": {"templateParameters": "[string(variables(''$fxv#2''))]"}, + "applicationEnablement": "Unknown"}}]}}}]}, "parameters": {"location": {"value": + "uksouth"}, "publisherName": {"value": "ubuntuPublisher"}, "acrArtifactStoreName": + {"value": "ubuntu-acr"}, "saArtifactStoreName": {"value": "ubuntu-blob-store"}, + "nfName": {"value": "ubuntu-vm"}, "nfDefinitionGroup": {"value": "ubuntu-vm-nfdg"}, + "nfDefinitionVersion": {"value": "1.0.0"}, "vhdVersion": {"value": "1-0-0"}, + "armTemplateVersion": {"value": "1.0.0"}}, "mode": "Incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + Content-Length: + - '4485' + Content-Type: + - application/json + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Resources/deployments/AOSM_CLI_deployment_1690447044","name":"AOSM_CLI_deployment_1690447044","type":"Microsoft.Resources/deployments","properties":{"templateHash":"9758159467150602695","parameters":{"location":{"type":"String","value":"uksouth"},"publisherName":{"type":"String","value":"ubuntuPublisher"},"acrArtifactStoreName":{"type":"String","value":"ubuntu-acr"},"saArtifactStoreName":{"type":"String","value":"ubuntu-blob-store"},"nfName":{"type":"String","value":"ubuntu-vm"},"nfDefinitionGroup":{"type":"String","value":"ubuntu-vm-nfdg"},"nfDefinitionVersion":{"type":"String","value":"1.0.0"},"vhdVersion":{"type":"String","value":"1-0-0"},"armTemplateVersion":{"type":"String","value":"1.0.0"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2023-07-27T08:37:26.4394835Z","duration":"PT0.0007218S","correlationId":"4843ca8e-1428-4b5e-834e-a9b77f84cb8a","providers":[{"namespace":"Microsoft.Hybridnetwork","resourceTypes":[{"resourceType":"publishers/networkfunctiondefinitiongroups/networkfunctiondefinitionversions","locations":["uksouth"]}]}],"dependencies":[]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/AOSM_CLI_deployment_1690447044/operationStatuses/08585111598393673646?api-version=2022-09-01 + cache-control: + - no-cache + content-length: + - '1204' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:37:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585111598393673646?api-version=2022-09-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:37:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585111598393673646?api-version=2022-09-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:37:57 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585111598393673646?api-version=2022-09-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:38:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585111598393673646?api-version=2022-09-01 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:38:56 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Resources/deployments/AOSM_CLI_deployment_1690447044","name":"AOSM_CLI_deployment_1690447044","type":"Microsoft.Resources/deployments","properties":{"templateHash":"9758159467150602695","parameters":{"location":{"type":"String","value":"uksouth"},"publisherName":{"type":"String","value":"ubuntuPublisher"},"acrArtifactStoreName":{"type":"String","value":"ubuntu-acr"},"saArtifactStoreName":{"type":"String","value":"ubuntu-blob-store"},"nfName":{"type":"String","value":"ubuntu-vm"},"nfDefinitionGroup":{"type":"String","value":"ubuntu-vm-nfdg"},"nfDefinitionVersion":{"type":"String","value":"1.0.0"},"vhdVersion":{"type":"String","value":"1-0-0"},"armTemplateVersion":{"type":"String","value":"1.0.0"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2023-07-27T08:38:50.4748316Z","duration":"PT1M24.0360699S","correlationId":"4843ca8e-1428-4b5e-834e-a9b77f84cb8a","providers":[{"namespace":"Microsoft.Hybridnetwork","resourceTypes":[{"resourceType":"publishers/networkfunctiondefinitiongroups/networkfunctiondefinitionversions","locations":["uksouth"]}]}],"dependencies":[],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/networkfunctiondefinitiongroups/ubuntu-vm-nfdg/networkfunctiondefinitionversions/1.0.0"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '1469' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:38:56 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-blob-store/artifactManifests/ubuntu-vm-sa-manifest-1-0-0?api-version=2023-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-blob-store/artifactManifests/ubuntu-vm-sa-manifest-1-0-0","name":"ubuntu-vm-sa-manifest-1-0-0","type":"microsoft.hybridnetwork/publishers/artifactstores/artifactmanifests","location":"uksouth","systemData":{"createdBy":"jamieparsons@microsoft.com","createdByType":"User","createdAt":"2023-07-27T08:36:51.2353772Z","lastModifiedBy":"jamieparsons@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-27T08:36:51.2353772Z"},"properties":{"artifacts":[{"artifactName":"ubuntu-vm-vhd","artifactType":"VhdImageFile","artifactVersion":"1-0-0"}],"artifactManifestState":"Uploading","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '797' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:38:57 GMT + etag: + - '"10007f7c-0000-1100-0000-64c22ca60000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-blob-store/artifactManifests/ubuntu-vm-sa-manifest-1-0-0/listCredential?api-version=2023-04-01-preview + response: + body: + string: '{"storageAccountId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ubuntu-blob-store-HostedResources-07BDF073/providers/Microsoft.Storage/storageAccounts/07bdf073ubuntublobstorea","containerCredentials":[{"containerName":"ubuntuvmvhd-1-0-0","containerSasUri":"https://07bdf073ubuntublobstorea.blob.core.windows.net/ubuntuvmvhd-1-0-0?sv=2021-08-06&si=StorageAccountAccessPolicy&sr=c&sig=eoSLWD7pccblbNRJt8QGMkWOcYR9xZbjVntVNxHmXiY%3D"}],"expiry":"2023-07-28T08:38:59.8129434+00:00","credentialType":"AzureStorageAccountToken"}' + headers: + cache-control: + - no-cache + content-length: + - '546' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:38:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-build-version: + - 1.0.02386.1640 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-acr-manifest-1-0-0?api-version=2023-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-acr-manifest-1-0-0","name":"ubuntu-vm-acr-manifest-1-0-0","type":"microsoft.hybridnetwork/publishers/artifactstores/artifactmanifests","location":"uksouth","systemData":{"createdBy":"jamieparsons@microsoft.com","createdByType":"User","createdAt":"2023-07-27T08:36:51.2510817Z","lastModifiedBy":"jamieparsons@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-27T08:36:51.2510817Z"},"properties":{"artifacts":[{"artifactName":"ubuntu-vm-arm-template","artifactType":"ArmTemplate","artifactVersion":"1.0.0"}],"artifactManifestState":"Uploading","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '800' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:38:59 GMT + etag: + - '"1000b17c-0000-1100-0000-64c22cb40000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd publish + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -f --definition-type --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-acr-manifest-1-0-0/listCredential?api-version=2023-04-01-preview + response: + body: + string: '{"username":"ubuntu-vm-acr-manifest-1-0-0","acrToken":"kVTD9kAaR9rfNbAVpH4+McPIOsrm3fLNj4HH5qO7U/+ACRDBqF+4","acrServerUrl":"https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io","repositories":["ubuntu-vm-arm-template"],"expiry":"2023-07-28T08:39:00.6488665+00:00","credentialType":"AzureContainerRegistryScopedToken"}' + headers: + cache-control: + - no-cache + content-length: + - '320' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-build-version: + - 1.0.02386.1640 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.16.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + x-ms-date: + - Thu, 27 Jul 2023 08:39:01 GMT + x-ms-version: + - '2022-11-02' + method: HEAD + uri: https://ubuntuimage.blob.core.windows.net/images/livecd.ubuntu-cpc.azure.vhd?sp=r&st=2023-07-25T13%3A50%3A40Z&se=2024-07-25T21%3A50%3A40Z&spr=https&sv=2022-11-02&sr=b&sig=NlqXIleMtL9wIACerJdtxZ5kXdF0Gbe4uoYRmcDsFq8%3D + response: + body: + string: '' + headers: + accept-ranges: + - bytes + content-length: + - '32213303808' + content-type: + - application/octet-stream + date: + - Thu, 27 Jul 2023 08:39:01 GMT + etag: + - '"0x8DB883E503690E6"' + last-modified: + - Wed, 19 Jul 2023 09:55:41 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-sequence-number: + - '0' + x-ms-blob-type: + - PageBlob + x-ms-creation-time: + - Wed, 19 Jul 2023 09:33:40 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2022-11-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-blob/12.16.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + x-ms-copy-source: + - https://ubuntuimage.blob.core.windows.net/images/livecd.ubuntu-cpc.azure.vhd?sp=r&st=2023-07-25T13%3A50%3A40Z&se=2024-07-25T21%3A50%3A40Z&spr=https&sv=2022-11-02&sr=b&sig=NlqXIleMtL9wIACerJdtxZ5kXdF0Gbe4uoYRmcDsFq8%3D + x-ms-date: + - Thu, 27 Jul 2023 08:39:01 GMT + x-ms-version: + - '2022-11-02' + method: PUT + uri: https://07bdf073ubuntublobstorea.blob.core.windows.net/ubuntuvmvhd-1-0-0/ubuntuvm-1-0-0.vhd?sv=2021-08-06&si=StorageAccountAccessPolicy&sr=c&sig=eoSLWD7pccblbNRJt8QGMkWOcYR9xZbjVntVNxHmXiY%3D + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Thu, 27 Jul 2023 08:39:01 GMT + etag: + - '"0x8DB8E7CEDFF753F"' + last-modified: + - Thu, 27 Jul 2023 08:39:02 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-copy-id: + - 334095cf-86e9-4700-9c1c-898327069c99 + x-ms-copy-status: + - pending + x-ms-version: + - '2022-11-02' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/octet-stream + User-Agent: + - python-requests/2.26.0 + method: POST + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-arm-template/blobs/uploads/ + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"ubuntu-vm-arm-template","Action":"pull"},{"Type":"repository","Name":"ubuntu-vm-arm-template","Action":"push"}]}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '286' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:02 GMT + docker-distribution-api-version: + - registry/2.0 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + www-authenticate: + - Bearer realm="https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/oauth2/token",service="ubuntupublisherubuntuacr2315dcfa83.azurecr.io",scope="repository:ubuntu-vm-arm-template:pull,push" + x-content-type-options: + - nosniff + status: + code: 401 + message: Unauthorized +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Service: + - ubuntupublisherubuntuacr2315dcfa83.azurecr.io + User-Agent: + - oras-py + method: GET + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/oauth2/token?service=ubuntupublisherubuntuacr2315dcfa83.azurecr.io&scope=repository%3Aubuntu-vm-arm-template%3Apull%2Cpush + response: + body: + string: '{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IkNPQVU6UERZSDo0SVJYOjM2SEI6TFYzUDpWNFBGOko0NzQ6SzNOSjpPS1JCOlRZQUo6NEc0Szo1Q1NEIn0.eyJqdGkiOiJjYzQxNTFiMy1jNDU0LTQ2M2YtODI2ZC1kZmQzZDM0NjlhZWUiLCJzdWIiOiJ1YnVudHUtdm0tYWNyLW1hbmlmZXN0LTEtMC0wIiwibmJmIjoxNjkwNDQ2MjQyLCJleHAiOjE2OTA0NDgwNDIsImlhdCI6MTY5MDQ0NjI0MiwiaXNzIjoiQXp1cmUgQ29udGFpbmVyIFJlZ2lzdHJ5IiwiYXVkIjoidWJ1bnR1cHVibGlzaGVydWJ1bnR1YWNyMjMxNWRjZmE4My5henVyZWNyLmlvIiwidmVyc2lvbiI6IjIuMCIsInJpZCI6IjUzNjQ5MTE4MjEzMTRkNjc5MjZkYTdhM2NkYzE3NGY4IiwiYWNjZXNzIjpbeyJUeXBlIjoicmVwb3NpdG9yeSIsIk5hbWUiOiJ1YnVudHUtdm0tYXJtLXRlbXBsYXRlIiwiQWN0aW9ucyI6WyJwdWxsIiwicHVzaCJdfV0sInJvbGVzIjpbXSwiZ3JhbnRfdHlwZSI6ImFjY2Vzc190b2tlbiJ9.sYXP7T121wBoMXhOtsHrR35dhYLtd8Lq-VaXVrNTdzkH1HI5_ky2zADjNkxwdYQuHmkgWAuwFQOJQdTgejPTH1kfpjtpvMCtG6KHlERGBrE7hneTMed6iFpJldq4-p2zpKmzTJCEJjAIN10LwJCUEJr1npYckIBBlo0o85kJcsaxF9eWrZYpb5GHHqOyxYDjfesxLKu5YuCDGXM6F6RrJ7GgEQYhXlQOUfTrGRSMD7uE87oaqiNj6rZuG8UMKr7m9FAUeWyQ2zCGkcxpQ37ex7sFtxOrUcoxI3h6rQjUv4twjlV4gjzdXUnCzVt15YKmKH5hWoq6snb_cDEAkh3Jjw"}' + headers: + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:02 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.316667' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/octet-stream + User-Agent: + - python-requests/2.26.0 + method: POST + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-arm-template/blobs/uploads/ + response: + body: + string: '' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '0' + date: + - Thu, 27 Jul 2023 08:39:02 GMT + docker-distribution-api-version: + - registry/2.0 + docker-upload-uuid: + - 7bc7c95c-face-4ffb-9021-02172a4e6279 + location: + - /v2/ubuntu-vm-arm-template/blobs/uploads/7bc7c95c-face-4ffb-9021-02172a4e6279?_nouploadcache=false&_state=ZPo5kB5x7VQ6WbZEHoW2yuBlm-BsBz0vKuQMqzQANzp7Ik5hbWUiOiJ1YnVudHUtdm0tYXJtLXRlbXBsYXRlIiwiVVVJRCI6IjdiYzdjOTVjLWZhY2UtNGZmYi05MDIxLTAyMTcyYTRlNjI3OSIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAyMy0wNy0yN1QwODozOTowMi44MDA0NjU3M1oifQ%3D%3D + range: + - 0-0 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: "{\n \"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\",\n + \ \"contentVersion\": \"1.0.0.0\",\n \"metadata\": {\n \"_generator\": {\n + \ \"name\": \"bicep\",\n \"version\": \"0.8.9.13224\",\n \"templateHash\": + \"14979664264804385741\"\n }\n },\n \"parameters\": {\n \"location\": + {\n \"type\": \"string\",\n \"defaultValue\": \"[resourceGroup().location]\"\n + \ },\n \"subnetName\": {\n \"type\": \"string\"\n },\n \"ubuntuVmName\": + {\n \"type\": \"string\",\n \"defaultValue\": \"ubuntu-vm\"\n },\n + \ \"virtualNetworkId\": {\n \"type\": \"string\"\n },\n \"sshPublicKeyAdmin\": + {\n \"type\": \"string\"\n },\n \"imageName\": {\n \"type\": + \"string\"\n }\n },\n \"variables\": {\n \"imageResourceGroup\": \"[resourceGroup().name]\",\n + \ \"subscriptionId\": \"[subscription().subscriptionId]\",\n \"vmSizeSku\": + \"Standard_D2s_v3\"\n },\n \"resources\": [\n {\n \"type\": \"Microsoft.Network/networkInterfaces\",\n + \ \"apiVersion\": \"2021-05-01\",\n \"name\": \"[format('{0}_nic', + parameters('ubuntuVmName'))]\",\n \"location\": \"[parameters('location')]\",\n + \ \"properties\": {\n \"ipConfigurations\": [\n {\n \"name\": + \"ipconfig1\",\n \"properties\": {\n \"subnet\": {\n + \ \"id\": \"[format('{0}/subnets/{1}', parameters('virtualNetworkId'), + parameters('subnetName'))]\"\n },\n \"primary\": true,\n + \ \"privateIPAddressVersion\": \"IPv4\"\n }\n }\n + \ ]\n }\n },\n {\n \"type\": \"Microsoft.Compute/virtualMachines\",\n + \ \"apiVersion\": \"2021-07-01\",\n \"name\": \"[parameters('ubuntuVmName')]\",\n + \ \"location\": \"[parameters('location')]\",\n \"properties\": {\n + \ \"hardwareProfile\": {\n \"vmSize\": \"[variables('vmSizeSku')]\"\n + \ },\n \"storageProfile\": {\n \"imageReference\": {\n + \ \"id\": \"[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', + variables('subscriptionId'), variables('imageResourceGroup')), 'Microsoft.Compute/images', + parameters('imageName'))]\"\n },\n \"osDisk\": {\n \"osType\": + \"Linux\",\n \"name\": \"[format('{0}_disk', parameters('ubuntuVmName'))]\",\n + \ \"createOption\": \"FromImage\",\n \"caching\": \"ReadWrite\",\n + \ \"writeAcceleratorEnabled\": false,\n \"managedDisk\": + \"[json('{\\\"storageAccountType\\\": \\\"Premium_LRS\\\"}')]\",\n \"deleteOption\": + \"Delete\",\n \"diskSizeGB\": 30\n }\n },\n \"osProfile\": + {\n \"computerName\": \"[parameters('ubuntuVmName')]\",\n \"adminUsername\": + \"azureuser\",\n \"linuxConfiguration\": {\n \"disablePasswordAuthentication\": + true,\n \"ssh\": {\n \"publicKeys\": [\n {\n + \ \"path\": \"/home/azureuser/.ssh/authorized_keys\",\n \"keyData\": + \"[parameters('sshPublicKeyAdmin')]\"\n }\n ]\n + \ },\n \"provisionVMAgent\": true,\n \"patchSettings\": + {\n \"patchMode\": \"ImageDefault\",\n \"assessmentMode\": + \"ImageDefault\"\n }\n },\n \"secrets\": [],\n + \ \"allowExtensionOperations\": true\n },\n \"networkProfile\": + {\n \"networkInterfaces\": [\n {\n \"id\": + \"[resourceId('Microsoft.Network/networkInterfaces', format('{0}_nic', parameters('ubuntuVmName')))]\"\n + \ }\n ]\n }\n },\n \"dependsOn\": [\n \"[resourceId('Microsoft.Network/networkInterfaces', + format('{0}_nic', parameters('ubuntuVmName')))]\"\n ]\n }\n ]\n}" + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '3591' + Content-Type: + - application/octet-stream + User-Agent: + - python-requests/2.26.0 + method: PUT + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-arm-template/blobs/uploads/7bc7c95c-face-4ffb-9021-02172a4e6279?_nouploadcache=false&_state=ZPo5kB5x7VQ6WbZEHoW2yuBlm-BsBz0vKuQMqzQANzp7Ik5hbWUiOiJ1YnVudHUtdm0tYXJtLXRlbXBsYXRlIiwiVVVJRCI6IjdiYzdjOTVjLWZhY2UtNGZmYi05MDIxLTAyMTcyYTRlNjI3OSIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAyMy0wNy0yN1QwODozOTowMi44MDA0NjU3M1oifQ%3D%3D&digest=sha256%3Ae71bf56543dc33dc8e550a0c574efe9a4875754a4ddf74347e448dec2462798b + response: + body: + string: '' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '0' + date: + - Thu, 27 Jul 2023 08:39:03 GMT + docker-content-digest: + - sha256:e71bf56543dc33dc8e550a0c574efe9a4875754a4ddf74347e448dec2462798b + docker-distribution-api-version: + - registry/2.0 + location: + - /v2/ubuntu-vm-arm-template/blobs/sha256:e71bf56543dc33dc8e550a0c574efe9a4875754a4ddf74347e448dec2462798b + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/octet-stream + User-Agent: + - python-requests/2.26.0 + method: POST + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-arm-template/blobs/uploads/ + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"ubuntu-vm-arm-template","Action":"pull"},{"Type":"repository","Name":"ubuntu-vm-arm-template","Action":"push"}]}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '286' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:03 GMT + docker-distribution-api-version: + - registry/2.0 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + www-authenticate: + - Bearer realm="https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/oauth2/token",service="ubuntupublisherubuntuacr2315dcfa83.azurecr.io",scope="repository:ubuntu-vm-arm-template:pull,push" + x-content-type-options: + - nosniff + status: + code: 401 + message: Unauthorized +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Service: + - ubuntupublisherubuntuacr2315dcfa83.azurecr.io + User-Agent: + - oras-py + method: GET + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/oauth2/token?service=ubuntupublisherubuntuacr2315dcfa83.azurecr.io&scope=repository%3Aubuntu-vm-arm-template%3Apull%2Cpush + response: + body: + string: '{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IkNPQVU6UERZSDo0SVJYOjM2SEI6TFYzUDpWNFBGOko0NzQ6SzNOSjpPS1JCOlRZQUo6NEc0Szo1Q1NEIn0.eyJqdGkiOiJiZmQ1ODFkNC1iOTRlLTQxMTktYjQ2Ni0xZWQxNWI4OTJkOGYiLCJzdWIiOiJ1YnVudHUtdm0tYWNyLW1hbmlmZXN0LTEtMC0wIiwibmJmIjoxNjkwNDQ2MjQzLCJleHAiOjE2OTA0NDgwNDMsImlhdCI6MTY5MDQ0NjI0MywiaXNzIjoiQXp1cmUgQ29udGFpbmVyIFJlZ2lzdHJ5IiwiYXVkIjoidWJ1bnR1cHVibGlzaGVydWJ1bnR1YWNyMjMxNWRjZmE4My5henVyZWNyLmlvIiwidmVyc2lvbiI6IjIuMCIsInJpZCI6IjUzNjQ5MTE4MjEzMTRkNjc5MjZkYTdhM2NkYzE3NGY4IiwiYWNjZXNzIjpbeyJUeXBlIjoicmVwb3NpdG9yeSIsIk5hbWUiOiJ1YnVudHUtdm0tYXJtLXRlbXBsYXRlIiwiQWN0aW9ucyI6WyJwdWxsIiwicHVzaCJdfV0sInJvbGVzIjpbXSwiZ3JhbnRfdHlwZSI6ImFjY2Vzc190b2tlbiJ9.jpojrcD5kDFofLgt1JP53aPEFbLcceTKJ4IIVKQ6rKNrAaoIthZMxO3qYccQrnm8Mf8UH_j7D4Bl3cjYJcGhspdf6GCi0ipjNq1FPrmPi-SgOHOB1bBBZpwLjPlXxJRnIybPPhkPq5t8IBEcrqkYHfC_QmasIkMaA6PSvOZo_M_RHaxhnaSusuHAHvnwYHfU5SkUloO4lpIRuIB0NFDXulKCiiU8qql-dSRHnqT9ldEpOsQ1hOQlMymclC_haN0yZJosTg6OsU-khenRlttOPL8l6WNjRcmVt7baP7MKbeKej77AeHtSsKdKaSLbAmui6nx5D6PQ5gi5SmocHAfXLQ"}' + headers: + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:03 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.3' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/octet-stream + User-Agent: + - python-requests/2.26.0 + method: POST + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-arm-template/blobs/uploads/ + response: + body: + string: '' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '0' + date: + - Thu, 27 Jul 2023 08:39:03 GMT + docker-distribution-api-version: + - registry/2.0 + docker-upload-uuid: + - 4eccefe2-9ccb-4871-ad56-e45ab3a9d31e + location: + - /v2/ubuntu-vm-arm-template/blobs/uploads/4eccefe2-9ccb-4871-ad56-e45ab3a9d31e?_nouploadcache=false&_state=NETur7sI6jVDrJxcfG3VMvkBK79Ca1Ntz8XJNBj_Od97Ik5hbWUiOiJ1YnVudHUtdm0tYXJtLXRlbXBsYXRlIiwiVVVJRCI6IjRlY2NlZmUyLTljY2ItNDg3MS1hZDU2LWU0NWFiM2E5ZDMxZSIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAyMy0wNy0yN1QwODozOTowMy4xNTg1NDg2NjNaIn0%3D + range: + - 0-0 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/octet-stream + User-Agent: + - python-requests/2.26.0 + method: PUT + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-arm-template/blobs/uploads/4eccefe2-9ccb-4871-ad56-e45ab3a9d31e?_nouploadcache=false&_state=NETur7sI6jVDrJxcfG3VMvkBK79Ca1Ntz8XJNBj_Od97Ik5hbWUiOiJ1YnVudHUtdm0tYXJtLXRlbXBsYXRlIiwiVVVJRCI6IjRlY2NlZmUyLTljY2ItNDg3MS1hZDU2LWU0NWFiM2E5ZDMxZSIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAyMy0wNy0yN1QwODozOTowMy4xNTg1NDg2NjNaIn0%3D&digest=sha256%3Ae3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + response: + body: + string: '' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '0' + date: + - Thu, 27 Jul 2023 08:39:03 GMT + docker-content-digest: + - sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + docker-distribution-api-version: + - registry/2.0 + location: + - /v2/ubuntu-vm-arm-template/blobs/sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 201 + message: Created +- request: + body: '{"schemaVersion": 2, "mediaType": "application/vnd.oci.image.manifest.v1+json", + "config": {"mediaType": "application/vnd.unknown.config.v1+json", "size": 0, + "digest": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"}, + "layers": [{"mediaType": "application/vnd.oci.image.layer.v1.tar", "size": 3591, + "digest": "sha256:e71bf56543dc33dc8e550a0c574efe9a4875754a4ddf74347e448dec2462798b", + "annotations": {"org.opencontainers.image.title": "ubuntu_template.json"}}], + "annotations": {}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '504' + Content-Type: + - application/vnd.oci.image.manifest.v1+json + User-Agent: + - python-requests/2.26.0 + method: PUT + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-arm-template/manifests/1.0.0 + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"ubuntu-vm-arm-template","Action":"pull"},{"Type":"repository","Name":"ubuntu-vm-arm-template","Action":"push"}]}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '286' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:03 GMT + docker-distribution-api-version: + - registry/2.0 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + www-authenticate: + - Bearer realm="https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/oauth2/token",service="ubuntupublisherubuntuacr2315dcfa83.azurecr.io",scope="repository:ubuntu-vm-arm-template:push,pull" + x-content-type-options: + - nosniff + status: + code: 401 + message: Unauthorized +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Service: + - ubuntupublisherubuntuacr2315dcfa83.azurecr.io + User-Agent: + - oras-py + method: GET + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/oauth2/token?service=ubuntupublisherubuntuacr2315dcfa83.azurecr.io&scope=repository%3Aubuntu-vm-arm-template%3Apush%2Cpull + response: + body: + string: '{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IkNPQVU6UERZSDo0SVJYOjM2SEI6TFYzUDpWNFBGOko0NzQ6SzNOSjpPS1JCOlRZQUo6NEc0Szo1Q1NEIn0.eyJqdGkiOiIzYTkyZDAxNC05MDljLTRmZjYtOWMyOC1mN2U0NjM2Y2FkZDEiLCJzdWIiOiJ1YnVudHUtdm0tYWNyLW1hbmlmZXN0LTEtMC0wIiwibmJmIjoxNjkwNDQ2MjQzLCJleHAiOjE2OTA0NDgwNDMsImlhdCI6MTY5MDQ0NjI0MywiaXNzIjoiQXp1cmUgQ29udGFpbmVyIFJlZ2lzdHJ5IiwiYXVkIjoidWJ1bnR1cHVibGlzaGVydWJ1bnR1YWNyMjMxNWRjZmE4My5henVyZWNyLmlvIiwidmVyc2lvbiI6IjIuMCIsInJpZCI6IjUzNjQ5MTE4MjEzMTRkNjc5MjZkYTdhM2NkYzE3NGY4IiwiYWNjZXNzIjpbeyJUeXBlIjoicmVwb3NpdG9yeSIsIk5hbWUiOiJ1YnVudHUtdm0tYXJtLXRlbXBsYXRlIiwiQWN0aW9ucyI6WyJwdXNoIiwicHVsbCJdfV0sInJvbGVzIjpbXSwiZ3JhbnRfdHlwZSI6ImFjY2Vzc190b2tlbiJ9.VqkX0-WuhFgcvsxfB6ZaqZcmbPmDkKkXzkU5WugxwFtuY-By2dld-IdXvfUa5EtKC1HLYvqC21Z6VrYgwGbdfOtxvJcw-U4VXzL9B6mbdyFneS_dXunhZAhuaAng2hxm_hVh2kY6iw5PX0xTeHA6x0v6eutO7KZFp1EwTk-7jjZIinU82566tqyxzBra72lvhGmyGEBrBOwLDOEaTItEcV7I2FgMjF0EZSuSDb5V2yV5d8e4h-VTF-4Jg3BIymoE9c-Z61nmi1ddhhImihmRHjl7QTAiufTuzWNnoc7QOx3JAOXKjLWgBNYzUDgYfPZP_6GcXzOYO2WgRRI8zIyYYw"}' + headers: + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:03 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.283333' + status: + code: 200 + message: OK +- request: + body: '{"schemaVersion": 2, "mediaType": "application/vnd.oci.image.manifest.v1+json", + "config": {"mediaType": "application/vnd.unknown.config.v1+json", "size": 0, + "digest": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"}, + "layers": [{"mediaType": "application/vnd.oci.image.layer.v1.tar", "size": 3591, + "digest": "sha256:e71bf56543dc33dc8e550a0c574efe9a4875754a4ddf74347e448dec2462798b", + "annotations": {"org.opencontainers.image.title": "ubuntu_template.json"}}], + "annotations": {}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '504' + Content-Type: + - application/vnd.oci.image.manifest.v1+json + User-Agent: + - python-requests/2.26.0 + method: PUT + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-arm-template/manifests/1.0.0 + response: + body: + string: '' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '0' + date: + - Thu, 27 Jul 2023 08:39:03 GMT + docker-content-digest: + - sha256:8923fa544da97914212bc9173ec512741d331940e4a2c7b6fbad979657a5c507 + docker-distribution-api-version: + - registry/2.0 + location: + - /v2/ubuntu-vm-arm-template/manifests/sha256:8923fa544da97914212bc9173ec512741d331940e4a2c7b6fbad979657a5c507 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd build + Connection: + - keep-alive + ParameterSetName: + - -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkFunctionDefinitionGroups/ubuntu-vm-nfdg/networkFunctionDefinitionVersions/1.0.0?api-version=2023-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/networkfunctiondefinitiongroups/ubuntu-vm-nfdg/networkfunctiondefinitionversions/1.0.0","name":"1.0.0","type":"microsoft.hybridnetwork/publishers/networkfunctiondefinitiongroups/networkfunctiondefinitionversions","location":"uksouth","systemData":{"createdBy":"jamieparsons@microsoft.com","createdByType":"User","createdAt":"2023-07-27T08:37:28.3465537Z","lastModifiedBy":"jamieparsons@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-27T08:37:28.3465537Z"},"properties":{"networkFunctionTemplate":{"networkFunctionApplications":[{"artifactProfile":{"vhdArtifactProfile":{"vhdName":"ubuntu-vm-vhd","vhdVersion":"1-0-0"},"artifactStore":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-blob-store"}},"deployParametersMappingRuleProfile":{"vhdImageMappingRuleProfile":{"userConfiguration":"{\"imageName\":\"ubuntu-vmImage\",\"azureDeployLocation\":\"{deployParameters.location}\"}"},"applicationEnablement":"Unknown"},"artifactType":"VhdImageFile","dependsOnProfile":null,"name":"ubuntu-vmImage"},{"artifactProfile":{"templateArtifactProfile":{"templateName":"ubuntu-vm-arm-template","templateVersion":"1.0.0"},"artifactStore":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr"}},"deployParametersMappingRuleProfile":{"templateMappingRuleProfile":{"templateParameters":"{\"location\":\"{deployParameters.location}\",\"subnetName\":\"{deployParameters.subnetName}\",\"ubuntuVmName\":\"{deployParameters.ubuntuVmName}\",\"virtualNetworkId\":\"{deployParameters.virtualNetworkId}\",\"sshPublicKeyAdmin\":\"{deployParameters.sshPublicKeyAdmin}\",\"imageName\":\"ubuntu-vmImage\"}"},"applicationEnablement":"Unknown"},"artifactType":"ArmTemplate","dependsOnProfile":null,"name":"ubuntu-vm"}],"nfviType":"AzureCore"},"versionState":"Preview","description":null,"deployParameters":"{\"$schema\":\"https://json-schema.org/draft-07/schema#\",\"title\":\"DeployParametersSchema\",\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\"},\"subnetName\":{\"type\":\"string\"},\"ubuntuVmName\":{\"type\":\"string\"},\"virtualNetworkId\":{\"type\":\"string\"},\"sshPublicKeyAdmin\":{\"type\":\"string\"}},\"required\":[\"location\",\"subnetName\",\"ubuntuVmName\",\"virtualNetworkId\",\"sshPublicKeyAdmin\"]}","networkFunctionType":"VirtualNetworkFunction","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '2713' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:03 GMT + etag: + - '"06009197-0000-1100-0000-64c22cd40000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: HEAD + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test?api-version=2022-09-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 27 Jul 2023 08:39:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test","name":"patrykkulik-test","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"autoDelete":"true","expiresOn":"2023-08-20T10:48:11.8928180Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '301' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher?api-version=2023-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher","name":"ubuntuPublisher","type":"microsoft.hybridnetwork/publishers","location":"uksouth","systemData":{"createdBy":"patrykkulik@microsoft.com","createdByType":"User","createdAt":"2023-07-24T10:35:08.3094719Z","lastModifiedBy":"patrykkulik@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-24T10:35:08.3094719Z"},"properties":{"scope":"Private","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '550' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:04 GMT + etag: + - '"0b00b59c-0000-1100-0000-64be53e60000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr?api-version=2023-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr","name":"ubuntu-acr","type":"microsoft.hybridnetwork/publishers/artifactstores","location":"uksouth","systemData":{"createdBy":"patrykkulik@microsoft.com","createdByType":"User","createdAt":"2023-07-24T10:36:42.2618346Z","lastModifiedBy":"b8ed041c-aa91-418e-8f47-20c70abc2de1","lastModifiedByType":"Application","lastModifiedAt":"2023-07-27T08:37:39.9550874Z"},"properties":{"storeType":"AzureContainerRegistry","replicationStrategy":"SingleReplication","managedResourceGroupConfiguration":{"name":"ubuntu-acr-HostedResources-7510103F","location":"uksouth"},"provisioningState":"Succeeded","storageResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ubuntu-acr-HostedResources-7510103F/providers/Microsoft.ContainerRegistry/registries/UbuntupublisherUbuntuAcr2315dcfa83"}}' + headers: + cache-control: + - no-cache + content-length: + - '978' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:04 GMT + etag: + - '"03001208-0000-1100-0000-64c22cd40000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: '{"location": "uksouth"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + Content-Length: + - '23' + Content-Type: + - application/json + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkServiceDesignGroups/ubuntu?api-version=2023-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkServiceDesignGroups/ubuntu","name":"ubuntu","type":"microsoft.hybridnetwork/publishers/networkservicedesigngroups","location":"uksouth","systemData":{"createdBy":"patrykkulik@microsoft.com","createdByType":"User","createdAt":"2023-07-24T13:23:29.0796168Z","lastModifiedBy":"jamieparsons@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-27T08:39:05.3904863Z"},"properties":{"description":null,"provisioningState":"Accepted"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/9dedec20-96e1-4b71-b374-bcb75af0218f*0A2C88351F91E19B08EFFAF13C02A492976D31AA01E04643FC90923CE153B778?api-version=2020-01-01-preview + cache-control: + - no-cache + content-length: + - '603' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:06 GMT + etag: + - '"010024fe-0000-1100-0000-64c22d2a0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-build-version: + - 1.0.02386.1640 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/9dedec20-96e1-4b71-b374-bcb75af0218f*0A2C88351F91E19B08EFFAF13C02A492976D31AA01E04643FC90923CE153B778?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/9dedec20-96e1-4b71-b374-bcb75af0218f*0A2C88351F91E19B08EFFAF13C02A492976D31AA01E04643FC90923CE153B778","name":"9dedec20-96e1-4b71-b374-bcb75af0218f*0A2C88351F91E19B08EFFAF13C02A492976D31AA01E04643FC90923CE153B778","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkServiceDesignGroups/ubuntu","status":"Accepted","startTime":"2023-07-27T08:39:06.2384338Z"}' + headers: + cache-control: + - no-cache + content-length: + - '549' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:06 GMT + etag: + - '"0200837a-0000-1100-0000-64c22d2a0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-nfdg-nf-acr-manifest-1-0-0?api-version=2023-04-01-preview + response: + body: + string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-nfdg-nf-acr-manifest-1-0-0'' + under resource group ''patrykkulik-test'' was not found. For more details + please go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + cache-control: + - no-cache + content-length: + - '319' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-failure-cause: + - gateway + status: + code: 404 + message: Not Found +- request: + body: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "metadata": {"_generator": {"name": "bicep", "version": + "0.15.31.15270", "templateHash": "12504378736665252435"}}, "parameters": {"location": + {"type": "string"}, "publisherName": {"type": "string", "metadata": {"description": + "Name of an existing publisher, expected to be in the resource group where you + deploy the template"}}, "acrArtifactStoreName": {"type": "string", "metadata": + {"description": "Name of an existing ACR-backed Artifact Store, deployed under + the publisher."}}, "acrManifestNames": {"type": "array", "metadata": {"description": + "Name of the manifest to deploy for the ACR-backed Artifact Store"}}, "armTemplateNames": + {"type": "array", "metadata": {"description": "The name under which to store + the ARM template"}}, "armTemplateVersion": {"type": "string", "metadata": {"description": + "The version that you want to name the NFM template artifact, in format A.B.C. + e.g. 6.13.0. If testing for development, you can use any numbers you like."}}}, + "resources": [{"copy": {"name": "acrArtifactManifests", "count": "[length(parameters(''armTemplateNames''))]"}, + "type": "Microsoft.Hybridnetwork/publishers/artifactStores/artifactManifests", + "apiVersion": "2023-04-01-preview", "name": "[format(''{0}/{1}/{2}'', parameters(''publisherName''), + parameters(''acrArtifactStoreName''), parameters(''acrManifestNames'')[copyIndex()])]", + "location": "[parameters(''location'')]", "properties": {"artifacts": [{"artifactName": + "[parameters(''armTemplateNames'')[copyIndex()]]", "artifactType": "ArmTemplate", + "artifactVersion": "[parameters(''armTemplateVersion'')]"}]}}]}, "parameters": + {"location": {"value": "uksouth"}, "publisherName": {"value": "ubuntuPublisher"}, + "acrArtifactStoreName": {"value": "ubuntu-acr"}, "acrManifestNames": {"value": + ["ubuntu-vm-nfdg-nf-acr-manifest-1-0-0"]}, "armTemplateNames": {"value": ["ubuntu-vm-nfdg_nf_artifact"]}, + "armTemplateVersion": {"value": "1.0.0"}}, "mode": "Incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + Content-Length: + - '2062' + Content-Type: + - application/json + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment/validate?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Resources/deployments/AOSM_CLI_deployment_1690447150","name":"AOSM_CLI_deployment_1690447150","type":"Microsoft.Resources/deployments","properties":{"templateHash":"12504378736665252435","parameters":{"location":{"type":"String","value":"uksouth"},"publisherName":{"type":"String","value":"ubuntuPublisher"},"acrArtifactStoreName":{"type":"String","value":"ubuntu-acr"},"acrManifestNames":{"type":"Array","value":["ubuntu-vm-nfdg-nf-acr-manifest-1-0-0"]},"armTemplateNames":{"type":"Array","value":["ubuntu-vm-nfdg_nf_artifact"]},"armTemplateVersion":{"type":"String","value":"1.0.0"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"0001-01-01T00:00:00Z","duration":"PT0S","correlationId":"c0d2aed3-757d-4f91-891f-01885924eb0c","providers":[{"namespace":"Microsoft.Hybridnetwork","resourceTypes":[{"resourceType":"publishers/artifactStores/artifactManifests","locations":["uksouth"]}]}],"dependencies":[],"validatedResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-nfdg-nf-acr-manifest-1-0-0"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '1294' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:11 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "metadata": {"_generator": {"name": "bicep", "version": + "0.15.31.15270", "templateHash": "12504378736665252435"}}, "parameters": {"location": + {"type": "string"}, "publisherName": {"type": "string", "metadata": {"description": + "Name of an existing publisher, expected to be in the resource group where you + deploy the template"}}, "acrArtifactStoreName": {"type": "string", "metadata": + {"description": "Name of an existing ACR-backed Artifact Store, deployed under + the publisher."}}, "acrManifestNames": {"type": "array", "metadata": {"description": + "Name of the manifest to deploy for the ACR-backed Artifact Store"}}, "armTemplateNames": + {"type": "array", "metadata": {"description": "The name under which to store + the ARM template"}}, "armTemplateVersion": {"type": "string", "metadata": {"description": + "The version that you want to name the NFM template artifact, in format A.B.C. + e.g. 6.13.0. If testing for development, you can use any numbers you like."}}}, + "resources": [{"copy": {"name": "acrArtifactManifests", "count": "[length(parameters(''armTemplateNames''))]"}, + "type": "Microsoft.Hybridnetwork/publishers/artifactStores/artifactManifests", + "apiVersion": "2023-04-01-preview", "name": "[format(''{0}/{1}/{2}'', parameters(''publisherName''), + parameters(''acrArtifactStoreName''), parameters(''acrManifestNames'')[copyIndex()])]", + "location": "[parameters(''location'')]", "properties": {"artifacts": [{"artifactName": + "[parameters(''armTemplateNames'')[copyIndex()]]", "artifactType": "ArmTemplate", + "artifactVersion": "[parameters(''armTemplateVersion'')]"}]}}]}, "parameters": + {"location": {"value": "uksouth"}, "publisherName": {"value": "ubuntuPublisher"}, + "acrArtifactStoreName": {"value": "ubuntu-acr"}, "acrManifestNames": {"value": + ["ubuntu-vm-nfdg-nf-acr-manifest-1-0-0"]}, "armTemplateNames": {"value": ["ubuntu-vm-nfdg_nf_artifact"]}, + "armTemplateVersion": {"value": "1.0.0"}}, "mode": "Incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + Content-Length: + - '2062' + Content-Type: + - application/json + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Resources/deployments/AOSM_CLI_deployment_1690447150","name":"AOSM_CLI_deployment_1690447150","type":"Microsoft.Resources/deployments","properties":{"templateHash":"12504378736665252435","parameters":{"location":{"type":"String","value":"uksouth"},"publisherName":{"type":"String","value":"ubuntuPublisher"},"acrArtifactStoreName":{"type":"String","value":"ubuntu-acr"},"acrManifestNames":{"type":"Array","value":["ubuntu-vm-nfdg-nf-acr-manifest-1-0-0"]},"armTemplateNames":{"type":"Array","value":["ubuntu-vm-nfdg_nf_artifact"]},"armTemplateVersion":{"type":"String","value":"1.0.0"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2023-07-27T08:39:13.9537136Z","duration":"PT0.0007926S","correlationId":"d644ec1d-6e30-4cbb-ab0d-dbb00dea04e0","providers":[{"namespace":"Microsoft.Hybridnetwork","resourceTypes":[{"resourceType":"publishers/artifactStores/artifactManifests","locations":["uksouth"]}]}],"dependencies":[]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/AOSM_CLI_deployment_1690447150/operationStatuses/08585111597325390029?api-version=2022-09-01 + cache-control: + - no-cache + content-length: + - '1051' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585111597325390029?api-version=2022-09-01 + response: + body: + string: '{"status":"Accepted"}' + headers: + cache-control: + - no-cache + content-length: + - '21' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/9dedec20-96e1-4b71-b374-bcb75af0218f*0A2C88351F91E19B08EFFAF13C02A492976D31AA01E04643FC90923CE153B778?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/9dedec20-96e1-4b71-b374-bcb75af0218f*0A2C88351F91E19B08EFFAF13C02A492976D31AA01E04643FC90923CE153B778","name":"9dedec20-96e1-4b71-b374-bcb75af0218f*0A2C88351F91E19B08EFFAF13C02A492976D31AA01E04643FC90923CE153B778","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkServiceDesignGroups/ubuntu","status":"Succeeded","startTime":"2023-07-27T08:39:06.2384338Z","endTime":"2023-07-27T08:39:07.8325053Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '609' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:36 GMT + etag: + - '"0200867a-0000-1100-0000-64c22d2b0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkServiceDesignGroups/ubuntu?api-version=2023-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkServiceDesignGroups/ubuntu","name":"ubuntu","type":"microsoft.hybridnetwork/publishers/networkservicedesigngroups","location":"uksouth","systemData":{"createdBy":"patrykkulik@microsoft.com","createdByType":"User","createdAt":"2023-07-24T13:23:29.0796168Z","lastModifiedBy":"jamieparsons@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-27T08:39:05.3904863Z"},"properties":{"description":null,"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '604' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:36 GMT + etag: + - '"010031fe-0000-1100-0000-64c22d2b0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585111597325390029?api-version=2022-09-01 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:43 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Resources/deployments/AOSM_CLI_deployment_1690447150","name":"AOSM_CLI_deployment_1690447150","type":"Microsoft.Resources/deployments","properties":{"templateHash":"12504378736665252435","parameters":{"location":{"type":"String","value":"uksouth"},"publisherName":{"type":"String","value":"ubuntuPublisher"},"acrArtifactStoreName":{"type":"String","value":"ubuntu-acr"},"acrManifestNames":{"type":"Array","value":["ubuntu-vm-nfdg-nf-acr-manifest-1-0-0"]},"armTemplateNames":{"type":"Array","value":["ubuntu-vm-nfdg_nf_artifact"]},"armTemplateVersion":{"type":"String","value":"1.0.0"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2023-07-27T08:39:34.2908116Z","duration":"PT20.3378906S","correlationId":"d644ec1d-6e30-4cbb-ab0d-dbb00dea04e0","providers":[{"namespace":"Microsoft.Hybridnetwork","resourceTypes":[{"resourceType":"publishers/artifactStores/artifactManifests","locations":["uksouth"]}]}],"dependencies":[],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-nfdg-nf-acr-manifest-1-0-0"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '1308' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:45 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "metadata": {"_generator": {"name": "bicep", "version": + "0.15.31.15270", "templateHash": "15386908252537985940"}}, "parameters": {"location": + {"type": "string"}, "publisherName": {"type": "string", "metadata": {"description": + "Name of an existing publisher, expected to be in the resource group where you + deploy the template"}}, "acrArtifactStoreName": {"type": "string", "metadata": + {"description": "Name of an existing ACR-backed Artifact Store, deployed under + the publisher."}}, "nsDesignGroup": {"type": "string", "metadata": {"description": + "Name of an existing Network Service Design Group"}}, "nsDesignVersion": {"type": + "string", "metadata": {"description": "The version of the NSDV you want to create, + in format A.B.C"}}, "nfviSiteName": {"type": "string", "defaultValue": "ubuntu_NFVI", + "metadata": {"description": "Name of the nfvi site"}}}, "variables": {"$fxv#0": + {"$schema": "https://json-schema.org/draft-07/schema#", "title": "ubuntu_ConfigGroupSchema", + "type": "object", "properties": {"ubuntu-vm-nfdg": {"type": "object", "properties": + {"deploymentParameters": {"type": "object", "properties": {"location": {"type": + "string"}, "subnetName": {"type": "string"}, "ubuntuVmName": {"type": "string"}, + "virtualNetworkId": {"type": "string"}, "sshPublicKeyAdmin": {"type": "string"}}}, + "ubuntu_vm_nfdg_nfd_version": {"type": "string", "description": "The version + of the ubuntu-vm-nfdg NFD to use. This version must be compatible with (have + the same parameters exposed as) ubuntu-vm-nfdg."}}, "required": ["deploymentParameters", + "ubuntu_vm_nfdg_nfd_version"]}, "managedIdentity": {"type": "string", "description": + "The managed identity to use to deploy NFs within this SNS. This should be + of the form ''/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. If + you wish to use a system assigned identity, set this to a blank string."}}, + "required": ["ubuntu-vm-nfdg", "managedIdentity"]}, "$fxv#1": {"deploymentParameters": + ["{configurationparameters(''ubuntu_ConfigGroupSchema'').ubuntu-vm-nfdg.deploymentParameters}"], + "ubuntu_vm_nfdg_nfd_version": "{configurationparameters(''ubuntu_ConfigGroupSchema'').ubuntu-vm-nfdg.ubuntu_vm_nfdg_nfd_version}", + "managedIdentity": "{configurationparameters(''ubuntu_ConfigGroupSchema'').managedIdentity}"}}, + "resources": [{"type": "Microsoft.Hybridnetwork/publishers/configurationGroupSchemas", + "apiVersion": "2023-04-01-preview", "name": "[format(''{0}/{1}'', parameters(''publisherName''), + ''ubuntu_ConfigGroupSchema'')]", "location": "[parameters(''location'')]", "properties": + {"schemaDefinition": "[string(variables(''$fxv#0''))]"}}, {"type": "Microsoft.Hybridnetwork/publishers/networkservicedesigngroups/networkservicedesignversions", + "apiVersion": "2023-04-01-preview", "name": "[format(''{0}/{1}/{2}'', parameters(''publisherName''), + parameters(''nsDesignGroup''), parameters(''nsDesignVersion''))]", "location": + "[parameters(''location'')]", "properties": {"description": "Plain ubuntu VM", + "versionState": "Preview", "configurationGroupSchemaReferences": {"ubuntu_ConfigGroupSchema": + {"id": "[resourceId(''Microsoft.Hybridnetwork/publishers/configurationGroupSchemas'', + parameters(''publisherName''), ''ubuntu_ConfigGroupSchema'')]"}}, "nfvisFromSite": + {"nfvi1": {"name": "[parameters(''nfviSiteName'')]", "type": "AzureCore"}}, + "resourceElementTemplates": [{"name": "ubuntu-vm-nfdg_nf_artifact_resource_element", + "type": "NetworkFunctionDefinition", "configuration": {"artifactProfile": {"artifactStoreReference": + {"id": "[resourceId(''Microsoft.HybridNetwork/publishers/artifactStores'', parameters(''publisherName''), + parameters(''acrArtifactStoreName''))]"}, "artifactName": "ubuntu-vm-nfdg_nf_artifact", + "artifactVersion": "1.0.0"}, "templateType": "ArmTemplate", "parameterValues": + "[string(variables(''$fxv#1''))]"}, "dependsOnProfile": {"installDependsOn": + [], "uninstallDependsOn": [], "updateDependsOn": []}}]}, "dependsOn": ["[resourceId(''Microsoft.Hybridnetwork/publishers/configurationGroupSchemas'', + parameters(''publisherName''), ''ubuntu_ConfigGroupSchema'')]"]}]}, "parameters": + {"location": {"value": "uksouth"}, "publisherName": {"value": "ubuntuPublisher"}, + "acrArtifactStoreName": {"value": "ubuntu-acr"}, "nsDesignGroup": {"value": + "ubuntu"}, "nsDesignVersion": {"value": "1.0.0"}, "nfviSiteName": {"value": + "ubuntu_NFVI"}}, "mode": "Incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + Content-Length: + - '4527' + Content-Type: + - application/json + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment/validate?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Resources/deployments/AOSM_CLI_deployment_1690447188","name":"AOSM_CLI_deployment_1690447188","type":"Microsoft.Resources/deployments","properties":{"templateHash":"15386908252537985940","parameters":{"location":{"type":"String","value":"uksouth"},"publisherName":{"type":"String","value":"ubuntuPublisher"},"acrArtifactStoreName":{"type":"String","value":"ubuntu-acr"},"nsDesignGroup":{"type":"String","value":"ubuntu"},"nsDesignVersion":{"type":"String","value":"1.0.0"},"nfviSiteName":{"type":"String","value":"ubuntu_NFVI"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"0001-01-01T00:00:00Z","duration":"PT0S","correlationId":"825bda07-c87c-4c3e-97f5-5a6c20e0b553","providers":[{"namespace":"Microsoft.Hybridnetwork","resourceTypes":[{"resourceType":"publishers/configurationGroupSchemas","locations":["uksouth"]},{"resourceType":"publishers/networkservicedesigngroups/networkservicedesignversions","locations":["uksouth"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/configurationGroupSchemas/ubuntu_ConfigGroupSchema","resourceType":"Microsoft.Hybridnetwork/publishers/configurationGroupSchemas","resourceName":"ubuntuPublisher/ubuntu_ConfigGroupSchema"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/networkservicedesigngroups/ubuntu/networkservicedesignversions/1.0.0","resourceType":"Microsoft.Hybridnetwork/publishers/networkservicedesigngroups/networkservicedesignversions","resourceName":"ubuntuPublisher/ubuntu/1.0.0"}],"validatedResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/configurationGroupSchemas/ubuntu_ConfigGroupSchema"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/networkservicedesigngroups/ubuntu/networkservicedesignversions/1.0.0"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '2264' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:50 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "metadata": {"_generator": {"name": "bicep", "version": + "0.15.31.15270", "templateHash": "15386908252537985940"}}, "parameters": {"location": + {"type": "string"}, "publisherName": {"type": "string", "metadata": {"description": + "Name of an existing publisher, expected to be in the resource group where you + deploy the template"}}, "acrArtifactStoreName": {"type": "string", "metadata": + {"description": "Name of an existing ACR-backed Artifact Store, deployed under + the publisher."}}, "nsDesignGroup": {"type": "string", "metadata": {"description": + "Name of an existing Network Service Design Group"}}, "nsDesignVersion": {"type": + "string", "metadata": {"description": "The version of the NSDV you want to create, + in format A.B.C"}}, "nfviSiteName": {"type": "string", "defaultValue": "ubuntu_NFVI", + "metadata": {"description": "Name of the nfvi site"}}}, "variables": {"$fxv#0": + {"$schema": "https://json-schema.org/draft-07/schema#", "title": "ubuntu_ConfigGroupSchema", + "type": "object", "properties": {"ubuntu-vm-nfdg": {"type": "object", "properties": + {"deploymentParameters": {"type": "object", "properties": {"location": {"type": + "string"}, "subnetName": {"type": "string"}, "ubuntuVmName": {"type": "string"}, + "virtualNetworkId": {"type": "string"}, "sshPublicKeyAdmin": {"type": "string"}}}, + "ubuntu_vm_nfdg_nfd_version": {"type": "string", "description": "The version + of the ubuntu-vm-nfdg NFD to use. This version must be compatible with (have + the same parameters exposed as) ubuntu-vm-nfdg."}}, "required": ["deploymentParameters", + "ubuntu_vm_nfdg_nfd_version"]}, "managedIdentity": {"type": "string", "description": + "The managed identity to use to deploy NFs within this SNS. This should be + of the form ''/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. If + you wish to use a system assigned identity, set this to a blank string."}}, + "required": ["ubuntu-vm-nfdg", "managedIdentity"]}, "$fxv#1": {"deploymentParameters": + ["{configurationparameters(''ubuntu_ConfigGroupSchema'').ubuntu-vm-nfdg.deploymentParameters}"], + "ubuntu_vm_nfdg_nfd_version": "{configurationparameters(''ubuntu_ConfigGroupSchema'').ubuntu-vm-nfdg.ubuntu_vm_nfdg_nfd_version}", + "managedIdentity": "{configurationparameters(''ubuntu_ConfigGroupSchema'').managedIdentity}"}}, + "resources": [{"type": "Microsoft.Hybridnetwork/publishers/configurationGroupSchemas", + "apiVersion": "2023-04-01-preview", "name": "[format(''{0}/{1}'', parameters(''publisherName''), + ''ubuntu_ConfigGroupSchema'')]", "location": "[parameters(''location'')]", "properties": + {"schemaDefinition": "[string(variables(''$fxv#0''))]"}}, {"type": "Microsoft.Hybridnetwork/publishers/networkservicedesigngroups/networkservicedesignversions", + "apiVersion": "2023-04-01-preview", "name": "[format(''{0}/{1}/{2}'', parameters(''publisherName''), + parameters(''nsDesignGroup''), parameters(''nsDesignVersion''))]", "location": + "[parameters(''location'')]", "properties": {"description": "Plain ubuntu VM", + "versionState": "Preview", "configurationGroupSchemaReferences": {"ubuntu_ConfigGroupSchema": + {"id": "[resourceId(''Microsoft.Hybridnetwork/publishers/configurationGroupSchemas'', + parameters(''publisherName''), ''ubuntu_ConfigGroupSchema'')]"}}, "nfvisFromSite": + {"nfvi1": {"name": "[parameters(''nfviSiteName'')]", "type": "AzureCore"}}, + "resourceElementTemplates": [{"name": "ubuntu-vm-nfdg_nf_artifact_resource_element", + "type": "NetworkFunctionDefinition", "configuration": {"artifactProfile": {"artifactStoreReference": + {"id": "[resourceId(''Microsoft.HybridNetwork/publishers/artifactStores'', parameters(''publisherName''), + parameters(''acrArtifactStoreName''))]"}, "artifactName": "ubuntu-vm-nfdg_nf_artifact", + "artifactVersion": "1.0.0"}, "templateType": "ArmTemplate", "parameterValues": + "[string(variables(''$fxv#1''))]"}, "dependsOnProfile": {"installDependsOn": + [], "uninstallDependsOn": [], "updateDependsOn": []}}]}, "dependsOn": ["[resourceId(''Microsoft.Hybridnetwork/publishers/configurationGroupSchemas'', + parameters(''publisherName''), ''ubuntu_ConfigGroupSchema'')]"]}]}, "parameters": + {"location": {"value": "uksouth"}, "publisherName": {"value": "ubuntuPublisher"}, + "acrArtifactStoreName": {"value": "ubuntu-acr"}, "nsDesignGroup": {"value": + "ubuntu"}, "nsDesignVersion": {"value": "1.0.0"}, "nfviSiteName": {"value": + "ubuntu_NFVI"}}, "mode": "Incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + Content-Length: + - '4527' + Content-Type: + - application/json + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Resources/deployments/AOSM_CLI_deployment_1690447188","name":"AOSM_CLI_deployment_1690447188","type":"Microsoft.Resources/deployments","properties":{"templateHash":"15386908252537985940","parameters":{"location":{"type":"String","value":"uksouth"},"publisherName":{"type":"String","value":"ubuntuPublisher"},"acrArtifactStoreName":{"type":"String","value":"ubuntu-acr"},"nsDesignGroup":{"type":"String","value":"ubuntu"},"nsDesignVersion":{"type":"String","value":"1.0.0"},"nfviSiteName":{"type":"String","value":"ubuntu_NFVI"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2023-07-27T08:39:53.1137433Z","duration":"PT0.0005654S","correlationId":"2ba13b34-9d38-4ae1-beea-ced6f9de33e2","providers":[{"namespace":"Microsoft.Hybridnetwork","resourceTypes":[{"resourceType":"publishers/configurationGroupSchemas","locations":["uksouth"]},{"resourceType":"publishers/networkservicedesigngroups/networkservicedesignversions","locations":["uksouth"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/configurationGroupSchemas/ubuntu_ConfigGroupSchema","resourceType":"Microsoft.Hybridnetwork/publishers/configurationGroupSchemas","resourceName":"ubuntuPublisher/ubuntu_ConfigGroupSchema"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/networkservicedesigngroups/ubuntu/networkservicedesignversions/1.0.0","resourceType":"Microsoft.Hybridnetwork/publishers/networkservicedesigngroups/networkservicedesignversions","resourceName":"ubuntuPublisher/ubuntu/1.0.0"}]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/AOSM_CLI_deployment_1690447188/operationStatuses/08585111596941610562?api-version=2022-09-01 + cache-control: + - no-cache + content-length: + - '1828' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585111596941610562?api-version=2022-09-01 + response: + body: + string: '{"status":"Accepted"}' + headers: + cache-control: + - no-cache + content-length: + - '21' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:39:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585111596941610562?api-version=2022-09-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:40:23 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585111596941610562?api-version=2022-09-01 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:40:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/patrykkulik-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Resources/deployments/AOSM_CLI_deployment_1690447188","name":"AOSM_CLI_deployment_1690447188","type":"Microsoft.Resources/deployments","properties":{"templateHash":"15386908252537985940","parameters":{"location":{"type":"String","value":"uksouth"},"publisherName":{"type":"String","value":"ubuntuPublisher"},"acrArtifactStoreName":{"type":"String","value":"ubuntu-acr"},"nsDesignGroup":{"type":"String","value":"ubuntu"},"nsDesignVersion":{"type":"String","value":"1.0.0"},"nfviSiteName":{"type":"String","value":"ubuntu_NFVI"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2023-07-27T08:40:35.3185037Z","duration":"PT42.2053258S","correlationId":"2ba13b34-9d38-4ae1-beea-ced6f9de33e2","providers":[{"namespace":"Microsoft.Hybridnetwork","resourceTypes":[{"resourceType":"publishers/configurationGroupSchemas","locations":["uksouth"]},{"resourceType":"publishers/networkservicedesigngroups/networkservicedesignversions","locations":["uksouth"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/configurationGroupSchemas/ubuntu_ConfigGroupSchema","resourceType":"Microsoft.Hybridnetwork/publishers/configurationGroupSchemas","resourceName":"ubuntuPublisher/ubuntu_ConfigGroupSchema"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/networkservicedesigngroups/ubuntu/networkservicedesignversions/1.0.0","resourceType":"Microsoft.Hybridnetwork/publishers/networkservicedesigngroups/networkservicedesignversions","resourceName":"ubuntuPublisher/ubuntu/1.0.0"}],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/configurationGroupSchemas/ubuntu_ConfigGroupSchema"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/networkservicedesigngroups/ubuntu/networkservicedesignversions/1.0.0"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '2278' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:40:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-nfdg-nf-acr-manifest-1-0-0?api-version=2023-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.Hybridnetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-nfdg-nf-acr-manifest-1-0-0","name":"ubuntu-vm-nfdg-nf-acr-manifest-1-0-0","type":"microsoft.hybridnetwork/publishers/artifactstores/artifactmanifests","location":"uksouth","systemData":{"createdBy":"jamieparsons@microsoft.com","createdByType":"User","createdAt":"2023-07-27T08:39:16.0188573Z","lastModifiedBy":"jamieparsons@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-27T08:39:16.0188573Z"},"properties":{"artifacts":[{"artifactName":"ubuntu-vm-nfdg_nf_artifact","artifactType":"ArmTemplate","artifactVersion":"1.0.0"}],"artifactManifestState":"Uploading","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '820' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:40:54 GMT + etag: + - '"1000417f-0000-1100-0000-64c22d420000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd publish + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -f --debug + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-nfdg-nf-acr-manifest-1-0-0/listCredential?api-version=2023-04-01-preview + response: + body: + string: '{"username":"ubuntu-vm-nfdg-nf-acr-manifest-1-0-0","acrToken":"yjrs+aHaxKJQ04SiGwWNa2AtxITacjTpNLXCl+z5ox+ACRDA1dxb","acrServerUrl":"https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io","repositories":["ubuntu-vm-nfdg_nf_artifact"],"expiry":"2023-07-28T08:40:55.8065979+00:00","credentialType":"AzureContainerRegistryScopedToken"}' + headers: + cache-control: + - no-cache + content-length: + - '332' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:40:55 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-build-version: + - 1.0.02386.1640 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/octet-stream + User-Agent: + - python-requests/2.26.0 + method: POST + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-nfdg_nf_artifact/blobs/uploads/ + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"ubuntu-vm-nfdg_nf_artifact","Action":"pull"},{"Type":"repository","Name":"ubuntu-vm-nfdg_nf_artifact","Action":"push"}]}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '294' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:40:59 GMT + docker-distribution-api-version: + - registry/2.0 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + www-authenticate: + - Bearer realm="https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/oauth2/token",service="ubuntupublisherubuntuacr2315dcfa83.azurecr.io",scope="repository:ubuntu-vm-nfdg_nf_artifact:pull,push" + x-content-type-options: + - nosniff + status: + code: 401 + message: Unauthorized +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Service: + - ubuntupublisherubuntuacr2315dcfa83.azurecr.io + User-Agent: + - oras-py + method: GET + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/oauth2/token?service=ubuntupublisherubuntuacr2315dcfa83.azurecr.io&scope=repository%3Aubuntu-vm-nfdg_nf_artifact%3Apull%2Cpush + response: + body: + string: '{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IkNPQVU6UERZSDo0SVJYOjM2SEI6TFYzUDpWNFBGOko0NzQ6SzNOSjpPS1JCOlRZQUo6NEc0Szo1Q1NEIn0.eyJqdGkiOiI3ZmYxMTA0MC03NzY2LTRjYWEtYmRkMi0wZjBhZDQ3YjdkOWUiLCJzdWIiOiJ1YnVudHUtdm0tbmZkZy1uZi1hY3ItbWFuaWZlc3QtMS0wLTAiLCJuYmYiOjE2OTA0NDYzNTksImV4cCI6MTY5MDQ0ODE1OSwiaWF0IjoxNjkwNDQ2MzU5LCJpc3MiOiJBenVyZSBDb250YWluZXIgUmVnaXN0cnkiLCJhdWQiOiJ1YnVudHVwdWJsaXNoZXJ1YnVudHVhY3IyMzE1ZGNmYTgzLmF6dXJlY3IuaW8iLCJ2ZXJzaW9uIjoiMi4wIiwicmlkIjoiNTM2NDkxMTgyMTMxNGQ2NzkyNmRhN2EzY2RjMTc0ZjgiLCJhY2Nlc3MiOlt7IlR5cGUiOiJyZXBvc2l0b3J5IiwiTmFtZSI6InVidW50dS12bS1uZmRnX25mX2FydGlmYWN0IiwiQWN0aW9ucyI6WyJwdWxsIiwicHVzaCJdfV0sInJvbGVzIjpbXSwiZ3JhbnRfdHlwZSI6ImFjY2Vzc190b2tlbiJ9.siy2-dIIX3u-CF13DvJ-XXtxQjOpL_Di-iRS24X_9XZ77I22L94hMk07_Wk0oiwbCN68ZEjzHqJ5bgOYQ0X4QL891MUNJOnSOZnDrfRpNVQSgHop7EBnIQi0ydR-KmdV-qSMaCfJEh0CKZdTNtUaRPSxnRHMwVleYL9O4qk_LQifC35mHyEiKxay7Dmi2fJRqi0nK2xvA_nsjlNf2m4iwdj9enrOjvGKvh9UQYj3V1QQEfRCp4zL6sPZYYC8KCKzVeUO-bCoIx7jFZdK4ubKwyoNR0X_WWAmJBykuhpCZfWr8Z5bwjl-qE7nTck3qYBBVcTADeNTQaWZF08s-5dmHg"}' + headers: + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:40:59 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.316667' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/octet-stream + User-Agent: + - python-requests/2.26.0 + method: POST + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-nfdg_nf_artifact/blobs/uploads/ + response: + body: + string: '' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '0' + date: + - Thu, 27 Jul 2023 08:40:59 GMT + docker-distribution-api-version: + - registry/2.0 + docker-upload-uuid: + - 64e17226-dcba-4542-8c42-952f36a5c04a + location: + - /v2/ubuntu-vm-nfdg_nf_artifact/blobs/uploads/64e17226-dcba-4542-8c42-952f36a5c04a?_nouploadcache=false&_state=nq8UY1SfWZMMl2xnuQyqavmAEe22d70CJZyWcyX--MZ7Ik5hbWUiOiJ1YnVudHUtdm0tbmZkZ19uZl9hcnRpZmFjdCIsIlVVSUQiOiI2NGUxNzIyNi1kY2JhLTQ1NDItOGM0Mi05NTJmMzZhNWMwNGEiLCJPZmZzZXQiOjAsIlN0YXJ0ZWRBdCI6IjIwMjMtMDctMjdUMDg6NDA6NTkuNjc5NzE4MTA0WiJ9 + range: + - 0-0 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: "{\n \"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\",\n + \ \"contentVersion\": \"1.0.0.0\",\n \"metadata\": {\n \"_generator\": + {\n \"name\": \"bicep\",\n \"version\": \"0.15.31.15270\",\n + \ \"templateHash\": \"6874079872057921116\"\n }\n },\n \"parameters\": + {\n \"publisherName\": {\n \"type\": \"string\",\n \"defaultValue\": + \"ubuntuPublisher\",\n \"metadata\": {\n \"description\": + \"Publisher where the NFD is published\"\n }\n },\n \"networkFunctionDefinitionGroupName\": + {\n \"type\": \"string\",\n \"defaultValue\": \"ubuntu-vm-nfdg\",\n + \ \"metadata\": {\n \"description\": \"NFD Group name + for the Network Function\"\n }\n },\n \"ubuntu_vm_nfdg_nfd_version\": + {\n \"type\": \"string\",\n \"metadata\": {\n \"description\": + \"NFD version\"\n }\n },\n \"networkFunctionDefinitionOfferingLocation\": + {\n \"type\": \"string\",\n \"defaultValue\": \"uksouth\",\n + \ \"metadata\": {\n \"description\": \"Offering location + for the Network Function\"\n }\n },\n \"managedIdentity\": + {\n \"type\": \"string\",\n \"metadata\": {\n \"description\": + \"The managed identity that should be used to create the NF.\"\n }\n + \ },\n \"location\": {\n \"type\": \"string\",\n \"defaultValue\": + \"uksouth\"\n },\n \"nfviType\": {\n \"type\": \"string\",\n + \ \"defaultValue\": \"AzureCore\"\n },\n \"resourceGroupId\": + {\n \"type\": \"string\",\n \"defaultValue\": \"[resourceGroup().id]\"\n + \ },\n \"deploymentParameters\": {\n \"type\": \"array\"\n + \ }\n },\n \"variables\": {\n \"identityObject\": \"[if(equals(parameters('managedIdentity'), + ''), createObject('type', 'SystemAssigned'), createObject('type', 'UserAssigned', + 'userAssignedIdentities', createObject(format('{0}', parameters('managedIdentity')), + createObject())))]\"\n },\n \"resources\": [\n {\n \"copy\": + {\n \"name\": \"nf_resource\",\n \"count\": \"[length(parameters('deploymentParameters'))]\"\n + \ },\n \"type\": \"Microsoft.HybridNetwork/networkFunctions\",\n + \ \"apiVersion\": \"2023-04-01-preview\",\n \"name\": \"[format('ubuntu-vm-nfdg{0}', + copyIndex())]\",\n \"location\": \"[parameters('location')]\",\n + \ \"identity\": \"[variables('identityObject')]\",\n \"properties\": + {\n \"publisherName\": \"[parameters('publisherName')]\",\n \"publisherScope\": + \"Private\",\n \"networkFunctionDefinitionGroupName\": \"[parameters('networkFunctionDefinitionGroupName')]\",\n + \ \"networkFunctionDefinitionVersion\": \"[parameters('ubuntu_vm_nfdg_nfd_version')]\",\n + \ \"networkFunctionDefinitionOfferingLocation\": \"[parameters('networkFunctionDefinitionOfferingLocation')]\",\n + \ \"nfviType\": \"[parameters('nfviType')]\",\n \"nfviId\": + \"[parameters('resourceGroupId')]\",\n \"allowSoftwareUpdate\": + true,\n \"deploymentValues\": \"[string(parameters('deploymentParameters')[copyIndex()])]\"\n + \ }\n }\n ]\n}" + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '3329' + Content-Type: + - application/octet-stream + User-Agent: + - python-requests/2.26.0 + method: PUT + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-nfdg_nf_artifact/blobs/uploads/64e17226-dcba-4542-8c42-952f36a5c04a?_nouploadcache=false&_state=nq8UY1SfWZMMl2xnuQyqavmAEe22d70CJZyWcyX--MZ7Ik5hbWUiOiJ1YnVudHUtdm0tbmZkZ19uZl9hcnRpZmFjdCIsIlVVSUQiOiI2NGUxNzIyNi1kY2JhLTQ1NDItOGM0Mi05NTJmMzZhNWMwNGEiLCJPZmZzZXQiOjAsIlN0YXJ0ZWRBdCI6IjIwMjMtMDctMjdUMDg6NDA6NTkuNjc5NzE4MTA0WiJ9&digest=sha256%3A203ab85e769c53b5698a5596a042c3190fdb91c36b361bb0fcc7700a1186af93 + response: + body: + string: '' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '0' + date: + - Thu, 27 Jul 2023 08:40:59 GMT + docker-content-digest: + - sha256:203ab85e769c53b5698a5596a042c3190fdb91c36b361bb0fcc7700a1186af93 + docker-distribution-api-version: + - registry/2.0 + location: + - /v2/ubuntu-vm-nfdg_nf_artifact/blobs/sha256:203ab85e769c53b5698a5596a042c3190fdb91c36b361bb0fcc7700a1186af93 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/octet-stream + User-Agent: + - python-requests/2.26.0 + method: POST + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-nfdg_nf_artifact/blobs/uploads/ + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"ubuntu-vm-nfdg_nf_artifact","Action":"pull"},{"Type":"repository","Name":"ubuntu-vm-nfdg_nf_artifact","Action":"push"}]}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '294' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:41:00 GMT + docker-distribution-api-version: + - registry/2.0 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + www-authenticate: + - Bearer realm="https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/oauth2/token",service="ubuntupublisherubuntuacr2315dcfa83.azurecr.io",scope="repository:ubuntu-vm-nfdg_nf_artifact:pull,push" + x-content-type-options: + - nosniff + status: + code: 401 + message: Unauthorized +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Service: + - ubuntupublisherubuntuacr2315dcfa83.azurecr.io + User-Agent: + - oras-py + method: GET + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/oauth2/token?service=ubuntupublisherubuntuacr2315dcfa83.azurecr.io&scope=repository%3Aubuntu-vm-nfdg_nf_artifact%3Apull%2Cpush + response: + body: + string: '{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IkNPQVU6UERZSDo0SVJYOjM2SEI6TFYzUDpWNFBGOko0NzQ6SzNOSjpPS1JCOlRZQUo6NEc0Szo1Q1NEIn0.eyJqdGkiOiJmYjUwNzA1OS04MTYyLTRlOGItYTU2MS03MDk4Nzk5NDQ0MjEiLCJzdWIiOiJ1YnVudHUtdm0tbmZkZy1uZi1hY3ItbWFuaWZlc3QtMS0wLTAiLCJuYmYiOjE2OTA0NDYzNjAsImV4cCI6MTY5MDQ0ODE2MCwiaWF0IjoxNjkwNDQ2MzYwLCJpc3MiOiJBenVyZSBDb250YWluZXIgUmVnaXN0cnkiLCJhdWQiOiJ1YnVudHVwdWJsaXNoZXJ1YnVudHVhY3IyMzE1ZGNmYTgzLmF6dXJlY3IuaW8iLCJ2ZXJzaW9uIjoiMi4wIiwicmlkIjoiNTM2NDkxMTgyMTMxNGQ2NzkyNmRhN2EzY2RjMTc0ZjgiLCJhY2Nlc3MiOlt7IlR5cGUiOiJyZXBvc2l0b3J5IiwiTmFtZSI6InVidW50dS12bS1uZmRnX25mX2FydGlmYWN0IiwiQWN0aW9ucyI6WyJwdWxsIiwicHVzaCJdfV0sInJvbGVzIjpbXSwiZ3JhbnRfdHlwZSI6ImFjY2Vzc190b2tlbiJ9.Di3y7Kst9768MNe5HMPDeB_p9_BMSZ-IOndp7Dn_54PAun-eL7dl4WzPapVUY6d0jtxcBn3kUaIv22cnF4jV5_K_NLJs_iDixVEBmyIH73puL6XCAo1z9FkOdxIZt5yw60Gjo27AoQUhAbi-qv9www9Tg5AVOqkAhISCj2fqFU7Dj5cCEls2nsAyq61wcLXxctxJtOarKmkpPF2r-SAZ94W2BETJ36V8Sma1CAJO5wk_nQ2c9S_ICMCAkBxy0hZhA5Bk0wIcJD5bwZKC_3LBvDry_J4Dsaha7oG42dzRrW0hKbu4nRCWhfLgnzmHmnsW4KPtZkrU4hsplrFoFSlcTw"}' + headers: + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:41:00 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.3' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/octet-stream + User-Agent: + - python-requests/2.26.0 + method: POST + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-nfdg_nf_artifact/blobs/uploads/ + response: + body: + string: '' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '0' + date: + - Thu, 27 Jul 2023 08:41:00 GMT + docker-distribution-api-version: + - registry/2.0 + docker-upload-uuid: + - 938244b7-a9b2-43fd-8f26-261893055781 + location: + - /v2/ubuntu-vm-nfdg_nf_artifact/blobs/uploads/938244b7-a9b2-43fd-8f26-261893055781?_nouploadcache=false&_state=xB8zt3tzNjZbQZ9DnI8cLTk3-cPsOldGe7a6nyrcoxB7Ik5hbWUiOiJ1YnVudHUtdm0tbmZkZ19uZl9hcnRpZmFjdCIsIlVVSUQiOiI5MzgyNDRiNy1hOWIyLTQzZmQtOGYyNi0yNjE4OTMwNTU3ODEiLCJPZmZzZXQiOjAsIlN0YXJ0ZWRBdCI6IjIwMjMtMDctMjdUMDg6NDE6MDAuMDkzNzQ4NTQzWiJ9 + range: + - 0-0 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/octet-stream + User-Agent: + - python-requests/2.26.0 + method: PUT + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-nfdg_nf_artifact/blobs/uploads/938244b7-a9b2-43fd-8f26-261893055781?_nouploadcache=false&_state=xB8zt3tzNjZbQZ9DnI8cLTk3-cPsOldGe7a6nyrcoxB7Ik5hbWUiOiJ1YnVudHUtdm0tbmZkZ19uZl9hcnRpZmFjdCIsIlVVSUQiOiI5MzgyNDRiNy1hOWIyLTQzZmQtOGYyNi0yNjE4OTMwNTU3ODEiLCJPZmZzZXQiOjAsIlN0YXJ0ZWRBdCI6IjIwMjMtMDctMjdUMDg6NDE6MDAuMDkzNzQ4NTQzWiJ9&digest=sha256%3Ae3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + response: + body: + string: '' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '0' + date: + - Thu, 27 Jul 2023 08:41:00 GMT + docker-content-digest: + - sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + docker-distribution-api-version: + - registry/2.0 + location: + - /v2/ubuntu-vm-nfdg_nf_artifact/blobs/sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 201 + message: Created +- request: + body: '{"schemaVersion": 2, "mediaType": "application/vnd.oci.image.manifest.v1+json", + "config": {"mediaType": "application/vnd.unknown.config.v1+json", "size": 0, + "digest": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"}, + "layers": [{"mediaType": "application/vnd.oci.image.layer.v1.tar", "size": 3329, + "digest": "sha256:203ab85e769c53b5698a5596a042c3190fdb91c36b361bb0fcc7700a1186af93", + "annotations": {"org.opencontainers.image.title": "nf_definition.json"}}], "annotations": + {}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '502' + Content-Type: + - application/vnd.oci.image.manifest.v1+json + User-Agent: + - python-requests/2.26.0 + method: PUT + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-nfdg_nf_artifact/manifests/1.0.0 + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"ubuntu-vm-nfdg_nf_artifact","Action":"pull"},{"Type":"repository","Name":"ubuntu-vm-nfdg_nf_artifact","Action":"push"}]}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '294' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:41:00 GMT + docker-distribution-api-version: + - registry/2.0 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + www-authenticate: + - Bearer realm="https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/oauth2/token",service="ubuntupublisherubuntuacr2315dcfa83.azurecr.io",scope="repository:ubuntu-vm-nfdg_nf_artifact:pull,push" + x-content-type-options: + - nosniff + status: + code: 401 + message: Unauthorized +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Service: + - ubuntupublisherubuntuacr2315dcfa83.azurecr.io + User-Agent: + - oras-py + method: GET + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/oauth2/token?service=ubuntupublisherubuntuacr2315dcfa83.azurecr.io&scope=repository%3Aubuntu-vm-nfdg_nf_artifact%3Apull%2Cpush + response: + body: + string: '{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IkNPQVU6UERZSDo0SVJYOjM2SEI6TFYzUDpWNFBGOko0NzQ6SzNOSjpPS1JCOlRZQUo6NEc0Szo1Q1NEIn0.eyJqdGkiOiIxOTU0MTc1Yi1mMGVlLTQzYTctODQwMS00MWE1NGFiYWM1ZjQiLCJzdWIiOiJ1YnVudHUtdm0tbmZkZy1uZi1hY3ItbWFuaWZlc3QtMS0wLTAiLCJuYmYiOjE2OTA0NDYzNjAsImV4cCI6MTY5MDQ0ODE2MCwiaWF0IjoxNjkwNDQ2MzYwLCJpc3MiOiJBenVyZSBDb250YWluZXIgUmVnaXN0cnkiLCJhdWQiOiJ1YnVudHVwdWJsaXNoZXJ1YnVudHVhY3IyMzE1ZGNmYTgzLmF6dXJlY3IuaW8iLCJ2ZXJzaW9uIjoiMi4wIiwicmlkIjoiNTM2NDkxMTgyMTMxNGQ2NzkyNmRhN2EzY2RjMTc0ZjgiLCJhY2Nlc3MiOlt7IlR5cGUiOiJyZXBvc2l0b3J5IiwiTmFtZSI6InVidW50dS12bS1uZmRnX25mX2FydGlmYWN0IiwiQWN0aW9ucyI6WyJwdWxsIiwicHVzaCJdfV0sInJvbGVzIjpbXSwiZ3JhbnRfdHlwZSI6ImFjY2Vzc190b2tlbiJ9.plgAbyg8j371ayhLrqK1NC4t7zTNjrAj0ey0o6UWpU_7toO6CZhkzJHpn_exfPmJ1DA7ZNjO0TuqcooGQv5kxVp-wCJVpCQaGZSMq-6TXRROl-4KAdvN5gcqBF8NKRdH-j5QsNs_8K6ecd20bxYBzYKy40_9zSmxdrnuBHzLSJsy8Xcx5HxRrIzsBZrCEp_mbooSKBn5pQtauiIjQniYtgAkBQIk-J6S0OyPZjSfkiGXVO3TblRNcys__4lfpvx82gTLouDLaWCY7c4yodwBD5oCNHjV_vL-apAQOtmh64wEajzun4UOA3hLH0t2asN1Si_QN076HM4gvZxlVwN9hw"}' + headers: + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:41:00 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.283333' + status: + code: 200 + message: OK +- request: + body: '{"schemaVersion": 2, "mediaType": "application/vnd.oci.image.manifest.v1+json", + "config": {"mediaType": "application/vnd.unknown.config.v1+json", "size": 0, + "digest": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"}, + "layers": [{"mediaType": "application/vnd.oci.image.layer.v1.tar", "size": 3329, + "digest": "sha256:203ab85e769c53b5698a5596a042c3190fdb91c36b361bb0fcc7700a1186af93", + "annotations": {"org.opencontainers.image.title": "nf_definition.json"}}], "annotations": + {}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '502' + Content-Type: + - application/vnd.oci.image.manifest.v1+json + User-Agent: + - python-requests/2.26.0 + method: PUT + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-nfdg_nf_artifact/manifests/1.0.0 + response: + body: + string: '' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '0' + date: + - Thu, 27 Jul 2023 08:41:00 GMT + docker-content-digest: + - sha256:16c22b2acdf0e0e39bd304ad53dd567b5c959774319563df7958625e9bdc5088 + docker-distribution-api-version: + - registry/2.0 + location: + - /v2/ubuntu-vm-nfdg_nf_artifact/manifests/sha256:16c22b2acdf0e0e39bd304ad53dd567b5c959774319563df7958625e9bdc5088 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --definition-type -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkFunctionDefinitionGroups/ubuntu-vm-nfdg/networkFunctionDefinitionVersions/1.0.0?api-version=2023-04-01-preview + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:41:01 GMT + etag: + - '"06001c9a-0000-1100-0000-64c22d9d0000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-build-version: + - 1.0.02386.1640 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd delete + Connection: + - keep-alive + ParameterSetName: + - --definition-type -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5","name":"455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkFunctionDefinitionGroups/ubuntu-vm-nfdg/networkFunctionDefinitionVersions/1.0.0","status":"Deleting","startTime":"2023-07-27T08:41:01.8378067Z"}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + cache-control: + - no-cache + content-length: + - '602' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:41:01 GMT + etag: + - '"0200bb7b-0000-1100-0000-64c22d9d0000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd delete + Connection: + - keep-alive + ParameterSetName: + - --definition-type -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5","name":"455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkFunctionDefinitionGroups/ubuntu-vm-nfdg/networkFunctionDefinitionVersions/1.0.0","status":"Deleting","startTime":"2023-07-27T08:41:01.8378067Z"}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + cache-control: + - no-cache + content-length: + - '602' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:41:32 GMT + etag: + - '"0200bb7b-0000-1100-0000-64c22d9d0000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd delete + Connection: + - keep-alive + ParameterSetName: + - --definition-type -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5","name":"455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkFunctionDefinitionGroups/ubuntu-vm-nfdg/networkFunctionDefinitionVersions/1.0.0","status":"Deleting","startTime":"2023-07-27T08:41:01.8378067Z"}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + cache-control: + - no-cache + content-length: + - '602' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:42:01 GMT + etag: + - '"0200bb7b-0000-1100-0000-64c22d9d0000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd delete + Connection: + - keep-alive + ParameterSetName: + - --definition-type -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5","name":"455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkFunctionDefinitionGroups/ubuntu-vm-nfdg/networkFunctionDefinitionVersions/1.0.0","status":"Succeeded","startTime":"2023-07-27T08:41:01.8378067Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '621' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:42:31 GMT + etag: + - '"0200f67b-0000-1100-0000-64c22de00000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd delete + Connection: + - keep-alive + ParameterSetName: + - --definition-type -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5","name":"455432af-8fa9-4c95-acc3-86eee4df1396*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkFunctionDefinitionGroups/ubuntu-vm-nfdg/networkFunctionDefinitionVersions/1.0.0","status":"Succeeded","startTime":"2023-07-27T08:41:01.8378067Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '621' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:42:31 GMT + etag: + - '"0200f67b-0000-1100-0000-64c22de00000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --definition-type -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-blob-store/artifactManifests/ubuntu-vm-sa-manifest-1-0-0?api-version=2023-04-01-preview + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/aad47946-0259-4d0c-a5ba-56212bb845c8*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B?api-version=2020-01-01-preview + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:42:33 GMT + etag: + - '"10002c82-0000-1100-0000-64c22df90000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/aad47946-0259-4d0c-a5ba-56212bb845c8*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B?api-version=2020-01-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-build-version: + - 1.0.02386.1640 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14998' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd delete + Connection: + - keep-alive + ParameterSetName: + - --definition-type -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/aad47946-0259-4d0c-a5ba-56212bb845c8*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/aad47946-0259-4d0c-a5ba-56212bb845c8*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B","name":"aad47946-0259-4d0c-a5ba-56212bb845c8*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-blob-store/artifactManifests/ubuntu-vm-sa-manifest-1-0-0","status":"Deleting","startTime":"2023-07-27T08:42:33.3121659Z"}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/aad47946-0259-4d0c-a5ba-56212bb845c8*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B?api-version=2020-01-01-preview + cache-control: + - no-cache + content-length: + - '594' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:42:33 GMT + etag: + - '"02001e7c-0000-1100-0000-64c22df90000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/aad47946-0259-4d0c-a5ba-56212bb845c8*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B?api-version=2020-01-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd delete + Connection: + - keep-alive + ParameterSetName: + - --definition-type -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/aad47946-0259-4d0c-a5ba-56212bb845c8*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/aad47946-0259-4d0c-a5ba-56212bb845c8*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B","name":"aad47946-0259-4d0c-a5ba-56212bb845c8*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-blob-store/artifactManifests/ubuntu-vm-sa-manifest-1-0-0","status":"Succeeded","startTime":"2023-07-27T08:42:33.3121659Z","endTime":"2023-07-27T08:42:37.6272883Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '654' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:43:02 GMT + etag: + - '"0200217c-0000-1100-0000-64c22dfd0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd delete + Connection: + - keep-alive + ParameterSetName: + - --definition-type -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/aad47946-0259-4d0c-a5ba-56212bb845c8*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/aad47946-0259-4d0c-a5ba-56212bb845c8*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B","name":"aad47946-0259-4d0c-a5ba-56212bb845c8*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-blob-store/artifactManifests/ubuntu-vm-sa-manifest-1-0-0","status":"Succeeded","startTime":"2023-07-27T08:42:33.3121659Z","endTime":"2023-07-27T08:42:37.6272883Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '654' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:43:03 GMT + etag: + - '"0200217c-0000-1100-0000-64c22dfd0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --definition-type -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-acr-manifest-1-0-0?api-version=2023-04-01-preview + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/38449bce-138a-4496-8a5c-bbe3d49b43f8*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443?api-version=2020-01-01-preview + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:43:04 GMT + etag: + - '"1000e682-0000-1100-0000-64c22e190000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/38449bce-138a-4496-8a5c-bbe3d49b43f8*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443?api-version=2020-01-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-build-version: + - 1.0.02386.1640 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14997' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd delete + Connection: + - keep-alive + ParameterSetName: + - --definition-type -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/38449bce-138a-4496-8a5c-bbe3d49b43f8*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/38449bce-138a-4496-8a5c-bbe3d49b43f8*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443","name":"38449bce-138a-4496-8a5c-bbe3d49b43f8*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-acr-manifest-1-0-0","status":"Deleting","startTime":"2023-07-27T08:43:04.7152779Z"}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/38449bce-138a-4496-8a5c-bbe3d49b43f8*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443?api-version=2020-01-01-preview + cache-control: + - no-cache + content-length: + - '588' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:43:04 GMT + etag: + - '"02003d7c-0000-1100-0000-64c22e180000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/38449bce-138a-4496-8a5c-bbe3d49b43f8*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443?api-version=2020-01-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd delete + Connection: + - keep-alive + ParameterSetName: + - --definition-type -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/38449bce-138a-4496-8a5c-bbe3d49b43f8*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/38449bce-138a-4496-8a5c-bbe3d49b43f8*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443","name":"38449bce-138a-4496-8a5c-bbe3d49b43f8*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-acr-manifest-1-0-0","status":"Succeeded","startTime":"2023-07-27T08:43:04.7152779Z","endTime":"2023-07-27T08:43:10.5584027Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '648' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:43:35 GMT + etag: + - '"02003f7c-0000-1100-0000-64c22e1e0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nfd delete + Connection: + - keep-alive + ParameterSetName: + - --definition-type -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/38449bce-138a-4496-8a5c-bbe3d49b43f8*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/38449bce-138a-4496-8a5c-bbe3d49b43f8*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443","name":"38449bce-138a-4496-8a5c-bbe3d49b43f8*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-acr-manifest-1-0-0","status":"Succeeded","startTime":"2023-07-27T08:43:04.7152779Z","endTime":"2023-07-27T08:43:10.5584027Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '648' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:43:35 GMT + etag: + - '"02003f7c-0000-1100-0000-64c22e1e0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkServiceDesignGroups/ubuntu/networkServiceDesignVersions/1.0.0?api-version=2023-04-01-preview + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/3aca03a0-c1b9-4931-9105-e0af1bba2573*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224?api-version=2020-01-01-preview + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:43:36 GMT + etag: + - '"0300cd3d-0000-1100-0000-64c22e380000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/3aca03a0-c1b9-4931-9105-e0af1bba2573*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224?api-version=2020-01-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-build-version: + - 1.0.02386.1640 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd delete + Connection: + - keep-alive + ParameterSetName: + - -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/3aca03a0-c1b9-4931-9105-e0af1bba2573*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/3aca03a0-c1b9-4931-9105-e0af1bba2573*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224","name":"3aca03a0-c1b9-4931-9105-e0af1bba2573*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkServiceDesignGroups/ubuntu/networkServiceDesignVersions/1.0.0","status":"Deleting","startTime":"2023-07-27T08:43:36.5797462Z"}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/3aca03a0-c1b9-4931-9105-e0af1bba2573*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224?api-version=2020-01-01-preview + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:43:36 GMT + etag: + - '"02005a7c-0000-1100-0000-64c22e380000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/3aca03a0-c1b9-4931-9105-e0af1bba2573*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224?api-version=2020-01-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd delete + Connection: + - keep-alive + ParameterSetName: + - -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/3aca03a0-c1b9-4931-9105-e0af1bba2573*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/3aca03a0-c1b9-4931-9105-e0af1bba2573*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224","name":"3aca03a0-c1b9-4931-9105-e0af1bba2573*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkServiceDesignGroups/ubuntu/networkServiceDesignVersions/1.0.0","status":"Succeeded","startTime":"2023-07-27T08:43:36.5797462Z","endTime":"2023-07-27T08:43:41.4670481Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '644' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:44:06 GMT + etag: + - '"0200637c-0000-1100-0000-64c22e3d0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd delete + Connection: + - keep-alive + ParameterSetName: + - -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/3aca03a0-c1b9-4931-9105-e0af1bba2573*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/3aca03a0-c1b9-4931-9105-e0af1bba2573*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224","name":"3aca03a0-c1b9-4931-9105-e0af1bba2573*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkServiceDesignGroups/ubuntu/networkServiceDesignVersions/1.0.0","status":"Succeeded","startTime":"2023-07-27T08:43:36.5797462Z","endTime":"2023-07-27T08:43:41.4670481Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '644' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:44:06 GMT + etag: + - '"0200637c-0000-1100-0000-64c22e3d0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-nfdg-nf-acr-manifest-1-0-0?api-version=2023-04-01-preview + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/03287562-f38a-4ca3-8596-7d51710c4961*8D93DE1828AACDC1144F7B137A7BDBCA1FB2298A8036FEA31CE0BEA6F8A8908F?api-version=2020-01-01-preview + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:44:08 GMT + etag: + - '"1000cd83-0000-1100-0000-64c22e580000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/03287562-f38a-4ca3-8596-7d51710c4961*8D93DE1828AACDC1144F7B137A7BDBCA1FB2298A8036FEA31CE0BEA6F8A8908F?api-version=2020-01-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-build-version: + - 1.0.02386.1640 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14998' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd delete + Connection: + - keep-alive + ParameterSetName: + - -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/03287562-f38a-4ca3-8596-7d51710c4961*8D93DE1828AACDC1144F7B137A7BDBCA1FB2298A8036FEA31CE0BEA6F8A8908F?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/03287562-f38a-4ca3-8596-7d51710c4961*8D93DE1828AACDC1144F7B137A7BDBCA1FB2298A8036FEA31CE0BEA6F8A8908F","name":"03287562-f38a-4ca3-8596-7d51710c4961*8D93DE1828AACDC1144F7B137A7BDBCA1FB2298A8036FEA31CE0BEA6F8A8908F","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-nfdg-nf-acr-manifest-1-0-0","status":"Deleting","startTime":"2023-07-27T08:44:08.0720075Z"}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/03287562-f38a-4ca3-8596-7d51710c4961*8D93DE1828AACDC1144F7B137A7BDBCA1FB2298A8036FEA31CE0BEA6F8A8908F?api-version=2020-01-01-preview + cache-control: + - no-cache + content-length: + - '596' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:44:08 GMT + etag: + - '"0200ad7c-0000-1100-0000-64c22e580000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/03287562-f38a-4ca3-8596-7d51710c4961*8D93DE1828AACDC1144F7B137A7BDBCA1FB2298A8036FEA31CE0BEA6F8A8908F?api-version=2020-01-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd delete + Connection: + - keep-alive + ParameterSetName: + - -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/03287562-f38a-4ca3-8596-7d51710c4961*8D93DE1828AACDC1144F7B137A7BDBCA1FB2298A8036FEA31CE0BEA6F8A8908F?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/03287562-f38a-4ca3-8596-7d51710c4961*8D93DE1828AACDC1144F7B137A7BDBCA1FB2298A8036FEA31CE0BEA6F8A8908F","name":"03287562-f38a-4ca3-8596-7d51710c4961*8D93DE1828AACDC1144F7B137A7BDBCA1FB2298A8036FEA31CE0BEA6F8A8908F","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-nfdg-nf-acr-manifest-1-0-0","status":"Succeeded","startTime":"2023-07-27T08:44:08.0720075Z","endTime":"2023-07-27T08:44:22.4798635Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '656' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:44:37 GMT + etag: + - '"0200c47c-0000-1100-0000-64c22e660000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd delete + Connection: + - keep-alive + ParameterSetName: + - -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/03287562-f38a-4ca3-8596-7d51710c4961*8D93DE1828AACDC1144F7B137A7BDBCA1FB2298A8036FEA31CE0BEA6F8A8908F?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/03287562-f38a-4ca3-8596-7d51710c4961*8D93DE1828AACDC1144F7B137A7BDBCA1FB2298A8036FEA31CE0BEA6F8A8908F","name":"03287562-f38a-4ca3-8596-7d51710c4961*8D93DE1828AACDC1144F7B137A7BDBCA1FB2298A8036FEA31CE0BEA6F8A8908F","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-vm-nfdg-nf-acr-manifest-1-0-0","status":"Succeeded","startTime":"2023-07-27T08:44:08.0720075Z","endTime":"2023-07-27T08:44:22.4798635Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '656' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:44:37 GMT + etag: + - '"0200c47c-0000-1100-0000-64c22e660000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/configurationGroupSchemas/ubuntu_ConfigGroupSchema?api-version=2023-04-01-preview + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/219abeba-ae1e-4df1-a118-ca863c1c8109*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73?api-version=2020-01-01-preview + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:44:38 GMT + etag: + - '"050013be-0000-1100-0000-64c22e770000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/219abeba-ae1e-4df1-a118-ca863c1c8109*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73?api-version=2020-01-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-build-version: + - 1.0.02386.1640 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14997' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd delete + Connection: + - keep-alive + ParameterSetName: + - -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/219abeba-ae1e-4df1-a118-ca863c1c8109*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/219abeba-ae1e-4df1-a118-ca863c1c8109*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73","name":"219abeba-ae1e-4df1-a118-ca863c1c8109*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/configurationGroupSchemas/ubuntu_ConfigGroupSchema","status":"Deleting","startTime":"2023-07-27T08:44:39.4195502Z"}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/219abeba-ae1e-4df1-a118-ca863c1c8109*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73?api-version=2020-01-01-preview + cache-control: + - no-cache + content-length: + - '566' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:44:38 GMT + etag: + - '"0200d37c-0000-1100-0000-64c22e770000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/219abeba-ae1e-4df1-a118-ca863c1c8109*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73?api-version=2020-01-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd delete + Connection: + - keep-alive + ParameterSetName: + - -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/219abeba-ae1e-4df1-a118-ca863c1c8109*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/219abeba-ae1e-4df1-a118-ca863c1c8109*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73","name":"219abeba-ae1e-4df1-a118-ca863c1c8109*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/configurationGroupSchemas/ubuntu_ConfigGroupSchema","status":"Succeeded","startTime":"2023-07-27T08:44:39.4195502Z","endTime":"2023-07-27T08:44:44.5104073Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '626' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:45:09 GMT + etag: + - '"0200d87c-0000-1100-0000-64c22e7c0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aosm nsd delete + Connection: + - keep-alive + ParameterSetName: + - -f --debug --force + User-Agent: + - AZURECLI/2.49.0 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/219abeba-ae1e-4df1-a118-ca863c1c8109*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/219abeba-ae1e-4df1-a118-ca863c1c8109*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73","name":"219abeba-ae1e-4df1-a118-ca863c1c8109*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/configurationGroupSchemas/ubuntu_ConfigGroupSchema","status":"Succeeded","startTime":"2023-07-27T08:44:39.4195502Z","endTime":"2023-07-27T08:44:44.5104073Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '626' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Jul 2023 08:45:09 GMT + etag: + - '"0200d87c-0000-1100-0000-64c22e7c0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/aosm/azext_aosm/tests/latest/scenario_test_mocks/mock_input_templates/cnf_nsd_input_template.json b/src/aosm/azext_aosm/tests/latest/scenario_test_mocks/mock_input_templates/cnf_nsd_input_template.json index df367f1f5f9..3b7b54523a9 100644 --- a/src/aosm/azext_aosm/tests/latest/scenario_test_mocks/mock_input_templates/cnf_nsd_input_template.json +++ b/src/aosm/azext_aosm/tests/latest/scenario_test_mocks/mock_input_templates/cnf_nsd_input_template.json @@ -3,12 +3,18 @@ "publisher_name": "nginx-publisher", "publisher_resource_group_name": "{{publisher_resource_group_name}}", "acr_artifact_store_name": "nginx-nsd-acr", - "network_function_definition_group_name": "nginx-nfdg", - "network_function_definition_version_name": "1.0.0", - "network_function_definition_offering_location": "uksouth", - "network_function_type": "cnf", + "network_functions": [ + { + "name": "nginx-nfdg", + "version": "1.0.0", + "publisher_offering_location": "uksouth", + "type": "cnf", + "multiple_instances": false, + "publisher": "nginx-publisher", + "publisher_resource_group": "{{publisher_resource_group_name}}" + } + ], "nsdg_name": "nginx", "nsd_version": "1.0.0", - "nsdv_description": "Deploys a basic NGINX CNF", - "multiple_instances": false -} \ No newline at end of file + "nsdv_description": "Deploys a basic NGINX CNF" +} diff --git a/src/aosm/azext_aosm/tests/latest/scenario_test_mocks/mock_input_templates/vnf_nsd_input_template.json b/src/aosm/azext_aosm/tests/latest/scenario_test_mocks/mock_input_templates/vnf_nsd_input_template.json index fc7776ed9d9..ef52017e5e0 100644 --- a/src/aosm/azext_aosm/tests/latest/scenario_test_mocks/mock_input_templates/vnf_nsd_input_template.json +++ b/src/aosm/azext_aosm/tests/latest/scenario_test_mocks/mock_input_templates/vnf_nsd_input_template.json @@ -1,14 +1,20 @@ { + "location": "uksouth", "publisher_name": "ubuntuPublisher", "publisher_resource_group_name": "{{publisher_resource_group_name}}", "acr_artifact_store_name": "ubuntu-acr", - "location": "uksouth", - "network_function_definition_group_name": "ubuntu-vm-nfdg", - "network_function_definition_version_name": "1.0.0", - "network_function_definition_offering_location": "uksouth", - "network_function_type": "vnf", + "network_functions": [ + { + "name": "ubuntu-vm-nfdg", + "version": "1.0.0", + "publisher_offering_location": "uksouth", + "type": "vnf", + "multiple_instances": false, + "publisher": "ubuntuPublisher", + "publisher_resource_group": "{{publisher_resource_group_name}}" + } + ], "nsdg_name": "ubuntu", "nsd_version": "1.0.0", - "nsdv_description": "Plain ubuntu VM", - "multiple_instances": false + "nsdv_description": "Plain ubuntu VM" } \ No newline at end of file diff --git a/src/aosm/azext_aosm/tests/latest/test_nsd.py b/src/aosm/azext_aosm/tests/latest/test_nsd.py index 8bfd2186a1a..cda783c7a50 100644 --- a/src/aosm/azext_aosm/tests/latest/test_nsd.py +++ b/src/aosm/azext_aosm/tests/latest/test_nsd.py @@ -5,9 +5,11 @@ import os from dataclasses import dataclass +from distutils.dir_util import copy_tree import json import shutil import subprocess +from filecmp import dircmp from pathlib import Path from unittest.mock import patch from tempfile import TemporaryDirectory @@ -17,6 +19,7 @@ from azext_aosm.custom import generate_design_config, build_design mock_nsd_folder = ((Path(__file__).parent) / "mock_nsd").resolve() +output_folder = ((Path(__file__).parent) / "nsd_output").resolve() CGV_DATA = { @@ -55,7 +58,27 @@ } -deploy_parameters = { +MULTIPLE_NFs_CGV_DATA = { + "managedIdentity": "managed_identity", + "nginx-nfdg": { + "customLocationId": "custom_location", + "nginx_nfdg_nfd_version": "1.0.0", + "deploymentParameters": {"service_port": 5222, "serviceAccount_create": False}, + }, + "ubuntu-nfdg": { + "ubuntu_nfdg_nfd_version": "1.0.0", + "deploymentParameters": { + "location": "eastus", + "subnetName": "ubuntu-vm-subnet", + "ubuntuVmName": "ubuntu-vm", + "virtualNetworkId": "ubuntu-vm-vnet", + "sshPublicKeyAdmin": "public_key", + }, + }, +} + + +ubuntu_deploy_parameters = { "$schema": "https://json-schema.org/draft-07/schema#", "title": "DeployParametersSchema", "type": "object", @@ -67,7 +90,16 @@ }, } -deploy_parameters_string = json.dumps(deploy_parameters) +nginx_deploy_parameters = { + "$schema": "https://json-schema.org/draft-07/schema#", + "title": "DeployParametersSchema", + "type": "object", + "properties": { + "serviceAccount_create": {"type": "boolean"}, + "service_port": {"type": "integer"}, + }, + "required": ["serviceAccount_create", "service_port"], +} # We don't want to get details from a real NFD (calling out to Azure) in a UT. @@ -77,12 +109,12 @@ class NFDV: deploy_parameters: str -nfdv = NFDV(deploy_parameters_string) - - class NFDVs: - def get(self, **_): - return nfdv + def get(self, network_function_definition_group_name, **_): + if "nginx" in network_function_definition_group_name: + return NFDV(json.dumps(nginx_deploy_parameters)) + else: + return NFDV(json.dumps(ubuntu_deploy_parameters)) class AOSMClient: @@ -149,6 +181,36 @@ def build_bicep(bicep_template_path): raise RuntimeError("Invalid Bicep") +def compare_to_expected_output(expected_folder_name: str): + """ + Compares nsd-bicep-templates to the supplied folder name + + :param expected_folder_name: The name of the folder within nsd_output to compare + with. + """ + # Check files and folders within the top level directory are the same. + expected_output_path = output_folder / expected_folder_name + comparison = dircmp("nsd-bicep-templates", expected_output_path) + + try: + assert len(comparison.diff_files) == 0 + assert len(comparison.left_only) == 0 + assert len(comparison.right_only) == 0 + + # Check the files and folders within each of the subdirectories are the same. + for subdir in comparison.subdirs.values(): + assert len(subdir.diff_files) == 0 + assert len(subdir.left_only) == 0 + assert len(subdir.right_only) == 0 + except: + copy_tree("nsd-bicep-templates", str(expected_output_path)) + print( + f"Output has changed in {expected_output_path}, use git diff to check if " + f"you are happy with those changes." + ) + raise + + class TestNSDGenerator: def test_generate_config(self): """ @@ -185,9 +247,8 @@ def test_build(self, cf_resources): CGV_DATA, "nsd-bicep-templates/schemas/ubuntu_ConfigGroupSchema.json", ) - # build_bicep("nsd-bicep-templates/nf_definition.bicep") - # build_bicep("nsd-bicep-templates/nsd_definition.bicep") - # build_bicep("nsd-bicep-templates/artifact_manifest.bicep") + + compare_to_expected_output("test_build") finally: os.chdir(starting_directory) @@ -213,8 +274,39 @@ def test_build_multiple_instances(self, cf_resources): "nsd-bicep-templates/schemas/ubuntu_ConfigGroupSchema.json", ) - # Don't bother validating the bicep here. It takes ages and there - # nothing different about the bicep in the multiple instances case. + compare_to_expected_output("test_build_multiple_instances") + finally: + os.chdir(starting_directory) + + @patch("azext_aosm.custom.cf_resources") + def test_build_multiple_nfs(self, cf_resources): + """ + Test building the NSD bicep templates with multiple NFs allowed. + """ + starting_directory = os.getcwd() + with TemporaryDirectory() as test_dir: + os.chdir(test_dir) + + try: + build_design( + mock_cmd, + client=mock_client, + config_file=str(mock_nsd_folder / "input_multi_nf_nsd.json"), + ) + + assert os.path.exists("nsd-bicep-templates") + validate_json_against_schema( + MULTIPLE_NFs_CGV_DATA, + "nsd-bicep-templates/schemas/multinf_ConfigGroupSchema.json", + ) + + # The bicep checks take a while, so we only do them here and not on the + # other tests. + build_bicep("nsd-bicep-templates/nginx-nfdg_nf.bicep") + build_bicep("nsd-bicep-templates/ubuntu-nfdg_nf.bicep") + build_bicep("nsd-bicep-templates/nsd_definition.bicep") + build_bicep("nsd-bicep-templates/artifact_manifest.bicep") + compare_to_expected_output("test_build_multiple_nfs") finally: os.chdir(starting_directory) diff --git a/src/aosm/azext_aosm/util/constants.py b/src/aosm/azext_aosm/util/constants.py index abdcb572f66..9612402fcac 100644 --- a/src/aosm/azext_aosm/util/constants.py +++ b/src/aosm/azext_aosm/util/constants.py @@ -10,7 +10,6 @@ VNF = "vnf" CNF = "cnf" NSD = "nsd" -SCHEMA = "schema" class DeployableResourceTypes(str, Enum): @@ -18,28 +17,27 @@ class DeployableResourceTypes(str, Enum): CNF = CNF NSD = NSD + # Skip steps BICEP_PUBLISH = "bicep-publish" ARTIFACT_UPLOAD = "artifact-upload" IMAGE_UPLOAD = "image-upload" + class SkipSteps(Enum): BICEP_PUBLISH = BICEP_PUBLISH ARTIFACT_UPLOAD = ARTIFACT_UPLOAD IMAGE_UPLOAD = IMAGE_UPLOAD -# Names of files used in the repo +# Names of files used in the repo NF_TEMPLATE_JINJA2_SOURCE_TEMPLATE = "nf_template.bicep.j2" -NF_DEFINITION_BICEP_FILENAME = "nf_definition.bicep" NF_DEFINITION_JSON_FILENAME = "nf_definition.json" NF_DEFINITION_OUTPUT_BICEP_PREFIX = "nfd-bicep-" NSD_DEFINITION_JINJA2_SOURCE_TEMPLATE = "nsd_template.bicep.j2" NSD_BICEP_FILENAME = "nsd_definition.bicep" NSD_OUTPUT_BICEP_PREFIX = "nsd-bicep-templates" NSD_ARTIFACT_MANIFEST_BICEP_FILENAME = "artifact_manifest.bicep" -NSD_ARTIFACT_MANIFEST_JSON_FILENAME = "artifact_manifest.json" -NSD_CONFIG_MAPPING_FILENAME = "configMappings.json" NSD_ARTIFACT_MANIFEST_SOURCE_TEMPLATE_FILENAME = "artifact_manifest_template.bicep" VNF_DEFINITION_BICEP_TEMPLATE_FILENAME = "vnfdefinition.bicep" diff --git a/src/aosm/development.md b/src/aosm/development.md index d1f7ff0d65f..b8b48779503 100644 --- a/src/aosm/development.md +++ b/src/aosm/development.md @@ -40,12 +40,96 @@ TODO Make sure your VSCode is running in the same python virtual environment ### Linting and Tests + +#### Style ```bash azdev style aosm +``` + +Expected output: +``` +=============== +| Style Check | +=============== + +Extensions: aosm + +Running pylint on extensions... +Pylint: PASSED + +Running flake8 on extensions... +Flake8: PASSED +``` + +#### Linter +```bash azdev linter --include-whl-extensions aosm -(Not written any tests yet) -azdev test aosm ``` + +Current expected output: +``` +============== +| CLI Linter | +============== + +Modules: aosm + +Initializing linter with command table and help files... + + Results +========= + +- pass: faulty_help_example_parameters_rule +- pass: faulty_help_example_rule +- pass: faulty_help_type_rule +- FAIL - HIGH severity: unrecognized_help_entry_rule + Help-Entry: `aosm definition build` - Not a recognized command or command-group + Help-Entry: `aosm definition delete` - Not a recognized command or command-group + Help-Entry: `aosm definition generate-config` - Not a recognized command or command-group + Help-Entry: `aosm definition publish` - Not a recognized command or command-group + Help-Entry: `aosm definition` - Not a recognized command or command-group + +- pass: unrecognized_help_parameter_rule +- pass: expired_command_group +- FAIL - HIGH severity: missing_group_help + Command-Group: `aosm nfd` - Missing help + Command-Group: `aosm nsd` - Missing help + +- pass: expired_command +- pass: missing_command_help +- pass: no_ids_for_list_commands +- FAIL - HIGH severity: bad_short_option + Parameter: aosm nfd publish, `manifest_parameters_json_file` - Found multi-character short options: -mp. Use a single character or convert to a long-option. + +- pass: expired_option +- pass: expired_parameter +- pass: missing_parameter_help +- pass: no_parameter_defaults_for_update_commands +- pass: no_positional_parameters +- FAIL - HIGH severity: option_length_too_long + Parameter: aosm nsd publish, `manifest_parameters_json_file` - The lengths of all options ['--manifest-parameters-json-file'] are longer than threshold 22. Argument manifest_parameters_json_file must have a short abbreviation. + +- pass: option_should_not_contain_under_score + +Run custom pylint rules. +Running pylint on extensions... + +No violations found for custom pylint rules. +Linter: PASSED +``` + +#### Typing +```bash +cd src/aosm +mypy . --ignore-missing-imports --no-namespace-packages --exclude "azext_aosm/vendored_sdks/*" +``` + +Expected output: +``` +Success: no issues found in 33 source files +``` + +#### Auto-formatting The standard Python tool, `black`, is useful for automatically formatting your code. You can use python-static-checks in your dev environment if you want, to help you: @@ -55,7 +139,12 @@ python-static-checks fmt ``` ### Unit tests -To run unit tests run `azdev test aosm`. +To run unit tests run `azdev test aosm`. All tests are expected to pass. + +If one of the publish tests fails, then it might be because you have made small tweaks and the recording is now out of date. +Delete the relevant file under tests/latest/recordings (the file names match the name of the tests), and re-run the test. +If that passes it will create a new recording for you to check in. + To get code coverage run: ```bash diff --git a/src/aosm/setup.py b/src/aosm/setup.py index 5bc99f64906..139afd15481 100644 --- a/src/aosm/setup.py +++ b/src/aosm/setup.py @@ -4,8 +4,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- - - +from codecs import open from setuptools import find_packages, setup try: