From 1c642bb7032f2bb180d2f435a9f46c3ec58c0e37 Mon Sep 17 00:00:00 2001 From: Jacob Darby Date: Tue, 6 Jun 2023 14:18:45 +0100 Subject: [PATCH 01/20] broken config generation code --- src/aosm/azext_aosm/_configuration.py | 347 +++++++++++------- src/aosm/azext_aosm/custom.py | 3 +- .../azext_aosm/generate_nsd/nsd_generator.py | 5 +- 3 files changed, 218 insertions(+), 137 deletions(-) diff --git a/src/aosm/azext_aosm/_configuration.py b/src/aosm/azext_aosm/_configuration.py index 4778f925bf7..e47aecc4f4b 100644 --- a/src/aosm/azext_aosm/_configuration.py +++ b/src/aosm/azext_aosm/_configuration.py @@ -1,17 +1,21 @@ from dataclasses import dataclass, field +from enum import Enum +import abc +import os from typing import Dict, Optional, Any, List from pathlib import Path -from azure.cli.core.azclierror import ValidationError, InvalidArgumentValueError +from azure.cli.core.azclierror import ( + InvalidArgumentValueError, + ValidationError, +) from azext_aosm.util.constants import ( DEFINITION_OUTPUT_BICEP_PREFIX, VNF, CNF, NSD, - SCHEMA, NSD_DEFINITION_OUTPUT_BICEP_PREFIX, NF_DEFINITION_JSON_FILE, ) -import os DESCRIPTION_MAP: Dict[str, str] = { "publisher_resource_group_name": ( @@ -23,14 +27,25 @@ "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 published should be the same as the publisher used for your NFDVs" + "Name of the Publisher resource you want your design published to. " + "This published should be the same as the publisher used for your " + "NFDVs" + ), + "publisher_resource_group_name_nsd": ( + "Resource group for the Publisher " + "resource." ), - "publisher_resource_group_name_nsd": ("Resource group for the Publisher resource."), "nf_name": "Name of NF definition", "version": "Version of the NF definition", - "acr_artifact_store_name": "Name of the ACR Artifact Store resource. Will be created if it does not exist.", + "acr_artifact_store_name": ( + "Name of the ACR Artifact Store resource. " + "Will be created if it does not exist." + ), "location": "Azure location to use when creating resources.", - "blob_artifact_store_name": "Name of the storage account Artifact Store resource. Will be created if it does not exist.", + "blob_artifact_store_name": ( + "Name of the storage account Artifact Store resource. " + "Will be created if it does not exist." + ), "artifact_name": "Name of the artifact", "file_path": ( "Optional. File path of the artifact you wish to upload from your " @@ -44,13 +59,28 @@ "Version of the artifact. For VHDs this must be in format A-B-C. " "For ARM templates this must be in format A.B.C" ), - "nsdv_description": "Description of the NSDV", - "nsdg_name": "Network Service Design Group Name. This is the collection of Network Service Design Versions. Will be " - "created if it does not exist.", - "nsd_version": "Version of the NSD to be created. This should be in the format A.B.C", - "network_function_definition_group_name": "Exising Network Function Definition Group Name. This can be created using the 'az aosm nfd' commands.", - "network_function_definition_version_name": "Exising 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", + "nsd_description": "Description of the NSDV", + "nsd_name": ( + "Network Service Design Group Name. This is the collection " + "of Network Service Design Versions. Will be " + "created if it does not exist." + ), + "nsd_version": ( + "Version of the NSD to be created. This should be in the format A.B.C" + ), + "network_function_definition_publisher": ( + "Name of the Publisher resource for an existing " + "Network Function Definition." + ), + "network_function_definition_name": ( + "Name of an existing Network Function Definition." + ), + "network_function_definition_version": ( + "Version of the existing Network Function Definition." + ), + "network_function_definition_offering_location": ( + "Offering location of the Network Function Definition" + ), "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" @@ -68,8 +98,8 @@ @dataclass class ArtifactConfig: artifact_name: str = DESCRIPTION_MAP["artifact_name"] - # 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. file_path: Optional[str] = DESCRIPTION_MAP["file_path"] blob_sas_url: Optional[str] = DESCRIPTION_MAP["blob_sas_url"] version: str = DESCRIPTION_MAP["artifact_version"] @@ -97,123 +127,6 @@ def acr_manifest_name(self) -> str: return f"{self.nf_name}-acr-manifest-{self.version.replace('.', '-')}" -@dataclass -class NSConfiguration: - 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" - ] - 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): - """ - Cope with deserializing subclasses from dicts to ArtifactConfig. - - Used when creating VNFConfiguration object from a loaded json config file. - """ - if isinstance(self.arm_template, dict): - self.arm_template = ArtifactConfig(**self.arm_template) - - def validate(self): - ## validate that all of the configuration parameters are set - - 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.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") - - @property - def build_output_folder_name(self) -> str: - """Return the local folder for generating the bicep template to.""" - current_working_directory = os.getcwd() - return f"{current_working_directory}/{NSD_DEFINITION_OUTPUT_BICEP_PREFIX}" - - @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" - - @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.""" - return f"{self.network_function_name.lower().replace('_', '-')}-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.artifact_name = f"{self.nsdg_name.lower()}_nf_artifact" - artifact.version = self.nsd_version - artifact.file_path = os.path.join( - self.build_output_folder_name, NF_DEFINITION_JSON_FILE - ) - return artifact - - @dataclass class VNFConfiguration(NFConfiguration): blob_artifact_store_name: str = DESCRIPTION_MAP["blob_artifact_store_name"] @@ -313,6 +226,174 @@ def build_output_folder_name(self) -> str: return f"{DEFINITION_OUTPUT_BICEP_PREFIX}{self.nf_name}" +class RETType(Enum): + NETWORK_FUNCTION_DEFINITION = "NetworkFunctionDefinition", + NETWORK_SERVICE_DEFINITION = "NetworkServiceDefinition", + ARM_RESOURCE_DEFINTION = "ARMResourceDefinition", + CONFIGURATION_DEFINITION = "ConfigurationDefinition", + + +class RETConfiguration(abc.ABC): + type: RETType + + def validate(self) -> None: + """ + Validate the configuration passed in. + + :raises ValidationError for any invalid config + """ + raise NotImplementedError + + +@dataclass +class NetworkFunctionDefinitionConfiguration(RETConfiguration): + type = RETType.NETWORK_FUNCTION_DEFINITION + publisher_name: str = DESCRIPTION_MAP[ + "network_function_definition_publisher" + ] + network_function_definition_name: str = DESCRIPTION_MAP[ + "network_function_definition_name" + ] + network_function_definition_version: str = DESCRIPTION_MAP[ + "network_function_definition_version" + ] + offering_location: str = DESCRIPTION_MAP[ + "network_function_definition_offering_location" + ] + + def validate(self) -> None: + """ + Validate the configuration passed in. + + :raises ValidationError for any invalid config + """ + if ( + self.publisher_name + == DESCRIPTION_MAP["network_function_definition_publisher"] + ): + raise ValidationError("Publisher name must be set") + + if ( + self.network_function_definition_name + == DESCRIPTION_MAP["network_function_definition_name"] + ): + raise ValidationError( + "Network function definition name must be set" + ) + + if ( + self.network_function_definition_version + == DESCRIPTION_MAP["network_function_definition_version"] + ): + raise ValidationError( + "Network function definition version must be set" + ) + + if ( + self.offering_location + == DESCRIPTION_MAP["network_function_definition_offering_location"] + ): + raise ValidationError( + "Network function definition offering location must be set" + ) + + +@dataclass +class NSConfiguration: + 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"] + resource_element_template_configurations: List[RETConfiguration] = ( + field(default_factory=lambda: [ + NetworkFunctionDefinitionConfiguration(), + ]) + ) + print(NetworkFunctionDefinitionConfiguration().offering_location) + nsd_name: str = DESCRIPTION_MAP["nsd_name"] + nsd_version: str = DESCRIPTION_MAP["nsd_version"] + nsd_description: str = DESCRIPTION_MAP["nsd_description"] + + def validate(self): + ## validate that all of the configuration parameters are set + + 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.resource_element_template_configurations == [] or None: + raise ValueError( + ("At least one resource element template " + "configuration must be set.") + ) + else: + for configuration in self.resource_element_template_configurations: + configuration.validate() + if self.nsd_name == DESCRIPTION_MAP["nsdg_name"] or "": + raise ValueError("NSD name must be set") + if self.nsd_version == DESCRIPTION_MAP["nsd_version"] or "": + raise ValueError("NSD Version must be set") + + @property + def build_output_folder_name(self) -> str: + """Return the local folder for generating the bicep template to.""" + current_working_directory = os.getcwd() + return ( + f"{current_working_directory}/{NSD_DEFINITION_OUTPUT_BICEP_PREFIX}" + ) + + @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" + + @property + def acr_manifest_name(self) -> str: + """Return the ACR manifest name from the NFD name.""" + return ( + f"{self.nsd_name.lower().replace('_', '-')}" + f"-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.nsd_name}_NFVI" + + @property + def cg_schema_name(self) -> str: + """Return the name of the Configuration Schema used for the NSDV.""" + return f"{self.nsd_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.artifact_name = f"{self.nsd_name.lower()}_nf_artifact" + artifact.version = self.nsd_version + artifact.file_path = os.path.join( + self.build_output_folder_name, NF_DEFINITION_JSON_FILE + ) + return artifact + + def get_configuration( configuration_type: str, config_as_dict: Optional[Dict[Any, Any]] = None ) -> NFConfiguration or NSConfiguration: diff --git a/src/aosm/azext_aosm/custom.py b/src/aosm/azext_aosm/custom.py index ed8e708e9d6..5bde5fcf88a 100644 --- a/src/aosm/azext_aosm/custom.py +++ b/src/aosm/azext_aosm/custom.py @@ -350,7 +350,6 @@ def _generate_nsd(config: NSDGenerator, api_clients): from azure.cli.core.azclierror import CLIInternalError raise CLIInternalError("Generate NSD called without a config file") - deploy_parameters = _get_nfdv_deployment_parameters(config, api_clients) if os.path.exists(config.build_output_folder_name): carry_on = input( @@ -361,7 +360,7 @@ def _generate_nsd(config: NSDGenerator, api_clients): shutil.rmtree(config.build_output_folder_name) - nsd_generator.generate_nsd(deploy_parameters) + nsd_generator.generate_nsd() def _get_nfdv_deployment_parameters(config: NSConfiguration, api_clients): diff --git a/src/aosm/azext_aosm/generate_nsd/nsd_generator.py b/src/aosm/azext_aosm/generate_nsd/nsd_generator.py index 430954fcab3..55fe3ac4d84 100644 --- a/src/aosm/azext_aosm/generate_nsd/nsd_generator.py +++ b/src/aosm/azext_aosm/generate_nsd/nsd_generator.py @@ -50,17 +50,18 @@ class NSDGenerator: def __init__(self, config: NSConfiguration): self.config = config + self.nsd_bicep_template_name = NSD_DEFINITION_BICEP_SOURCE_TEMPLATE self.nf_bicep_template_name = NF_TEMPLATE_BICEP_FILE self.nsd_bicep_output_name = NSD_DEFINITION_BICEP_FILE self.build_folder_name = self.config.build_output_folder_name - def generate_nsd(self, deploy_parameters) -> None: + def generate_nsd(self) -> None: """Generate a NSD templates which includes an Artifact Manifest, NFDV and NF templates.""" logger.info(f"Generate NSD bicep templates") - self.deploy_parameters = deploy_parameters + # self.deploy_parameters = deploy_parameters # Create temporary folder. with tempfile.TemporaryDirectory() as tmpdirname: From a88e757e3de10f303c1c21b1985b80852d3bfdec Mon Sep 17 00:00:00 2001 From: Jacob Darby Date: Sat, 17 Jun 2023 20:02:25 +0100 Subject: [PATCH 02/20] add multi nf config --- src/aosm/azext_aosm/_client_factory.py | 1 + src/aosm/azext_aosm/_configuration.py | 79 +++++++--------- src/aosm/azext_aosm/_help.py | 1 - src/aosm/azext_aosm/_params.py | 9 +- src/aosm/azext_aosm/custom.py | 41 +++------ src/aosm/azext_aosm/delete/delete.py | 4 +- src/aosm/azext_aosm/deploy/artifact.py | 5 +- .../azext_aosm/deploy/artifact_manifest.py | 16 ++-- src/aosm/azext_aosm/deploy/deploy_with_arm.py | 30 +++--- src/aosm/azext_aosm/deploy/pre_deploy.py | 20 ++-- .../generate_nfd/cnf_nfd_generator.py | 92 ++++++++++--------- .../generate_nfd/nfd_generator_base.py | 2 - .../generate_nfd/vnf_nfd_generator.py | 20 ++-- src/aosm/azext_aosm/generate_nsd/__init__.py | 5 + .../azext_aosm/generate_nsd/nsd_generator.py | 60 ++++++------ .../tests/latest/test_aosm_scenario.py | 3 +- .../azext_aosm/util/management_clients.py | 3 +- src/aosm/setup.py | 3 +- 18 files changed, 178 insertions(+), 216 deletions(-) create mode 100644 src/aosm/azext_aosm/generate_nsd/__init__.py diff --git a/src/aosm/azext_aosm/_client_factory.py b/src/aosm/azext_aosm/_client_factory.py index e55e6142d25..939880b240f 100644 --- a/src/aosm/azext_aosm/_client_factory.py +++ b/src/aosm/azext_aosm/_client_factory.py @@ -5,6 +5,7 @@ from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.cli.core.profiles import ResourceType + from .vendored_sdks import HybridNetworkManagementClient diff --git a/src/aosm/azext_aosm/_configuration.py b/src/aosm/azext_aosm/_configuration.py index e47aecc4f4b..d4fa4d3525b 100644 --- a/src/aosm/azext_aosm/_configuration.py +++ b/src/aosm/azext_aosm/_configuration.py @@ -1,21 +1,16 @@ -from dataclasses import dataclass, field -from enum import Enum import abc import os -from typing import Dict, Optional, Any, List +from dataclasses import dataclass, field +from enum import Enum from pathlib import Path -from azure.cli.core.azclierror import ( - InvalidArgumentValueError, - ValidationError, -) -from azext_aosm.util.constants import ( - DEFINITION_OUTPUT_BICEP_PREFIX, - VNF, - CNF, - NSD, - NSD_DEFINITION_OUTPUT_BICEP_PREFIX, - NF_DEFINITION_JSON_FILE, -) +from typing import Any, Dict, List, Optional + +from azure.cli.core.azclierror import (InvalidArgumentValueError, + ValidationError) + +from azext_aosm.util.constants import (CNF, DEFINITION_OUTPUT_BICEP_PREFIX, + NF_DEFINITION_JSON_FILE, NSD, + NSD_DEFINITION_OUTPUT_BICEP_PREFIX, VNF) DESCRIPTION_MAP: Dict[str, str] = { "publisher_resource_group_name": ( @@ -32,8 +27,7 @@ "NFDVs" ), "publisher_resource_group_name_nsd": ( - "Resource group for the Publisher " - "resource." + "Resource group for the Publisher " "resource." ), "nf_name": "Name of NF definition", "version": "Version of the NF definition", @@ -69,8 +63,7 @@ "Version of the NSD to be created. This should be in the format A.B.C" ), "network_function_definition_publisher": ( - "Name of the Publisher resource for an existing " - "Network Function Definition." + "Name of the Publisher resource for an existing " "Network Function Definition." ), "network_function_definition_name": ( "Name of an existing Network Function Definition." @@ -226,13 +219,14 @@ def build_output_folder_name(self) -> str: return f"{DEFINITION_OUTPUT_BICEP_PREFIX}{self.nf_name}" -class RETType(Enum): - NETWORK_FUNCTION_DEFINITION = "NetworkFunctionDefinition", - NETWORK_SERVICE_DEFINITION = "NetworkServiceDefinition", - ARM_RESOURCE_DEFINTION = "ARMResourceDefinition", - CONFIGURATION_DEFINITION = "ConfigurationDefinition", +class RETType(str, Enum): + NETWORK_FUNCTION_DEFINITION = ("NetworkFunctionDefinition",) + NETWORK_SERVICE_DEFINITION = ("NetworkServiceDefinition",) + ARM_RESOURCE_DEFINTION = ("ARMResourceDefinition",) + CONFIGURATION_DEFINITION = ("ConfigurationDefinition",) +@dataclass class RETConfiguration(abc.ABC): type: RETType @@ -247,10 +241,9 @@ def validate(self) -> None: @dataclass class NetworkFunctionDefinitionConfiguration(RETConfiguration): - type = RETType.NETWORK_FUNCTION_DEFINITION - publisher_name: str = DESCRIPTION_MAP[ - "network_function_definition_publisher" - ] + type: RETType = RETType.NETWORK_FUNCTION_DEFINITION + publisher_name: str = DESCRIPTION_MAP["network_function_definition_publisher"] + publisher_resource_group: str = "Publisher resource group." network_function_definition_name: str = DESCRIPTION_MAP[ "network_function_definition_name" ] @@ -277,17 +270,13 @@ def validate(self) -> None: self.network_function_definition_name == DESCRIPTION_MAP["network_function_definition_name"] ): - raise ValidationError( - "Network function definition name must be set" - ) + raise ValidationError("Network function definition name must be set") if ( - self.network_function_definition_version + self.network_function_definition_version == DESCRIPTION_MAP["network_function_definition_version"] ): - raise ValidationError( - "Network function definition version must be set" - ) + raise ValidationError("Network function definition version must be set") if ( self.offering_location @@ -306,18 +295,17 @@ class NSConfiguration: "publisher_resource_group_name_nsd" ] acr_artifact_store_name: str = DESCRIPTION_MAP["acr_artifact_store_name"] - resource_element_template_configurations: List[RETConfiguration] = ( - field(default_factory=lambda: [ + resource_element_template_configurations: List[RETConfiguration] = field( + default_factory=lambda: [ NetworkFunctionDefinitionConfiguration(), - ]) + ] ) - print(NetworkFunctionDefinitionConfiguration().offering_location) nsd_name: str = DESCRIPTION_MAP["nsd_name"] nsd_version: str = DESCRIPTION_MAP["nsd_version"] nsd_description: str = DESCRIPTION_MAP["nsd_description"] def validate(self): - ## validate that all of the configuration parameters are set + # validate that all of the configuration parameters are set if self.location == DESCRIPTION_MAP["location"] or "": raise ValueError("Location must be set") @@ -330,14 +318,13 @@ def validate(self): ): raise ValueError("Publisher resource group name must be set") if ( - self.acr_artifact_store_name - == DESCRIPTION_MAP["acr_artifact_store_name"] or "" + self.acr_artifact_store_name == DESCRIPTION_MAP["acr_artifact_store_name"] + or "" ): raise ValueError("ACR Artifact Store name must be set") if self.resource_element_template_configurations == [] or None: raise ValueError( - ("At least one resource element template " - "configuration must be set.") + ("At least one resource element template " "configuration must be set.") ) else: for configuration in self.resource_element_template_configurations: @@ -351,9 +338,7 @@ def validate(self): def build_output_folder_name(self) -> str: """Return the local folder for generating the bicep template to.""" current_working_directory = os.getcwd() - return ( - f"{current_working_directory}/{NSD_DEFINITION_OUTPUT_BICEP_PREFIX}" - ) + return f"{current_working_directory}/{NSD_DEFINITION_OUTPUT_BICEP_PREFIX}" @property def resource_element_name(self) -> str: diff --git a/src/aosm/azext_aosm/_help.py b/src/aosm/azext_aosm/_help.py index 2a9a3013fd9..b11bedb4b53 100644 --- a/src/aosm/azext_aosm/_help.py +++ b/src/aosm/azext_aosm/_help.py @@ -6,7 +6,6 @@ from knack.help_files import helps # pylint: disable=unused-import - helps[ "aosm" ] = """ diff --git a/src/aosm/azext_aosm/_params.py b/src/aosm/azext_aosm/_params.py index 840dda18b6e..2c2c70a3360 100644 --- a/src/aosm/azext_aosm/_params.py +++ b/src/aosm/azext_aosm/_params.py @@ -7,15 +7,12 @@ from argcomplete.completers import FilesCompleter from azure.cli.core import AzCommandsLoader -from .util.constants import VNF, CNF, NSD +from .util.constants import CNF, NSD, VNF def load_arguments(self: AzCommandsLoader, _): - from azure.cli.core.commands.parameters import ( - file_type, - get_enum_type, - get_three_state_flag, - ) + from azure.cli.core.commands.parameters import (file_type, get_enum_type, + get_three_state_flag) definition_type = get_enum_type([VNF, CNF]) diff --git a/src/aosm/azext_aosm/custom.py b/src/aosm/azext_aosm/custom.py index 5bde5fcf88a..99cc26dc339 100644 --- a/src/aosm/azext_aosm/custom.py +++ b/src/aosm/azext_aosm/custom.py @@ -8,29 +8,24 @@ import shutil from dataclasses import asdict from typing import Optional + +from azure.cli.core.azclierror import (CLIInternalError, + InvalidArgumentValueError, + UnclassifiedUserFault) from knack.log import get_logger -from azure.cli.core.azclierror import ( - CLIInternalError, - InvalidArgumentValueError, - UnclassifiedUserFault, -) +from azext_aosm._client_factory import cf_resources +from azext_aosm._configuration import (NFConfiguration, NSConfiguration, + get_configuration) +from azext_aosm.delete.delete import ResourceDeleter +from azext_aosm.deploy.deploy_with_arm import DeployerViaArm from azext_aosm.generate_nfd.cnf_nfd_generator import CnfNfdGenerator from azext_aosm.generate_nfd.nfd_generator_base import NFDGenerator -from azext_aosm.generate_nsd.nsd_generator import NSDGenerator from azext_aosm.generate_nfd.vnf_nfd_generator import VnfNfdGenerator -from azext_aosm.delete.delete import ResourceDeleter -from azext_aosm.deploy.deploy_with_arm import DeployerViaArm -from azext_aosm.util.constants import VNF, CNF, NSD +from azext_aosm.generate_nsd.nsd_generator import NSDGenerator +from azext_aosm.util.constants import CNF, NSD, VNF from azext_aosm.util.management_clients import ApiClients from azext_aosm.vendored_sdks import HybridNetworkManagementClient -from azext_aosm._client_factory import cf_resources -from azext_aosm._configuration import ( - get_configuration, - NFConfiguration, - NSConfiguration, -) - logger = get_logger(__name__) @@ -345,7 +340,7 @@ def publish_design( def _generate_nsd(config: NSDGenerator, api_clients): """Generate a Network Service Design for the given type and config.""" if config: - nsd_generator = NSDGenerator(config) + nsd_generator = NSDGenerator(config, api_clients) else: from azure.cli.core.azclierror import CLIInternalError @@ -361,15 +356,3 @@ def _generate_nsd(config: NSDGenerator, api_clients): shutil.rmtree(config.build_output_folder_name) nsd_generator.generate_nsd() - - -def _get_nfdv_deployment_parameters(config: NSConfiguration, api_clients): - """Get the properties of the existing NFDV.""" - 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.deploy_parameters diff --git a/src/aosm/azext_aosm/delete/delete.py b/src/aosm/azext_aosm/delete/delete.py index 6a1515b2c77..c1802c34e25 100644 --- a/src/aosm/azext_aosm/delete/delete.py +++ b/src/aosm/azext_aosm/delete/delete.py @@ -5,11 +5,11 @@ """Contains class for deploying generated definitions using the Python SDK.""" from knack.log import get_logger +from azext_aosm._configuration import (NFConfiguration, NSConfiguration, + VNFConfiguration) from azext_aosm.util.management_clients import ApiClients -from azext_aosm._configuration import NFConfiguration, VNFConfiguration, NSConfiguration from azext_aosm.util.utils import input_ack - logger = get_logger(__name__) diff --git a/src/aosm/azext_aosm/deploy/artifact.py b/src/aosm/azext_aosm/deploy/artifact.py index e533905e6b1..fd96d4f3f4c 100644 --- a/src/aosm/azext_aosm/deploy/artifact.py +++ b/src/aosm/azext_aosm/deploy/artifact.py @@ -2,14 +2,15 @@ # Highly Confidential Material """A module to handle interacting with artifacts.""" -from knack.log import get_logger from dataclasses import dataclass from typing import Union from azure.storage.blob import BlobClient -from azext_aosm._configuration import ArtifactConfig +from knack.log import get_logger from oras.client import OrasClient +from azext_aosm._configuration import ArtifactConfig + logger = get_logger(__name__) diff --git a/src/aosm/azext_aosm/deploy/artifact_manifest.py b/src/aosm/azext_aosm/deploy/artifact_manifest.py index 58f2ea3e893..dca7345c945 100644 --- a/src/aosm/azext_aosm/deploy/artifact_manifest.py +++ b/src/aosm/azext_aosm/deploy/artifact_manifest.py @@ -2,22 +2,20 @@ # Highly Confidential Material """A module to handle interacting with artifact manifests.""" -from knack.log import get_logger from functools import cached_property, lru_cache from typing import Any, List, Union + from azure.cli.core.azclierror import AzCLIError -from azext_aosm.deploy.artifact import Artifact from azure.storage.blob import BlobClient +from knack.log import get_logger from oras.client import OrasClient -from azext_aosm._configuration import NFConfiguration, NSConfiguration -from azext_aosm.vendored_sdks.models import ( - ArtifactManifest, - ManifestArtifactFormat, - CredentialType, - ArtifactType, -) +from azext_aosm._configuration import NFConfiguration, NSConfiguration +from azext_aosm.deploy.artifact import Artifact from azext_aosm.util.management_clients import ApiClients +from azext_aosm.vendored_sdks.models import (ArtifactManifest, ArtifactType, + CredentialType, + ManifestArtifactFormat) logger = get_logger(__name__) diff --git a/src/aosm/azext_aosm/deploy/deploy_with_arm.py b/src/aosm/azext_aosm/deploy/deploy_with_arm.py index 47edd96d82b..98a3ef4cc57 100644 --- a/src/aosm/azext_aosm/deploy/deploy_with_arm.py +++ b/src/aosm/azext_aosm/deploy/deploy_with_arm.py @@ -7,28 +7,24 @@ import os import shutil import subprocess # noqa -from typing import Any, Dict, Optional import tempfile +import time +from typing import Any, Dict, Optional -from knack.log import get_logger -from azext_aosm.deploy.artifact_manifest import ArtifactManifestOperator -from azext_aosm.util.management_clients import ApiClients from azure.mgmt.resource.resources.models import DeploymentExtended +from knack.log import get_logger +from azext_aosm._configuration import (NFConfiguration, NSConfiguration, + VNFConfiguration) +from azext_aosm.deploy.artifact_manifest import ArtifactManifestOperator from azext_aosm.deploy.pre_deploy import PreDeployerViaSDK -from azext_aosm._configuration import NFConfiguration, NSConfiguration, VNFConfiguration -from azext_aosm.util.constants import ( - NSD_DEFINITION_BICEP_FILE, - NSD_ARTIFACT_MANIFEST_BICEP_FILE, - NF_DEFINITION_BICEP_FILE, - NF_DEFINITION_JSON_FILE, - VNF_DEFINITION_BICEP_TEMPLATE, - VNF_MANIFEST_BICEP_TEMPLATE, - NSD, - VNF, -) -import time - +from azext_aosm.util.constants import (NF_DEFINITION_BICEP_FILE, + NF_DEFINITION_JSON_FILE, NSD, + NSD_ARTIFACT_MANIFEST_BICEP_FILE, + NSD_DEFINITION_BICEP_FILE, VNF, + VNF_DEFINITION_BICEP_TEMPLATE, + VNF_MANIFEST_BICEP_TEMPLATE) +from azext_aosm.util.management_clients import ApiClients logger = get_logger(__name__) diff --git a/src/aosm/azext_aosm/deploy/pre_deploy.py b/src/aosm/azext_aosm/deploy/pre_deploy.py index 47e83ff4e81..9c1cdc9cff0 100644 --- a/src/aosm/azext_aosm/deploy/pre_deploy.py +++ b/src/aosm/azext_aosm/deploy/pre_deploy.py @@ -4,22 +4,18 @@ # -------------------------------------------------------------------------------------- """Contains class for deploying resources required by NFDs/NSDs via the SDK.""" -from knack.log import get_logger - -from azure.core import exceptions as azure_exceptions from azure.cli.core.azclierror import AzCLIError +from azure.core import exceptions as azure_exceptions from azure.mgmt.resource.resources.models import ResourceGroup +from knack.log import get_logger +from azext_aosm._configuration import (NFConfiguration, NSConfiguration, + VNFConfiguration) from azext_aosm.util.management_clients import ApiClients -from azext_aosm.vendored_sdks.models import ( - ArtifactStore, - ArtifactStoreType, - NetworkFunctionDefinitionGroup, - NetworkServiceDesignGroup, - Publisher, - ProvisioningState, -) -from azext_aosm._configuration import NFConfiguration, VNFConfiguration, NSConfiguration +from azext_aosm.vendored_sdks.models import (ArtifactStore, ArtifactStoreType, + NetworkFunctionDefinitionGroup, + NetworkServiceDesignGroup, + ProvisioningState, Publisher) logger = get_logger(__name__) 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 bb7f889e35e..c9754179f71 100644 --- a/src/aosm/azext_aosm/generate_nfd/cnf_nfd_generator.py +++ b/src/aosm/azext_aosm/generate_nfd/cnf_nfd_generator.py @@ -8,35 +8,30 @@ import re import shutil import tarfile -from typing import Dict, List, Any, Tuple, Optional, Iterator - import tempfile +from typing import Any, Dict, Iterator, List, Optional, Tuple + import yaml -from jinja2 import Template, StrictUndefined -from azure.cli.core.azclierror import InvalidTemplateError, FileOperationError +from azure.cli.core.azclierror import FileOperationError, InvalidTemplateError +from jinja2 import StrictUndefined, Template from knack.log import get_logger -from azext_aosm.generate_nfd.nfd_generator_base import NFDGenerator from azext_aosm._configuration import CNFConfiguration, HelmPackageConfig -from azext_aosm.util.constants import ( - CNF_DEFINITION_BICEP_TEMPLATE, - CNF_DEFINITION_JINJA2_SOURCE_TEMPLATE, - CNF_MANIFEST_BICEP_TEMPLATE, - CNF_MANIFEST_JINJA2_SOURCE_TEMPLATE, - DEPLOYMENT_PARAMETER_MAPPING_REGEX, - IMAGE_LINE_REGEX, - IMAGE_PULL_SECRET_LINE_REGEX, - CONFIG_MAPPINGS, - SCHEMAS, - SCHEMA_PREFIX, - DEPLOYMENT_PARAMETERS -) - +from azext_aosm.generate_nfd.nfd_generator_base import NFDGenerator +from azext_aosm.util.constants import (CNF_DEFINITION_BICEP_TEMPLATE, + CNF_DEFINITION_JINJA2_SOURCE_TEMPLATE, + CNF_MANIFEST_BICEP_TEMPLATE, + CNF_MANIFEST_JINJA2_SOURCE_TEMPLATE, + CONFIG_MAPPINGS, + DEPLOYMENT_PARAMETER_MAPPING_REGEX, + DEPLOYMENT_PARAMETERS, IMAGE_LINE_REGEX, + IMAGE_PULL_SECRET_LINE_REGEX, + SCHEMA_PREFIX, SCHEMAS) logger = get_logger(__name__) -class CnfNfdGenerator(NFDGenerator): # pylint: disable=too-many-instance-attributes +class CnfNfdGenerator(NFDGenerator): # pylint: disable=too-many-instance-attributes """ CNF NFD Generator. @@ -79,10 +74,10 @@ def generate_nfd(self) -> None: self._tmp_folder_name = tmpdirname try: for helm_package in self.config.helm_packages: - + # Turn Any type into HelmPackageConfig, to access properties on the object helm_package = HelmPackageConfig(**helm_package) - + # Unpack the chart into the tmp folder self._extract_chart(helm_package.path_to_chart) @@ -132,7 +127,7 @@ def generate_nfd(self) -> None: "If you are happy with them, you should manually deploy your bicep " "templates and upload your charts and images to your " "artifact store." - ) + ) except InvalidTemplateError as e: raise e @@ -150,9 +145,9 @@ def _extract_chart(self, path: str) -> None: :param path: The path to helm package """ - + logger.debug("Extracting helm package %s", path) - + (_, ext) = os.path.splitext(path) if ext == ".gz" or ext == ".tgz": tar = tarfile.open(path, "r:gz") @@ -183,7 +178,7 @@ def write_manifest_bicep_file(self) -> None: path = os.path.join(self._tmp_folder_name, CNF_MANIFEST_BICEP_TEMPLATE) with open(path, "w", encoding="utf-8") as f: f.write(bicep_contents) - + logger.info("Created artifact manifest bicep template: %s", path) def write_nfd_bicep_file(self) -> None: @@ -195,32 +190,32 @@ def write_nfd_bicep_file(self) -> None: ) bicep_contents: str = template.render( - deployParametersPath = os.path.join(SCHEMAS,DEPLOYMENT_PARAMETERS), + deployParametersPath=os.path.join(SCHEMAS, DEPLOYMENT_PARAMETERS), nf_application_configurations=self.nf_application_configurations, ) path = os.path.join(self._tmp_folder_name, CNF_DEFINITION_BICEP_TEMPLATE) with open(path, "w", encoding="utf-8") as f: f.write(bicep_contents) - + logger.info("Created NFD bicep template: %s", path) def write_schema_to_file(self) -> None: """Write the schema to file deploymentParameters.json.""" - + logger.debug("Create deploymentParameters.json") - + full_schema = os.path.join(self._tmp_folder_name, DEPLOYMENT_PARAMETERS) with open(full_schema, "w", encoding="UTF-8") as f: json.dump(self.deployment_parameter_schema, f, indent=4) - + logger.debug(f"{full_schema} created") def copy_to_output_folder(self) -> None: """Copy the config mappings, schema and bicep templates (artifact manifest and NFDV) to the output folder.""" - + logger.info("Create NFD bicep %s", self.output_folder_name) - + os.mkdir(self.output_folder_name) os.mkdir(os.path.join(self.output_folder_name, SCHEMAS)) @@ -235,7 +230,9 @@ def copy_to_output_folder(self) -> None: shutil.copy(tmp_manifest_bicep_path, self.output_folder_name) tmp_config_mappings_path = os.path.join(self._tmp_folder_name, CONFIG_MAPPINGS) - output_config_mappings_path = os.path.join(self.output_folder_name, CONFIG_MAPPINGS) + output_config_mappings_path = os.path.join( + self.output_folder_name, CONFIG_MAPPINGS + ) shutil.copytree( tmp_config_mappings_path, output_config_mappings_path, @@ -243,12 +240,14 @@ def copy_to_output_folder(self) -> None: ) tmp_schema_path = os.path.join(self._tmp_folder_name, DEPLOYMENT_PARAMETERS) - output_schema_path = os.path.join(self.output_folder_name, SCHEMAS, DEPLOYMENT_PARAMETERS) + output_schema_path = os.path.join( + self.output_folder_name, SCHEMAS, DEPLOYMENT_PARAMETERS + ) shutil.copy( tmp_schema_path, output_schema_path, ) - + logger.info("Copied files to %s", self.output_folder_name) def generate_nf_application_config( @@ -340,9 +339,9 @@ def get_chart_mapping_schema( param helm_package: The helm package config. """ - + logger.debug("Get chart mapping schema for %s", helm_package.name) - + mappings_path = helm_package.path_to_mappings values_schema = os.path.join( self._tmp_folder_name, helm_package.name, "values.schema.json" @@ -351,7 +350,7 @@ def get_chart_mapping_schema( if not os.path.exists(mappings_path): raise InvalidTemplateError( f"ERROR: The helm package '{helm_package.name}' does not have a valid values mappings file. The file at '{helm_package.path_to_mappings}' does not exist.\nPlease fix this and run the command again." - ) + ) if not os.path.exists(values_schema): raise InvalidTemplateError( f"ERROR: The helm package '{helm_package.name}' is missing values.schema.json. Please fix this and run the command again." @@ -410,18 +409,21 @@ def get_chart_name_and_version( ) -> Tuple[str, str]: """Get the name and version of the chart.""" chart = os.path.join(self._tmp_folder_name, helm_package.name, "Chart.yaml") - + if not os.path.exists(chart): - raise InvalidTemplateError(f"There is no Chart.yaml file in the helm package '{helm_package.name}'. Please fix this and run the command again.") - - + raise InvalidTemplateError( + f"There is no Chart.yaml file in the helm package '{helm_package.name}'. Please fix this and run the command again." + ) + with open(chart, "r", encoding="utf-8") as f: data = yaml.load(f, Loader=yaml.FullLoader) - if 'name' in data and 'version' in data: + if "name" in data and "version" in data: chart_name = data["name"] chart_version = data["version"] else: - raise FileOperationError(f"A name or version is missing from Chart.yaml in the helm package '{helm_package.name}'. Please fix this and run the command again.") + raise FileOperationError( + f"A name or version is missing from Chart.yaml in the helm package '{helm_package.name}'. Please fix this and run the command again." + ) return (chart_name, chart_version) diff --git a/src/aosm/azext_aosm/generate_nfd/nfd_generator_base.py b/src/aosm/azext_aosm/generate_nfd/nfd_generator_base.py index 591e56e2200..f2d9f372ce8 100644 --- a/src/aosm/azext_aosm/generate_nfd/nfd_generator_base.py +++ b/src/aosm/azext_aosm/generate_nfd/nfd_generator_base.py @@ -5,7 +5,6 @@ """Contains a base class for generating NFDs.""" from knack.log import get_logger - logger = get_logger(__name__) @@ -24,4 +23,3 @@ def __init__( def generate_nfd(self) -> None: """No-op on base class.""" logger.error("Generate NFD called on base class. No-op") - diff --git a/src/aosm/azext_aosm/generate_nfd/vnf_nfd_generator.py b/src/aosm/azext_aosm/generate_nfd/vnf_nfd_generator.py index e9a2c85f424..88a2847fbb7 100644 --- a/src/aosm/azext_aosm/generate_nfd/vnf_nfd_generator.py +++ b/src/aosm/azext_aosm/generate_nfd/vnf_nfd_generator.py @@ -4,29 +4,23 @@ # -------------------------------------------------------------------------------------- """Contains a class for generating VNF NFDs and associated resources.""" -import logging import json +import logging import os import shutil import tempfile - from functools import cached_property from pathlib import Path from typing import Any, Dict, Optional -from knack.log import get_logger -from azext_aosm.generate_nfd.nfd_generator_base import NFDGenerator +from knack.log import get_logger from azext_aosm._configuration import VNFConfiguration -from azext_aosm.util.constants import ( - VNF_DEFINITION_BICEP_TEMPLATE, - VNF_MANIFEST_BICEP_TEMPLATE, - CONFIG_MAPPINGS, - SCHEMAS, - SCHEMA_PREFIX, - DEPLOYMENT_PARAMETERS, -) - +from azext_aosm.generate_nfd.nfd_generator_base import NFDGenerator +from azext_aosm.util.constants import (CONFIG_MAPPINGS, DEPLOYMENT_PARAMETERS, + SCHEMA_PREFIX, SCHEMAS, + VNF_DEFINITION_BICEP_TEMPLATE, + VNF_MANIFEST_BICEP_TEMPLATE) logger = get_logger(__name__) diff --git a/src/aosm/azext_aosm/generate_nsd/__init__.py b/src/aosm/azext_aosm/generate_nsd/__init__.py new file mode 100644 index 00000000000..99c0f28cd71 --- /dev/null +++ b/src/aosm/azext_aosm/generate_nsd/__init__.py @@ -0,0 +1,5 @@ +# ----------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# ----------------------------------------------------------------------------- diff --git a/src/aosm/azext_aosm/generate_nsd/nsd_generator.py b/src/aosm/azext_aosm/generate_nsd/nsd_generator.py index 55fe3ac4d84..70c80b0075d 100644 --- a/src/aosm/azext_aosm/generate_nsd/nsd_generator.py +++ b/src/aosm/azext_aosm/generate_nsd/nsd_generator.py @@ -3,34 +3,32 @@ # License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------- """Contains a class for generating VNF NFDs and associated resources.""" -from knack.log import get_logger import json import logging import os import shutil +import tempfile from functools import cached_property from pathlib import Path from typing import Any, Dict, Optional -import tempfile - -from azext_aosm.generate_nfd.nfd_generator_base import NFDGenerator - -from azext_aosm._configuration import NSConfiguration -from azext_aosm.util.constants import ( - NSD_DEFINITION_BICEP_SOURCE_TEMPLATE, - NSD_DEFINITION_BICEP_FILE, - NF_TEMPLATE_BICEP_FILE, - NF_DEFINITION_BICEP_FILE, - NSD_ARTIFACT_MANIFEST_BICEP_FILE, - NSD_CONFIG_MAPPING_FILE, - SCHEMAS, - CONFIG_MAPPINGS, - NSD_ARTIFACT_MANIFEST_SOURCE_TEMPLATE, - TEMPLATES, -) from jinja2 import Template +from knack.log import get_logger +from azext_aosm._configuration import (NetworkFunctionDefinitionConfiguration, + NSConfiguration, RETType) +from azext_aosm.generate_nfd.nfd_generator_base import NFDGenerator +from azext_aosm.util.constants import (CONFIG_MAPPINGS, + NF_DEFINITION_BICEP_FILE, + NF_TEMPLATE_BICEP_FILE, + NSD_ARTIFACT_MANIFEST_BICEP_FILE, + NSD_ARTIFACT_MANIFEST_SOURCE_TEMPLATE, + NSD_CONFIG_MAPPING_FILE, + NSD_DEFINITION_BICEP_FILE, + NSD_DEFINITION_BICEP_SOURCE_TEMPLATE, + SCHEMAS, TEMPLATES) +from azext_aosm.util.management_clients import ApiClients +from azext_aosm.vendored_sdks.models import NetworkFunctionDefinitionVersion logger = get_logger(__name__) @@ -48,9 +46,10 @@ class NSDGenerator: be deployed by the NSDV """ - def __init__(self, config: NSConfiguration): + def __init__(self, config: NSConfiguration, api_clients: ApiClients): self.config = config - + self.ret_configurations = config.resource_element_template_configurations + self.aosm_clients = api_clients.aosm_client self.nsd_bicep_template_name = NSD_DEFINITION_BICEP_SOURCE_TEMPLATE self.nf_bicep_template_name = NF_TEMPLATE_BICEP_FILE self.nsd_bicep_output_name = NSD_DEFINITION_BICEP_FILE @@ -61,16 +60,21 @@ def generate_nsd(self) -> None: """Generate a NSD templates which includes an Artifact Manifest, NFDV and NF templates.""" logger.info(f"Generate NSD bicep templates") - # self.deploy_parameters = deploy_parameters - # Create temporary folder. with tempfile.TemporaryDirectory() as tmpdirname: self.tmp_folder_name = tmpdirname - self.create_parameter_files() - self.write_nsd_manifest() - self.write_nf_bicep() - self.write_nsd_bicep() + for ret_config in self.ret_configurations: + if ( + ret_config.type == RETType.NETWORK_FUNCTION_DEFINITION + and type(ret_config) == NetworkFunctionDefinitionConfiguration + ): + nfdv: NetworkFunctionDefinitionVersion = self.aosm_clients.network_function_definition_versions.get( + resource_group_name=ret_config.publisher_resource_group, + publisher_name=ret_config.publisher_name, + network_function_definition_group_name=ret_config.network_function_definition_name, + network_function_definition_version_name=ret_config.network_function_definition_version, + ) self.copy_to_output_folder() print(f"Generated NSD bicep templates created in {self.build_folder_name}") @@ -178,7 +182,9 @@ def write_nsd_manifest(self) -> None: logger.debug("Create NSD manifest") self.generate_bicep( - NSD_ARTIFACT_MANIFEST_SOURCE_TEMPLATE, NSD_ARTIFACT_MANIFEST_BICEP_FILE, {} + NSD_ARTIFACT_MANIFEST_SOURCE_TEMPLATE, + NSD_ARTIFACT_MANIFEST_BICEP_FILE, + {}, ) def generate_bicep(self, template_name, output_file_name, params) -> None: diff --git a/src/aosm/azext_aosm/tests/latest/test_aosm_scenario.py b/src/aosm/azext_aosm/tests/latest/test_aosm_scenario.py index 0bc37d2e16e..e1ff05f0ff8 100644 --- a/src/aosm/azext_aosm/tests/latest/test_aosm_scenario.py +++ b/src/aosm/azext_aosm/tests/latest/test_aosm_scenario.py @@ -7,8 +7,7 @@ import unittest # from azure_devtools.scenario_tests import AllowLargeResponse -from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer - +from azure.cli.testsdk import ResourceGroupPreparer, ScenarioTest TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), "..")) diff --git a/src/aosm/azext_aosm/util/management_clients.py b/src/aosm/azext_aosm/util/management_clients.py index 65ea9aa4afb..11712b4e894 100644 --- a/src/aosm/azext_aosm/util/management_clients.py +++ b/src/aosm/azext_aosm/util/management_clients.py @@ -4,8 +4,9 @@ # -------------------------------------------------------------------------------------------- """Clients for the python SDK along with useful caches.""" -from knack.log import get_logger from azure.mgmt.resource import ResourceManagementClient +from knack.log import get_logger + from azext_aosm.vendored_sdks import HybridNetworkManagementClient logger = get_logger(__name__) diff --git a/src/aosm/setup.py b/src/aosm/setup.py index 47149f957cb..37e2dd4eff9 100644 --- a/src/aosm/setup.py +++ b/src/aosm/setup.py @@ -7,7 +7,8 @@ from codecs import open -from setuptools import setup, find_packages + +from setuptools import find_packages, setup try: from azure_bdist_wheel import cmdclass From 607b2d1c87ad2865062e75b90f3dffc9bbc0a4c8 Mon Sep 17 00:00:00 2001 From: Jamie Parsons Date: Tue, 18 Jul 2023 11:58:34 +0100 Subject: [PATCH 03/20] Rename a few things --- src/aosm/azext_aosm/_configuration.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/aosm/azext_aosm/_configuration.py b/src/aosm/azext_aosm/_configuration.py index 7ac9ecf4977..dcd673bc9c1 100644 --- a/src/aosm/azext_aosm/_configuration.py +++ b/src/aosm/azext_aosm/_configuration.py @@ -355,7 +355,7 @@ def validate(self) -> None: @dataclass -class NetworkFunctionDefinitionConfiguration(RETConfiguration): +class NFDRETConfiguration(RETConfiguration): type: RETType = RETType.NETWORK_FUNCTION_DEFINITION publisher_name: str = DESCRIPTION_MAP["network_function_definition_publisher"] publisher_resource_group: str = "Publisher resource group." @@ -406,12 +406,12 @@ def validate(self) -> None: class NSConfiguration(Configuration): resource_element_template_configurations: List[RETConfiguration] = field( default_factory=lambda: [ - NetworkFunctionDefinitionConfiguration(), + NFDRETConfiguration(), ] ) - nsd_name: str = DESCRIPTION_MAP["nsd_name"] + nsdg_name: str = DESCRIPTION_MAP["nsdg_name"] nsd_version: str = DESCRIPTION_MAP["nsd_version"] - nsd_description: str = DESCRIPTION_MAP["nsd_description"] + nsdv_description: str = DESCRIPTION_MAP["nsdv_description"] def validate(self): # validate that all of the configuration parameters are set From b40b62c7dc871396b97e9baf643fc3e205ab5a09 Mon Sep 17 00:00:00 2001 From: Andy Churchard Date: Tue, 18 Jul 2023 20:29:25 +0100 Subject: [PATCH 04/20] DRY the deploy_nfd_from_bicep code --- src/aosm/azext_aosm/deploy/deploy_with_arm.py | 310 +++++++----------- 1 file changed, 122 insertions(+), 188 deletions(-) diff --git a/src/aosm/azext_aosm/deploy/deploy_with_arm.py b/src/aosm/azext_aosm/deploy/deploy_with_arm.py index 0d79fafcddd..fe2f5a16b61 100644 --- a/src/aosm/azext_aosm/deploy/deploy_with_arm.py +++ b/src/aosm/azext_aosm/deploy/deploy_with_arm.py @@ -17,6 +17,7 @@ from azext_aosm._configuration import ( CNFConfiguration, Configuration, + NFConfiguration, NSConfiguration, VNFConfiguration, ) @@ -26,14 +27,11 @@ from azext_aosm.util.constants import ( ARTIFACT_UPLOAD, BICEP_PUBLISH, - CNF, CNF_DEFINITION_BICEP_TEMPLATE_FILENAME, CNF_MANIFEST_BICEP_TEMPLATE_FILENAME, NF_DEFINITION_BICEP_FILENAME, - NSD, NSD_ARTIFACT_MANIFEST_BICEP_FILENAME, NSD_BICEP_FILENAME, - VNF, VNF_DEFINITION_BICEP_TEMPLATE_FILENAME, VNF_MANIFEST_BICEP_TEMPLATE_FILENAME, ) @@ -79,8 +77,9 @@ def read_parameters_from_file(parameters_json_file: str) -> Dict[str, Any]: return parameters - def deploy_vnfd_from_bicep( + def deploy_nfd_from_bicep( self, + cli_ctx, bicep_path: Optional[str] = None, parameters_json_file: Optional[str] = None, manifest_bicep_path: Optional[str] = None, @@ -88,34 +87,32 @@ def deploy_vnfd_from_bicep( skip: Optional[str] = None, ) -> None: """ - Deploy the bicep template defining the VNFD. + Deploy the bicep template defining the NFD. Also ensure that all required predeploy resources are deployed. - :param bicep_template_path: The path to the bicep template of the nfdv :type - bicep_template_path: str :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 - :manifest_parameters_json_ - file: - :param bicep_template_path: The path to the bicep template of the nfdv - :type bicep_template_path: str - :parameters_json_file: path to an override file of set parameters for the nfdv + :param cli_ctx: The CLI context. Only used with CNFs. + :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 - :manifest_parameters_json_file: path to an override file of set parameters for - 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 """ - assert isinstance(self.config, VNFConfiguration) - - if not skip == BICEP_PUBLISH: + assert isinstance(self.config, NFConfiguration) + if skip == BICEP_PUBLISH: + print("Skipping bicep publish") + else: if not bicep_path: # User has not passed in a bicep template, so we are deploying the default # one produced from building the NFDV using this CLI + if isinstance(self.config, VNFConfiguration): + file_name = VNF_DEFINITION_BICEP_TEMPLATE_FILENAME + if isinstance(self.config, CNFConfiguration): + file_name = CNF_DEFINITION_BICEP_TEMPLATE_FILENAME bicep_path = os.path.join( self.config.output_directory_for_build, - VNF_DEFINITION_BICEP_TEMPLATE_FILENAME, + file_name ) if parameters_json_file: @@ -126,15 +123,17 @@ def deploy_vnfd_from_bicep( # required from config for the default bicep template produced from # building the NFDV using this CLI logger.debug("Create parameters for default NFDV template.") - parameters = self.construct_vnfd_parameters() + parameters = self.construct_nfd_parameters() - logger.debug(parameters) + logger.debug( + "Parameters used for NF definition bicep deployment: %s", parameters + ) # Create or check required resources - deploy_manifest_template = not self.nfd_predeploy(definition_type=VNF) + deploy_manifest_template = not self.nfd_predeploy() if deploy_manifest_template: self.deploy_manifest_template( - manifest_parameters_json_file, manifest_bicep_path, VNF + manifest_parameters_json_file, manifest_bicep_path ) else: print( @@ -151,14 +150,23 @@ def deploy_vnfd_from_bicep( logger.info(message) self.deploy_bicep_template(bicep_path, parameters) print(f"Deployed NFD {self.config.nf_name} version {self.config.version}.") - else: - print("Skipping bicep publish") if skip == ARTIFACT_UPLOAD: print("Skipping artifact upload") print("Done") return + if isinstance(self.config, VNFConfiguration): + self._vnfd_artifact_upload() + if isinstance(self.config, CNFConfiguration): + self._cnfd_artifact_upload(cli_ctx) + + def _vnfd_artifact_upload( + self + ) -> None: + """ + Uploads the VHD and ARM template artifacts + """ storage_account_manifest = ArtifactManifestOperator( self.config, self.api_clients, @@ -177,170 +185,18 @@ def deploy_vnfd_from_bicep( print("Uploading VHD artifact") vhd_artifact.upload(self.config.vhd) + print("Uploading ARM template artifact") arm_template_artifact.upload(self.config.arm_template) print("Done") - def nfd_predeploy(self, definition_type) -> bool: - """ - All the predeploy steps for a NFD. Create publisher, artifact stores and NFDG. - - Return True if artifact manifest already exists, False otherwise - """ - logger.debug("Ensure all required resources exist") - self.pre_deployer.ensure_config_resource_group_exists() - self.pre_deployer.ensure_config_publisher_exists() - self.pre_deployer.ensure_acr_artifact_store_exists() - if definition_type == VNF: - self.pre_deployer.ensure_sa_artifact_store_exists() - if definition_type == CNF: - self.pre_deployer.ensure_config_source_registry_exists() - - self.pre_deployer.ensure_config_nfdg_exists() - return self.pre_deployer.do_config_artifact_manifests_exist() - - def construct_vnfd_parameters(self) -> Dict[str, Any]: - """ - Create the parmeters dictionary for vnfdefinitions.bicep. VNF specific. - - :param config: The contents of the configuration file. - """ - assert isinstance(self.config, VNFConfiguration) - return { - "location": {"value": self.config.location}, - "publisherName": {"value": self.config.publisher_name}, - "acrArtifactStoreName": {"value": self.config.acr_artifact_store_name}, - "saArtifactStoreName": {"value": self.config.blob_artifact_store_name}, - "nfName": {"value": self.config.nf_name}, - "nfDefinitionGroup": {"value": self.config.nfdg_name}, - "nfDefinitionVersion": {"value": self.config.version}, - "vhdVersion": {"value": self.config.vhd.version}, - "armTemplateVersion": {"value": self.config.arm_template.version}, - } - - def construct_cnfd_parameters(self) -> Dict[str, Any]: - """ - Create the parmeters dictionary for cnfdefinition.bicep. - - CNF specific. - """ - assert isinstance(self.config, CNFConfiguration) - return { - "location": {"value": self.config.location}, - "publisherName": {"value": self.config.publisher_name}, - "acrArtifactStoreName": {"value": self.config.acr_artifact_store_name}, - "nfDefinitionGroup": {"value": self.config.nfdg_name}, - "nfDefinitionVersion": {"value": self.config.version}, - } - - def construct_manifest_parameters(self) -> Dict[str, Any]: - """Create the parmeters dictionary for VNF, CNF or NSD.""" - if isinstance(self.config, VNFConfiguration): - return { - "location": {"value": self.config.location}, - "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}, - "saManifestName": {"value": self.config.sa_manifest_name}, - "nfName": {"value": self.config.nf_name}, - "vhdVersion": {"value": self.config.vhd.version}, - "armTemplateVersion": {"value": self.config.arm_template.version}, - } - if isinstance(self.config, CNFConfiguration): - 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}, - } - if isinstance(self.config, NSConfiguration): - 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}, - } - raise ValueError("Unknown configuration type") - - def deploy_cnfd_from_bicep( + def _cnfd_artifact_upload( self, - cli_ctx, - 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[str] = None, + cli_ctx ) -> None: """ - Deploy the bicep template defining the CNFD. - - Also ensure that all required predeploy resources are deployed. - - :param cli_ctx: The CLI context - :param management_client: The container registry management client - :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 + Uploads the Helm chart and any additional images. """ - assert isinstance(self.config, CNFConfiguration) - - if not skip == BICEP_PUBLISH: - if not bicep_path: - # User has not passed in a bicep template, so we are deploying the - # default one produced from building the NFDV using this CLI - bicep_path = os.path.join( - self.config.output_directory_for_build, - CNF_DEFINITION_BICEP_TEMPLATE_FILENAME, - ) - - if parameters_json_file: - parameters = self.read_parameters_from_file(parameters_json_file) - else: - # User has not passed in parameters file, so we use the parameters - # required from config for the default bicep template produced from - # building the NFDV using this CLI - logger.debug("Create parameters for default NFDV template.") - parameters = self.construct_cnfd_parameters() - - logger.debug( - "Parameters used for CNF definition bicep deployment: %s", parameters - ) - - # Create or check required resources - deploy_manifest_template = not self.nfd_predeploy(definition_type=CNF) - if deploy_manifest_template: - self.deploy_manifest_template( - manifest_parameters_json_file, manifest_bicep_path, CNF - ) - else: - print( - f"Artifact manifests exist for NFD {self.config.nf_name} " - f"version {self.config.version}" - ) - message = ( - f"Deploy bicep template for NFD {self.config.nf_name} version" - f" {self.config.version} into" - f" {self.config.publisher_resource_group_name} under publisher" - f" {self.config.publisher_name}" - ) - print(message) - logger.info(message) - self.deploy_bicep_template(bicep_path, parameters) - print(f"Deployed NFD {self.config.nf_name} version {self.config.version}.") - else: - print("Skipping bicep publish") - - if skip == ARTIFACT_UPLOAD: - print("Skipping artifact upload") - print("Done") - return - acr_properties = self.api_clients.aosm_client.artifact_stores.get( resource_group_name=self.config.publisher_resource_group_name, publisher_name=self.config.publisher_name, @@ -412,6 +268,84 @@ def deploy_cnfd_from_bicep( print("Done") + def nfd_predeploy(self) -> bool: + """ + All the predeploy steps for a NFD. Create publisher, artifact stores and NFDG. + + Return True if artifact manifest already exists, False otherwise + """ + logger.debug("Ensure all required resources exist") + self.pre_deployer.ensure_config_resource_group_exists() + self.pre_deployer.ensure_config_publisher_exists() + self.pre_deployer.ensure_acr_artifact_store_exists() + if isinstance(self.config, VNFConfiguration): + self.pre_deployer.ensure_sa_artifact_store_exists() + if isinstance(self.config, CNFConfiguration): + self.pre_deployer.ensure_config_source_registry_exists() + + self.pre_deployer.ensure_config_nfdg_exists() + return self.pre_deployer.do_config_artifact_manifests_exist() + + def construct_nfd_parameters(self) -> Dict[str, Any]: + """ + Create the parmeters dictionary for vnfdefinitions.bicep. VNF specific. + + :param config: The contents of the configuration file. + """ + if isinstance(self.config, VNFConfiguration): + return { + "location": {"value": self.config.location}, + "publisherName": {"value": self.config.publisher_name}, + "acrArtifactStoreName": {"value": self.config.acr_artifact_store_name}, + "saArtifactStoreName": {"value": self.config.blob_artifact_store_name}, + "nfName": {"value": self.config.nf_name}, + "nfDefinitionGroup": {"value": self.config.nfdg_name}, + "nfDefinitionVersion": {"value": self.config.version}, + "vhdVersion": {"value": self.config.vhd.version}, + "armTemplateVersion": {"value": self.config.arm_template.version}, + } + if isinstance(self.config, CNFConfiguration): + return { + "location": {"value": self.config.location}, + "publisherName": {"value": self.config.publisher_name}, + "acrArtifactStoreName": {"value": self.config.acr_artifact_store_name}, + "nfDefinitionGroup": {"value": self.config.nfdg_name}, + "nfDefinitionVersion": {"value": self.config.version}, + } + raise TypeError(f"Unexpected config type. Expected [VNFConfiguration|CNFConfiguration], received {type(self.config)}") + + def construct_manifest_parameters(self) -> Dict[str, Any]: + """Create the parmeters dictionary for VNF, CNF or NSD.""" + if isinstance(self.config, VNFConfiguration): + return { + "location": {"value": self.config.location}, + "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}, + "saManifestName": {"value": self.config.sa_manifest_name}, + "nfName": {"value": self.config.nf_name}, + "vhdVersion": {"value": self.config.vhd.version}, + "armTemplateVersion": {"value": self.config.arm_template.version}, + } + if isinstance(self.config, CNFConfiguration): + 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}, + } + if isinstance(self.config, NSConfiguration): + 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}, + } + raise ValueError("Unknown configuration type") + def deploy_nsd_from_bicep( self, bicep_path: Optional[str] = None, @@ -458,7 +392,7 @@ def deploy_nsd_from_bicep( if deploy_manifest_template: self.deploy_manifest_template( - manifest_parameters_json_file, manifest_bicep_path, NSD + manifest_parameters_json_file, manifest_bicep_path ) else: print( @@ -510,7 +444,7 @@ def deploy_nsd_from_bicep( print("Done") def deploy_manifest_template( - self, manifest_parameters_json_file, manifest_bicep_path, configuration_type + self, manifest_parameters_json_file, manifest_bicep_path ) -> None: """ Deploy the bicep template defining the manifest. @@ -524,11 +458,11 @@ def deploy_manifest_template( if not manifest_bicep_path: file_name: str = "" - if configuration_type == NSD: + if isinstance(self.config, NSConfiguration): file_name = NSD_ARTIFACT_MANIFEST_BICEP_FILENAME - elif configuration_type == VNF: + if isinstance(self.config, VNFConfiguration): file_name = VNF_MANIFEST_BICEP_TEMPLATE_FILENAME - elif configuration_type == CNF: + if isinstance(self.config, CNFConfiguration): file_name = CNF_MANIFEST_BICEP_TEMPLATE_FILENAME manifest_bicep_path = os.path.join( From 324176141387d3c1f18b542a51d191447f7180a7 Mon Sep 17 00:00:00 2001 From: Andy Churchard Date: Tue, 18 Jul 2023 20:47:53 +0100 Subject: [PATCH 05/20] Make conditional statements clearer --- src/aosm/azext_aosm/deploy/deploy_with_arm.py | 41 ++++++++++++------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/src/aosm/azext_aosm/deploy/deploy_with_arm.py b/src/aosm/azext_aosm/deploy/deploy_with_arm.py index fe2f5a16b61..b0a36291e3b 100644 --- a/src/aosm/azext_aosm/deploy/deploy_with_arm.py +++ b/src/aosm/azext_aosm/deploy/deploy_with_arm.py @@ -27,11 +27,14 @@ from azext_aosm.util.constants import ( ARTIFACT_UPLOAD, BICEP_PUBLISH, + CNF, CNF_DEFINITION_BICEP_TEMPLATE_FILENAME, CNF_MANIFEST_BICEP_TEMPLATE_FILENAME, NF_DEFINITION_BICEP_FILENAME, + NSD, NSD_ARTIFACT_MANIFEST_BICEP_FILENAME, NSD_BICEP_FILENAME, + VNF, VNF_DEFINITION_BICEP_TEMPLATE_FILENAME, VNF_MANIFEST_BICEP_TEMPLATE_FILENAME, ) @@ -60,6 +63,16 @@ def __init__(self, api_clients: ApiClients, config: Configuration) -> None: self.config = config self.pre_deployer = PreDeployerViaSDK(api_clients, self.config) + # Convenience variable to make conditional statements clearer + if isinstance(self.config, VNFConfiguration): + self.resource_type = VNF + elif isinstance(self.config, CNFConfiguration): + self.resource_type = CNF + elif isinstance(self.config, NSConfiguration): + self.resource_type = NSD + else: + raise TypeError(f"Unexpected config type. Expected [VNFConfiguration|CNFConfiguration|NSConfiguration], received {type(self.config)}") + @staticmethod def read_parameters_from_file(parameters_json_file: str) -> Dict[str, Any]: """ @@ -106,9 +119,9 @@ def deploy_nfd_from_bicep( if not bicep_path: # User has not passed in a bicep template, so we are deploying the default # one produced from building the NFDV using this CLI - if isinstance(self.config, VNFConfiguration): + if self.resource_type == VNF: file_name = VNF_DEFINITION_BICEP_TEMPLATE_FILENAME - if isinstance(self.config, CNFConfiguration): + if self.resource_type == CNF: file_name = CNF_DEFINITION_BICEP_TEMPLATE_FILENAME bicep_path = os.path.join( self.config.output_directory_for_build, @@ -156,9 +169,9 @@ def deploy_nfd_from_bicep( print("Done") return - if isinstance(self.config, VNFConfiguration): + if self.resource_type == VNF: self._vnfd_artifact_upload() - if isinstance(self.config, CNFConfiguration): + if self.resource_type == CNF: self._cnfd_artifact_upload(cli_ctx) def _vnfd_artifact_upload( @@ -278,9 +291,9 @@ def nfd_predeploy(self) -> bool: self.pre_deployer.ensure_config_resource_group_exists() self.pre_deployer.ensure_config_publisher_exists() self.pre_deployer.ensure_acr_artifact_store_exists() - if isinstance(self.config, VNFConfiguration): + if self.resource_type == VNF: self.pre_deployer.ensure_sa_artifact_store_exists() - if isinstance(self.config, CNFConfiguration): + if self.resource_type == CNF: self.pre_deployer.ensure_config_source_registry_exists() self.pre_deployer.ensure_config_nfdg_exists() @@ -292,7 +305,7 @@ def construct_nfd_parameters(self) -> Dict[str, Any]: :param config: The contents of the configuration file. """ - if isinstance(self.config, VNFConfiguration): + if self.resource_type == VNF: return { "location": {"value": self.config.location}, "publisherName": {"value": self.config.publisher_name}, @@ -304,7 +317,7 @@ def construct_nfd_parameters(self) -> Dict[str, Any]: "vhdVersion": {"value": self.config.vhd.version}, "armTemplateVersion": {"value": self.config.arm_template.version}, } - if isinstance(self.config, CNFConfiguration): + if self.resource_type == CNF: return { "location": {"value": self.config.location}, "publisherName": {"value": self.config.publisher_name}, @@ -316,7 +329,7 @@ def construct_nfd_parameters(self) -> Dict[str, Any]: def construct_manifest_parameters(self) -> Dict[str, Any]: """Create the parmeters dictionary for VNF, CNF or NSD.""" - if isinstance(self.config, VNFConfiguration): + if self.resource_type == VNF: return { "location": {"value": self.config.location}, "publisherName": {"value": self.config.publisher_name}, @@ -328,14 +341,14 @@ def construct_manifest_parameters(self) -> Dict[str, Any]: "vhdVersion": {"value": self.config.vhd.version}, "armTemplateVersion": {"value": self.config.arm_template.version}, } - if isinstance(self.config, CNFConfiguration): + if self.resource_type == CNF: 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}, } - if isinstance(self.config, NSConfiguration): + if self.resource_type == NSD: return { "location": {"value": self.config.location}, "publisherName": {"value": self.config.publisher_name}, @@ -458,11 +471,11 @@ def deploy_manifest_template( if not manifest_bicep_path: file_name: str = "" - if isinstance(self.config, NSConfiguration): + if self.resource_type == NSD: file_name = NSD_ARTIFACT_MANIFEST_BICEP_FILENAME - if isinstance(self.config, VNFConfiguration): + if self.resource_type == VNF: file_name = VNF_MANIFEST_BICEP_TEMPLATE_FILENAME - if isinstance(self.config, CNFConfiguration): + if self.resource_type == CNF: file_name = CNF_MANIFEST_BICEP_TEMPLATE_FILENAME manifest_bicep_path = os.path.join( From 5388f19c999aa31bf66b330ebf1f2ee988ac0943 Mon Sep 17 00:00:00 2001 From: Andy Churchard Date: Tue, 18 Jul 2023 20:55:35 +0100 Subject: [PATCH 06/20] black --- src/aosm/azext_aosm/deploy/deploy_with_arm.py | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/aosm/azext_aosm/deploy/deploy_with_arm.py b/src/aosm/azext_aosm/deploy/deploy_with_arm.py index b0a36291e3b..283408b2334 100644 --- a/src/aosm/azext_aosm/deploy/deploy_with_arm.py +++ b/src/aosm/azext_aosm/deploy/deploy_with_arm.py @@ -71,7 +71,9 @@ def __init__(self, api_clients: ApiClients, config: Configuration) -> None: elif isinstance(self.config, NSConfiguration): self.resource_type = NSD else: - raise TypeError(f"Unexpected config type. Expected [VNFConfiguration|CNFConfiguration|NSConfiguration], received {type(self.config)}") + raise TypeError( + f"Unexpected config type. Expected [VNFConfiguration|CNFConfiguration|NSConfiguration], received {type(self.config)}" + ) @staticmethod def read_parameters_from_file(parameters_json_file: str) -> Dict[str, Any]: @@ -124,8 +126,7 @@ def deploy_nfd_from_bicep( if self.resource_type == CNF: file_name = CNF_DEFINITION_BICEP_TEMPLATE_FILENAME bicep_path = os.path.join( - self.config.output_directory_for_build, - file_name + self.config.output_directory_for_build, file_name ) if parameters_json_file: @@ -174,9 +175,7 @@ def deploy_nfd_from_bicep( if self.resource_type == CNF: self._cnfd_artifact_upload(cli_ctx) - def _vnfd_artifact_upload( - self - ) -> None: + def _vnfd_artifact_upload(self) -> None: """ Uploads the VHD and ARM template artifacts """ @@ -203,10 +202,7 @@ def _vnfd_artifact_upload( arm_template_artifact.upload(self.config.arm_template) print("Done") - def _cnfd_artifact_upload( - self, - cli_ctx - ) -> None: + def _cnfd_artifact_upload(self, cli_ctx) -> None: """ Uploads the Helm chart and any additional images. """ @@ -325,7 +321,9 @@ def construct_nfd_parameters(self) -> Dict[str, Any]: "nfDefinitionGroup": {"value": self.config.nfdg_name}, "nfDefinitionVersion": {"value": self.config.version}, } - raise TypeError(f"Unexpected config type. Expected [VNFConfiguration|CNFConfiguration], received {type(self.config)}") + raise TypeError( + f"Unexpected config type. Expected [VNFConfiguration|CNFConfiguration], received {type(self.config)}" + ) def construct_manifest_parameters(self) -> Dict[str, Any]: """Create the parmeters dictionary for VNF, CNF or NSD.""" From 68e11ccbdb31fb7fe7730afef03f8716ddcbc00b Mon Sep 17 00:00:00 2001 From: Andy Churchard Date: Wed, 19 Jul 2023 07:48:27 +0100 Subject: [PATCH 07/20] Update custom.py to use new nfd deploy method --- src/aosm/azext_aosm/custom.py | 39 ++++++++++++++--------------------- 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/src/aosm/azext_aosm/custom.py b/src/aosm/azext_aosm/custom.py index e3e6d225ece..1f8fac780d6 100644 --- a/src/aosm/azext_aosm/custom.py +++ b/src/aosm/azext_aosm/custom.py @@ -165,34 +165,25 @@ def publish_definition( container_registry_client=cf_acr_registries(cmd.cli_ctx), ) + if definition_type not in (VNF, CNF): + raise ValueError( + "Definition type must be either 'vnf' or 'cnf'. Definition type" + f" '{definition_type}' is not valid for network function definitions." + ) + config = _get_config_from_file( config_file=config_file, configuration_type=definition_type ) - if definition_type == VNF: - deployer = DeployerViaArm(api_clients, config=config) - deployer.deploy_vnfd_from_bicep( - bicep_path=definition_file, - parameters_json_file=parameters_json_file, - manifest_bicep_path=manifest_file, - manifest_parameters_json_file=manifest_parameters_json_file, - skip=skip, - ) - elif definition_type == CNF: - deployer = DeployerViaArm(api_clients, config=config) - deployer.deploy_cnfd_from_bicep( - cli_ctx=cmd.cli_ctx, - bicep_path=definition_file, - parameters_json_file=parameters_json_file, - manifest_bicep_path=manifest_file, - manifest_parameters_json_file=manifest_parameters_json_file, - skip=skip, - ) - else: - raise ValueError( - "Definition type must be either 'vnf' or 'cnf'. Definition type" - f" {definition_type} is not recognised." - ) + deployer = DeployerViaArm(api_clients, config=config) + deployer.deploy_nfd_from_bicep( + cli_ctx=cmd.cli_ctx, + bicep_path=definition_file, + parameters_json_file=parameters_json_file, + manifest_bicep_path=manifest_file, + manifest_parameters_json_file=manifest_parameters_json_file, + skip=skip, + ) def delete_published_definition( From b28e5f5454df765efa407157cfa5683355744d47 Mon Sep 17 00:00:00 2001 From: Andy Churchard Date: Wed, 19 Jul 2023 07:52:01 +0100 Subject: [PATCH 08/20] Black with text processing --- src/aosm/azext_aosm/deploy/deploy_with_arm.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/aosm/azext_aosm/deploy/deploy_with_arm.py b/src/aosm/azext_aosm/deploy/deploy_with_arm.py index 283408b2334..d95c233c8fc 100644 --- a/src/aosm/azext_aosm/deploy/deploy_with_arm.py +++ b/src/aosm/azext_aosm/deploy/deploy_with_arm.py @@ -72,7 +72,9 @@ def __init__(self, api_clients: ApiClients, config: Configuration) -> None: self.resource_type = NSD else: raise TypeError( - f"Unexpected config type. Expected [VNFConfiguration|CNFConfiguration|NSConfiguration], received {type(self.config)}" + "Unexpected config type. Expected" + " [VNFConfiguration|CNFConfiguration|NSConfiguration], received" + f" {type(self.config)}" ) @staticmethod @@ -322,7 +324,8 @@ def construct_nfd_parameters(self) -> Dict[str, Any]: "nfDefinitionVersion": {"value": self.config.version}, } raise TypeError( - f"Unexpected config type. Expected [VNFConfiguration|CNFConfiguration], received {type(self.config)}" + "Unexpected config type. Expected [VNFConfiguration|CNFConfiguration]," + f" received {type(self.config)}" ) def construct_manifest_parameters(self) -> Dict[str, Any]: From 64c645bc749d436bf546a3c84896a348e2e3fa3a Mon Sep 17 00:00:00 2001 From: Jamie Parsons Date: Wed, 19 Jul 2023 16:34:36 +0100 Subject: [PATCH 09/20] Create new nfRET class --- src/aosm/azext_aosm/_configuration.py | 181 +++++------- src/aosm/azext_aosm/generate_nsd/nf_ret.py | 167 +++++++++++ .../azext_aosm/generate_nsd/nsd_generator.py | 276 ++++++------------ .../templates/nsd_template.bicep.j2 | 16 +- 4 files changed, 336 insertions(+), 304 deletions(-) create mode 100644 src/aosm/azext_aosm/generate_nsd/nf_ret.py diff --git a/src/aosm/azext_aosm/_configuration.py b/src/aosm/azext_aosm/_configuration.py index c4e7e4f74a0..f08bb0f8ff6 100644 --- a/src/aosm/azext_aosm/_configuration.py +++ b/src/aosm/azext_aosm/_configuration.py @@ -9,7 +9,6 @@ import os import re from dataclasses import dataclass, field -from enum import Enum from pathlib import Path from typing import Any, Dict, List, Optional, Union @@ -71,26 +70,6 @@ "nsd_version": ( "Version of the NSD to be created. This should be in the format A.B.C" ), - "network_function_definition_publisher": ( - "Name of the Publisher resource for an existing " "Network Function Definition." - ), - "network_function_definition_name": ( - "Name of an existing Network Function Definition." - ), - "network_function_definition_version": ( - "Version of the existing Network Function Definition." - ), - "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" @@ -130,7 +109,7 @@ class ArtifactConfig: # there if you change the descriptions. 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 @@ -342,16 +321,30 @@ def validate(self): ) -class RETType(str, Enum): - NETWORK_FUNCTION_DEFINITION = ("NetworkFunctionDefinition",) - NETWORK_SERVICE_DEFINITION = ("NetworkServiceDefinition",) - ARM_RESOURCE_DEFINTION = ("ARMResourceDefinition",) - CONFIGURATION_DEFINITION = ("ConfigurationDefinition",) +NFD_NAME = ( + "The name of the existing Network Function Definition 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 RETConfiguration(abc.ABC): - type: RETType +class NFDRETConfiguration: + 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: """ @@ -359,74 +352,76 @@ def validate(self) -> None: :raises ValidationError for any invalid config """ - raise NotImplementedError - - -@dataclass -class NFDRETConfiguration(RETConfiguration): - type: RETType = RETType.NETWORK_FUNCTION_DEFINITION - publisher_name: str = DESCRIPTION_MAP["network_function_definition_publisher"] - publisher_resource_group: str = "Publisher resource group." - network_function_definition_name: str = DESCRIPTION_MAP[ - "network_function_definition_name" - ] - network_function_definition_version: str = DESCRIPTION_MAP[ - "network_function_definition_version" - ] - offering_location: str = DESCRIPTION_MAP[ - "network_function_definition_offering_location" - ] - network_function_type: str = DESCRIPTION_MAP["network_function_type"] - multiple_instances: Union[str, bool] = DESCRIPTION_MAP["multiple_instances"] + if self.name == NFD_NAME: + raise ValidationError("Network function definition name must be set") - def validate(self) -> None: - """ - Validate the configuration passed in. + if self.publisher == PUBLISHER_NAME: + raise ValidationError(f"Publisher name must be set for {self.name}") - :raises ValidationError for any invalid config - """ - if ( - self.publisher_name - == DESCRIPTION_MAP["network_function_definition_publisher"] - ): - raise ValidationError("Publisher name must be set") - - if ( - self.network_function_definition_name - == DESCRIPTION_MAP["network_function_definition_name"] - ): - raise ValidationError("Network function definition name must be set") + if self.publisher_resource_group == PUBLISHER_RESOURCE_GROUP: + raise ValidationError( + f"Publisher resource group name must be set for {self.name}" + ) - if ( - self.network_function_definition_version - == DESCRIPTION_MAP["network_function_definition_version"] - ): - raise ValidationError("Network function definition version must be set") + if self.version == NFD_VERSION: + raise ValidationError( + f"Network function definition version must be set for {self.name}" + ) - if ( - self.offering_location - == DESCRIPTION_MAP["network_function_definition_offering_location"] - ): + if self.publisher_offering_location == NFD_LOCATION: raise ValidationError( - "Network function definition offering location must be set" + f"Network function definition offering location must be set, for {self.name}" ) - if self.network_function_type not in [CNF, VNF]: - raise ValueError("Network Function Type must be cnf or vnf") + 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("multiple_instances must be a boolean") + 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.network_function_type == CNF and self.multiple_instances: + if self.type == CNF and self.multiple_instances: raise ValueError("Multiple instances is not supported on CNFs.") + @property + def build_output_folder_name(self) -> str: + """Return the local folder for generating the bicep template to.""" + current_working_directory = os.getcwd() + return f"{current_working_directory}/{NSD_OUTPUT_BICEP_PREFIX}" + + @property + def arm_template(self) -> ArtifactConfig: + """ + Return the parameters of the ARM template 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 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" + @dataclass class NSConfiguration(Configuration): - resource_element_template_configurations: List[RETConfiguration] = field( + network_functions: List[NFDRETConfiguration] = field( default_factory=lambda: [ NFDRETConfiguration(), ] @@ -453,12 +448,10 @@ def validate(self): or "" ): raise ValueError("ACR Artifact Store name must be set") - if self.resource_element_template_configurations == [] or None: - raise ValueError( - ("At least one resource element template " "configuration must be set.") - ) + if self.network_functions == [] or None: + raise ValueError(("At least one network function must be included.")) else: - for configuration in self.resource_element_template_configurations: + for configuration in self.network_functions: configuration.validate() if self.nsdg_name == DESCRIPTION_MAP["nsdg_name"] or "": raise ValueError("NSD name must be set") @@ -471,12 +464,6 @@ def build_output_folder_name(self) -> str: current_working_directory = os.getcwd() return f"{current_working_directory}/{NSD_OUTPUT_BICEP_PREFIX}" - @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" - @property def acr_manifest_name(self) -> str: """Return the ACR manifest name from the NFD name.""" @@ -495,20 +482,6 @@ 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.artifact_name = f"{self.nsdg_name.lower()}_nf_artifact" - artifact.version = self.nsd_version - artifact.file_path = os.path.join( - self.build_output_folder_name, NF_DEFINITION_JSON_FILENAME - ) - return artifact - def get_configuration( configuration_type: str, config_file: Optional[str] = None 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..aafa09450a0 --- /dev/null +++ b/src/aosm/azext_aosm/generate_nsd/nf_ret.py @@ -0,0 +1,167 @@ +# -------------------------------------------------------------------------------------- +# 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 +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 nfRET: + """ + 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.nf_type = self.config.name.replace("-", "_") + self.nfdv_parameter_name = f"{self.nf_type}_nfd_version" + self.config_mapping_filename = f"{self.config.name}_config_mapping.json" + self.nf_bicep_filename = f"{self.config.name}_nf.bicep" + + def _get_nfdv( + self, 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, str]: + """ + Return the contents of the config mapping file for this RET. + """ + nf = self.config.name + + logger.debug("Create %s", self.config_mapping_filename) + + deployment_parameters = f"{{configurationparameters('{self.cg_schema_name}').{nf}.deploymentParameters}}" + + if not self.config.multiple_instances: + deployment_parameters = f"[{deployment_parameters}]" + + config_mappings = { + "deploymentParameters": deployment_parameters, + self.nfdv_parameter_name: f"{{configurationparameters('{self.cg_schema_name}').{nf}.{self.nfdv_parameter_name}}}", + "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]: + """Write out the Network Function bicep file.""" + 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] + if self.config.type == VNF + else NFVIType.AZURE_ARC_KUBERNETES.value # type: ignore[attr-defined] + ), + "CNF": self.config.type == CNF, + } + + @property + def config_schema_snippet(self) -> Dict[str, Any]: + """ + + :return: _description_ + :rtype: Dict[str, Any] + """ + 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 4cb47b13096..6f6ae6c51c3 100644 --- a/src/aosm/azext_aosm/generate_nsd/nsd_generator.py +++ b/src/aosm/azext_aosm/generate_nsd/nsd_generator.py @@ -8,13 +8,13 @@ import shutil import tempfile from functools import cached_property -from pathlib import Path -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 nfRET from azext_aosm.util.constants import ( CNF, CONFIG_MAPPINGS_DIR_NAME, @@ -30,7 +30,6 @@ VNF, ) from azext_aosm.util.management_clients import ApiClients -from azext_aosm.vendored_sdks.models import NetworkFunctionDefinitionVersion, NFVIType logger = get_logger(__name__) @@ -60,39 +59,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 = [ + nfRET(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.""" @@ -100,16 +71,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}" @@ -120,21 +88,12 @@ 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. """ - 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/" @@ -143,183 +102,118 @@ 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.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 + ] + params = { "nfvi_site_name": self.config.nfvi_site_name, - "armTemplateName": self.config.arm_template_artifact_name, - "armTemplateVersion": self.config.arm_template.version, + "armTemplateName": 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, } - 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( + def _generate_bicep( self, template_name: str, output_file_name: str, params: Dict[Any, Any] ) -> None: """ @@ -342,19 +236,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/nsd_template.bicep.j2 b/src/aosm/azext_aosm/generate_nsd/templates/nsd_template.bicep.j2 index 3570adf0247..89eee6b692b 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. Suggestion that this matches as best possible the SIMPL released version. 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. @@ -81,8 +77,11 @@ 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: [ +{%- set comma = joiner(",") %} +{%- for index in range(nf_count) %} +{{- comma() }} { - 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. @@ -92,8 +91,8 @@ resource nsdVersion 'Microsoft.Hybridnetwork/publishers/networkservicedesigngrou artifactStoreReference: { id: acrArtifactStore.id } - artifactName: armTemplateName - artifactVersion: armTemplateVersion + artifactName: {{armTemplateName[index]}} + artifactVersion: {{armTemplateVersion}} } templateType: 'ArmTemplate' // The parameter values map values from the CG schema, to values required by the template @@ -110,7 +109,8 @@ resource nsdVersion 'Microsoft.Hybridnetwork/publishers/networkservicedesigngrou uninstallDependsOn: [] updateDependsOn: [] } - } + } +{%- endfor %} ] } } From dc9deca7c9d873d191697c296a6976be69256db9 Mon Sep 17 00:00:00 2001 From: Jamie Parsons Date: Fri, 21 Jul 2023 09:14:27 +0100 Subject: [PATCH 10/20] Mypy passing --- src/aosm/azext_aosm/_configuration.py | 47 ++++++++---- src/aosm/azext_aosm/_params.py | 7 +- src/aosm/azext_aosm/delete/delete.py | 46 ++++++------ src/aosm/azext_aosm/deploy/deploy_with_arm.py | 72 +++++++++++-------- src/aosm/azext_aosm/deploy/pre_deploy.py | 27 ++++--- .../azext_aosm/generate_nsd/nsd_generator.py | 4 +- .../artifact_manifest_template.bicep | 16 ++--- .../templates/nsd_template.bicep.j2 | 2 +- .../tests/latest/mock_nsd/input.json | 15 ++-- .../mock_nsd/input_multiple_instances.json | 18 +++-- 10 files changed, 155 insertions(+), 99 deletions(-) diff --git a/src/aosm/azext_aosm/_configuration.py b/src/aosm/azext_aosm/_configuration.py index f08bb0f8ff6..9083bb69191 100644 --- a/src/aosm/azext_aosm/_configuration.py +++ b/src/aosm/azext_aosm/_configuration.py @@ -156,8 +156,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") @@ -180,10 +182,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.""" + def acr_manifest_names(self) -> List[str]: + """ + Return the ACR manifest name from the NFD name. + + 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('.', '-')}" + return [f"{sanitized_nf_name}-acr-manifest-{self.version.replace('.', '-')}"] @dataclass @@ -418,6 +425,13 @@ def resource_element_name(self) -> str: 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): @@ -430,6 +444,14 @@ class NSConfiguration(Configuration): 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 @@ -464,14 +486,6 @@ def build_output_folder_name(self) -> str: current_working_directory = os.getcwd() return f"{current_working_directory}/{NSD_OUTPUT_BICEP_PREFIX}" - @property - def acr_manifest_name(self) -> str: - """Return the ACR manifest name from the NFD name.""" - return ( - f"{self.nsdg_name.lower().replace('_', '-')}" - f"-acr-manifest-{self.nsd_version.replace('.', '-')}" - ) - @property def nfvi_site_name(self) -> str: """Return the name of the NFVI used for the NSDV.""" @@ -482,6 +496,13 @@ 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 diff --git a/src/aosm/azext_aosm/_params.py b/src/aosm/azext_aosm/_params.py index 134b9631d56..f0d5b1590f3 100644 --- a/src/aosm/azext_aosm/_params.py +++ b/src/aosm/azext_aosm/_params.py @@ -10,8 +10,11 @@ def load_arguments(self: AzCommandsLoader, _): - from azure.cli.core.commands.parameters import (file_type, get_enum_type, - get_three_state_flag) + from azure.cli.core.commands.parameters import ( + file_type, + get_enum_type, + get_three_state_flag, + ) definition_type = get_enum_type([VNF, CNF]) skip_steps = get_enum_type([BICEP_PUBLISH, ARTIFACT_UPLOAD]) diff --git a/src/aosm/azext_aosm/delete/delete.py b/src/aosm/azext_aosm/delete/delete.py index 3580a5d7737..9658ff097ea 100644 --- a/src/aosm/azext_aosm/delete/delete.py +++ b/src/aosm/azext_aosm/delete/delete.py @@ -170,10 +170,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 @@ -181,27 +181,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 d95c233c8fc..cc3785d0567 100644 --- a/src/aosm/azext_aosm/deploy/deploy_with_arm.py +++ b/src/aosm/azext_aosm/deploy/deploy_with_arm.py @@ -181,6 +181,7 @@ def _vnfd_artifact_upload(self) -> None: """ Uploads the VHD and ARM template artifacts """ + assert isinstance(self.config, VNFConfiguration) storage_account_manifest = ArtifactManifestOperator( self.config, self.api_clients, @@ -191,7 +192,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] @@ -304,6 +305,7 @@ def construct_nfd_parameters(self) -> Dict[str, Any]: :param config: The contents of the configuration file. """ if self.resource_type == VNF: + assert isinstance(self.config, VNFConfiguration) return { "location": {"value": self.config.location}, "publisherName": {"value": self.config.publisher_name}, @@ -316,6 +318,7 @@ def construct_nfd_parameters(self) -> Dict[str, Any]: "armTemplateVersion": {"value": self.config.arm_template.version}, } if self.resource_type == CNF: + assert isinstance(self.config, CNFConfiguration) return { "location": {"value": self.config.location}, "publisherName": {"value": self.config.publisher_name}, @@ -329,34 +332,43 @@ def construct_nfd_parameters(self) -> Dict[str, Any]: ) def construct_manifest_parameters(self) -> Dict[str, Any]: - """Create the parmeters dictionary for VNF, CNF or NSD.""" + """Create the parameters dictionary for VNF, CNF or NSD.""" if self.resource_type == VNF: + assert isinstance(self.config, VNFConfiguration) return { "location": {"value": self.config.location}, "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}, "armTemplateVersion": {"value": self.config.arm_template.version}, } if self.resource_type == CNF: + assert isinstance(self.config, CNFConfiguration) 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}, + "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 + ] + arm_template_versions = [ + nf.arm_template.version for nf in self.config.network_functions + ] 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}, + "armTemplateVersions": {"value": arm_template_versions}, } raise ValueError("Unknown configuration type") @@ -410,7 +422,7 @@ def deploy_nsd_from_bicep( ) else: print( - f"Artifact manifests {self.config.acr_manifest_name} already exists" + f"Artifact manifests {self.config.acr_manifest_names} already exist" ) message = ( @@ -430,32 +442,33 @@ def deploy_nsd_from_bicep( print("Done") return - acr_manifest = ArtifactManifestOperator( - self.config, - self.api_clients, - self.config.acr_artifact_store_name, - self.config.acr_manifest_name, - ) + 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, + ) - arm_template_artifact = acr_manifest.artifacts[0] + arm_template_artifact = acr_manifest.artifacts[0] - # 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_DEFINITION_BICEP_FILENAME + ) ) - ) - # appease mypy - 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)) + # 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("Uploading ARM template artifact") - arm_template_artifact.upload(self.config.arm_template) - print("Done") + print("Uploading ARM template artifact") + arm_template_artifact.upload(nf.arm_template) + print("Done") def deploy_manifest_template( self, manifest_parameters_json_file, manifest_bicep_path @@ -516,7 +529,6 @@ def construct_nsd_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}, } def deploy_bicep_template( diff --git a/src/aosm/azext_aosm/deploy/pre_deploy.py b/src/aosm/azext_aosm/deploy/pre_deploy.py index ea5147fc44d..d4ce13a2e19 100644 --- a/src/aosm/azext_aosm/deploy/pre_deploy.py +++ b/src/aosm/azext_aosm/deploy/pre_deploy.py @@ -388,12 +388,17 @@ 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 = False if self.config.acr_manifest_names else True + 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 +407,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_nsd/nsd_generator.py b/src/aosm/azext_aosm/generate_nsd/nsd_generator.py index 6f6ae6c51c3..8381f6e49b2 100644 --- a/src/aosm/azext_aosm/generate_nsd/nsd_generator.py +++ b/src/aosm/azext_aosm/generate_nsd/nsd_generator.py @@ -188,9 +188,11 @@ def _write_nsd_bicep(self, output_directory) -> None: nf.config.arm_template.artifact_name 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": arm_template_names, + "armTemplateNames": arm_template_names, "armTemplateVersion": self.config.nsd_version, "cg_schema_name": self.config.cg_schema_name, "nsdv_description": self.config.nsdv_description, 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..7e762c2854b 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,11 +7,11 @@ 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 +param armTemplateVersions array resource publisher 'Microsoft.HybridNetwork/publishers@2023-04-01-preview' existing = { name: publisherName @@ -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 + artifactVersion: armTemplateVersions[i] } ] } -} +}] 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 89eee6b692b..6a3f40bf2ab 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 @@ -91,7 +91,7 @@ resource nsdVersion 'Microsoft.Hybridnetwork/publishers/networkservicedesigngrou artifactStoreReference: { id: acrArtifactStore.id } - artifactName: {{armTemplateName[index]}} + artifactName: {{armTemplateNames[index]}} artifactVersion: {{armTemplateVersion}} } templateType: 'ArmTemplate' 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 8cccdaebfa8..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,10 +3,17 @@ "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" 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 From bfdb6dcce238f22d11733e742fdc3c9303669d97 Mon Sep 17 00:00:00 2001 From: Jamie Parsons Date: Fri, 21 Jul 2023 09:54:06 +0100 Subject: [PATCH 11/20] UTs passing --- src/aosm/azext_aosm/_configuration.py | 12 +++++++----- src/aosm/azext_aosm/custom.py | 4 ++-- src/aosm/azext_aosm/generate_nsd/nsd_generator.py | 1 + 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/aosm/azext_aosm/_configuration.py b/src/aosm/azext_aosm/_configuration.py index 9083bb69191..46281f7ed09 100644 --- a/src/aosm/azext_aosm/_configuration.py +++ b/src/aosm/azext_aosm/_configuration.py @@ -397,10 +397,10 @@ def validate(self) -> None: raise ValueError("Multiple instances is not supported on CNFs.") @property - def build_output_folder_name(self) -> str: + def build_output_folder_name(self) -> Path: """Return the local folder for generating the bicep template to.""" current_working_directory = os.getcwd() - return f"{current_working_directory}/{NSD_OUTPUT_BICEP_PREFIX}" + return Path(current_working_directory, NSD_OUTPUT_BICEP_PREFIX) @property def arm_template(self) -> ArtifactConfig: @@ -449,7 +449,9 @@ 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] + nf_ret_list = [ + NFDRETConfiguration(**config) for config in self.network_functions + ] self.network_functions = nf_ret_list def validate(self): @@ -481,10 +483,10 @@ def validate(self): raise ValueError("NSD Version must be set") @property - def build_output_folder_name(self) -> str: + def output_directory_for_build(self) -> Path: """Return the local folder for generating the bicep template to.""" current_working_directory = os.getcwd() - return f"{current_working_directory}/{NSD_OUTPUT_BICEP_PREFIX}" + return Path(current_working_directory, NSD_OUTPUT_BICEP_PREFIX) @property def nfvi_site_name(self) -> str: diff --git a/src/aosm/azext_aosm/custom.py b/src/aosm/azext_aosm/custom.py index 93d3ded402b..e09ff1c74b2 100644 --- a/src/aosm/azext_aosm/custom.py +++ b/src/aosm/azext_aosm/custom.py @@ -375,7 +375,7 @@ def _generate_nsd(config: NSConfiguration, api_clients: ApiClients): else: raise CLIInternalError("Generate NSD called without a config file") - if os.path.exists(config.build_output_folder_name): + if os.path.exists(config.output_directory_for_build): carry_on = input( f"The folder {config.output_directory_for_build} already exists - delete it" " and continue? (y/n)" @@ -383,6 +383,6 @@ def _generate_nsd(config: NSConfiguration, api_clients: ApiClients): if carry_on != "y": raise UnclassifiedUserFault("User aborted! ") - shutil.rmtree(config.build_output_folder_name) + shutil.rmtree(config.output_directory_for_build) nsd_generator.generate_nsd() diff --git a/src/aosm/azext_aosm/generate_nsd/nsd_generator.py b/src/aosm/azext_aosm/generate_nsd/nsd_generator.py index 8381f6e49b2..055b48341be 100644 --- a/src/aosm/azext_aosm/generate_nsd/nsd_generator.py +++ b/src/aosm/azext_aosm/generate_nsd/nsd_generator.py @@ -197,6 +197,7 @@ def _write_nsd_bicep(self, output_directory) -> None: "cg_schema_name": self.config.cg_schema_name, "nsdv_description": self.config.nsdv_description, "ResourceElementName": ret_names, + "nf_count": len(self.nf_ret_generators), } self._generate_bicep( From 0a7dc2d2941955a7ad4a0b553e5b6305b96d5206 Mon Sep 17 00:00:00 2001 From: Jamie Parsons Date: Mon, 24 Jul 2023 13:21:30 +0100 Subject: [PATCH 12/20] Unit tests added --- src/aosm/README.md | 14 ---- src/aosm/azext_aosm/_configuration.py | 5 ++ src/aosm/azext_aosm/deploy/deploy_with_arm.py | 13 +-- src/aosm/azext_aosm/deploy/pre_deploy.py | 12 +-- .../generate_nfd/cnf_nfd_generator.py | 6 +- src/aosm/azext_aosm/generate_nsd/nf_ret.py | 10 +-- .../azext_aosm/generate_nsd/nsd_generator.py | 6 +- .../artifact_manifest_template.bicep | 4 +- .../templates/nsd_template.bicep.j2 | 8 +- .../latest/mock_nsd/input_multi_nf_nsd.json | 29 +++++++ src/aosm/azext_aosm/tests/latest/test_nsd.py | 79 ++++++++++++++++--- src/aosm/development.md | 4 +- 12 files changed, 129 insertions(+), 61 deletions(-) create mode 100644 src/aosm/azext_aosm/tests/latest/mock_nsd/input_multi_nf_nsd.json 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 46281f7ed09..9f8ab5ce34c 100644 --- a/src/aosm/azext_aosm/_configuration.py +++ b/src/aosm/azext_aosm/_configuration.py @@ -419,6 +419,11 @@ def arm_template(self) -> ArtifactConfig: ) 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.""" diff --git a/src/aosm/azext_aosm/deploy/deploy_with_arm.py b/src/aosm/azext_aosm/deploy/deploy_with_arm.py index cc3785d0567..ac303bc5b2f 100644 --- a/src/aosm/azext_aosm/deploy/deploy_with_arm.py +++ b/src/aosm/azext_aosm/deploy/deploy_with_arm.py @@ -233,7 +233,7 @@ def _cnfd_artifact_upload(self, cli_ctx) -> 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 = {} @@ -359,16 +359,16 @@ def construct_manifest_parameters(self) -> Dict[str, Any]: arm_template_names = [ nf.arm_template.artifact_name for nf in self.config.network_functions ] - arm_template_versions = [ - nf.arm_template.version 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}, "acrManifestNames": {"value": self.config.acr_manifest_names}, "armTemplateNames": {"value": arm_template_names}, - "armTemplateVersions": {"value": arm_template_versions}, + "armTemplateVersion": {"value": self.config.nsd_version}, } raise ValueError("Unknown configuration type") @@ -457,7 +457,7 @@ def deploy_nsd_from_bicep( # 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 + self.config.output_directory_for_build, nf.nf_bicep_filename ) ) @@ -542,6 +542,7 @@ def deploy_bicep_template( 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 d4ce13a2e19..9a37ba3ef64 100644 --- a/src/aosm/azext_aosm/deploy/pre_deploy.py +++ b/src/aosm/azext_aosm/deploy/pre_deploy.py @@ -65,11 +65,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 +105,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( 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_nsd/nf_ret.py b/src/aosm/azext_aosm/generate_nsd/nf_ret.py index aafa09450a0..639cef6d36e 100644 --- a/src/aosm/azext_aosm/generate_nsd/nf_ret.py +++ b/src/aosm/azext_aosm/generate_nsd/nf_ret.py @@ -6,7 +6,7 @@ import json -from typing import Dict, Any +from typing import Dict, Any, List, Union from knack.log import get_logger from azext_aosm._configuration import NFDRETConfiguration @@ -42,7 +42,6 @@ def __init__( self.nf_type = self.config.name.replace("-", "_") self.nfdv_parameter_name = f"{self.nf_type}_nfd_version" self.config_mapping_filename = f"{self.config.name}_config_mapping.json" - self.nf_bicep_filename = f"{self.config.name}_nf.bicep" def _get_nfdv( self, config: NFDRETConfiguration, api_clients @@ -61,7 +60,7 @@ def _get_nfdv( return nfdv_object @property - def config_mappings(self) -> Dict[str, str]: + def config_mappings(self) -> Dict[str, Any]: """ Return the contents of the config mapping file for this RET. """ @@ -69,10 +68,11 @@ def config_mappings(self) -> Dict[str, str]: logger.debug("Create %s", self.config_mapping_filename) - deployment_parameters = f"{{configurationparameters('{self.cg_schema_name}').{nf}.deploymentParameters}}" + deployment_parameters: Union[str, List[str]] = f"{{configurationparameters('{self.cg_schema_name}').{nf}.deploymentParameters}}" if not self.config.multiple_instances: - deployment_parameters = f"[{deployment_parameters}]" + assert isinstance(deployment_parameters, str) + deployment_parameters = [deployment_parameters] config_mappings = { "deploymentParameters": deployment_parameters, diff --git a/src/aosm/azext_aosm/generate_nsd/nsd_generator.py b/src/aosm/azext_aosm/generate_nsd/nsd_generator.py index 055b48341be..e20fb336abc 100644 --- a/src/aosm/azext_aosm/generate_nsd/nsd_generator.py +++ b/src/aosm/azext_aosm/generate_nsd/nsd_generator.py @@ -177,7 +177,7 @@ def _write_nf_bicep_files(self, output_directory) -> None: self._generate_bicep( NF_TEMPLATE_JINJA2_SOURCE_TEMPLATE, - os.path.join(output_directory, nf.nf_bicep_filename), + os.path.join(output_directory, nf.config.nf_bicep_filename), substitutions, ) @@ -187,6 +187,9 @@ def _write_nsd_bicep(self, output_directory) -> None: 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. @@ -197,6 +200,7 @@ def _write_nsd_bicep(self, output_directory) -> None: "cg_schema_name": self.config.cg_schema_name, "nsdv_description": self.config.nsdv_description, "ResourceElementName": ret_names, + "configMappingFiles": config_mapping_files, "nf_count": len(self.nf_ret_generators), } 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 7e762c2854b..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 @@ -11,7 +11,7 @@ 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 armTemplateVersions array +param armTemplateVersion string resource publisher 'Microsoft.HybridNetwork/publishers@2023-04-01-preview' existing = { name: publisherName @@ -32,7 +32,7 @@ resource acrArtifactManifests 'Microsoft.Hybridnetwork/publishers/artifactStores { artifactName: armTemplateNames[i] artifactType: 'ArmTemplate' - artifactVersion: armTemplateVersions[i] + 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 6a3f40bf2ab..56815c3ca68 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 @@ -77,9 +77,7 @@ 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: [ -{%- set comma = joiner(",") %} {%- for index in range(nf_count) %} -{{- comma() }} { name: '{{ResourceElementName[index]}}' // The type of resource element can be ArmResourceDefinition, ConfigurationDefinition or NetworkFunctionDefinition. @@ -91,8 +89,8 @@ resource nsdVersion 'Microsoft.Hybridnetwork/publishers/networkservicedesigngrou artifactStoreReference: { id: acrArtifactStore.id } - artifactName: {{armTemplateNames[index]}} - artifactVersion: {{armTemplateVersion}} + artifactName: '{{armTemplateNames[index]}}' + artifactVersion: '{{armTemplateVersion}}' } templateType: 'ArmTemplate' // The parameter values map values from the CG schema, to values required by the template @@ -102,7 +100,7 @@ resource nsdVersion 'Microsoft.Hybridnetwork/publishers/networkservicedesigngrou // must be edited to have these lines (instead of blank values. SNSSelf is null if there are no Configuration elements) // "": "{configurationparameters('SNSSelf').nfAgentConfiguration.resourceNamespace}", // "": "{configurationparameters('SNSSelf').nfAgentConfiguration.userAssignedIdentityResourceId}", - parameterValues: string(loadJsonContent('configMappings/configMappings.json')) + parameterValues: string(loadJsonContent('configMappings/{{configMappingFiles[index]}}')) } dependsOnProfile: { installDependsOn: [] 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/test_nsd.py b/src/aosm/azext_aosm/tests/latest/test_nsd.py index 8bfd2186a1a..e95ff9d73ee 100644 --- a/src/aosm/azext_aosm/tests/latest/test_nsd.py +++ b/src/aosm/azext_aosm/tests/latest/test_nsd.py @@ -55,7 +55,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 +87,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 +106,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: @@ -185,9 +214,6 @@ 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") finally: os.chdir(starting_directory) @@ -213,8 +239,37 @@ 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. + 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") finally: os.chdir(starting_directory) diff --git a/src/aosm/development.md b/src/aosm/development.md index d1f7ff0d65f..fd4e937d84b 100644 --- a/src/aosm/development.md +++ b/src/aosm/development.md @@ -43,8 +43,10 @@ Make sure your VSCode is running in the same python virtual environment ```bash azdev style aosm azdev linter --include-whl-extensions aosm -(Not written any tests yet) azdev test aosm + +cd src/aosm +mypy . --ignore-missing-imports --no-namespace-packages --exclude "azext_aosm/vendored_sdks/*" ``` The standard Python tool, `black`, is useful for automatically formatting your code. From 980ebc2cfeeacdb6a82066a4bf72aaefb7ccf457 Mon Sep 17 00:00:00 2001 From: Jamie Parsons Date: Mon, 24 Jul 2023 13:34:08 +0100 Subject: [PATCH 13/20] Self review markups --- src/aosm/azext_aosm/_configuration.py | 4 ++-- src/aosm/azext_aosm/generate_nsd/nf_ret.py | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/aosm/azext_aosm/_configuration.py b/src/aosm/azext_aosm/_configuration.py index 9f8ab5ce34c..cae67fdb72b 100644 --- a/src/aosm/azext_aosm/_configuration.py +++ b/src/aosm/azext_aosm/_configuration.py @@ -104,9 +104,9 @@ @dataclass class ArtifactConfig: - artifact_name: str = DESCRIPTION_MAP["artifact_name"] # 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: Optional[str] = DESCRIPTION_MAP["artifact_version"] @@ -158,7 +158,7 @@ def output_directory_for_build(self) -> Path: @property def acr_manifest_names(self) -> List[str]: """ - The list of ACR manifest names.. + The list of ACR manifest names. """ raise NotImplementedError("Subclass must define property") diff --git a/src/aosm/azext_aosm/generate_nsd/nf_ret.py b/src/aosm/azext_aosm/generate_nsd/nf_ret.py index 639cef6d36e..4c45cc02050 100644 --- a/src/aosm/azext_aosm/generate_nsd/nf_ret.py +++ b/src/aosm/azext_aosm/generate_nsd/nf_ret.py @@ -89,7 +89,7 @@ def config_mappings(self) -> Dict[str, Any]: @property def nf_bicep_substitutions(self) -> Dict[str, Any]: - """Write out the Network Function bicep file.""" + """Returns the jinja2 parameters for the NF bicep template template.""" return { "network_function_name": self.config.name, "publisher_name": self.config.publisher, @@ -112,9 +112,7 @@ def nf_bicep_substitutions(self) -> Dict[str, Any]: @property def config_schema_snippet(self) -> Dict[str, Any]: """ - - :return: _description_ - :rtype: Dict[str, Any] + Return the CGS snippet for this NF. """ nfdv_version_description_string = ( f"The version of the {self.config.name} " From e286c17a3340247f1fc09895328cb1bf6ad3d8a2 Mon Sep 17 00:00:00 2001 From: Jamie Parsons Date: Tue, 25 Jul 2023 18:02:36 +0100 Subject: [PATCH 14/20] Code review markups --- src/aosm/azext_aosm/_configuration.py | 47 ++-- src/aosm/azext_aosm/deploy/deploy_with_arm.py | 9 +- src/aosm/azext_aosm/deploy/pre_deploy.py | 4 +- src/aosm/azext_aosm/generate_nsd/nf_ret.py | 36 ++- .../azext_aosm/generate_nsd/nsd_generator.py | 16 +- .../test_build/artifact_manifest.bicep | 39 ++++ .../ubuntu-vm-nfdg_config_mapping.json | 7 + .../test_build/nsd_definition.bicep | 112 +++++++++ .../schemas/ubuntu_ConfigGroupSchema.json | 45 ++++ .../test_build/ubuntu-vm-nfdg_nf.bicep | 53 +++++ .../artifact_manifest.bicep | 39 ++++ .../ubuntu-vm-nfdg_config_mapping.json | 5 + .../nsd_definition.bicep | 112 +++++++++ .../schemas/ubuntu_ConfigGroupSchema.json | 48 ++++ .../ubuntu-vm-nfdg_nf.bicep | 53 +++++ .../artifact_manifest.bicep | 39 ++++ .../artifact_manifest.json | 67 ++++++ .../nginx-nfdg_config_mapping.json | 8 + .../ubuntu-nfdg_config_mapping.json | 7 + .../nginx-nfdg_nf.bicep | 55 +++++ .../nginx-nfdg_nf.json | 94 ++++++++ .../nsd_definition.bicep | 142 ++++++++++++ .../nsd_definition.json | 216 ++++++++++++++++++ .../schemas/multinf_ConfigGroupSchema.json | 75 ++++++ .../ubuntu-nfdg_nf.bicep | 53 +++++ .../ubuntu-nfdg_nf.json | 88 +++++++ src/aosm/azext_aosm/tests/latest/test_nsd.py | 26 +++ src/aosm/azext_aosm/util/constants.py | 5 - src/aosm/development.md | 86 ++++++- 29 files changed, 1532 insertions(+), 54 deletions(-) create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build/artifact_manifest.bicep create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build/configMappings/ubuntu-vm-nfdg_config_mapping.json create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build/nsd_definition.bicep create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build/schemas/ubuntu_ConfigGroupSchema.json create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build/ubuntu-vm-nfdg_nf.bicep create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/artifact_manifest.bicep create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/configMappings/ubuntu-vm-nfdg_config_mapping.json create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/nsd_definition.bicep create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/schemas/ubuntu_ConfigGroupSchema.json create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/ubuntu-vm-nfdg_nf.bicep create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/artifact_manifest.bicep create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/artifact_manifest.json create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/configMappings/nginx-nfdg_config_mapping.json create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/configMappings/ubuntu-nfdg_config_mapping.json create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/nginx-nfdg_nf.bicep create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/nginx-nfdg_nf.json create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/nsd_definition.bicep create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/nsd_definition.json create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/schemas/multinf_ConfigGroupSchema.json create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/ubuntu-nfdg_nf.bicep create mode 100644 src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/ubuntu-nfdg_nf.json diff --git a/src/aosm/azext_aosm/_configuration.py b/src/aosm/azext_aosm/_configuration.py index cae67fdb72b..4fd13ad6bf9 100644 --- a/src/aosm/azext_aosm/_configuration.py +++ b/src/aosm/azext_aosm/_configuration.py @@ -34,10 +34,6 @@ "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", @@ -328,10 +324,12 @@ def validate(self): ) -NFD_NAME = ( - "The name of the existing Network Function Definition to deploy using this NSD" +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_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." @@ -345,6 +343,10 @@ def validate(self): @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 @@ -405,7 +407,7 @@ def build_output_folder_name(self) -> Path: @property def arm_template(self) -> ArtifactConfig: """ - Return the parameters of the ARM template to be uploaded as part of + Return the parameters of the ARM template for this RET to be uploaded as part of the NSDV. """ artifact = ArtifactConfig() @@ -462,29 +464,28 @@ def __post_init__(self): def validate(self): # validate that all of the configuration parameters are set - if self.location == DESCRIPTION_MAP["location"] or "": + if self.location in (DESCRIPTION_MAP["location"], ""): raise ValueError("Location must be set") - if self.publisher_name == DESCRIPTION_MAP["publisher_name_nsd"] or "": + if self.publisher_name in (DESCRIPTION_MAP["publisher_name"], ""): raise ValueError("Publisher name must be set") - if ( - self.publisher_resource_group_name - == DESCRIPTION_MAP["publisher_resource_group_name_nsd"] - or "" + 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 == DESCRIPTION_MAP["acr_artifact_store_name"] - or "" + 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 == [] or None: + if self.network_functions in ([], None): raise ValueError(("At least one network function must be included.")) - else: - for configuration in self.network_functions: - configuration.validate() - if self.nsdg_name == DESCRIPTION_MAP["nsdg_name"] or "": + + 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 == DESCRIPTION_MAP["nsd_version"] or "": + if self.nsd_version in (DESCRIPTION_MAP["nsd_version"], ""): raise ValueError("NSD Version must be set") @property diff --git a/src/aosm/azext_aosm/deploy/deploy_with_arm.py b/src/aosm/azext_aosm/deploy/deploy_with_arm.py index ac303bc5b2f..f150c048ed3 100644 --- a/src/aosm/azext_aosm/deploy/deploy_with_arm.py +++ b/src/aosm/azext_aosm/deploy/deploy_with_arm.py @@ -30,7 +30,6 @@ CNF, CNF_DEFINITION_BICEP_TEMPLATE_FILENAME, CNF_MANIFEST_BICEP_TEMPLATE_FILENAME, - NF_DEFINITION_BICEP_FILENAME, NSD, NSD_ARTIFACT_MANIFEST_BICEP_FILENAME, NSD_BICEP_FILENAME, @@ -421,9 +420,11 @@ def deploy_nsd_from_bicep( manifest_parameters_json_file, manifest_bicep_path ) else: - print( - f"Artifact manifests {self.config.acr_manifest_names} already exist" + 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} " @@ -466,7 +467,7 @@ def deploy_nsd_from_bicep( with open(nf.arm_template.file_path, "w", encoding="utf-8") as file: file.write(json.dumps(arm_template_artifact_json, indent=4)) - print("Uploading ARM template artifact") + print(f"Uploading ARM template artifact: {nf.arm_template.file_path}") arm_template_artifact.upload(nf.arm_template) print("Done") diff --git a/src/aosm/azext_aosm/deploy/pre_deploy.py b/src/aosm/azext_aosm/deploy/pre_deploy.py index 9a37ba3ef64..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, ) @@ -379,7 +378,8 @@ def do_config_artifact_manifests_exist( ) -> bool: """Returns True if all required manifests exist, False otherwise.""" all_acr_mannys_exist = True - any_acr_mannys_exist = False if self.config.acr_manifest_names else 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, diff --git a/src/aosm/azext_aosm/generate_nsd/nf_ret.py b/src/aosm/azext_aosm/generate_nsd/nf_ret.py index 4c45cc02050..8a476181d12 100644 --- a/src/aosm/azext_aosm/generate_nsd/nf_ret.py +++ b/src/aosm/azext_aosm/generate_nsd/nf_ret.py @@ -18,7 +18,7 @@ logger = get_logger(__name__) -class nfRET: +class NFRETGenerator: """ Represents a single network function resource element template withing an NSD. """ @@ -39,12 +39,13 @@ def __init__( ) self.deploy_parameters: Dict[str, Any] = json.loads(nfdv.deploy_parameters) - self.nf_type = self.config.name.replace("-", "_") - self.nfdv_parameter_name = f"{self.nf_type}_nfd_version" + 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( - self, config: NFDRETConfiguration, api_clients + config: NFDRETConfiguration, api_clients ) -> NetworkFunctionDefinitionVersion: """Get the existing NFDV resource object.""" print( @@ -62,21 +63,38 @@ def _get_nfdv( @property def config_mappings(self) -> Dict[str, Any]: """ - Return the contents of the config mapping file for this RET. + 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}}" + 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: f"{{configurationparameters('{self.cg_schema_name}').{nf}.{self.nfdv_parameter_name}}}", + self.nfdv_parameter_name: version_parameter, "managedIdentity": f"{{configurationparameters('{self.cg_schema_name}').managedIdentity}}", } @@ -102,9 +120,9 @@ def nf_bicep_substitutions(self) -> Dict[str, Any]: # 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] + 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] + else NFVIType.AZURE_ARC_KUBERNETES.value # type: ignore[attr-defined] # pylint: disable=no-member ), "CNF": self.config.type == CNF, } diff --git a/src/aosm/azext_aosm/generate_nsd/nsd_generator.py b/src/aosm/azext_aosm/generate_nsd/nsd_generator.py index e20fb336abc..986c26faa71 100644 --- a/src/aosm/azext_aosm/generate_nsd/nsd_generator.py +++ b/src/aosm/azext_aosm/generate_nsd/nsd_generator.py @@ -14,20 +14,16 @@ from knack.log import get_logger from azext_aosm._configuration import NSConfiguration -from azext_aosm.generate_nsd.nf_ret import nfRET +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 @@ -43,7 +39,7 @@ } -class NSDGenerator: +class NSDGenerator: # pylint: disable=too-few-public-methods """ NSD Generator. @@ -61,7 +57,7 @@ def __init__(self, api_clients: ApiClients, config: NSConfiguration): self.nsd_bicep_template_name = NSD_DEFINITION_JINJA2_SOURCE_TEMPLATE self.nsd_bicep_output_name = NSD_BICEP_FILENAME self.nf_ret_generators = [ - nfRET(api_clients, nf_config, self.config.cg_schema_name) + NFRETGenerator(api_clients, nf_config, self.config.cg_schema_name) for nf_config in self.config.network_functions ] @@ -92,7 +88,8 @@ 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. """ managed_identity_description_string = ( "The managed identity to use to deploy NFs within this SNS. This should " @@ -220,8 +217,9 @@ def _write_nsd_manifest(self, output_directory) -> None: {}, ) + @staticmethod def _generate_bicep( - self, template_name: str, output_file_name: str, params: Dict[Any, Any] + 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. 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..82975782518 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build/nsd_definition.bicep @@ -0,0 +1,112 @@ +// 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. +// You can either create one especially for SIMPL or share a manifest with other NSDs. In this example +// the artifact store is expected to be shared and should be created upfront. +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. + // This NSD does not support the NF-Agent as it has no Configuration Resource Elements. + // If Configuration resource elements (SDFs, Perimeta config) are added, the configMapping + // must be edited to have these lines (instead of blank values. SNSSelf is null if there are no Configuration elements) + // "": "{configurationparameters('SNSSelf').nfAgentConfiguration.resourceNamespace}", + // "": "{configurationparameters('SNSSelf').nfAgentConfiguration.userAssignedIdentityResourceId}", + 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..82975782518 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_instances/nsd_definition.bicep @@ -0,0 +1,112 @@ +// 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. +// You can either create one especially for SIMPL or share a manifest with other NSDs. In this example +// the artifact store is expected to be shared and should be created upfront. +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. + // This NSD does not support the NF-Agent as it has no Configuration Resource Elements. + // If Configuration resource elements (SDFs, Perimeta config) are added, the configMapping + // must be edited to have these lines (instead of blank values. SNSSelf is null if there are no Configuration elements) + // "": "{configurationparameters('SNSSelf').nfAgentConfiguration.resourceNamespace}", + // "": "{configurationparameters('SNSSelf').nfAgentConfiguration.userAssignedIdentityResourceId}", + 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..1c87de9abf0 --- /dev/null +++ b/src/aosm/azext_aosm/tests/latest/nsd_output/test_build_multiple_nfs/nsd_definition.bicep @@ -0,0 +1,142 @@ +// 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. +// You can either create one especially for SIMPL or share a manifest with other NSDs. In this example +// the artifact store is expected to be shared and should be created upfront. +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. + // This NSD does not support the NF-Agent as it has no Configuration Resource Elements. + // If Configuration resource elements (SDFs, Perimeta config) are added, the configMapping + // must be edited to have these lines (instead of blank values. SNSSelf is null if there are no Configuration elements) + // "": "{configurationparameters('SNSSelf').nfAgentConfiguration.resourceNamespace}", + // "": "{configurationparameters('SNSSelf').nfAgentConfiguration.userAssignedIdentityResourceId}", + 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. + // This NSD does not support the NF-Agent as it has no Configuration Resource Elements. + // If Configuration resource elements (SDFs, Perimeta config) are added, the configMapping + // must be edited to have these lines (instead of blank values. SNSSelf is null if there are no Configuration elements) + // "": "{configurationparameters('SNSSelf').nfAgentConfiguration.resourceNamespace}", + // "": "{configurationparameters('SNSSelf').nfAgentConfiguration.userAssignedIdentityResourceId}", + 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..7c27cab4ee9 --- /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": "13955546478309878346" + } + }, + "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/test_nsd.py b/src/aosm/azext_aosm/tests/latest/test_nsd.py index e95ff9d73ee..a1f10a98049 100644 --- a/src/aosm/azext_aosm/tests/latest/test_nsd.py +++ b/src/aosm/azext_aosm/tests/latest/test_nsd.py @@ -8,6 +8,7 @@ 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 +18,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 = { @@ -178,6 +180,26 @@ 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. + comparison = dircmp("nsd-bicep-templates", output_folder / expected_folder_name) + 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 + + class TestNSDGenerator: def test_generate_config(self): """ @@ -214,6 +236,8 @@ def test_build(self, cf_resources): CGV_DATA, "nsd-bicep-templates/schemas/ubuntu_ConfigGroupSchema.json", ) + + compare_to_expected_output("test_build") finally: os.chdir(starting_directory) @@ -239,6 +263,7 @@ def test_build_multiple_instances(self, cf_resources): "nsd-bicep-templates/schemas/ubuntu_ConfigGroupSchema.json", ) + compare_to_expected_output("test_build_multiple_instances") finally: os.chdir(starting_directory) @@ -271,5 +296,6 @@ def test_build_multiple_nfs(self, cf_resources): 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 d2f0f529f7c..37e0bbb494c 100644 --- a/src/aosm/azext_aosm/util/constants.py +++ b/src/aosm/azext_aosm/util/constants.py @@ -8,24 +8,19 @@ VNF = "vnf" CNF = "cnf" NSD = "nsd" -SCHEMA = "schema" # Skip steps BICEP_PUBLISH = "bicep-publish" ARTIFACT_UPLOAD = "artifact-upload" # 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 fd4e937d84b..f0fbbd2e6c6 100644 --- a/src/aosm/development.md +++ b/src/aosm/development.md @@ -40,14 +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 -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: @@ -57,7 +139,7 @@ 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. To get code coverage run: ```bash From e9925a19d1f712e05bae6fc6f9e5bcf1d5cf8282 Mon Sep 17 00:00:00 2001 From: Jamie Parsons Date: Wed, 26 Jul 2023 13:59:23 +0100 Subject: [PATCH 15/20] Extra markups --- src/aosm/azext_aosm/tests/latest/test_nsd.py | 31 +++++++++++++------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/src/aosm/azext_aosm/tests/latest/test_nsd.py b/src/aosm/azext_aosm/tests/latest/test_nsd.py index a1f10a98049..85977e10d5c 100644 --- a/src/aosm/azext_aosm/tests/latest/test_nsd.py +++ b/src/aosm/azext_aosm/tests/latest/test_nsd.py @@ -5,6 +5,7 @@ import os from dataclasses import dataclass +from distutils.dir_util import copy_tree import json import shutil import subprocess @@ -188,16 +189,26 @@ def compare_to_expected_output(expected_folder_name: str): with. """ # Check files and folders within the top level directory are the same. - comparison = dircmp("nsd-bicep-templates", output_folder / expected_folder_name) - 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 + 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: From 100a844c4bbf4efcf6a8ffa4f16675f5a7a8e076 Mon Sep 17 00:00:00 2001 From: Jamie Parsons Date: Wed, 26 Jul 2023 15:11:56 +0100 Subject: [PATCH 16/20] Fix mypy --- src/aosm/azext_aosm/deploy/deploy_with_arm.py | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/aosm/azext_aosm/deploy/deploy_with_arm.py b/src/aosm/azext_aosm/deploy/deploy_with_arm.py index b31ef6fd821..3051ed9dad0 100644 --- a/src/aosm/azext_aosm/deploy/deploy_with_arm.py +++ b/src/aosm/azext_aosm/deploy/deploy_with_arm.py @@ -64,6 +64,7 @@ class DeployerViaArm: :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 @@ -116,7 +117,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) @@ -313,7 +315,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]," @@ -329,7 +330,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}, @@ -341,17 +342,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}, + "acrManifestName": {"value": self.config.acr_manifest_names}, + "armTemplateName": {"value": arm_template_names}, + "armTemplateVersion": {"value": self.config.nsd_version}, } raise ValueError("Unknown configuration type") @@ -412,12 +420,6 @@ def deploy_nsd_from_bicep(self) -> None: manifest, ) - 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)) - # Convert the NF bicep to ARM arm_template_artifact_json = self.convert_bicep_to_arm( os.path.join( @@ -425,6 +427,8 @@ def deploy_nsd_from_bicep(self) -> None: ) ) + arm_template_artifact = acr_manifest.artifacts[0] + # 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: From 6c5bea22187ba0a221ba67ac6bafb54167e36cc4 Mon Sep 17 00:00:00 2001 From: Jamie Parsons Date: Wed, 26 Jul 2023 16:05:06 +0100 Subject: [PATCH 17/20] More markups --- src/aosm/azext_aosm/_configuration.py | 2 +- src/aosm/azext_aosm/_params.py | 11 +++- src/aosm/azext_aosm/custom.py | 1 + src/aosm/azext_aosm/delete/delete.py | 4 +- src/aosm/azext_aosm/deploy/deploy_with_arm.py | 61 +++++++++++-------- .../templates/cnfdefinition.bicep.j2 | 2 +- .../templates/vnfdefinition.bicep | 2 +- src/aosm/azext_aosm/util/constants.py | 3 + 8 files changed, 54 insertions(+), 32 deletions(-) diff --git a/src/aosm/azext_aosm/_configuration.py b/src/aosm/azext_aosm/_configuration.py index 4fd13ad6bf9..58455889b7a 100644 --- a/src/aosm/azext_aosm/_configuration.py +++ b/src/aosm/azext_aosm/_configuration.py @@ -36,7 +36,7 @@ ), "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." ), 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 8961f437a31..082ae045ec3 100644 --- a/src/aosm/azext_aosm/custom.py +++ b/src/aosm/azext_aosm/custom.py @@ -373,6 +373,7 @@ def publish_design( deployer.deploy_nsd_from_bicep() + def _generate_nsd(config: NSConfiguration, api_clients: ApiClients): """Generate a Network Service Design for the given type and config.""" if config: diff --git a/src/aosm/azext_aosm/delete/delete.py b/src/aosm/azext_aosm/delete/delete.py index 9658ff097ea..ca0286416f4 100644 --- a/src/aosm/azext_aosm/delete/delete.py +++ b/src/aosm/azext_aosm/delete/delete.py @@ -96,8 +96,8 @@ def delete_nsd(self): 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") diff --git a/src/aosm/azext_aosm/deploy/deploy_with_arm.py b/src/aosm/azext_aosm/deploy/deploy_with_arm.py index 3051ed9dad0..b093592d405 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 @@ -46,36 +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: @@ -357,8 +366,8 @@ 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_names}, - "armTemplateName": {"value": arm_template_names}, + "acrManifestNames": {"value": self.config.acr_manifest_names}, + "armTemplateNames": {"value": arm_template_names}, "armTemplateVersion": {"value": self.config.nsd_version}, } raise ValueError("Unknown configuration type") 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/util/constants.py b/src/aosm/azext_aosm/util/constants.py index 32513c2c68f..9612402fcac 100644 --- a/src/aosm/azext_aosm/util/constants.py +++ b/src/aosm/azext_aosm/util/constants.py @@ -17,16 +17,19 @@ 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 NF_TEMPLATE_JINJA2_SOURCE_TEMPLATE = "nf_template.bicep.j2" NF_DEFINITION_JSON_FILENAME = "nf_definition.json" From ea6e507d71c0a3306a638e7c83e15d7184b00d8f Mon Sep 17 00:00:00 2001 From: Jamie Parsons Date: Wed, 26 Jul 2023 16:09:46 +0100 Subject: [PATCH 18/20] Update output in tests --- .../nsd_output/test_build/nsd_definition.bicep | 10 ++-------- .../nsd_definition.bicep | 10 ++-------- .../test_build_multiple_nfs/nsd_definition.bicep | 15 ++------------- .../test_build_multiple_nfs/nsd_definition.json | 4 ++-- 4 files changed, 8 insertions(+), 31 deletions(-) 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 index 82975782518..8969b671381 100644 --- 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 @@ -12,7 +12,7 @@ param publisherName string 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') +@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' @@ -25,8 +25,7 @@ resource publisher 'Microsoft.HybridNetwork/publishers@2023-04-01-preview' exist } // The artifact store is the resource in which all the artifacts required to deploy the NF are stored. -// You can either create one especially for SIMPL or share a manifest with other NSDs. In this example -// the artifact store is expected to be shared and should be created upfront. +// 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 @@ -94,11 +93,6 @@ resource nsdVersion 'Microsoft.Hybridnetwork/publishers/networkservicedesigngrou templateType: 'ArmTemplate' // The parameter values map values from the CG schema, to values required by the template // deployed by this resource element. - // This NSD does not support the NF-Agent as it has no Configuration Resource Elements. - // If Configuration resource elements (SDFs, Perimeta config) are added, the configMapping - // must be edited to have these lines (instead of blank values. SNSSelf is null if there are no Configuration elements) - // "": "{configurationparameters('SNSSelf').nfAgentConfiguration.resourceNamespace}", - // "": "{configurationparameters('SNSSelf').nfAgentConfiguration.userAssignedIdentityResourceId}", parameterValues: string(loadJsonContent('configMappings/ubuntu-vm-nfdg_config_mapping.json')) } dependsOnProfile: { 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 index 82975782518..8969b671381 100644 --- 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 @@ -12,7 +12,7 @@ param publisherName string 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') +@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' @@ -25,8 +25,7 @@ resource publisher 'Microsoft.HybridNetwork/publishers@2023-04-01-preview' exist } // The artifact store is the resource in which all the artifacts required to deploy the NF are stored. -// You can either create one especially for SIMPL or share a manifest with other NSDs. In this example -// the artifact store is expected to be shared and should be created upfront. +// 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 @@ -94,11 +93,6 @@ resource nsdVersion 'Microsoft.Hybridnetwork/publishers/networkservicedesigngrou templateType: 'ArmTemplate' // The parameter values map values from the CG schema, to values required by the template // deployed by this resource element. - // This NSD does not support the NF-Agent as it has no Configuration Resource Elements. - // If Configuration resource elements (SDFs, Perimeta config) are added, the configMapping - // must be edited to have these lines (instead of blank values. SNSSelf is null if there are no Configuration elements) - // "": "{configurationparameters('SNSSelf').nfAgentConfiguration.resourceNamespace}", - // "": "{configurationparameters('SNSSelf').nfAgentConfiguration.userAssignedIdentityResourceId}", parameterValues: string(loadJsonContent('configMappings/ubuntu-vm-nfdg_config_mapping.json')) } dependsOnProfile: { 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 index 1c87de9abf0..e40f9b8dd73 100644 --- 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 @@ -12,7 +12,7 @@ param publisherName string 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') +@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' @@ -25,8 +25,7 @@ resource publisher 'Microsoft.HybridNetwork/publishers@2023-04-01-preview' exist } // The artifact store is the resource in which all the artifacts required to deploy the NF are stored. -// You can either create one especially for SIMPL or share a manifest with other NSDs. In this example -// the artifact store is expected to be shared and should be created upfront. +// 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 @@ -94,11 +93,6 @@ resource nsdVersion 'Microsoft.Hybridnetwork/publishers/networkservicedesigngrou templateType: 'ArmTemplate' // The parameter values map values from the CG schema, to values required by the template // deployed by this resource element. - // This NSD does not support the NF-Agent as it has no Configuration Resource Elements. - // If Configuration resource elements (SDFs, Perimeta config) are added, the configMapping - // must be edited to have these lines (instead of blank values. SNSSelf is null if there are no Configuration elements) - // "": "{configurationparameters('SNSSelf').nfAgentConfiguration.resourceNamespace}", - // "": "{configurationparameters('SNSSelf').nfAgentConfiguration.userAssignedIdentityResourceId}", parameterValues: string(loadJsonContent('configMappings/nginx-nfdg_config_mapping.json')) } dependsOnProfile: { @@ -124,11 +118,6 @@ resource nsdVersion 'Microsoft.Hybridnetwork/publishers/networkservicedesigngrou templateType: 'ArmTemplate' // The parameter values map values from the CG schema, to values required by the template // deployed by this resource element. - // This NSD does not support the NF-Agent as it has no Configuration Resource Elements. - // If Configuration resource elements (SDFs, Perimeta config) are added, the configMapping - // must be edited to have these lines (instead of blank values. SNSSelf is null if there are no Configuration elements) - // "": "{configurationparameters('SNSSelf').nfAgentConfiguration.resourceNamespace}", - // "": "{configurationparameters('SNSSelf').nfAgentConfiguration.userAssignedIdentityResourceId}", parameterValues: string(loadJsonContent('configMappings/ubuntu-nfdg_config_mapping.json')) } dependsOnProfile: { 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 index 7c27cab4ee9..d8194be7d20 100644 --- 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 @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.15.31.15270", - "templateHash": "13955546478309878346" + "templateHash": "15013200147840669823" } }, "parameters": { @@ -33,7 +33,7 @@ "nsDesignVersion": { "type": "string", "metadata": { - "description": "The version of the NSDV you want to create, in format A-B-C" + "description": "The version of the NSDV you want to create, in format A.B.C" } }, "nfviSiteName": { From 12a2179f171113eac31d3de093a2107d3d8b88c0 Mon Sep 17 00:00:00 2001 From: Jamie Parsons Date: Thu, 27 Jul 2023 09:53:07 +0100 Subject: [PATCH 19/20] Update recordings --- .../tests/latest/mock_nsd/input.json | 3 +- .../test_vnf_nsd_publish_and_delete.yaml | 1151 +++++++++-------- .../cnf_nsd_input_template.json | 20 +- .../vnf_nsd_input_template.json | 20 +- 4 files changed, 622 insertions(+), 572 deletions(-) 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 2b5bb5a3eaa..81d0247e8ea 100644 --- a/src/aosm/azext_aosm/tests/latest/mock_nsd/input.json +++ b/src/aosm/azext_aosm/tests/latest/mock_nsd/input.json @@ -16,6 +16,5 @@ ], "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/recordings/test_vnf_nsd_publish_and_delete.yaml b/src/aosm/azext_aosm/tests/latest/recordings/test_vnf_nsd_publish_and_delete.yaml index fecf3af37c7..63e709c2093 100644 --- 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 @@ -13,7 +13,7 @@ interactions: ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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: @@ -25,7 +25,7 @@ interactions: content-length: - '0' date: - - Wed, 26 Jul 2023 13:40:31 GMT + - Thu, 27 Jul 2023 08:36:40 GMT expires: - '-1' pragma: @@ -51,7 +51,7 @@ interactions: ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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: @@ -65,7 +65,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:40:31 GMT + - Thu, 27 Jul 2023 08:36:40 GMT expires: - '-1' pragma: @@ -93,8 +93,8 @@ interactions: ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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: @@ -108,7 +108,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:40:30 GMT + - Thu, 27 Jul 2023 08:36:39 GMT etag: - '"0b00b59c-0000-1100-0000-64be53e60000"' expires: @@ -142,13 +142,13 @@ interactions: ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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-25T15:40:36.9503596Z"},"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"}}' + 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 @@ -157,9 +157,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:40:31 GMT + - Thu, 27 Jul 2023 08:36:40 GMT etag: - - '"0a007d57-0000-1100-0000-64bfecf40000"' + - '"010076a6-0000-1100-0000-64c123f70000"' expires: - '-1' pragma: @@ -191,24 +191,24 @@ interactions: ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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-25T15:38:05.439289Z"},"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"}}' + 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: - - '987' + - '988' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:40:31 GMT + - Thu, 27 Jul 2023 08:36:40 GMT etag: - - '"0a004656-0000-1100-0000-64bfec5d0000"' + - '"0100a7a4-0000-1100-0000-64c123600000"' expires: - '-1' pragma: @@ -240,8 +240,8 @@ interactions: ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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: @@ -255,7 +255,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:40:31 GMT + - Thu, 27 Jul 2023 08:36:40 GMT etag: - '"0f00e901-0000-1100-0000-64be55b40000"' expires: @@ -289,8 +289,8 @@ interactions: ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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: @@ -306,7 +306,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:40:31 GMT + - Thu, 27 Jul 2023 08:36:40 GMT expires: - '-1' pragma: @@ -334,8 +334,8 @@ interactions: ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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: @@ -351,7 +351,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:40:31 GMT + - Thu, 27 Jul 2023 08:36:40 GMT expires: - '-1' pragma: @@ -368,7 +368,7 @@ interactions: - 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.8.9.13224", "templateHash": "6414151573583976606"}}, "parameters": {"location": + "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": @@ -411,27 +411,27 @@ interactions: Connection: - keep-alive Content-Length: - - '2907' + - '2910' Content-Type: - application/json ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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_1690378835","name":"AOSM_CLI_deployment_1690378835","type":"Microsoft.Resources/deployments","properties":{"templateHash":"6414151573583976606","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":"c12b6d8b-5712-4e8c-b5f0-796987b7ede0","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"}]}}' + 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: - - '1668' + - '1669' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:40:37 GMT + - Thu, 27 Jul 2023 08:36:46 GMT expires: - '-1' pragma: @@ -452,7 +452,7 @@ interactions: - 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.8.9.13224", "templateHash": "6414151573583976606"}}, "parameters": {"location": + "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": @@ -495,29 +495,29 @@ interactions: Connection: - keep-alive Content-Length: - - '2907' + - '2910' Content-Type: - application/json ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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_1690378835","name":"AOSM_CLI_deployment_1690378835","type":"Microsoft.Resources/deployments","properties":{"templateHash":"6414151573583976606","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-26T13:40:39.9830794Z","duration":"PT0.0007049S","correlationId":"6b5fc538-ddd6-42f2-b6d3-595d3d08458a","providers":[{"namespace":"Microsoft.Hybridnetwork","resourceTypes":[{"resourceType":"publishers/artifactStores/artifactManifests","locations":["uksouth"]}]}],"dependencies":[]}}' + 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_1690378835/operationStatuses/08585112280464871991?api-version=2022-09-01 + - 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: - - '1200' + - '1201' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:40:40 GMT + - Thu, 27 Jul 2023 08:36:48 GMT expires: - '-1' pragma: @@ -545,21 +545,21 @@ interactions: ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/08585112280464871991?api-version=2022-09-01 + 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":"Running"}' + string: '{"status":"Accepted"}' headers: cache-control: - no-cache content-length: - - '20' + - '21' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:40:40 GMT + - Thu, 27 Jul 2023 08:36:49 GMT expires: - '-1' pragma: @@ -587,9 +587,9 @@ interactions: ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/08585112280464871991?api-version=2022-09-01 + 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"}' @@ -601,7 +601,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:41:11 GMT + - Thu, 27 Jul 2023 08:37:18 GMT expires: - '-1' pragma: @@ -629,21 +629,21 @@ interactions: ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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_1690378835","name":"AOSM_CLI_deployment_1690378835","type":"Microsoft.Resources/deployments","properties":{"templateHash":"6414151573583976606","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-26T13:41:01.4062434Z","duration":"PT21.4238689S","correlationId":"6b5fc538-ddd6-42f2-b6d3-595d3d08458a","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"}]}}' + 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: - - '1682' + - '1683' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:41:11 GMT + - Thu, 27 Jul 2023 08:37:19 GMT expires: - '-1' pragma: @@ -660,7 +660,7 @@ interactions: - 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.8.9.13224", "templateHash": "9578888424119431564"}}, "parameters": {"location": + "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": @@ -672,7 +672,7 @@ interactions: "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": + 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. @@ -720,18 +720,18 @@ interactions: Connection: - keep-alive Content-Length: - - '4483' + - '4485' Content-Type: - application/json ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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_1690378875","name":"AOSM_CLI_deployment_1690378875","type":"Microsoft.Resources/deployments","properties":{"templateHash":"9578888424119431564","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":"67dc782c-80b9-4cfc-9870-c66297946a13","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"}]}}' + 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 @@ -740,7 +740,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:41:16 GMT + - Thu, 27 Jul 2023 08:37:24 GMT expires: - '-1' pragma: @@ -761,7 +761,7 @@ interactions: - 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.8.9.13224", "templateHash": "9578888424119431564"}}, "parameters": {"location": + "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": @@ -773,7 +773,7 @@ interactions: "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": + 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. @@ -821,21 +821,21 @@ interactions: Connection: - keep-alive Content-Length: - - '4483' + - '4485' Content-Type: - application/json ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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_1690378875","name":"AOSM_CLI_deployment_1690378875","type":"Microsoft.Resources/deployments","properties":{"templateHash":"9578888424119431564","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-26T13:41:18.9471964Z","duration":"PT0.0002291S","correlationId":"656d408c-7df4-4d6a-9c4c-db318c6666a7","providers":[{"namespace":"Microsoft.Hybridnetwork","resourceTypes":[{"resourceType":"publishers/networkfunctiondefinitiongroups/networkfunctiondefinitionversions","locations":["uksouth"]}]}],"dependencies":[]}}' + 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_1690378875/operationStatuses/08585112280068404322?api-version=2022-09-01 + - 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: @@ -843,7 +843,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:41:18 GMT + - Thu, 27 Jul 2023 08:37:26 GMT expires: - '-1' pragma: @@ -871,21 +871,21 @@ interactions: ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/08585112280068404322?api-version=2022-09-01 + 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":"Accepted"}' + string: '{"status":"Running"}' headers: cache-control: - no-cache content-length: - - '21' + - '20' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:41:18 GMT + - Thu, 27 Jul 2023 08:37:26 GMT expires: - '-1' pragma: @@ -913,9 +913,9 @@ interactions: ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/08585112280068404322?api-version=2022-09-01 + 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"}' @@ -927,7 +927,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:41:49 GMT + - Thu, 27 Jul 2023 08:37:57 GMT expires: - '-1' pragma: @@ -955,9 +955,9 @@ interactions: ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/08585112280068404322?api-version=2022-09-01 + 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"}' @@ -969,7 +969,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:42:19 GMT + - Thu, 27 Jul 2023 08:38:26 GMT expires: - '-1' pragma: @@ -997,9 +997,9 @@ interactions: ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/08585112280068404322?api-version=2022-09-01 + 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"}' @@ -1011,7 +1011,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:42:51 GMT + - Thu, 27 Jul 2023 08:38:56 GMT expires: - '-1' pragma: @@ -1039,21 +1039,21 @@ interactions: ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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_1690378875","name":"AOSM_CLI_deployment_1690378875","type":"Microsoft.Resources/deployments","properties":{"templateHash":"9578888424119431564","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-26T13:42:41.877147Z","duration":"PT1M22.9301797S","correlationId":"656d408c-7df4-4d6a-9c4c-db318c6666a7","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"}]}}' + 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: - - '1468' + - '1469' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:42:51 GMT + - Thu, 27 Jul 2023 08:38:56 GMT expires: - '-1' pragma: @@ -1081,24 +1081,24 @@ interactions: ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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":"patrykkulik@microsoft.com","createdByType":"User","createdAt":"2023-07-26T13:40:42.2163698Z","lastModifiedBy":"patrykkulik@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-26T13:40:42.2163698Z"},"properties":{"artifacts":[{"artifactName":"ubuntu-vm-vhd","artifactType":"VhdImageFile","artifactVersion":"1-0-0"}],"artifactManifestState":"Uploading","provisioningState":"Succeeded"}}' + 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: - - '795' + - '797' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:42:51 GMT + - Thu, 27 Jul 2023 08:38:57 GMT etag: - - '"0100d6d7-0000-1100-0000-64c1225e0000"' + - '"10007f7c-0000-1100-0000-64c22ca60000"' expires: - '-1' pragma: @@ -1132,13 +1132,13 @@ interactions: ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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-27T13:42:53.0889336+00:00","credentialType":"AzureStorageAccountToken"}' + 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 @@ -1147,7 +1147,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:42:52 GMT + - Thu, 27 Jul 2023 08:38:59 GMT expires: - '-1' pragma: @@ -1183,24 +1183,24 @@ interactions: ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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":"patrykkulik@microsoft.com","createdByType":"User","createdAt":"2023-07-26T13:40:42.45082Z","lastModifiedBy":"patrykkulik@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-26T13:40:42.45082Z"},"properties":{"artifacts":[{"artifactName":"ubuntu-vm-arm-template","artifactType":"ArmTemplate","artifactVersion":"1.0.0"}],"artifactManifestState":"Uploading","provisioningState":"Succeeded"}}' + 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: - - '794' + - '800' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:42:52 GMT + - Thu, 27 Jul 2023 08:38:59 GMT etag: - - '"010000d8-0000-1100-0000-64c1226a0000"' + - '"1000b17c-0000-1100-0000-64c22cb40000"' expires: - '-1' pragma: @@ -1234,13 +1234,13 @@ interactions: ParameterSetName: - -f --definition-type --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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":"dzBEJc9khyb/+Gwp3TQDSYn6bvvFcJfQfgF8MZT20M+ACRA+ahWq","acrServerUrl":"https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io","repositories":["ubuntu-vm-arm-template"],"expiry":"2023-07-27T13:42:53.8465345+00:00","credentialType":"AzureContainerRegistryScopedToken"}' + 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 @@ -1249,7 +1249,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:42:53 GMT + - Thu, 27 Jul 2023 08:39:00 GMT expires: - '-1' pragma: @@ -1281,9 +1281,9 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.16.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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: - - Wed, 26 Jul 2023 13:42:53 GMT + - Thu, 27 Jul 2023 08:39:01 GMT x-ms-version: - '2022-11-02' method: HEAD @@ -1299,7 +1299,7 @@ interactions: content-type: - application/octet-stream date: - - Wed, 26 Jul 2023 13:42:54 GMT + - Thu, 27 Jul 2023 08:39:01 GMT etag: - '"0x8DB883E503690E6"' last-modified: @@ -1335,11 +1335,11 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.16.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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: - - Wed, 26 Jul 2023 13:42:53 GMT + - Thu, 27 Jul 2023 08:39:01 GMT x-ms-version: - '2022-11-02' method: PUT @@ -1351,15 +1351,15 @@ interactions: content-length: - '0' date: - - Wed, 26 Jul 2023 13:42:55 GMT + - Thu, 27 Jul 2023 08:39:01 GMT etag: - - '"0x8DB8DDE37993689"' + - '"0x8DB8E7CEDFF753F"' last-modified: - - Wed, 26 Jul 2023 13:42:55 GMT + - Thu, 27 Jul 2023 08:39:02 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-copy-id: - - 772d97bc-1e16-4a2a-8a18-6ad8d074e371 + - 334095cf-86e9-4700-9c1c-898327069c99 x-ms-copy-status: - pending x-ms-version: @@ -1403,7 +1403,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:42:55 GMT + - Thu, 27 Jul 2023 08:39:02 GMT docker-distribution-api-version: - registry/2.0 server: @@ -1435,14 +1435,14 @@ interactions: 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.eyJqdGkiOiJhZmI5ZmM4MS05MDRjLTRlMjMtODVhZC1iZmYwNzYyYTMxMzEiLCJzdWIiOiJ1YnVudHUtdm0tYWNyLW1hbmlmZXN0LTEtMC0wIiwibmJmIjoxNjkwMzc4MDc2LCJleHAiOjE2OTAzNzk4NzYsImlhdCI6MTY5MDM3ODA3NiwiaXNzIjoiQXp1cmUgQ29udGFpbmVyIFJlZ2lzdHJ5IiwiYXVkIjoidWJ1bnR1cHVibGlzaGVydWJ1bnR1YWNyMjMxNWRjZmE4My5henVyZWNyLmlvIiwidmVyc2lvbiI6IjIuMCIsInJpZCI6IjUzNjQ5MTE4MjEzMTRkNjc5MjZkYTdhM2NkYzE3NGY4IiwiYWNjZXNzIjpbeyJUeXBlIjoicmVwb3NpdG9yeSIsIk5hbWUiOiJ1YnVudHUtdm0tYXJtLXRlbXBsYXRlIiwiQWN0aW9ucyI6WyJwdWxsIiwicHVzaCJdfV0sInJvbGVzIjpbXSwiZ3JhbnRfdHlwZSI6ImFjY2Vzc190b2tlbiJ9.z80W2pf4snT9rDfnttVlFIXQtyeUJhHvQDKtvY553FJeeMPXd3pN5Z9KuOAKjT7hbG53pRDtgBS9SBEpvj0uwPab6wdpm2nHqlcsBPl7kOIqspPH7-7XOyjMOuSfXSGNWhzLv3F2mPg7YWj6ZPUsQUZL6aN8OKl5hwZ-k_cFFFAhBvSjSpyHRehxyUkdISBNcr_9zkpZLBam02twuMuMsQHFo2k8amYpcVQaXY_EzVnbfN29gG9XbWd1KAtS75Dg6srTqH8QN0Llr-riWmiUxFRhKyBI_zcPmAmnZXa6mmknc_tW0l6ue6uTgFaPIX1ZYYpo_h3SswD88OH5q96Izg"}' + string: '{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IkNPQVU6UERZSDo0SVJYOjM2SEI6TFYzUDpWNFBGOko0NzQ6SzNOSjpPS1JCOlRZQUo6NEc0Szo1Q1NEIn0.eyJqdGkiOiJjYzQxNTFiMy1jNDU0LTQ2M2YtODI2ZC1kZmQzZDM0NjlhZWUiLCJzdWIiOiJ1YnVudHUtdm0tYWNyLW1hbmlmZXN0LTEtMC0wIiwibmJmIjoxNjkwNDQ2MjQyLCJleHAiOjE2OTA0NDgwNDIsImlhdCI6MTY5MDQ0NjI0MiwiaXNzIjoiQXp1cmUgQ29udGFpbmVyIFJlZ2lzdHJ5IiwiYXVkIjoidWJ1bnR1cHVibGlzaGVydWJ1bnR1YWNyMjMxNWRjZmE4My5henVyZWNyLmlvIiwidmVyc2lvbiI6IjIuMCIsInJpZCI6IjUzNjQ5MTE4MjEzMTRkNjc5MjZkYTdhM2NkYzE3NGY4IiwiYWNjZXNzIjpbeyJUeXBlIjoicmVwb3NpdG9yeSIsIk5hbWUiOiJ1YnVudHUtdm0tYXJtLXRlbXBsYXRlIiwiQWN0aW9ucyI6WyJwdWxsIiwicHVzaCJdfV0sInJvbGVzIjpbXSwiZ3JhbnRfdHlwZSI6ImFjY2Vzc190b2tlbiJ9.sYXP7T121wBoMXhOtsHrR35dhYLtd8Lq-VaXVrNTdzkH1HI5_ky2zADjNkxwdYQuHmkgWAuwFQOJQdTgejPTH1kfpjtpvMCtG6KHlERGBrE7hneTMed6iFpJldq4-p2zpKmzTJCEJjAIN10LwJCUEJr1npYckIBBlo0o85kJcsaxF9eWrZYpb5GHHqOyxYDjfesxLKu5YuCDGXM6F6RrJ7GgEQYhXlQOUfTrGRSMD7uE87oaqiNj6rZuG8UMKr7m9FAUeWyQ2zCGkcxpQ37ex7sFtxOrUcoxI3h6rQjUv4twjlV4gjzdXUnCzVt15YKmKH5hWoq6snb_cDEAkh3Jjw"}' headers: connection: - keep-alive content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:42:56 GMT + - Thu, 27 Jul 2023 08:39:02 GMT server: - openresty strict-transport-security: @@ -1485,13 +1485,13 @@ interactions: content-length: - '0' date: - - Wed, 26 Jul 2023 13:42:56 GMT + - Thu, 27 Jul 2023 08:39:02 GMT docker-distribution-api-version: - registry/2.0 docker-upload-uuid: - - 377ceeef-5696-4d08-9d23-e0d6808d5cb5 + - 7bc7c95c-face-4ffb-9021-02172a4e6279 location: - - /v2/ubuntu-vm-arm-template/blobs/uploads/377ceeef-5696-4d08-9d23-e0d6808d5cb5?_nouploadcache=false&_state=y6irBoTyBpc74WmUHCHXifGwSlipCltDAc3i5nlOdvV7Ik5hbWUiOiJ1YnVudHUtdm0tYXJtLXRlbXBsYXRlIiwiVVVJRCI6IjM3N2NlZWVmLTU2OTYtNGQwOC05ZDIzLWUwZDY4MDhkNWNiNSIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAyMy0wNy0yNlQxMzo0Mjo1Ni4xMDU5OTM3MDFaIn0%3D + - /v2/ubuntu-vm-arm-template/blobs/uploads/7bc7c95c-face-4ffb-9021-02172a4e6279?_nouploadcache=false&_state=ZPo5kB5x7VQ6WbZEHoW2yuBlm-BsBz0vKuQMqzQANzp7Ik5hbWUiOiJ1YnVudHUtdm0tYXJtLXRlbXBsYXRlIiwiVVVJRCI6IjdiYzdjOTVjLWZhY2UtNGZmYi05MDIxLTAyMTcyYTRlNjI3OSIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAyMy0wNy0yN1QwODozOTowMi44MDA0NjU3M1oifQ%3D%3D range: - 0-0 server: @@ -1564,7 +1564,7 @@ interactions: User-Agent: - python-requests/2.26.0 method: PUT - uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-arm-template/blobs/uploads/377ceeef-5696-4d08-9d23-e0d6808d5cb5?_nouploadcache=false&_state=y6irBoTyBpc74WmUHCHXifGwSlipCltDAc3i5nlOdvV7Ik5hbWUiOiJ1YnVudHUtdm0tYXJtLXRlbXBsYXRlIiwiVVVJRCI6IjM3N2NlZWVmLTU2OTYtNGQwOC05ZDIzLWUwZDY4MDhkNWNiNSIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAyMy0wNy0yNlQxMzo0Mjo1Ni4xMDU5OTM3MDFaIn0%3D&digest=sha256%3Ae71bf56543dc33dc8e550a0c574efe9a4875754a4ddf74347e448dec2462798b + 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: '' @@ -1579,7 +1579,7 @@ interactions: content-length: - '0' date: - - Wed, 26 Jul 2023 13:42:56 GMT + - Thu, 27 Jul 2023 08:39:03 GMT docker-content-digest: - sha256:e71bf56543dc33dc8e550a0c574efe9a4875754a4ddf74347e448dec2462798b docker-distribution-api-version: @@ -1632,7 +1632,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:42:56 GMT + - Thu, 27 Jul 2023 08:39:03 GMT docker-distribution-api-version: - registry/2.0 server: @@ -1664,14 +1664,14 @@ interactions: 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.eyJqdGkiOiI5OGZlZGY5My04MmFjLTQzYTctYmQ3MS05ZGZjNTlhYmZlNDkiLCJzdWIiOiJ1YnVudHUtdm0tYWNyLW1hbmlmZXN0LTEtMC0wIiwibmJmIjoxNjkwMzc4MDc2LCJleHAiOjE2OTAzNzk4NzYsImlhdCI6MTY5MDM3ODA3NiwiaXNzIjoiQXp1cmUgQ29udGFpbmVyIFJlZ2lzdHJ5IiwiYXVkIjoidWJ1bnR1cHVibGlzaGVydWJ1bnR1YWNyMjMxNWRjZmE4My5henVyZWNyLmlvIiwidmVyc2lvbiI6IjIuMCIsInJpZCI6IjUzNjQ5MTE4MjEzMTRkNjc5MjZkYTdhM2NkYzE3NGY4IiwiYWNjZXNzIjpbeyJUeXBlIjoicmVwb3NpdG9yeSIsIk5hbWUiOiJ1YnVudHUtdm0tYXJtLXRlbXBsYXRlIiwiQWN0aW9ucyI6WyJwdWxsIiwicHVzaCJdfV0sInJvbGVzIjpbXSwiZ3JhbnRfdHlwZSI6ImFjY2Vzc190b2tlbiJ9.C64_ds7czwe_9fwWjamPuU6Co0cdp0HJdRDC9BFKUXoRi-CX-E0ODLPVel418nOORJckQxPraqCpFMqWv1F4Bi-SsNFLcww3SP6ku7VtS45KlelEmhT4LuNbZtBBMUbbP2fYtB4jz7aAb-7ty7xsh0kljNb47gWKeoc_yYvgaZUHQVxvFdYoDdWQSoJyv3r7znyE3hC9SVbHI2jt_FSQT10us2c-p_u1zivsM8GB_pcCjHyYbDQwg4_zn62r2SHEYSpS5zZKRnkYymMIMV29HTsX1xsmUH0bmk7-11XQcxrcL7vhrBBjLgRiIO_MEm-rmuZA7QC3RlRkoHK5e2hfNQ"}' + 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: - - Wed, 26 Jul 2023 13:42:56 GMT + - Thu, 27 Jul 2023 08:39:03 GMT server: - openresty strict-transport-security: @@ -1714,13 +1714,13 @@ interactions: content-length: - '0' date: - - Wed, 26 Jul 2023 13:42:56 GMT + - Thu, 27 Jul 2023 08:39:03 GMT docker-distribution-api-version: - registry/2.0 docker-upload-uuid: - - 3aac3265-c404-4b7f-9891-921c3150d04f + - 4eccefe2-9ccb-4871-ad56-e45ab3a9d31e location: - - /v2/ubuntu-vm-arm-template/blobs/uploads/3aac3265-c404-4b7f-9891-921c3150d04f?_nouploadcache=false&_state=eoGzfNWHRutGitouwu8OKW4HBcDE3_WBnHH-FFq3iH17Ik5hbWUiOiJ1YnVudHUtdm0tYXJtLXRlbXBsYXRlIiwiVVVJRCI6IjNhYWMzMjY1LWM0MDQtNGI3Zi05ODkxLTkyMWMzMTUwZDA0ZiIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAyMy0wNy0yNlQxMzo0Mjo1Ni45MzExMDkzNzhaIn0%3D + - /v2/ubuntu-vm-arm-template/blobs/uploads/4eccefe2-9ccb-4871-ad56-e45ab3a9d31e?_nouploadcache=false&_state=NETur7sI6jVDrJxcfG3VMvkBK79Ca1Ntz8XJNBj_Od97Ik5hbWUiOiJ1YnVudHUtdm0tYXJtLXRlbXBsYXRlIiwiVVVJRCI6IjRlY2NlZmUyLTljY2ItNDg3MS1hZDU2LWU0NWFiM2E5ZDMxZSIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAyMy0wNy0yN1QwODozOTowMy4xNTg1NDg2NjNaIn0%3D range: - 0-0 server: @@ -1749,7 +1749,7 @@ interactions: User-Agent: - python-requests/2.26.0 method: PUT - uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-arm-template/blobs/uploads/3aac3265-c404-4b7f-9891-921c3150d04f?_nouploadcache=false&_state=eoGzfNWHRutGitouwu8OKW4HBcDE3_WBnHH-FFq3iH17Ik5hbWUiOiJ1YnVudHUtdm0tYXJtLXRlbXBsYXRlIiwiVVVJRCI6IjNhYWMzMjY1LWM0MDQtNGI3Zi05ODkxLTkyMWMzMTUwZDA0ZiIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAyMy0wNy0yNlQxMzo0Mjo1Ni45MzExMDkzNzhaIn0%3D&digest=sha256%3Ae3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + 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: '' @@ -1764,7 +1764,7 @@ interactions: content-length: - '0' date: - - Wed, 26 Jul 2023 13:42:57 GMT + - Thu, 27 Jul 2023 08:39:03 GMT docker-content-digest: - sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 docker-distribution-api-version: @@ -1823,7 +1823,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:42:57 GMT + - Thu, 27 Jul 2023 08:39:03 GMT docker-distribution-api-version: - registry/2.0 server: @@ -1832,7 +1832,7 @@ interactions: - 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" + - 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: @@ -1852,17 +1852,17 @@ interactions: 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 + 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.eyJqdGkiOiI0NDJlYTUyNS1hOWQ0LTQ5MmYtYWI0NS1hODMxNzAwODZjMjEiLCJzdWIiOiJ1YnVudHUtdm0tYWNyLW1hbmlmZXN0LTEtMC0wIiwibmJmIjoxNjkwMzc4MDc3LCJleHAiOjE2OTAzNzk4NzcsImlhdCI6MTY5MDM3ODA3NywiaXNzIjoiQXp1cmUgQ29udGFpbmVyIFJlZ2lzdHJ5IiwiYXVkIjoidWJ1bnR1cHVibGlzaGVydWJ1bnR1YWNyMjMxNWRjZmE4My5henVyZWNyLmlvIiwidmVyc2lvbiI6IjIuMCIsInJpZCI6IjUzNjQ5MTE4MjEzMTRkNjc5MjZkYTdhM2NkYzE3NGY4IiwiYWNjZXNzIjpbeyJUeXBlIjoicmVwb3NpdG9yeSIsIk5hbWUiOiJ1YnVudHUtdm0tYXJtLXRlbXBsYXRlIiwiQWN0aW9ucyI6WyJwdWxsIiwicHVzaCJdfV0sInJvbGVzIjpbXSwiZ3JhbnRfdHlwZSI6ImFjY2Vzc190b2tlbiJ9.yo8hU6AYMFINYoZfrB08atl05hnYVuTBnj_rKtNutyqsvk4IKTNCQyMsF_N7HebRE9Vdgsiu9kc7gELn5lP2u4IvZS8LmNvsu-DCZI4N9A5CZhy0uAQb3Ih-Pk9oMXj3dPpL_A7M2Ffkq4tAtBt2ggS0v-kud7aRen52Epa_q66gaQVhUheHArDwESIn3dsSLKFHA7je3endSvnn3dc8MHa3EI_NkpPgfOS7ZmBOZKt5b_A9jKdWeF52wMtYAOjXoTF9VdmncfhSYhLk9MELqn6QeyLecWVFWNL9LzwpBMHmDFg6IWKZZC3jlW2RCnBCJi6JaSwbH5KEk9AV-4i2GQ"}' + 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: - - Wed, 26 Jul 2023 13:42:57 GMT + - Thu, 27 Jul 2023 08:39:03 GMT server: - openresty strict-transport-security: @@ -1911,7 +1911,7 @@ interactions: content-length: - '0' date: - - Wed, 26 Jul 2023 13:42:57 GMT + - Thu, 27 Jul 2023 08:39:03 GMT docker-content-digest: - sha256:8923fa544da97914212bc9173ec512741d331940e4a2c7b6fbad979657a5c507 docker-distribution-api-version: @@ -1942,24 +1942,24 @@ interactions: ParameterSetName: - -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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":"patrykkulik@microsoft.com","createdByType":"User","createdAt":"2023-07-26T13:41:20.6640217Z","lastModifiedBy":"patrykkulik@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-26T13:41:20.6640217Z"},"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"}}' + 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: - - '2711' + - '2713' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:42:57 GMT + - Thu, 27 Jul 2023 08:39:03 GMT etag: - - '"0200c39f-0000-1100-0000-64c1228c0000"' + - '"06009197-0000-1100-0000-64c22cd40000"' expires: - '-1' pragma: @@ -1991,7 +1991,7 @@ interactions: ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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: @@ -2003,7 +2003,7 @@ interactions: content-length: - '0' date: - - Wed, 26 Jul 2023 13:42:57 GMT + - Thu, 27 Jul 2023 08:39:03 GMT expires: - '-1' pragma: @@ -2029,7 +2029,7 @@ interactions: ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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: @@ -2043,7 +2043,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:42:57 GMT + - Thu, 27 Jul 2023 08:39:03 GMT expires: - '-1' pragma: @@ -2071,8 +2071,8 @@ interactions: ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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: @@ -2086,7 +2086,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:42:58 GMT + - Thu, 27 Jul 2023 08:39:04 GMT etag: - '"0b00b59c-0000-1100-0000-64be53e60000"' expires: @@ -2120,13 +2120,13 @@ interactions: ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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:41:32.1146188Z"},"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"}}' + 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 @@ -2135,9 +2135,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:42:58 GMT + - Thu, 27 Jul 2023 08:39:04 GMT etag: - - '"0100f7a1-0000-1100-0000-64c1228c0000"' + - '"03001208-0000-1100-0000-64c22cd40000"' expires: - '-1' pragma: @@ -2173,26 +2173,26 @@ interactions: ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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":"patrykkulik@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-26T13:42:58.6170624Z"},"properties":{"description":null,"provisioningState":"Accepted"}}' + 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/3a55f1d1-5877-4483-abfa-ef6f900f02d8*0A2C88351F91E19B08EFFAF13C02A492976D31AA01E04643FC90923CE153B778?api-version=2020-01-01-preview + - 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: - - '602' + - '603' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:42:59 GMT + - Thu, 27 Jul 2023 08:39:06 GMT etag: - - '"05001305-0000-1100-0000-64c122e30000"' + - '"010024fe-0000-1100-0000-64c22d2a0000"' expires: - '-1' pragma: @@ -2224,24 +2224,24 @@ interactions: ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/3a55f1d1-5877-4483-abfa-ef6f900f02d8*0A2C88351F91E19B08EFFAF13C02A492976D31AA01E04643FC90923CE153B778?api-version=2020-01-01-preview + 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/3a55f1d1-5877-4483-abfa-ef6f900f02d8*0A2C88351F91E19B08EFFAF13C02A492976D31AA01E04643FC90923CE153B778","name":"3a55f1d1-5877-4483-abfa-ef6f900f02d8*0A2C88351F91E19B08EFFAF13C02A492976D31AA01E04643FC90923CE153B778","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkServiceDesignGroups/ubuntu","status":"Accepted","startTime":"2023-07-26T13:42:59.410368Z"}' + 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: - - '548' + - '549' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:42:59 GMT + - Thu, 27 Jul 2023 08:39:06 GMT etag: - - '"01009920-0000-1100-0000-64c122e30000"' + - '"0200837a-0000-1100-0000-64c22d2a0000"' expires: - '-1' pragma: @@ -2257,30 +2257,76 @@ interactions: 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.8.9.13224", "templateHash": "6106670278831411745"}}, "parameters": {"location": + "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."}}, "acrManifestName": {"type": "string", "metadata": {"description": - "Name of the manifest to deploy for the ACR-backed Artifact Store"}}, "armTemplateName": - {"type": "string", "metadata": {"description": "The name under which to store + 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": [{"type": "Microsoft.Hybridnetwork/publishers/artifactStores/artifactManifests", + "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(''acrManifestName''))]", "location": - "[parameters(''location'')]", "properties": {"artifacts": [{"artifactName": - "[parameters(''armTemplateName'')]", "artifactType": "ArmTemplate", "artifactVersion": - "[parameters(''armTemplateVersion'')]"}]}}]}, "parameters": {"location": {"value": - "uksouth"}, "publisherName": {"value": "ubuntuPublisher"}, "acrArtifactStoreName": - {"value": "ubuntu-acr"}, "acrManifestName": {"value": "ubuntu-nf-nsd-acr-manifest-1-0-0"}, - "armTemplateName": {"value": "ubuntu-vm-nfdg-nfd-artifact"}, "armTemplateVersion": - {"value": "1.0.0"}}, "mode": "Incremental"}}' + 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 @@ -2291,27 +2337,27 @@ interactions: Connection: - keep-alive Content-Length: - - '1927' + - '2062' Content-Type: - application/json ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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_1690378985","name":"AOSM_CLI_deployment_1690378985","type":"Microsoft.Resources/deployments","properties":{"templateHash":"6106670278831411745","parameters":{"location":{"type":"String","value":"uksouth"},"publisherName":{"type":"String","value":"ubuntuPublisher"},"acrArtifactStoreName":{"type":"String","value":"ubuntu-acr"},"acrManifestName":{"type":"String","value":"ubuntu-nf-nsd-acr-manifest-1-0-0"},"armTemplateName":{"type":"String","value":"ubuntu-vm-nfdg-nfd-artifact"},"armTemplateVersion":{"type":"String","value":"1.0.0"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"0001-01-01T00:00:00Z","duration":"PT0S","correlationId":"f60691ee-e24a-4cbc-a883-c4d593ad423b","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-nf-nsd-acr-manifest-1-0-0"}]}}' + 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: - - '1282' + - '1294' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:43:06 GMT + - Thu, 27 Jul 2023 08:39:11 GMT expires: - '-1' pragma: @@ -2332,27 +2378,28 @@ interactions: - 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.8.9.13224", "templateHash": "6106670278831411745"}}, "parameters": {"location": + "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."}}, "acrManifestName": {"type": "string", "metadata": {"description": - "Name of the manifest to deploy for the ACR-backed Artifact Store"}}, "armTemplateName": - {"type": "string", "metadata": {"description": "The name under which to store + 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": [{"type": "Microsoft.Hybridnetwork/publishers/artifactStores/artifactManifests", + "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(''acrManifestName''))]", "location": - "[parameters(''location'')]", "properties": {"artifacts": [{"artifactName": - "[parameters(''armTemplateName'')]", "artifactType": "ArmTemplate", "artifactVersion": - "[parameters(''armTemplateVersion'')]"}]}}]}, "parameters": {"location": {"value": - "uksouth"}, "publisherName": {"value": "ubuntuPublisher"}, "acrArtifactStoreName": - {"value": "ubuntu-acr"}, "acrManifestName": {"value": "ubuntu-nf-nsd-acr-manifest-1-0-0"}, - "armTemplateName": {"value": "ubuntu-vm-nfdg-nfd-artifact"}, "armTemplateVersion": - {"value": "1.0.0"}}, "mode": "Incremental"}}' + 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 @@ -2363,29 +2410,29 @@ interactions: Connection: - keep-alive Content-Length: - - '1927' + - '2062' Content-Type: - application/json ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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_1690378985","name":"AOSM_CLI_deployment_1690378985","type":"Microsoft.Resources/deployments","properties":{"templateHash":"6106670278831411745","parameters":{"location":{"type":"String","value":"uksouth"},"publisherName":{"type":"String","value":"ubuntuPublisher"},"acrArtifactStoreName":{"type":"String","value":"ubuntu-acr"},"acrManifestName":{"type":"String","value":"ubuntu-nf-nsd-acr-manifest-1-0-0"},"armTemplateName":{"type":"String","value":"ubuntu-vm-nfdg-nfd-artifact"},"armTemplateVersion":{"type":"String","value":"1.0.0"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2023-07-26T13:43:08.4539954Z","duration":"PT0.0006676S","correlationId":"a84edfe4-d8b7-4c90-92aa-02ca81149717","providers":[{"namespace":"Microsoft.Hybridnetwork","resourceTypes":[{"resourceType":"publishers/artifactStores/artifactManifests","locations":["uksouth"]}]}],"dependencies":[]}}' + 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_1690378985/operationStatuses/08585112278979827087?api-version=2022-09-01 + - 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: - - '1043' + - '1051' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:43:08 GMT + - Thu, 27 Jul 2023 08:39:13 GMT expires: - '-1' pragma: @@ -2395,7 +2442,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 201 message: Created @@ -2413,21 +2460,21 @@ interactions: ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/08585112278979827087?api-version=2022-09-01 + 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":"Running"}' + string: '{"status":"Accepted"}' headers: cache-control: - no-cache content-length: - - '20' + - '21' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:43:09 GMT + - Thu, 27 Jul 2023 08:39:13 GMT expires: - '-1' pragma: @@ -2455,24 +2502,24 @@ interactions: ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/3a55f1d1-5877-4483-abfa-ef6f900f02d8*0A2C88351F91E19B08EFFAF13C02A492976D31AA01E04643FC90923CE153B778?api-version=2020-01-01-preview + 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/3a55f1d1-5877-4483-abfa-ef6f900f02d8*0A2C88351F91E19B08EFFAF13C02A492976D31AA01E04643FC90923CE153B778","name":"3a55f1d1-5877-4483-abfa-ef6f900f02d8*0A2C88351F91E19B08EFFAF13C02A492976D31AA01E04643FC90923CE153B778","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/networkServiceDesignGroups/ubuntu","status":"Succeeded","startTime":"2023-07-26T13:42:59.410368Z","endTime":"2023-07-26T13:43:00.838134Z","properties":null}' + 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: - - '607' + - '609' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:43:31 GMT + - Thu, 27 Jul 2023 08:39:36 GMT etag: - - '"01009b20-0000-1100-0000-64c122e40000"' + - '"0200867a-0000-1100-0000-64c22d2b0000"' expires: - '-1' pragma: @@ -2502,24 +2549,24 @@ interactions: ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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":"patrykkulik@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-26T13:42:58.6170624Z"},"properties":{"description":null,"provisioningState":"Succeeded"}}' + 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: - - '603' + - '604' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:43:31 GMT + - Thu, 27 Jul 2023 08:39:36 GMT etag: - - '"05001b05-0000-1100-0000-64c122e50000"' + - '"010031fe-0000-1100-0000-64c22d2b0000"' expires: - '-1' pragma: @@ -2551,9 +2598,9 @@ interactions: ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/08585112278979827087?api-version=2022-09-01 + 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"}' @@ -2565,7 +2612,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:43:39 GMT + - Thu, 27 Jul 2023 08:39:43 GMT expires: - '-1' pragma: @@ -2593,21 +2640,21 @@ interactions: ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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_1690378985","name":"AOSM_CLI_deployment_1690378985","type":"Microsoft.Resources/deployments","properties":{"templateHash":"6106670278831411745","parameters":{"location":{"type":"String","value":"uksouth"},"publisherName":{"type":"String","value":"ubuntuPublisher"},"acrArtifactStoreName":{"type":"String","value":"ubuntu-acr"},"acrManifestName":{"type":"String","value":"ubuntu-nf-nsd-acr-manifest-1-0-0"},"armTemplateName":{"type":"String","value":"ubuntu-vm-nfdg-nfd-artifact"},"armTemplateVersion":{"type":"String","value":"1.0.0"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2023-07-26T13:43:29.9461841Z","duration":"PT21.4928563S","correlationId":"a84edfe4-d8b7-4c90-92aa-02ca81149717","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-nf-nsd-acr-manifest-1-0-0"}]}}' + 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: - - '1296' + - '1308' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:43:40 GMT + - Thu, 27 Jul 2023 08:39:45 GMT expires: - '-1' pragma: @@ -2624,7 +2671,7 @@ interactions: - 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.8.9.13224", "templateHash": "5366007890796286067"}}, "parameters": {"location": + "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": @@ -2632,29 +2679,25 @@ interactions: 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"}}, "armTemplateVersion": - {"type": "string", "defaultValue": "1.0.0", "metadata": {"description": "The - version that you want to name the NF template artifact, in format A-B-C. e.g. - 6-13-0. Suggestion that this matches as best possible the SIMPL released version. - If testing for development, you can use any numbers you like."}}}, "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) 1.0.0."}}, - "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 + 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}]", + ["{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}"}, - "armTemplateName": "ubuntu-vm-nfdg-nfd-artifact"}, "resources": [{"type": "Microsoft.Hybridnetwork/publishers/configurationGroupSchemas", + "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", @@ -2665,18 +2708,18 @@ interactions: {"id": "[resourceId(''Microsoft.Hybridnetwork/publishers/configurationGroupSchemas'', parameters(''publisherName''), ''ubuntu_ConfigGroupSchema'')]"}}, "nfvisFromSite": {"nfvi1": {"name": "[parameters(''nfviSiteName'')]", "type": "AzureCore"}}, - "resourceElementTemplates": [{"name": "ubuntu-resource-element", "type": "NetworkFunctionDefinition", - "configuration": {"artifactProfile": {"artifactStoreReference": {"id": "[resourceId(''Microsoft.HybridNetwork/publishers/artifactStores'', - parameters(''publisherName''), parameters(''acrArtifactStoreName''))]"}, "artifactName": - "[variables(''armTemplateName'')]", "artifactVersion": "[parameters(''armTemplateVersion'')]"}, - "templateType": "ArmTemplate", "parameterValues": "[string(variables(''$fxv#1''))]"}, - "dependsOnProfile": {"installDependsOn": [], "uninstallDependsOn": [], "updateDependsOn": - []}}]}, "dependsOn": ["[resourceId(''Microsoft.Hybridnetwork/publishers/configurationGroupSchemas'', + "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"}, "armTemplateVersion": {"value": "1.0.0"}}, "mode": "Incremental"}}' + "ubuntu_NFVI"}}, "mode": "Incremental"}}' headers: Accept: - application/json @@ -2687,27 +2730,27 @@ interactions: Connection: - keep-alive Content-Length: - - '4946' + - '4527' Content-Type: - application/json ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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_1690379023","name":"AOSM_CLI_deployment_1690379023","type":"Microsoft.Resources/deployments","properties":{"templateHash":"5366007890796286067","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"},"armTemplateVersion":{"type":"String","value":"1.0.0"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"0001-01-01T00:00:00Z","duration":"PT0S","correlationId":"cb832760-e51d-4aa9-9806-81edb0e7c6c6","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"}]}}' + 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: - - '2318' + - '2264' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:43:45 GMT + - Thu, 27 Jul 2023 08:39:50 GMT expires: - '-1' pragma: @@ -2728,7 +2771,7 @@ interactions: - 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.8.9.13224", "templateHash": "5366007890796286067"}}, "parameters": {"location": + "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": @@ -2736,29 +2779,25 @@ interactions: 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"}}, "armTemplateVersion": - {"type": "string", "defaultValue": "1.0.0", "metadata": {"description": "The - version that you want to name the NF template artifact, in format A-B-C. e.g. - 6-13-0. Suggestion that this matches as best possible the SIMPL released version. - If testing for development, you can use any numbers you like."}}}, "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) 1.0.0."}}, - "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 + 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}]", + ["{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}"}, - "armTemplateName": "ubuntu-vm-nfdg-nfd-artifact"}, "resources": [{"type": "Microsoft.Hybridnetwork/publishers/configurationGroupSchemas", + "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", @@ -2769,18 +2808,18 @@ interactions: {"id": "[resourceId(''Microsoft.Hybridnetwork/publishers/configurationGroupSchemas'', parameters(''publisherName''), ''ubuntu_ConfigGroupSchema'')]"}}, "nfvisFromSite": {"nfvi1": {"name": "[parameters(''nfviSiteName'')]", "type": "AzureCore"}}, - "resourceElementTemplates": [{"name": "ubuntu-resource-element", "type": "NetworkFunctionDefinition", - "configuration": {"artifactProfile": {"artifactStoreReference": {"id": "[resourceId(''Microsoft.HybridNetwork/publishers/artifactStores'', - parameters(''publisherName''), parameters(''acrArtifactStoreName''))]"}, "artifactName": - "[variables(''armTemplateName'')]", "artifactVersion": "[parameters(''armTemplateVersion'')]"}, - "templateType": "ArmTemplate", "parameterValues": "[string(variables(''$fxv#1''))]"}, - "dependsOnProfile": {"installDependsOn": [], "uninstallDependsOn": [], "updateDependsOn": - []}}]}, "dependsOn": ["[resourceId(''Microsoft.Hybridnetwork/publishers/configurationGroupSchemas'', + "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"}, "armTemplateVersion": {"value": "1.0.0"}}, "mode": "Incremental"}}' + "ubuntu_NFVI"}}, "mode": "Incremental"}}' headers: Accept: - application/json @@ -2791,29 +2830,29 @@ interactions: Connection: - keep-alive Content-Length: - - '4946' + - '4527' Content-Type: - application/json ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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_1690379023","name":"AOSM_CLI_deployment_1690379023","type":"Microsoft.Resources/deployments","properties":{"templateHash":"5366007890796286067","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"},"armTemplateVersion":{"type":"String","value":"1.0.0"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2023-07-26T13:43:47.0987333Z","duration":"PT0.0004251S","correlationId":"c537f6f3-9668-4475-a9ee-6c4b21a5deb5","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"}]}}' + 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_1690379023/operationStatuses/08585112278587615767?api-version=2022-09-01 + - 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: - - '1882' + - '1828' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:43:46 GMT + - Thu, 27 Jul 2023 08:39:53 GMT expires: - '-1' pragma: @@ -2823,7 +2862,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1198' status: code: 201 message: Created @@ -2841,9 +2880,9 @@ interactions: ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/08585112278587615767?api-version=2022-09-01 + 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"}' @@ -2855,7 +2894,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:43:46 GMT + - Thu, 27 Jul 2023 08:39:53 GMT expires: - '-1' pragma: @@ -2883,9 +2922,9 @@ interactions: ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/08585112278587615767?api-version=2022-09-01 + 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"}' @@ -2897,7 +2936,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:44:17 GMT + - Thu, 27 Jul 2023 08:40:23 GMT expires: - '-1' pragma: @@ -2925,9 +2964,9 @@ interactions: ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/08585112278587615767?api-version=2022-09-01 + 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"}' @@ -2939,7 +2978,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:44:47 GMT + - Thu, 27 Jul 2023 08:40:53 GMT expires: - '-1' pragma: @@ -2967,21 +3006,21 @@ interactions: ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.8.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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_1690379023","name":"AOSM_CLI_deployment_1690379023","type":"Microsoft.Resources/deployments","properties":{"templateHash":"5366007890796286067","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"},"armTemplateVersion":{"type":"String","value":"1.0.0"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2023-07-26T13:44:28.2026218Z","duration":"PT41.1043136S","correlationId":"c537f6f3-9668-4475-a9ee-6c4b21a5deb5","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"}]}}' + 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: - - '2332' + - '2278' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:44:47 GMT + - Thu, 27 Jul 2023 08:40:54 GMT expires: - '-1' pragma: @@ -3009,24 +3048,24 @@ interactions: ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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-nf-nsd-acr-manifest-1-0-0?api-version=2023-04-01-preview + 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-nf-nsd-acr-manifest-1-0-0","name":"ubuntu-nf-nsd-acr-manifest-1-0-0","type":"microsoft.hybridnetwork/publishers/artifactstores/artifactmanifests","location":"uksouth","systemData":{"createdBy":"patrykkulik@microsoft.com","createdByType":"User","createdAt":"2023-07-26T13:43:10.6373425Z","lastModifiedBy":"patrykkulik@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-26T13:43:10.6373425Z"},"properties":{"artifacts":[{"artifactName":"ubuntu-vm-nfdg-nfd-artifact","artifactType":"ArmTemplate","artifactVersion":"1.0.0"}],"artifactManifestState":"Uploading","provisioningState":"Succeeded"}}' + 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: - - '811' + - '820' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:44:47 GMT + - Thu, 27 Jul 2023 08:40:54 GMT etag: - - '"010031da-0000-1100-0000-64c122fd0000"' + - '"1000417f-0000-1100-0000-64c22d420000"' expires: - '-1' pragma: @@ -3060,22 +3099,22 @@ interactions: ParameterSetName: - -f --debug User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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-nf-nsd-acr-manifest-1-0-0/listCredential?api-version=2023-04-01-preview + 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-nf-nsd-acr-manifest-1-0-0","acrToken":"DXjNIWkqhbrWo0qHzqML5VnpFDPvUdlRUWQyObizc2+ACRBNLJYR","acrServerUrl":"https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io","repositories":["ubuntu-vm-nfdg-nfd-artifact"],"expiry":"2023-07-27T13:44:48.98326+00:00","credentialType":"AzureContainerRegistryScopedToken"}' + 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: - - '327' + - '332' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:44:48 GMT + - Thu, 27 Jul 2023 08:40:55 GMT expires: - '-1' pragma: @@ -3093,7 +3132,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1199' status: code: 200 message: OK @@ -3113,11 +3152,11 @@ interactions: User-Agent: - python-requests/2.26.0 method: POST - uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-nfdg-nfd-artifact/blobs/uploads/ + 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-nfd-artifact","Action":"pull"},{"Type":"repository","Name":"ubuntu-vm-nfdg-nfd-artifact","Action":"push"}]}]} + 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: @@ -3129,11 +3168,11 @@ interactions: connection: - keep-alive content-length: - - '296' + - '294' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:44:53 GMT + - Thu, 27 Jul 2023 08:40:59 GMT docker-distribution-api-version: - registry/2.0 server: @@ -3142,7 +3181,7 @@ interactions: - 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-nfd-artifact:pull,push" + - 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: @@ -3162,17 +3201,17 @@ interactions: User-Agent: - oras-py method: GET - uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/oauth2/token?service=ubuntupublisherubuntuacr2315dcfa83.azurecr.io&scope=repository%3Aubuntu-vm-nfdg-nfd-artifact%3Apull%2Cpush + 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.eyJqdGkiOiJmNTFmNWFhZC1lNWJmLTQxMzUtYWIyNy01ODM2NWE4ZWQxMzMiLCJzdWIiOiJ1YnVudHUtbmYtbnNkLWFjci1tYW5pZmVzdC0xLTAtMCIsIm5iZiI6MTY5MDM3ODE5MywiZXhwIjoxNjkwMzc5OTkzLCJpYXQiOjE2OTAzNzgxOTMsImlzcyI6IkF6dXJlIENvbnRhaW5lciBSZWdpc3RyeSIsImF1ZCI6InVidW50dXB1Ymxpc2hlcnVidW50dWFjcjIzMTVkY2ZhODMuYXp1cmVjci5pbyIsInZlcnNpb24iOiIyLjAiLCJyaWQiOiI1MzY0OTExODIxMzE0ZDY3OTI2ZGE3YTNjZGMxNzRmOCIsImFjY2VzcyI6W3siVHlwZSI6InJlcG9zaXRvcnkiLCJOYW1lIjoidWJ1bnR1LXZtLW5mZGctbmZkLWFydGlmYWN0IiwiQWN0aW9ucyI6WyJwdWxsIiwicHVzaCJdfV0sInJvbGVzIjpbXSwiZ3JhbnRfdHlwZSI6ImFjY2Vzc190b2tlbiJ9.f-6ct5FdjqSbHu60kVj2eOYwB1L81Yv0uVoCIZaELx12YGISRbIDa9tKy4t2_Xo1IFnwDaQtZnNJ49r3Je0Nrm8gx-9umkCUoA79v4_mEe57098Tu0DhazqAwgSH93n28OwvlDJVOXwxliBjHpLA47BvSGOaYT0C_me2j-2v5M6jw7Xduer71y4AAgVZ4XgJjJK9XZ_WuO0jYw0U7zlbxpACLR2FtRcKKB2uGwpSsvkmWBY3oadfjZf_Ut3amI1AL5XeQ478zaPqyrqRAsLQJP35Xm66J2hU5XSysq7KpVq6iYfzQPIuoqJ_7DayJp-mSiauP075KbactrUPV8lrCw"}' + 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: - - Wed, 26 Jul 2023 13:44:53 GMT + - Thu, 27 Jul 2023 08:40:59 GMT server: - openresty strict-transport-security: @@ -3200,7 +3239,7 @@ interactions: User-Agent: - python-requests/2.26.0 method: POST - uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-nfdg-nfd-artifact/blobs/uploads/ + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-nfdg_nf_artifact/blobs/uploads/ response: body: string: '' @@ -3215,13 +3254,13 @@ interactions: content-length: - '0' date: - - Wed, 26 Jul 2023 13:44:53 GMT + - Thu, 27 Jul 2023 08:40:59 GMT docker-distribution-api-version: - registry/2.0 docker-upload-uuid: - - 1d1c84ae-6eb6-42cf-92ca-ac315c1d1f0e + - 64e17226-dcba-4542-8c42-952f36a5c04a location: - - /v2/ubuntu-vm-nfdg-nfd-artifact/blobs/uploads/1d1c84ae-6eb6-42cf-92ca-ac315c1d1f0e?_nouploadcache=false&_state=AY-45rXcDwt4GOR8MpkUylQseW81p_yDQO_9ZiJ7yKF7Ik5hbWUiOiJ1YnVudHUtdm0tbmZkZy1uZmQtYXJ0aWZhY3QiLCJVVUlEIjoiMWQxYzg0YWUtNmViNi00MmNmLTkyY2EtYWMzMTVjMWQxZjBlIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIzLTA3LTI2VDEzOjQ0OjUzLjgzNzU3NDEwOVoifQ%3D%3D + - /v2/ubuntu-vm-nfdg_nf_artifact/blobs/uploads/64e17226-dcba-4542-8c42-952f36a5c04a?_nouploadcache=false&_state=nq8UY1SfWZMMl2xnuQyqavmAEe22d70CJZyWcyX--MZ7Ik5hbWUiOiJ1YnVudHUtdm0tbmZkZ19uZl9hcnRpZmFjdCIsIlVVSUQiOiI2NGUxNzIyNi1kY2JhLTQ1NDItOGM0Mi05NTJmMzZhNWMwNGEiLCJPZmZzZXQiOjAsIlN0YXJ0ZWRBdCI6IjIwMjMtMDctMjdUMDg6NDA6NTkuNjc5NzE4MTA0WiJ9 range: - 0-0 server: @@ -3237,8 +3276,8 @@ interactions: - 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\": \"711670018733537283\"\n }\n },\n \"parameters\": + {\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\": @@ -3263,7 +3302,7 @@ interactions: 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_NF{0}', + \ \"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\": @@ -3282,13 +3321,13 @@ interactions: Connection: - keep-alive Content-Length: - - '3321' + - '3329' Content-Type: - application/octet-stream User-Agent: - python-requests/2.26.0 method: PUT - uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-nfdg-nfd-artifact/blobs/uploads/1d1c84ae-6eb6-42cf-92ca-ac315c1d1f0e?_nouploadcache=false&_state=AY-45rXcDwt4GOR8MpkUylQseW81p_yDQO_9ZiJ7yKF7Ik5hbWUiOiJ1YnVudHUtdm0tbmZkZy1uZmQtYXJ0aWZhY3QiLCJVVUlEIjoiMWQxYzg0YWUtNmViNi00MmNmLTkyY2EtYWMzMTVjMWQxZjBlIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIzLTA3LTI2VDEzOjQ0OjUzLjgzNzU3NDEwOVoifQ%3D%3D&digest=sha256%3A730d733b8d58f3c59acb7fa0e0195eca7e404af75de22d6c4d62ecd16d95d9f2 + 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: '' @@ -3303,13 +3342,13 @@ interactions: content-length: - '0' date: - - Wed, 26 Jul 2023 13:44:54 GMT + - Thu, 27 Jul 2023 08:40:59 GMT docker-content-digest: - - sha256:730d733b8d58f3c59acb7fa0e0195eca7e404af75de22d6c4d62ecd16d95d9f2 + - sha256:203ab85e769c53b5698a5596a042c3190fdb91c36b361bb0fcc7700a1186af93 docker-distribution-api-version: - registry/2.0 location: - - /v2/ubuntu-vm-nfdg-nfd-artifact/blobs/sha256:730d733b8d58f3c59acb7fa0e0195eca7e404af75de22d6c4d62ecd16d95d9f2 + - /v2/ubuntu-vm-nfdg_nf_artifact/blobs/sha256:203ab85e769c53b5698a5596a042c3190fdb91c36b361bb0fcc7700a1186af93 server: - openresty strict-transport-security: @@ -3336,11 +3375,11 @@ interactions: User-Agent: - python-requests/2.26.0 method: POST - uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-nfdg-nfd-artifact/blobs/uploads/ + 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-nfd-artifact","Action":"pull"},{"Type":"repository","Name":"ubuntu-vm-nfdg-nfd-artifact","Action":"push"}]}]} + 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: @@ -3352,11 +3391,11 @@ interactions: connection: - keep-alive content-length: - - '296' + - '294' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:44:54 GMT + - Thu, 27 Jul 2023 08:41:00 GMT docker-distribution-api-version: - registry/2.0 server: @@ -3365,7 +3404,7 @@ interactions: - 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-nfd-artifact:pull,push" + - 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: @@ -3385,17 +3424,17 @@ interactions: User-Agent: - oras-py method: GET - uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/oauth2/token?service=ubuntupublisherubuntuacr2315dcfa83.azurecr.io&scope=repository%3Aubuntu-vm-nfdg-nfd-artifact%3Apull%2Cpush + 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.eyJqdGkiOiI3ZTk0MTNkYy1mMTFlLTRkOTMtOTM0Ny05NDJkOWQ1MDU4NWEiLCJzdWIiOiJ1YnVudHUtbmYtbnNkLWFjci1tYW5pZmVzdC0xLTAtMCIsIm5iZiI6MTY5MDM3ODE5NCwiZXhwIjoxNjkwMzc5OTk0LCJpYXQiOjE2OTAzNzgxOTQsImlzcyI6IkF6dXJlIENvbnRhaW5lciBSZWdpc3RyeSIsImF1ZCI6InVidW50dXB1Ymxpc2hlcnVidW50dWFjcjIzMTVkY2ZhODMuYXp1cmVjci5pbyIsInZlcnNpb24iOiIyLjAiLCJyaWQiOiI1MzY0OTExODIxMzE0ZDY3OTI2ZGE3YTNjZGMxNzRmOCIsImFjY2VzcyI6W3siVHlwZSI6InJlcG9zaXRvcnkiLCJOYW1lIjoidWJ1bnR1LXZtLW5mZGctbmZkLWFydGlmYWN0IiwiQWN0aW9ucyI6WyJwdWxsIiwicHVzaCJdfV0sInJvbGVzIjpbXSwiZ3JhbnRfdHlwZSI6ImFjY2Vzc190b2tlbiJ9.Pr7HHAn6OoeD5cubZC12BEpUxFWZ3zlZv7V82O2n38mWkiaeP979NedrM9RqXuZPEa04sWMItETK70nazA1EKly1pu8yTL1C_G2ZaEAKIGiihyQZnhMFLw98A7ouarE1DD-gUZcRXPMp4NUzuFExp1Od8jf-MkOcya7OJVgmV_acTrYcWjrFOWYjgFsEopViivwps7zYYTo3gsL4gv11FI3fU2WsWHQ7NZDZJrvs_ULhaaknmpFgO4xgWhceN4XcYqP8S8fs2fSWaIoHhA63H3oTDSFCkBxjDgvjsCUFtZQhGFUTpKe6OzxOPL_Fgh_MUhUlynqslQZQbrIuOdwBKw"}' + 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: - - Wed, 26 Jul 2023 13:44:54 GMT + - Thu, 27 Jul 2023 08:41:00 GMT server: - openresty strict-transport-security: @@ -3423,7 +3462,7 @@ interactions: User-Agent: - python-requests/2.26.0 method: POST - uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-nfdg-nfd-artifact/blobs/uploads/ + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-nfdg_nf_artifact/blobs/uploads/ response: body: string: '' @@ -3438,13 +3477,13 @@ interactions: content-length: - '0' date: - - Wed, 26 Jul 2023 13:44:54 GMT + - Thu, 27 Jul 2023 08:41:00 GMT docker-distribution-api-version: - registry/2.0 docker-upload-uuid: - - 006cb224-a270-4a9e-b88f-9d754846feb4 + - 938244b7-a9b2-43fd-8f26-261893055781 location: - - /v2/ubuntu-vm-nfdg-nfd-artifact/blobs/uploads/006cb224-a270-4a9e-b88f-9d754846feb4?_nouploadcache=false&_state=9SltznBEOSjQ234hgy5IlEZ1HIW-nv9btgBk1Rj-7Od7Ik5hbWUiOiJ1YnVudHUtdm0tbmZkZy1uZmQtYXJ0aWZhY3QiLCJVVUlEIjoiMDA2Y2IyMjQtYTI3MC00YTllLWI4OGYtOWQ3NTQ4NDZmZWI0IiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIzLTA3LTI2VDEzOjQ0OjU0LjExNTYyMzczNloifQ%3D%3D + - /v2/ubuntu-vm-nfdg_nf_artifact/blobs/uploads/938244b7-a9b2-43fd-8f26-261893055781?_nouploadcache=false&_state=xB8zt3tzNjZbQZ9DnI8cLTk3-cPsOldGe7a6nyrcoxB7Ik5hbWUiOiJ1YnVudHUtdm0tbmZkZ19uZl9hcnRpZmFjdCIsIlVVSUQiOiI5MzgyNDRiNy1hOWIyLTQzZmQtOGYyNi0yNjE4OTMwNTU3ODEiLCJPZmZzZXQiOjAsIlN0YXJ0ZWRBdCI6IjIwMjMtMDctMjdUMDg6NDE6MDAuMDkzNzQ4NTQzWiJ9 range: - 0-0 server: @@ -3473,7 +3512,7 @@ interactions: User-Agent: - python-requests/2.26.0 method: PUT - uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-nfdg-nfd-artifact/blobs/uploads/006cb224-a270-4a9e-b88f-9d754846feb4?_nouploadcache=false&_state=9SltznBEOSjQ234hgy5IlEZ1HIW-nv9btgBk1Rj-7Od7Ik5hbWUiOiJ1YnVudHUtdm0tbmZkZy1uZmQtYXJ0aWZhY3QiLCJVVUlEIjoiMDA2Y2IyMjQtYTI3MC00YTllLWI4OGYtOWQ3NTQ4NDZmZWI0IiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIzLTA3LTI2VDEzOjQ0OjU0LjExNTYyMzczNloifQ%3D%3D&digest=sha256%3Ae3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + 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: '' @@ -3488,13 +3527,13 @@ interactions: content-length: - '0' date: - - Wed, 26 Jul 2023 13:44:54 GMT + - 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-nfd-artifact/blobs/sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + - /v2/ubuntu-vm-nfdg_nf_artifact/blobs/sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 server: - openresty strict-transport-security: @@ -3509,8 +3548,8 @@ interactions: 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": 3321, - "digest": "sha256:730d733b8d58f3c59acb7fa0e0195eca7e404af75de22d6c4d62ecd16d95d9f2", + "layers": [{"mediaType": "application/vnd.oci.image.layer.v1.tar", "size": 3329, + "digest": "sha256:203ab85e769c53b5698a5596a042c3190fdb91c36b361bb0fcc7700a1186af93", "annotations": {"org.opencontainers.image.title": "nf_definition.json"}}], "annotations": {}}' headers: @@ -3527,11 +3566,11 @@ interactions: User-Agent: - python-requests/2.26.0 method: PUT - uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-nfdg-nfd-artifact/manifests/1.0.0 + 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-nfd-artifact","Action":"pull"},{"Type":"repository","Name":"ubuntu-vm-nfdg-nfd-artifact","Action":"push"}]}]} + 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: @@ -3543,11 +3582,11 @@ interactions: connection: - keep-alive content-length: - - '296' + - '294' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:44:54 GMT + - Thu, 27 Jul 2023 08:41:00 GMT docker-distribution-api-version: - registry/2.0 server: @@ -3556,7 +3595,7 @@ interactions: - 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-nfd-artifact:push,pull" + - 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: @@ -3576,17 +3615,17 @@ interactions: User-Agent: - oras-py method: GET - uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/oauth2/token?service=ubuntupublisherubuntuacr2315dcfa83.azurecr.io&scope=repository%3Aubuntu-vm-nfdg-nfd-artifact%3Apush%2Cpull + 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.eyJqdGkiOiIyMzllN2Q1ZS1jODg2LTQxOGYtODhhNC1jNTc5M2JlZjQ3ZTciLCJzdWIiOiJ1YnVudHUtbmYtbnNkLWFjci1tYW5pZmVzdC0xLTAtMCIsIm5iZiI6MTY5MDM3ODE5NCwiZXhwIjoxNjkwMzc5OTk0LCJpYXQiOjE2OTAzNzgxOTQsImlzcyI6IkF6dXJlIENvbnRhaW5lciBSZWdpc3RyeSIsImF1ZCI6InVidW50dXB1Ymxpc2hlcnVidW50dWFjcjIzMTVkY2ZhODMuYXp1cmVjci5pbyIsInZlcnNpb24iOiIyLjAiLCJyaWQiOiI1MzY0OTExODIxMzE0ZDY3OTI2ZGE3YTNjZGMxNzRmOCIsImFjY2VzcyI6W3siVHlwZSI6InJlcG9zaXRvcnkiLCJOYW1lIjoidWJ1bnR1LXZtLW5mZGctbmZkLWFydGlmYWN0IiwiQWN0aW9ucyI6WyJwdXNoIiwicHVsbCJdfV0sInJvbGVzIjpbXSwiZ3JhbnRfdHlwZSI6ImFjY2Vzc190b2tlbiJ9.jyNup_Z8NybheBzUNkyOkzqwN3VAewsPtwjgFcgo4KnpCl3pcAjaBlnKloPgKmfgmTbNSxam9DruQXewae9tYDq4V6qQOyTngu5DtJPeqeBOs_rioO6mPPPE_rh2R2RC_smxIDRV6RLgyj2Gp0sexSvD0OR4-IkVkesmZ_ujjxK9hwchV_BU_SaydxArhln1U29DMkuujns4_5jWJfUvnuINCHDOUg6G9tbdm4vowHezvRbiXhXHSbdWMWJIaPBliS0-gV41LcvhOkBHH5zOMhjTm5t2czZbsnDZ459nsYp0oTSCzw0wDEzQ-OU0w6vPw6B7vffDmZ1ctHZUgo_RKg"}' + 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: - - Wed, 26 Jul 2023 13:44:54 GMT + - Thu, 27 Jul 2023 08:41:00 GMT server: - openresty strict-transport-security: @@ -3602,8 +3641,8 @@ interactions: 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": 3321, - "digest": "sha256:730d733b8d58f3c59acb7fa0e0195eca7e404af75de22d6c4d62ecd16d95d9f2", + "layers": [{"mediaType": "application/vnd.oci.image.layer.v1.tar", "size": 3329, + "digest": "sha256:203ab85e769c53b5698a5596a042c3190fdb91c36b361bb0fcc7700a1186af93", "annotations": {"org.opencontainers.image.title": "nf_definition.json"}}], "annotations": {}}' headers: @@ -3620,7 +3659,7 @@ interactions: User-Agent: - python-requests/2.26.0 method: PUT - uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-nfdg-nfd-artifact/manifests/1.0.0 + uri: https://ubuntupublisherubuntuacr2315dcfa83.azurecr.io/v2/ubuntu-vm-nfdg_nf_artifact/manifests/1.0.0 response: body: string: '' @@ -3635,13 +3674,13 @@ interactions: content-length: - '0' date: - - Wed, 26 Jul 2023 13:44:54 GMT + - Thu, 27 Jul 2023 08:41:00 GMT docker-content-digest: - - sha256:d9933b93bccf8761b3730a85d86b8f01555c8a4b73e36a8d31de964e5ff01594 + - sha256:16c22b2acdf0e0e39bd304ad53dd567b5c959774319563df7958625e9bdc5088 docker-distribution-api-version: - registry/2.0 location: - - /v2/ubuntu-vm-nfdg-nfd-artifact/manifests/sha256:d9933b93bccf8761b3730a85d86b8f01555c8a4b73e36a8d31de964e5ff01594 + - /v2/ubuntu-vm-nfdg_nf_artifact/manifests/sha256:16c22b2acdf0e0e39bd304ad53dd567b5c959774319563df7958625e9bdc5088 server: - openresty strict-transport-security: @@ -3668,8 +3707,8 @@ interactions: ParameterSetName: - --definition-type -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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: @@ -3677,7 +3716,7 @@ interactions: string: 'null' headers: azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/d58469b4-88f9-4f43-8e05-348c3f8694f2*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + - 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: @@ -3685,13 +3724,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:44:55 GMT + - Thu, 27 Jul 2023 08:41:01 GMT etag: - - '"0200f8a2-0000-1100-0000-64c123570000"' + - '"06001c9a-0000-1100-0000-64c22d9d0000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/d58469b4-88f9-4f43-8e05-348c3f8694f2*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + - 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: @@ -3721,16 +3760,16 @@ interactions: ParameterSetName: - --definition-type -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/d58469b4-88f9-4f43-8e05-348c3f8694f2*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + 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/d58469b4-88f9-4f43-8e05-348c3f8694f2*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5","name":"d58469b4-88f9-4f43-8e05-348c3f8694f2*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-26T13:44:55.6221799Z"}' + 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/d58469b4-88f9-4f43-8e05-348c3f8694f2*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + - 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: @@ -3738,13 +3777,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:44:55 GMT + - Thu, 27 Jul 2023 08:41:01 GMT etag: - - '"01006121-0000-1100-0000-64c123570000"' + - '"0200bb7b-0000-1100-0000-64c22d9d0000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/d58469b4-88f9-4f43-8e05-348c3f8694f2*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + - 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: @@ -3768,16 +3807,16 @@ interactions: ParameterSetName: - --definition-type -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/d58469b4-88f9-4f43-8e05-348c3f8694f2*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + 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/d58469b4-88f9-4f43-8e05-348c3f8694f2*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5","name":"d58469b4-88f9-4f43-8e05-348c3f8694f2*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-26T13:44:55.6221799Z"}' + 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/d58469b4-88f9-4f43-8e05-348c3f8694f2*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + - 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: @@ -3785,13 +3824,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:45:26 GMT + - Thu, 27 Jul 2023 08:41:32 GMT etag: - - '"01006121-0000-1100-0000-64c123570000"' + - '"0200bb7b-0000-1100-0000-64c22d9d0000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/d58469b4-88f9-4f43-8e05-348c3f8694f2*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + - 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: @@ -3815,16 +3854,16 @@ interactions: ParameterSetName: - --definition-type -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/d58469b4-88f9-4f43-8e05-348c3f8694f2*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + 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/d58469b4-88f9-4f43-8e05-348c3f8694f2*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5","name":"d58469b4-88f9-4f43-8e05-348c3f8694f2*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-26T13:44:55.6221799Z"}' + 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/d58469b4-88f9-4f43-8e05-348c3f8694f2*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + - 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: @@ -3832,13 +3871,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:45:58 GMT + - Thu, 27 Jul 2023 08:42:01 GMT etag: - - '"01006121-0000-1100-0000-64c123570000"' + - '"0200bb7b-0000-1100-0000-64c22d9d0000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/d58469b4-88f9-4f43-8e05-348c3f8694f2*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + - 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: @@ -3862,13 +3901,13 @@ interactions: ParameterSetName: - --definition-type -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/d58469b4-88f9-4f43-8e05-348c3f8694f2*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + 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/d58469b4-88f9-4f43-8e05-348c3f8694f2*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5","name":"d58469b4-88f9-4f43-8e05-348c3f8694f2*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-26T13:44:55.6221799Z","properties":null}' + 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 @@ -3877,9 +3916,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:46:28 GMT + - Thu, 27 Jul 2023 08:42:31 GMT etag: - - '"0100ce21-0000-1100-0000-64c1239a0000"' + - '"0200f67b-0000-1100-0000-64c22de00000"' expires: - '-1' pragma: @@ -3909,13 +3948,13 @@ interactions: ParameterSetName: - --definition-type -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/d58469b4-88f9-4f43-8e05-348c3f8694f2*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5?api-version=2020-01-01-preview + 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/d58469b4-88f9-4f43-8e05-348c3f8694f2*D624C07777555D34927C0A2B08D32D894F860B37ED62687F7FB2A1AE8B045BC5","name":"d58469b4-88f9-4f43-8e05-348c3f8694f2*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-26T13:44:55.6221799Z","properties":null}' + 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 @@ -3924,9 +3963,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:46:28 GMT + - Thu, 27 Jul 2023 08:42:31 GMT etag: - - '"0100ce21-0000-1100-0000-64c1239a0000"' + - '"0200f67b-0000-1100-0000-64c22de00000"' expires: - '-1' pragma: @@ -3958,8 +3997,8 @@ interactions: ParameterSetName: - --definition-type -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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: @@ -3967,7 +4006,7 @@ interactions: string: 'null' headers: azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/a5be6087-5cd5-4df1-b562-31bc65c2ffcc*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B?api-version=2020-01-01-preview + - 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: @@ -3975,13 +4014,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:46:29 GMT + - Thu, 27 Jul 2023 08:42:33 GMT etag: - - '"010084dc-0000-1100-0000-64c123b60000"' + - '"10002c82-0000-1100-0000-64c22df90000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/a5be6087-5cd5-4df1-b562-31bc65c2ffcc*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B?api-version=2020-01-01-preview + - 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: @@ -4011,16 +4050,16 @@ interactions: ParameterSetName: - --definition-type -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/a5be6087-5cd5-4df1-b562-31bc65c2ffcc*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B?api-version=2020-01-01-preview + 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/a5be6087-5cd5-4df1-b562-31bc65c2ffcc*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B","name":"a5be6087-5cd5-4df1-b562-31bc65c2ffcc*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-26T13:46:29.7049035Z"}' + 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/a5be6087-5cd5-4df1-b562-31bc65c2ffcc*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B?api-version=2020-01-01-preview + - 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: @@ -4028,13 +4067,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:46:29 GMT + - Thu, 27 Jul 2023 08:42:33 GMT etag: - - '"01000722-0000-1100-0000-64c123b50000"' + - '"02001e7c-0000-1100-0000-64c22df90000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/a5be6087-5cd5-4df1-b562-31bc65c2ffcc*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B?api-version=2020-01-01-preview + - 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: @@ -4058,13 +4097,13 @@ interactions: ParameterSetName: - --definition-type -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/a5be6087-5cd5-4df1-b562-31bc65c2ffcc*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B?api-version=2020-01-01-preview + 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/a5be6087-5cd5-4df1-b562-31bc65c2ffcc*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B","name":"a5be6087-5cd5-4df1-b562-31bc65c2ffcc*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-26T13:46:29.7049035Z","endTime":"2023-07-26T13:46:30.8639422Z","properties":null}' + 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 @@ -4073,9 +4112,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:47:00 GMT + - Thu, 27 Jul 2023 08:43:02 GMT etag: - - '"01000a22-0000-1100-0000-64c123b60000"' + - '"0200217c-0000-1100-0000-64c22dfd0000"' expires: - '-1' pragma: @@ -4105,13 +4144,13 @@ interactions: ParameterSetName: - --definition-type -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/a5be6087-5cd5-4df1-b562-31bc65c2ffcc*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B?api-version=2020-01-01-preview + 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/a5be6087-5cd5-4df1-b562-31bc65c2ffcc*A14CB3C906EF24FA3D408DD057F2AE24B571D82B0D5EA33C6DE47C5BDC4F2A9B","name":"a5be6087-5cd5-4df1-b562-31bc65c2ffcc*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-26T13:46:29.7049035Z","endTime":"2023-07-26T13:46:30.8639422Z","properties":null}' + 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 @@ -4120,9 +4159,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:47:00 GMT + - Thu, 27 Jul 2023 08:43:03 GMT etag: - - '"01000a22-0000-1100-0000-64c123b60000"' + - '"0200217c-0000-1100-0000-64c22dfd0000"' expires: - '-1' pragma: @@ -4154,8 +4193,8 @@ interactions: ParameterSetName: - --definition-type -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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: @@ -4163,7 +4202,7 @@ interactions: string: 'null' headers: azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/78045eb9-d757-4ced-93d2-8619c65398af*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443?api-version=2020-01-01-preview + - 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: @@ -4171,13 +4210,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:47:00 GMT + - Thu, 27 Jul 2023 08:43:04 GMT etag: - - '"0100f8dc-0000-1100-0000-64c123d50000"' + - '"1000e682-0000-1100-0000-64c22e190000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/78045eb9-d757-4ced-93d2-8619c65398af*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443?api-version=2020-01-01-preview + - 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: @@ -4207,30 +4246,30 @@ interactions: ParameterSetName: - --definition-type -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/78045eb9-d757-4ced-93d2-8619c65398af*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443?api-version=2020-01-01-preview + 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/78045eb9-d757-4ced-93d2-8619c65398af*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443","name":"78045eb9-d757-4ced-93d2-8619c65398af*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-26T13:47:01.359381Z"}' + 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/78045eb9-d757-4ced-93d2-8619c65398af*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443?api-version=2020-01-01-preview + - 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: - - '587' + - '588' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:47:01 GMT + - Thu, 27 Jul 2023 08:43:04 GMT etag: - - '"01005522-0000-1100-0000-64c123d50000"' + - '"02003d7c-0000-1100-0000-64c22e180000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/78045eb9-d757-4ced-93d2-8619c65398af*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443?api-version=2020-01-01-preview + - 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: @@ -4254,24 +4293,24 @@ interactions: ParameterSetName: - --definition-type -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/78045eb9-d757-4ced-93d2-8619c65398af*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443?api-version=2020-01-01-preview + 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/78045eb9-d757-4ced-93d2-8619c65398af*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443","name":"78045eb9-d757-4ced-93d2-8619c65398af*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-26T13:47:01.359381Z","endTime":"2023-07-26T13:47:15.9042981Z","properties":null}' + 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: - - '647' + - '648' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:47:31 GMT + - Thu, 27 Jul 2023 08:43:35 GMT etag: - - '"01006822-0000-1100-0000-64c123e30000"' + - '"02003f7c-0000-1100-0000-64c22e1e0000"' expires: - '-1' pragma: @@ -4301,24 +4340,24 @@ interactions: ParameterSetName: - --definition-type -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/78045eb9-d757-4ced-93d2-8619c65398af*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443?api-version=2020-01-01-preview + 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/78045eb9-d757-4ced-93d2-8619c65398af*D2486BCAB99E2BCF72D1AA248612DB2BD4F1B7EC473B74FDCBE40C6CD1EDB443","name":"78045eb9-d757-4ced-93d2-8619c65398af*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-26T13:47:01.359381Z","endTime":"2023-07-26T13:47:15.9042981Z","properties":null}' + 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: - - '647' + - '648' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:47:31 GMT + - Thu, 27 Jul 2023 08:43:35 GMT etag: - - '"01006822-0000-1100-0000-64c123e30000"' + - '"02003f7c-0000-1100-0000-64c22e1e0000"' expires: - '-1' pragma: @@ -4350,8 +4389,8 @@ interactions: ParameterSetName: - -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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: @@ -4359,7 +4398,7 @@ interactions: string: 'null' headers: azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/a9c7dd86-ed10-42dc-b97a-1fb63487ef75*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224?api-version=2020-01-01-preview + - 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: @@ -4367,13 +4406,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:47:33 GMT + - Thu, 27 Jul 2023 08:43:36 GMT etag: - - '"0100f039-0000-1100-0000-64c123f50000"' + - '"0300cd3d-0000-1100-0000-64c22e380000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/a9c7dd86-ed10-42dc-b97a-1fb63487ef75*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224?api-version=2020-01-01-preview + - 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: @@ -4403,16 +4442,16 @@ interactions: ParameterSetName: - -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/a9c7dd86-ed10-42dc-b97a-1fb63487ef75*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224?api-version=2020-01-01-preview + 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/a9c7dd86-ed10-42dc-b97a-1fb63487ef75*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224","name":"a9c7dd86-ed10-42dc-b97a-1fb63487ef75*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-26T13:47:33.5010058Z"}' + 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/a9c7dd86-ed10-42dc-b97a-1fb63487ef75*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224?api-version=2020-01-01-preview + - 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: @@ -4420,13 +4459,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:47:33 GMT + - Thu, 27 Jul 2023 08:43:36 GMT etag: - - '"01008b22-0000-1100-0000-64c123f50000"' + - '"02005a7c-0000-1100-0000-64c22e380000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/a9c7dd86-ed10-42dc-b97a-1fb63487ef75*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224?api-version=2020-01-01-preview + - 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: @@ -4450,13 +4489,13 @@ interactions: ParameterSetName: - -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/a9c7dd86-ed10-42dc-b97a-1fb63487ef75*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224?api-version=2020-01-01-preview + 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/a9c7dd86-ed10-42dc-b97a-1fb63487ef75*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224","name":"a9c7dd86-ed10-42dc-b97a-1fb63487ef75*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-26T13:47:33.5010058Z","endTime":"2023-07-26T13:47:36.3888318Z","properties":null}' + 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 @@ -4465,9 +4504,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:48:05 GMT + - Thu, 27 Jul 2023 08:44:06 GMT etag: - - '"01008f22-0000-1100-0000-64c123f80000"' + - '"0200637c-0000-1100-0000-64c22e3d0000"' expires: - '-1' pragma: @@ -4497,13 +4536,13 @@ interactions: ParameterSetName: - -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/a9c7dd86-ed10-42dc-b97a-1fb63487ef75*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224?api-version=2020-01-01-preview + 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/a9c7dd86-ed10-42dc-b97a-1fb63487ef75*1846D68E68668C8C67B84D44A208FE839BD2E9DD81A439CF0FA33146989C6224","name":"a9c7dd86-ed10-42dc-b97a-1fb63487ef75*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-26T13:47:33.5010058Z","endTime":"2023-07-26T13:47:36.3888318Z","properties":null}' + 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 @@ -4512,9 +4551,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:48:05 GMT + - Thu, 27 Jul 2023 08:44:06 GMT etag: - - '"01008f22-0000-1100-0000-64c123f80000"' + - '"0200637c-0000-1100-0000-64c22e3d0000"' expires: - '-1' pragma: @@ -4546,16 +4585,16 @@ interactions: ParameterSetName: - -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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-nf-nsd-acr-manifest-1-0-0?api-version=2023-04-01-preview + 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/f4730ac5-7a07-4e27-a171-d8c5b5aafcfc*E1780600141AA23F055FD4F1BF09AFB8B879A597CAB5AF25D9972BA80599BA79?api-version=2020-01-01-preview + - 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: @@ -4563,13 +4602,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:48:06 GMT + - Thu, 27 Jul 2023 08:44:08 GMT etag: - - '"0100cadd-0000-1100-0000-64c124160000"' + - '"1000cd83-0000-1100-0000-64c22e580000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/f4730ac5-7a07-4e27-a171-d8c5b5aafcfc*E1780600141AA23F055FD4F1BF09AFB8B879A597CAB5AF25D9972BA80599BA79?api-version=2020-01-01-preview + - 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: @@ -4599,30 +4638,30 @@ interactions: ParameterSetName: - -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/f4730ac5-7a07-4e27-a171-d8c5b5aafcfc*E1780600141AA23F055FD4F1BF09AFB8B879A597CAB5AF25D9972BA80599BA79?api-version=2020-01-01-preview + 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/f4730ac5-7a07-4e27-a171-d8c5b5aafcfc*E1780600141AA23F055FD4F1BF09AFB8B879A597CAB5AF25D9972BA80599BA79","name":"f4730ac5-7a07-4e27-a171-d8c5b5aafcfc*E1780600141AA23F055FD4F1BF09AFB8B879A597CAB5AF25D9972BA80599BA79","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-nf-nsd-acr-manifest-1-0-0","status":"Deleting","startTime":"2023-07-26T13:48:06.2563537Z"}' + 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/f4730ac5-7a07-4e27-a171-d8c5b5aafcfc*E1780600141AA23F055FD4F1BF09AFB8B879A597CAB5AF25D9972BA80599BA79?api-version=2020-01-01-preview + - 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: - - '592' + - '596' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:48:06 GMT + - Thu, 27 Jul 2023 08:44:08 GMT etag: - - '"0100bc22-0000-1100-0000-64c124160000"' + - '"0200ad7c-0000-1100-0000-64c22e580000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/f4730ac5-7a07-4e27-a171-d8c5b5aafcfc*E1780600141AA23F055FD4F1BF09AFB8B879A597CAB5AF25D9972BA80599BA79?api-version=2020-01-01-preview + - 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: @@ -4646,24 +4685,24 @@ interactions: ParameterSetName: - -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/f4730ac5-7a07-4e27-a171-d8c5b5aafcfc*E1780600141AA23F055FD4F1BF09AFB8B879A597CAB5AF25D9972BA80599BA79?api-version=2020-01-01-preview + 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/f4730ac5-7a07-4e27-a171-d8c5b5aafcfc*E1780600141AA23F055FD4F1BF09AFB8B879A597CAB5AF25D9972BA80599BA79","name":"f4730ac5-7a07-4e27-a171-d8c5b5aafcfc*E1780600141AA23F055FD4F1BF09AFB8B879A597CAB5AF25D9972BA80599BA79","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-nf-nsd-acr-manifest-1-0-0","status":"Succeeded","startTime":"2023-07-26T13:48:06.2563537Z","endTime":"2023-07-26T13:48:29.6040723Z","properties":null}' + 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: - - '652' + - '656' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:48:35 GMT + - Thu, 27 Jul 2023 08:44:37 GMT etag: - - '"0100e722-0000-1100-0000-64c1242d0000"' + - '"0200c47c-0000-1100-0000-64c22e660000"' expires: - '-1' pragma: @@ -4693,24 +4732,24 @@ interactions: ParameterSetName: - -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/f4730ac5-7a07-4e27-a171-d8c5b5aafcfc*E1780600141AA23F055FD4F1BF09AFB8B879A597CAB5AF25D9972BA80599BA79?api-version=2020-01-01-preview + 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/f4730ac5-7a07-4e27-a171-d8c5b5aafcfc*E1780600141AA23F055FD4F1BF09AFB8B879A597CAB5AF25D9972BA80599BA79","name":"f4730ac5-7a07-4e27-a171-d8c5b5aafcfc*E1780600141AA23F055FD4F1BF09AFB8B879A597CAB5AF25D9972BA80599BA79","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/artifactStores/ubuntu-acr/artifactManifests/ubuntu-nf-nsd-acr-manifest-1-0-0","status":"Succeeded","startTime":"2023-07-26T13:48:06.2563537Z","endTime":"2023-07-26T13:48:29.6040723Z","properties":null}' + 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: - - '652' + - '656' content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:48:35 GMT + - Thu, 27 Jul 2023 08:44:37 GMT etag: - - '"0100e722-0000-1100-0000-64c1242d0000"' + - '"0200c47c-0000-1100-0000-64c22e660000"' expires: - '-1' pragma: @@ -4742,8 +4781,8 @@ interactions: ParameterSetName: - -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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: @@ -4751,7 +4790,7 @@ interactions: string: 'null' headers: azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/faa4dbd8-9f9a-435b-960a-19fa8428df04*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73?api-version=2020-01-01-preview + - 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: @@ -4759,13 +4798,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:48:36 GMT + - Thu, 27 Jul 2023 08:44:38 GMT etag: - - '"0200f702-0000-1100-0000-64c124350000"' + - '"050013be-0000-1100-0000-64c22e770000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/UKSOUTH/operationStatuses/faa4dbd8-9f9a-435b-960a-19fa8428df04*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73?api-version=2020-01-01-preview + - 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: @@ -4795,16 +4834,16 @@ interactions: ParameterSetName: - -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/faa4dbd8-9f9a-435b-960a-19fa8428df04*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73?api-version=2020-01-01-preview + 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/faa4dbd8-9f9a-435b-960a-19fa8428df04*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73","name":"faa4dbd8-9f9a-435b-960a-19fa8428df04*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/configurationGroupSchemas/ubuntu_ConfigGroupSchema","status":"Deleting","startTime":"2023-07-26T13:48:37.2309542Z"}' + 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/faa4dbd8-9f9a-435b-960a-19fa8428df04*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73?api-version=2020-01-01-preview + - 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: @@ -4812,13 +4851,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:48:37 GMT + - Thu, 27 Jul 2023 08:44:38 GMT etag: - - '"0100ee22-0000-1100-0000-64c124350000"' + - '"0200d37c-0000-1100-0000-64c22e770000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.HybridNetwork/locations/uksouth/operationStatuses/faa4dbd8-9f9a-435b-960a-19fa8428df04*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73?api-version=2020-01-01-preview + - 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: @@ -4842,13 +4881,13 @@ interactions: ParameterSetName: - -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/faa4dbd8-9f9a-435b-960a-19fa8428df04*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73?api-version=2020-01-01-preview + 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/faa4dbd8-9f9a-435b-960a-19fa8428df04*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73","name":"faa4dbd8-9f9a-435b-960a-19fa8428df04*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/configurationGroupSchemas/ubuntu_ConfigGroupSchema","status":"Succeeded","startTime":"2023-07-26T13:48:37.2309542Z","endTime":"2023-07-26T13:48:41.6355282Z","properties":null}' + 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 @@ -4857,9 +4896,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:49:06 GMT + - Thu, 27 Jul 2023 08:45:09 GMT etag: - - '"0100f722-0000-1100-0000-64c124390000"' + - '"0200d87c-0000-1100-0000-64c22e7c0000"' expires: - '-1' pragma: @@ -4889,13 +4928,13 @@ interactions: ParameterSetName: - -f --debug --force User-Agent: - - AZURECLI/2.48.1 azsdk-python-hybridnetwork/2020-01-01-preview Python/3.8.10 - (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - 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/faa4dbd8-9f9a-435b-960a-19fa8428df04*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73?api-version=2020-01-01-preview + 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/faa4dbd8-9f9a-435b-960a-19fa8428df04*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73","name":"faa4dbd8-9f9a-435b-960a-19fa8428df04*11248D1E508C64951FD5472E112C703E359E13297009740D5C18AF47B65BEF73","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/patrykkulik-test/providers/Microsoft.HybridNetwork/publishers/ubuntuPublisher/configurationGroupSchemas/ubuntu_ConfigGroupSchema","status":"Succeeded","startTime":"2023-07-26T13:48:37.2309542Z","endTime":"2023-07-26T13:48:41.6355282Z","properties":null}' + 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 @@ -4904,9 +4943,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 26 Jul 2023 13:49:06 GMT + - Thu, 27 Jul 2023 08:45:09 GMT etag: - - '"0100f722-0000-1100-0000-64c124390000"' + - '"0200d87c-0000-1100-0000-64c22e7c0000"' expires: - '-1' pragma: 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 From 687d5063c6e4eb955d5e234d730114217a8c7b2c Mon Sep 17 00:00:00 2001 From: Jamie Parsons Date: Thu, 27 Jul 2023 10:01:14 +0100 Subject: [PATCH 20/20] Update developer docs --- src/aosm/development.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/aosm/development.md b/src/aosm/development.md index f0fbbd2e6c6..b8b48779503 100644 --- a/src/aosm/development.md +++ b/src/aosm/development.md @@ -141,6 +141,11 @@ python-static-checks fmt ### Unit tests 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 pip install coverage