diff --git a/src/mesh/HISTORY.rst b/src/mesh/HISTORY.rst index 2bfea9e5d46..f3ba4f21d4d 100644 --- a/src/mesh/HISTORY.rst +++ b/src/mesh/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +1.0.0b2 +++++++++++++++++++ + +* Migrate to AAZ command. + 1.0.0a1 ++++++++++++++++++ diff --git a/src/mesh/azext_mesh/_client_factory.py b/src/mesh/azext_mesh/_client_factory.py index 1d13d4d0d61..d3e3a701a97 100644 --- a/src/mesh/azext_mesh/_client_factory.py +++ b/src/mesh/azext_mesh/_client_factory.py @@ -3,37 +3,6 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- - -def _cf_mesh(cli_ctx, **_): - from azure.cli.core.commands.client_factory import get_mgmt_service_client - from .servicefabricmesh.mgmt.servicefabricmesh import ServiceFabricMeshManagementClient - return get_mgmt_service_client(cli_ctx, ServiceFabricMeshManagementClient) - - -def cf_mesh_application(cli_ctx, _): - return _cf_mesh(cli_ctx).application - - -def cf_mesh_service(cli_ctx, _): - return _cf_mesh(cli_ctx).service - - -def cf_mesh_service_replica(cli_ctx, _): - return _cf_mesh(cli_ctx).service_replica - - -def cf_mesh_code_package(cli_ctx, _): - return _cf_mesh(cli_ctx).code_package - - -def cf_mesh_network(cli_ctx, _): - return _cf_mesh(cli_ctx).network - - -def cf_mesh_volume(cli_ctx, _): - return _cf_mesh(cli_ctx).volume - - def _resource_client_factory(cli_ctx, **_): from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.cli.core.profiles import ResourceType @@ -42,15 +11,3 @@ def _resource_client_factory(cli_ctx, **_): def cf_mesh_deployments(cli_ctx, _): return _resource_client_factory(cli_ctx).deployments - - -def cf_mesh_secret(cli_ctx, _): - return _cf_mesh(cli_ctx).secret - - -def cf_mesh_secret_value(cli_ctx, _): - return _cf_mesh(cli_ctx).secret_value - - -def cf_mesh_gateway(cli_ctx, _): - return _cf_mesh(cli_ctx).gateway diff --git a/src/mesh/azext_mesh/_exception_handler.py b/src/mesh/azext_mesh/_exception_handler.py index 1e03a77ea21..91304637eda 100644 --- a/src/mesh/azext_mesh/_exception_handler.py +++ b/src/mesh/azext_mesh/_exception_handler.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- +# pylint: disable=no-else-raise def resource_exception_handler(exception): from knack.util import CLIError diff --git a/src/mesh/azext_mesh/_help.py b/src/mesh/azext_mesh/_help.py index 232e51c271c..d852ff64178 100644 --- a/src/mesh/azext_mesh/_help.py +++ b/src/mesh/azext_mesh/_help.py @@ -66,162 +66,7 @@ short-summary: parameters in yaml file as key-value pairs or as json object or as json arm parameter file to supplement parameters of the deployment template """ -helps['mesh app'] = """ - type: group - short-summary: Manage Service Fabric Mesh applications. -""" - -helps['mesh app delete'] = """ - type: command - short-summary: Delete a Service Fabric Mesh application. -""" - -helps['mesh app list'] = """ - type: command - short-summary: List Service Fabric Mesh applications. -""" - -helps['mesh app show'] = """ - type: command - short-summary: Get the details of a Service Fabric Mesh application. -""" - -helps['mesh service'] = """ - type: group - short-summary: Manage Service Fabric Mesh services. -""" - -helps['mesh service show'] = """ - type: command - short-summary: Get the details of a service. -""" - -helps['mesh service-replica'] = """ - type: group - short-summary: Manage Service Fabric Mesh service replicas. -""" - -helps['mesh service-replica list'] = """ - type: command - short-summary: List the details of service replicas. -""" - -helps['mesh code-package-log'] = """ - type: group - short-summary: Examine the logs for a codepackage. -""" - -helps['mesh code-package-log get'] = """ - type: command - short-summary: Examine the logs for a codepackage. -""" - -helps['mesh network'] = """ - type: group - short-summary: Manage networks. -""" - -helps['mesh network delete'] = """ - type: command - short-summary: Delete a network. -""" - -helps['mesh network list'] = """ - type: command - short-summary: List networks. -""" - -helps['mesh network show'] = """ - type: command - short-summary: Get the details of a network. -""" - -helps['mesh volume'] = """ - type: group - short-summary: Manage volumes. -""" - -helps['mesh volume create'] = """ - type: command - short-summary: Create a volume. - examples: - - name: Create a volume with a template file on a remote URL. - text: az mesh volume create --location westus --name myvolume --resource-group mygroup --template-uri https://mystorage.blob.core.windows.net/templates/volumeDescription.json - - name: Create a volume with a template file on local disk. - text: az mesh volume create --location westus --name myvolume --resource-group mygroup --template-file ./volumeDescription.json -""" - -helps['mesh volume delete'] = """ - type: command - short-summary: Delete a volume. -""" - -helps['mesh volume list'] = """ - type: command - short-summary: List volumes. -""" - -helps['mesh volume show'] = """ - type: command - short-summary: Get the details of a volume. -""" - -helps['mesh secret'] = """ - type: group - short-summary: Manage secret resources. -""" - -helps['mesh secret delete'] = """ - type: command - short-summary: Delete a secret. -""" - -helps['mesh secret list'] = """ - type: command - short-summary: List Secrets. -""" - -helps['mesh secret show'] = """ - type: command - short-summary: Get the details of a secret. -""" - -helps['mesh secretvalue'] = """ - type: group - short-summary: Manage secret values. -""" - -helps['mesh secretvalue delete'] = """ - type: command - short-summary: Delete a secret version. -""" - -helps['mesh secretvalue list'] = """ - type: command - short-summary: List Secrets versions. -""" - helps['mesh secretvalue show'] = """ type: command short-summary: Get the details of a secret value. """ - -helps['mesh gateway'] = """ - type: group - short-summary: Manage gateway resources. -""" - -helps['mesh gateway delete'] = """ - type: command - short-summary: Delete a gateway resource. -""" - -helps['mesh gateway list'] = """ - type: command - short-summary: List gateway resources. -""" - -helps['mesh gateway show'] = """ - type: command - short-summary: Get the details of a gateway. -""" diff --git a/src/mesh/azext_mesh/aaz/latest/__init__.py b/src/mesh/azext_mesh/aaz/latest/__init__.py index 5757aea3175..f6acc11aa4e 100644 --- a/src/mesh/azext_mesh/aaz/latest/__init__.py +++ b/src/mesh/azext_mesh/aaz/latest/__init__.py @@ -4,3 +4,7 @@ # # Code generated by aaz-dev-tools # -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + diff --git a/src/mesh/azext_mesh/aaz/latest/mesh/secretvalue/__init__.py b/src/mesh/azext_mesh/aaz/latest/mesh/secretvalue/__init__.py index a3559a3f9bb..6d83fca880d 100644 --- a/src/mesh/azext_mesh/aaz/latest/mesh/secretvalue/__init__.py +++ b/src/mesh/azext_mesh/aaz/latest/mesh/secretvalue/__init__.py @@ -11,3 +11,5 @@ from .__cmd_group import * from ._delete import * from ._list import * +from ._listvalue import * +from ._show import * diff --git a/src/mesh/azext_mesh/aaz/latest/mesh/secretvalue/_listvalue.py b/src/mesh/azext_mesh/aaz/latest/mesh/secretvalue/_listvalue.py new file mode 100644 index 00000000000..b5870c5c6b5 --- /dev/null +++ b/src/mesh/azext_mesh/aaz/latest/mesh/secretvalue/_listvalue.py @@ -0,0 +1,171 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Listvalue(AAZCommand): + """Lists the decrypted value of the specified named value of the secret resource. This is a privileged operation. + """ + + _aaz_info = { + "version": "2018-09-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.servicefabricmesh/secrets/{}/values/{}/listvalue", "2018-09-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.secret_name = AAZStrArg( + options=["--secret-name"], + help="The name of the secret resource.", + required=True, + id_part="name", + ) + _args_schema.version = AAZStrArg( + options=["-v", "--version"], + help="The name of the secret version.", + required=True, + id_part="child_name_1", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SecretValueListValue(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class SecretValueListValue(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretResourceName}/values/{secretValueResourceName}/listvalue", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "secretResourceName", self.ctx.args.secret_name, + skip_quote=True, + required=True, + ), + **self.serialize_url_param( + "secretValueResourceName", self.ctx.args.version, + skip_quote=True, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2018-09-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.value = AAZStrType() + + return cls._schema_on_200 + + +class _ListvalueHelper: + """Helper class for Listvalue""" + + +__all__ = ["Listvalue"] diff --git a/src/mesh/azext_mesh/aaz/latest/mesh/secretvalue/_show.py b/src/mesh/azext_mesh/aaz/latest/mesh/secretvalue/_show.py new file mode 100644 index 00000000000..bb7d5e67656 --- /dev/null +++ b/src/mesh/azext_mesh/aaz/latest/mesh/secretvalue/_show.py @@ -0,0 +1,196 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Show(AAZCommand): + """Get the information about the specified named secret value resources. The information does not include the actual value of the secret. + """ + + _aaz_info = { + "version": "2018-09-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.servicefabricmesh/secrets/{}/values/{}", "2018-09-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.version = AAZStrArg( + options=["-v", "--version"], + help="The name of the secret version.", + required=True, + id_part="name", + ) + _args_schema.secret_name = AAZStrArg( + options=["-n", "--secret-name"], + help="The name of the secret resource value which is typically the version identifier for the value.", + required=True, + id_part="child_name_1", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SecretValueGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class SecretValueGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretResourceName}/values/{secretValueResourceName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "secretResourceName", self.ctx.args.version, + skip_quote=True, + required=True, + ), + **self.serialize_url_param( + "secretValueResourceName", self.ctx.args.secret_name, + skip_quote=True, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2018-09-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.value = AAZStrType() + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/mesh/azext_mesh/aaz/latest/mesh/volume/__init__.py b/src/mesh/azext_mesh/aaz/latest/mesh/volume/__init__.py index 054d52707ea..efc3964e3fb 100644 --- a/src/mesh/azext_mesh/aaz/latest/mesh/volume/__init__.py +++ b/src/mesh/azext_mesh/aaz/latest/mesh/volume/__init__.py @@ -9,6 +9,7 @@ # flake8: noqa from .__cmd_group import * +from ._create import * from ._delete import * from ._list import * from ._show import * diff --git a/src/mesh/azext_mesh/aaz/latest/mesh/volume/_create.py b/src/mesh/azext_mesh/aaz/latest/mesh/volume/_create.py new file mode 100644 index 00000000000..54b8d135a9a --- /dev/null +++ b/src/mesh/azext_mesh/aaz/latest/mesh/volume/_create.py @@ -0,0 +1,294 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Create(AAZCommand): + """Create a volume. + + :example: Create a volume with a template file on a remote URL. + az mesh volume create --location westus --name myvolume --resource-group mygroup --template-uri https://mystorage.blob.core.windows.net/templates/volumeDescription.json + + :example: Create a volume with a template file on local disk. + az mesh volume create --location westus --name myvolume --resource-group mygroup --template-file ./volumeDescription.json + """ + + _aaz_info = { + "version": "2018-09-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.servicefabricmesh/volumes/{}", "2018-09-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="The identity of the volume.", + required=True, + ) + _args_schema.location = AAZResourceLocationArg( + help="The geo-location where the resource lives", + required=True, + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.azure_file_parameters = AAZObjectArg( + options=["--azure-file-parameters"], + arg_group="Properties", + help="This type describes a volume provided by an Azure Files file share.", + ) + _args_schema.description = AAZStrArg( + options=["--description"], + arg_group="Properties", + help="User readable description of the volume.", + ) + _args_schema.provider = AAZStrArg( + options=["--provider"], + arg_group="Properties", + help="Provider of the volume.", + required=True, + enum={"SFAzureFile": "SFAzureFile"}, + ) + + azure_file_parameters = cls._args_schema.azure_file_parameters + azure_file_parameters.account_key = AAZStrArg( + options=["account-key"], + help="Access key of the Azure storage account for the File Share.", + ) + azure_file_parameters.account_name = AAZStrArg( + options=["account-name"], + help="Name of the Azure storage account for the File Share.", + required=True, + ) + azure_file_parameters.share_name = AAZStrArg( + options=["share-name"], + help="Name of the Azure Files file share that provides storage for the volume.", + required=True, + ) + + # define Arg Group "VolumeResourceDescription" + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.VolumeCreate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class VolumeCreate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + if session.http_response.status_code in [202]: + return self.on_202(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/volumes/{volumeResourceName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "volumeResourceName", self.ctx.args.name, + skip_quote=True, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2018-09-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("azureFileParameters", AAZObjectType, ".azure_file_parameters") + properties.set_prop("description", AAZStrType, ".description") + properties.set_prop("provider", AAZStrType, ".provider", typ_kwargs={"flags": {"required": True}}) + + azure_file_parameters = _builder.get(".properties.azureFileParameters") + if azure_file_parameters is not None: + azure_file_parameters.set_prop("accountKey", AAZStrType, ".account_key") + azure_file_parameters.set_prop("accountName", AAZStrType, ".account_name", typ_kwargs={"flags": {"required": True}}) + azure_file_parameters.set_prop("shareName", AAZStrType, ".share_name", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200_201.tags = AAZDictType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.azure_file_parameters = AAZObjectType( + serialized_name="azureFileParameters", + ) + properties.description = AAZStrType() + properties.provider = AAZStrType( + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.status = AAZStrType( + flags={"read_only": True}, + ) + properties.status_details = AAZStrType( + serialized_name="statusDetails", + flags={"read_only": True}, + ) + + azure_file_parameters = cls._schema_on_200_201.properties.azure_file_parameters + azure_file_parameters.account_key = AAZStrType( + serialized_name="accountKey", + ) + azure_file_parameters.account_name = AAZStrType( + serialized_name="accountName", + flags={"required": True}, + ) + azure_file_parameters.share_name = AAZStrType( + serialized_name="shareName", + flags={"required": True}, + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + return cls._schema_on_200_201 + + def on_202(self, session): + pass + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/mesh/azext_mesh/aaz/latest/mesh/volume/_list.py b/src/mesh/azext_mesh/aaz/latest/mesh/volume/_list.py index 13346db9b55..dbc021f774a 100644 --- a/src/mesh/azext_mesh/aaz/latest/mesh/volume/_list.py +++ b/src/mesh/azext_mesh/aaz/latest/mesh/volume/_list.py @@ -22,7 +22,6 @@ class List(AAZCommand): _aaz_info = { "version": "2018-09-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/microsoft.servicefabricmesh/volumes", "2018-09-01-preview"], ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.servicefabricmesh/volumes", "2018-09-01-preview"], ] } @@ -44,17 +43,14 @@ def _build_arguments_schema(cls, *args, **kwargs): # define Arg Group "" _args_schema = cls._args_schema - _args_schema.resource_group = AAZResourceGroupNameArg() + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) return cls._args_schema def _execute_operations(self): self.pre_operations() - condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True - condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) - if condition_0: - self.VolumeListBySubscription(ctx=self.ctx)() - if condition_1: - self.VolumeListByResourceGroup(ctx=self.ctx)() + self.VolumeListByResourceGroup(ctx=self.ctx)() self.post_operations() @register_callback @@ -70,141 +66,6 @@ def _output(self, *args, **kwargs): next_link = self.deserialize_output(self.ctx.vars.instance.next_link) return result, next_link - class VolumeListBySubscription(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabricMesh/volumes", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "ODataV4Format" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2018-09-01-preview", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.next_link = AAZStrType( - serialized_name="nextLink", - ) - _schema_on_200.value = AAZListType() - - value = cls._schema_on_200.value - value.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element - _element.id = AAZStrType( - flags={"read_only": True}, - ) - _element.location = AAZStrType( - flags={"required": True}, - ) - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _element.tags = AAZDictType() - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.value.Element.properties - properties.azure_file_parameters = AAZObjectType( - serialized_name="azureFileParameters", - ) - properties.description = AAZStrType() - properties.provider = AAZStrType( - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.status = AAZStrType() - properties.status_details = AAZStrType( - serialized_name="statusDetails", - flags={"read_only": True}, - ) - - azure_file_parameters = cls._schema_on_200.value.Element.properties.azure_file_parameters - azure_file_parameters.account_key = AAZStrType( - serialized_name="accountKey", - ) - azure_file_parameters.account_name = AAZStrType( - serialized_name="accountName", - flags={"required": True}, - ) - azure_file_parameters.share_name = AAZStrType( - serialized_name="shareName", - flags={"required": True}, - ) - - tags = cls._schema_on_200.value.Element.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - class VolumeListByResourceGroup(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" @@ -320,7 +181,9 @@ def _build_schema_on_200(cls): serialized_name="provisioningState", flags={"read_only": True}, ) - properties.status = AAZStrType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) properties.status_details = AAZStrType( serialized_name="statusDetails", flags={"read_only": True}, diff --git a/src/mesh/azext_mesh/aaz/latest/mesh/volume/_show.py b/src/mesh/azext_mesh/aaz/latest/mesh/volume/_show.py index 5642d450b7d..3c4a9182b58 100644 --- a/src/mesh/azext_mesh/aaz/latest/mesh/volume/_show.py +++ b/src/mesh/azext_mesh/aaz/latest/mesh/volume/_show.py @@ -181,7 +181,9 @@ def _build_schema_on_200(cls): serialized_name="provisioningState", flags={"read_only": True}, ) - properties.status = AAZStrType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) properties.status_details = AAZStrType( serialized_name="statusDetails", flags={"read_only": True}, diff --git a/src/mesh/azext_mesh/azext_metadata.json b/src/mesh/azext_mesh/azext_metadata.json index 8138e860821..b2e481ecb9e 100644 --- a/src/mesh/azext_mesh/azext_metadata.json +++ b/src/mesh/azext_mesh/azext_metadata.json @@ -1,4 +1,4 @@ { "azext.isPreview": true, - "azext.minCliCoreVersion": "2.50.0" + "azext.minCliCoreVersion": "2.67.0" } \ No newline at end of file diff --git a/src/mesh/azext_mesh/commands.py b/src/mesh/azext_mesh/commands.py index cc2899a9937..ddbd546b645 100644 --- a/src/mesh/azext_mesh/commands.py +++ b/src/mesh/azext_mesh/commands.py @@ -13,8 +13,7 @@ from azure.cli.command_modules.resource._validators import _validate_deployment_name from knack.util import CLIError -from ._client_factory import (cf_mesh_deployments, - cf_mesh_volume, cf_mesh_secret_value) +from ._client_factory import cf_mesh_deployments from ._exception_handler import resource_exception_handler # @@ -169,15 +168,6 @@ def process_deployment_create_namespace(namespace): def load_command_table(self, _): # pylint: disable=too-many-statements - cmd_util = CliCommandType( - operations_tmpl='azext_mesh.custom#{}', - exception_handler=resource_exception_handler - ) - - mesh_secret_value_util = CliCommandType( - operations_tmpl='azext_mesh.servicefabricmesh.mgmt.servicefabricmesh.operations.secret_value_operations#SecretValueOperations.{}', - exception_handler=resource_exception_handler - ) resource_deployment_sdk = CliCommandType( operations_tmpl='azure.mgmt.resource.resources.operations.deployments_operations#DeploymentsOperations.{}', @@ -216,11 +206,9 @@ def load_command_table(self, _): # pylint: disable=too-many-statements self.command_table['mesh network show'] = Show(loader=self, table_transformer=transform_network) self.command_table['mesh network list'] = List(loader=self, table_transformer=transform_network_list) - with self.command_group('mesh volume', cmd_util) as g: - g.custom_command('create', 'create_volume', client_factory=cf_mesh_volume, table_transformer=transform_volume_list) - - with self.command_group('mesh volume'): + with self.command_group('mesh volume') as g: from .aaz.latest.mesh.volume import Show, List + g.custom_command('create', 'create_volume', table_transformer=transform_volume_list) self.command_table['mesh volume show'] = Show(loader=self, table_transformer=transform_volume) self.command_table['mesh volume list'] = List(loader=self, table_transformer=transform_volume_list) @@ -228,14 +216,9 @@ def load_command_table(self, _): # pylint: disable=too-many-statements from .aaz.latest.mesh.secret import List self.command_table['mesh secret list'] = List(loader=self, table_transformer=transform_secret_list) - with self.command_group('mesh secretvalue', mesh_secret_value_util, client_factory=cf_mesh_secret_value) as g: - g.show_command('show', 'get') - - with self.command_group('mesh secretvalue', cmd_util, client_factory=cf_mesh_secret_value) as g: - g.custom_show_command('show', 'secret_show') - - with self.command_group('mesh secretvalue'): + with self.command_group('mesh secretvalue') as g: from .aaz.latest.mesh.secretvalue import List + g.custom_show_command('show', 'secret_show') self.command_table['mesh secretvalue list'] = List(loader=self, table_transformer=transform_secretvalue_list) with self.command_group('mesh gateway'): diff --git a/src/mesh/azext_mesh/custom.py b/src/mesh/azext_mesh/custom.py index 910d983428b..4717e0bcba9 100644 --- a/src/mesh/azext_mesh/custom.py +++ b/src/mesh/azext_mesh/custom.py @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -# pylint: disable=too-few-public-methods,too-many-arguments,no-self-use,too-many-locals,line-too-long,unused-argument +# pylint: disable=too-few-public-methods,too-many-arguments,no-self-use,too-many-locals,line-too-long,unused-argument,no-else-break,no-else-return from __future__ import print_function from collections import OrderedDict @@ -19,9 +19,11 @@ from azure.cli.core.util import get_file_json, shell_safe_json_parse, sdk_no_wait from azure.cli.core.commands.client_factory import get_mgmt_service_client +from azure.cli.core.azclierror import ArgumentUsageError from azure.cli.core.profiles import ResourceType, get_sdk from sfmergeutility import SFMergeUtility # pylint: disable=E0611,import-error - +from azext_mesh.aaz.latest.mesh.secretvalue import Show as _SecretValueShow, Listvalue as _SecretValueListValue +from azext_mesh.aaz.latest.mesh.volume import Create as _VolumeCreate logger = get_logger(__name__) @@ -288,7 +290,7 @@ def generate_arm_template(cmd, input_yaml_files=None, parameters=None): return _generate_arm_template_core(input_yaml_files, parameters) -def create_volume(client, resource_group_name, +def create_volume(cmd, resource_group_name, name, location, template_file=None, template_uri=None): """Create a volume. """ @@ -300,15 +302,30 @@ def create_volume(client, resource_group_name, volume_properties = get_file_json(template_file, preserve_order=True) volume_properties = json.loads(json.dumps(volume_properties)) else: - raise CLIError('One of --template-file or --template-uri has to be specified') + raise ArgumentUsageError('One of --template-file or --template-uri has to be specified') volume_properties['location'] = location - return client.create(resource_group_name, name, volume_properties) - - -def secret_show(client, resource_group_name, secret_name, secret_value_resource_name, show_value=False): - secret_data = client.get(resource_group_name, secret_name, secret_value_resource_name) + return _VolumeCreate(cli_ctx=cmd.cli_ctx)(command_args={ + 'resource_group': resource_group_name, + 'name': name, + 'location': location, + 'provider': volume_properties.get('provider', 'SFAzureFile'), + 'azure_file_parameters': volume_properties.get('azure_file_parameters', None), + 'description': volume_properties.get('description', None), + }) + + +def secret_show(cmd, resource_group_name, secret_name, secret_value_resource_name, show_value=False): + secret_data = _SecretValueShow(cli_ctx=cmd.cli_ctx)(command_args={ + 'secret_name': secret_name, + 'resource_group': resource_group_name, + 'version': secret_value_resource_name + }) if show_value: - secret_value = client.list_value(resource_group_name, secret_name, secret_value_resource_name) - secret_data.value = secret_value.value + secret_value = _SecretValueListValue(cli_ctx=cmd.cli_ctx)(command_args={ + 'secret_name': secret_name, + 'resource_group': resource_group_name, + 'version': secret_value_resource_name + }) + secret_data['value'] = secret_value['value'] return secret_data diff --git a/src/mesh/azext_mesh/servicefabricmesh/__init__.py b/src/mesh/azext_mesh/servicefabricmesh/__init__.py deleted file mode 100644 index 67e4d0fd535..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- -__import__('pkg_resources').declare_namespace(__name__) diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/__init__.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/__init__.py deleted file mode 100644 index a5b81f3bde4..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -__import__('pkg_resources').declare_namespace(__name__) diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/__init__.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/__init__.py deleted file mode 100644 index 5f8ad00a7d6..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_fabric_mesh_management_client import ServiceFabricMeshManagementClient -from .version import VERSION - -__all__ = ['ServiceFabricMeshManagementClient'] - -__version__ = VERSION diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/__init__.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/__init__.py deleted file mode 100644 index 6b3b2f253f3..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/__init__.py +++ /dev/null @@ -1,204 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .available_operation_display import AvailableOperationDisplay -from .error_details_model import ErrorDetailsModel -from .error_error_model import ErrorErrorModel -from .error_model import ErrorModel, ErrorModelException -from .operation_result import OperationResult -from .provisioned_resource_properties import ProvisionedResourceProperties -from .proxy_resource import ProxyResource -from .managed_proxy_resource import ManagedProxyResource -from .resource import Resource -from .tracked_resource import TrackedResource -from .secret_resource_properties import SecretResourceProperties -from .inlined_value_secret_resource_properties import InlinedValueSecretResourceProperties -from .secret_resource_properties_base import SecretResourcePropertiesBase -from .secret_resource_description import SecretResourceDescription -from .secret_value import SecretValue -from .secret_value_properties import SecretValueProperties -from .secret_value_resource_description import SecretValueResourceDescription -from .volume_provider_parameters_azure_file import VolumeProviderParametersAzureFile -from .volume_properties import VolumeProperties -from .volume_reference import VolumeReference -from .application_scoped_volume_creation_parameters import ApplicationScopedVolumeCreationParameters -from .application_scoped_volume import ApplicationScopedVolume -from .application_scoped_volume_creation_parameters_service_fabric_volume_disk import ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk -from .volume_resource_description import VolumeResourceDescription -from .network_resource_properties import NetworkResourceProperties -from .local_network_resource_properties import LocalNetworkResourceProperties -from .endpoint_ref import EndpointRef -from .network_ref import NetworkRef -from .network_resource_properties_base import NetworkResourcePropertiesBase -from .network_resource_description import NetworkResourceDescription -from .gateway_destination import GatewayDestination -from .tcp_config import TcpConfig -from .http_route_match_path import HttpRouteMatchPath -from .http_route_match_header import HttpRouteMatchHeader -from .http_route_match_rule import HttpRouteMatchRule -from .http_route_config import HttpRouteConfig -from .http_host_config import HttpHostConfig -from .http_config import HttpConfig -from .gateway_properties import GatewayProperties -from .gateway_resource_description import GatewayResourceDescription -from .image_registry_credential import ImageRegistryCredential -from .environment_variable import EnvironmentVariable -from .setting import Setting -from .container_label import ContainerLabel -from .endpoint_properties import EndpointProperties -from .resource_requests import ResourceRequests -from .resource_limits import ResourceLimits -from .resource_requirements import ResourceRequirements -from .diagnostics_ref import DiagnosticsRef -from .reliable_collections_ref import ReliableCollectionsRef -from .container_state import ContainerState -from .container_event import ContainerEvent -from .container_instance_view import ContainerInstanceView -from .container_code_package_properties import ContainerCodePackageProperties -from .auto_scaling_trigger import AutoScalingTrigger -from .auto_scaling_mechanism import AutoScalingMechanism -from .auto_scaling_policy import AutoScalingPolicy -from .service_resource_description import ServiceResourceDescription -from .diagnostics_sink_properties import DiagnosticsSinkProperties -from .diagnostics_description import DiagnosticsDescription -from .application_properties import ApplicationProperties -from .azure_internal_monitoring_pipeline_sink_description import AzureInternalMonitoringPipelineSinkDescription -from .application_resource_description import ApplicationResourceDescription -from .add_remove_replica_scaling_mechanism import AddRemoveReplicaScalingMechanism -from .auto_scaling_metric import AutoScalingMetric -from .auto_scaling_resource_metric import AutoScalingResourceMetric -from .service_properties import ServiceProperties -from .service_replica_properties import ServiceReplicaProperties -from .service_replica_description import ServiceReplicaDescription -from .average_load_scaling_trigger import AverageLoadScalingTrigger -from .container_logs import ContainerLogs -from .operation_result_paged import OperationResultPaged -from .secret_resource_description_paged import SecretResourceDescriptionPaged -from .secret_value_resource_description_paged import SecretValueResourceDescriptionPaged -from .volume_resource_description_paged import VolumeResourceDescriptionPaged -from .network_resource_description_paged import NetworkResourceDescriptionPaged -from .gateway_resource_description_paged import GatewayResourceDescriptionPaged -from .application_resource_description_paged import ApplicationResourceDescriptionPaged -from .service_resource_description_paged import ServiceResourceDescriptionPaged -from .service_replica_description_paged import ServiceReplicaDescriptionPaged -from .service_fabric_mesh_management_client_enums import ( - ResourceStatus, - HealthState, - SecretKind, - VolumeProvider, - SizeTypes, - ApplicationScopedVolumeKind, - NetworkKind, - HeaderMatchType, - OperatingSystemType, - DiagnosticsSinkKind, - AutoScalingMechanismKind, - AutoScalingMetricKind, - AutoScalingResourceMetricName, - AutoScalingTriggerKind, -) - -__all__ = [ - 'AvailableOperationDisplay', - 'ErrorDetailsModel', - 'ErrorErrorModel', - 'ErrorModel', 'ErrorModelException', - 'OperationResult', - 'ProvisionedResourceProperties', - 'ProxyResource', - 'ManagedProxyResource', - 'Resource', - 'TrackedResource', - 'SecretResourceProperties', - 'InlinedValueSecretResourceProperties', - 'SecretResourcePropertiesBase', - 'SecretResourceDescription', - 'SecretValue', - 'SecretValueProperties', - 'SecretValueResourceDescription', - 'VolumeProviderParametersAzureFile', - 'VolumeProperties', - 'VolumeReference', - 'ApplicationScopedVolumeCreationParameters', - 'ApplicationScopedVolume', - 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk', - 'VolumeResourceDescription', - 'NetworkResourceProperties', - 'LocalNetworkResourceProperties', - 'EndpointRef', - 'NetworkRef', - 'NetworkResourcePropertiesBase', - 'NetworkResourceDescription', - 'GatewayDestination', - 'TcpConfig', - 'HttpRouteMatchPath', - 'HttpRouteMatchHeader', - 'HttpRouteMatchRule', - 'HttpRouteConfig', - 'HttpHostConfig', - 'HttpConfig', - 'GatewayProperties', - 'GatewayResourceDescription', - 'ImageRegistryCredential', - 'EnvironmentVariable', - 'Setting', - 'ContainerLabel', - 'EndpointProperties', - 'ResourceRequests', - 'ResourceLimits', - 'ResourceRequirements', - 'DiagnosticsRef', - 'ReliableCollectionsRef', - 'ContainerState', - 'ContainerEvent', - 'ContainerInstanceView', - 'ContainerCodePackageProperties', - 'AutoScalingTrigger', - 'AutoScalingMechanism', - 'AutoScalingPolicy', - 'ServiceResourceDescription', - 'DiagnosticsSinkProperties', - 'DiagnosticsDescription', - 'ApplicationProperties', - 'AzureInternalMonitoringPipelineSinkDescription', - 'ApplicationResourceDescription', - 'AddRemoveReplicaScalingMechanism', - 'AutoScalingMetric', - 'AutoScalingResourceMetric', - 'ServiceProperties', - 'ServiceReplicaProperties', - 'ServiceReplicaDescription', - 'AverageLoadScalingTrigger', - 'ContainerLogs', - 'OperationResultPaged', - 'SecretResourceDescriptionPaged', - 'SecretValueResourceDescriptionPaged', - 'VolumeResourceDescriptionPaged', - 'NetworkResourceDescriptionPaged', - 'GatewayResourceDescriptionPaged', - 'ApplicationResourceDescriptionPaged', - 'ServiceResourceDescriptionPaged', - 'ServiceReplicaDescriptionPaged', - 'ResourceStatus', - 'HealthState', - 'SecretKind', - 'VolumeProvider', - 'SizeTypes', - 'ApplicationScopedVolumeKind', - 'NetworkKind', - 'HeaderMatchType', - 'OperatingSystemType', - 'DiagnosticsSinkKind', - 'AutoScalingMechanismKind', - 'AutoScalingMetricKind', - 'AutoScalingResourceMetricName', - 'AutoScalingTriggerKind', -] diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/add_remove_replica_scaling_mechanism.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/add_remove_replica_scaling_mechanism.py deleted file mode 100644 index f3bf0e0944d..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/add_remove_replica_scaling_mechanism.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .auto_scaling_mechanism import AutoScalingMechanism - - -class AddRemoveReplicaScalingMechanism(AutoScalingMechanism): - """Describes the horizontal auto scaling mechanism that adds or removes - replicas (containers or container groups). - - :param kind: Constant filled by server. - :type kind: str - :param min_count: Minimum number of containers (scale down won't be - performed below this number). - :type min_count: int - :param max_count: Maximum number of containers (scale up won't be - performed above this number). - :type max_count: int - :param scale_increment: Each time auto scaling is performed, this number - of containers will be added or removed. - :type scale_increment: int - """ - - _validation = { - 'kind': {'required': True}, - 'min_count': {'required': True}, - 'max_count': {'required': True}, - 'scale_increment': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'scale_increment': {'key': 'scaleIncrement', 'type': 'int'}, - } - - def __init__(self, min_count, max_count, scale_increment): - super(AddRemoveReplicaScalingMechanism, self).__init__() - self.min_count = min_count - self.max_count = max_count - self.scale_increment = scale_increment - self.kind = 'AddRemoveReplica' diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_properties.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_properties.py deleted file mode 100644 index 60927b61d4a..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_properties.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationProperties(Model): - """Describes properties of a application resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param description: User readable description of the application. - :type description: str - :param services: Describes the services in the application. This property - is used to create or modify services of the application. On get only the - name of the service is returned. The service description can be obtained - by querying for the service resource. - :type services: - list[~azure.mgmt.servicefabricmesh.models.ServiceResourceDescription] - :param diagnostics: Describes the diagnostics definition and usage for an - application resource. - :type diagnostics: - ~azure.mgmt.servicefabricmesh.models.DiagnosticsDescription - :param debug_params: Internal - used by Visual Studio to setup the - debugging session on the local development environment. - :type debug_params: str - :ivar service_names: Names of the services in the application. - :vartype service_names: list[str] - :ivar status: Status of the application. Possible values include: - 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or - ~azure.mgmt.servicefabricmesh.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the application. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :vartype health_state: str or - ~azure.mgmt.servicefabricmesh.models.HealthState - :ivar unhealthy_evaluation: When the application's health state is not - 'Ok', this additional details from service fabric Health Manager for the - user to know why the application is marked unhealthy. - :vartype unhealthy_evaluation: str - """ - - _validation = { - 'service_names': {'readonly': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'services': {'key': 'services', 'type': '[ServiceResourceDescription]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsDescription'}, - 'debug_params': {'key': 'debugParams', 'type': 'str'}, - 'service_names': {'key': 'serviceNames', 'type': '[str]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'health_state': {'key': 'healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, - } - - def __init__(self, description=None, services=None, diagnostics=None, debug_params=None): - super(ApplicationProperties, self).__init__() - self.description = description - self.services = services - self.diagnostics = diagnostics - self.debug_params = debug_params - self.service_names = None - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_resource_description.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_resource_description.py deleted file mode 100644 index f071f247d71..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_resource_description.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class ApplicationResourceDescription(TrackedResource): - """This type describes an application resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: The geo-location where the resource lives - :type location: str - :ivar provisioning_state: State of the resource. - :vartype provisioning_state: str - :param description: User readable description of the application. - :type description: str - :param services: Describes the services in the application. This property - is used to create or modify services of the application. On get only the - name of the service is returned. The service description can be obtained - by querying for the service resource. - :type services: - list[~azure.mgmt.servicefabricmesh.models.ServiceResourceDescription] - :param diagnostics: Describes the diagnostics definition and usage for an - application resource. - :type diagnostics: - ~azure.mgmt.servicefabricmesh.models.DiagnosticsDescription - :param debug_params: Internal - used by Visual Studio to setup the - debugging session on the local development environment. - :type debug_params: str - :ivar service_names: Names of the services in the application. - :vartype service_names: list[str] - :ivar status: Status of the application. Possible values include: - 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or - ~azure.mgmt.servicefabricmesh.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the application. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :vartype health_state: str or - ~azure.mgmt.servicefabricmesh.models.HealthState - :ivar unhealthy_evaluation: When the application's health state is not - 'Ok', this additional details from service fabric Health Manager for the - user to know why the application is marked unhealthy. - :vartype unhealthy_evaluation: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'service_names': {'readonly': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'}, - 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'}, - 'debug_params': {'key': 'properties.debugParams', 'type': 'str'}, - 'service_names': {'key': 'properties.serviceNames', 'type': '[str]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'health_state': {'key': 'properties.healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, - } - - def __init__(self, location, tags=None, description=None, services=None, diagnostics=None, debug_params=None): - super(ApplicationResourceDescription, self).__init__(tags=tags, location=location) - self.provisioning_state = None - self.description = description - self.services = services - self.diagnostics = diagnostics - self.debug_params = debug_params - self.service_names = None - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_resource_description_paged.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_resource_description_paged.py deleted file mode 100644 index cef270543b1..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_resource_description_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ApplicationResourceDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`ApplicationResourceDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ApplicationResourceDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(ApplicationResourceDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_scoped_volume.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_scoped_volume.py deleted file mode 100644 index 41eb143c130..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_scoped_volume.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .volume_reference import VolumeReference - - -class ApplicationScopedVolume(VolumeReference): - """Describes a volume whose lifetime is scoped to the application's lifetime. - - :param name: Name of the volume being referenced. - :type name: str - :param read_only: The flag indicating whether the volume is read only. - Default is 'false'. - :type read_only: bool - :param destination_path: The path within the container at which the volume - should be mounted. Only valid path characters are allowed. - :type destination_path: str - :param creation_parameters: Describes parameters for creating - application-scoped volumes. - :type creation_parameters: - ~azure.mgmt.servicefabricmesh.models.ApplicationScopedVolumeCreationParameters - """ - - _validation = { - 'name': {'required': True}, - 'destination_path': {'required': True}, - 'creation_parameters': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'destination_path': {'key': 'destinationPath', 'type': 'str'}, - 'creation_parameters': {'key': 'creationParameters', 'type': 'ApplicationScopedVolumeCreationParameters'}, - } - - def __init__(self, name, destination_path, creation_parameters, read_only=None): - super(ApplicationScopedVolume, self).__init__(name=name, read_only=read_only, destination_path=destination_path) - self.creation_parameters = creation_parameters diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_scoped_volume_creation_parameters.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_scoped_volume_creation_parameters.py deleted file mode 100644 index a96bf54e829..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_scoped_volume_creation_parameters.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationScopedVolumeCreationParameters(Model): - """Describes parameters for creating application-scoped volumes. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: - ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk - - :param description: User readable description of the volume. - :type description: str - :param kind: Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ServiceFabricVolumeDisk': 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk'} - } - - def __init__(self, description=None): - super(ApplicationScopedVolumeCreationParameters, self).__init__() - self.description = description - self.kind = None diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk.py deleted file mode 100644 index 143d3905b5a..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_scoped_volume_creation_parameters import ApplicationScopedVolumeCreationParameters - - -class ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk(ApplicationScopedVolumeCreationParameters): - """Describes parameters for creating application-scoped volumes provided by - Service Fabric Volume Disks. - - :param description: User readable description of the volume. - :type description: str - :param kind: Constant filled by server. - :type kind: str - :param size_disk: Volume size. Possible values include: 'Small', 'Medium', - 'Large' - :type size_disk: str or ~azure.mgmt.servicefabricmesh.models.SizeTypes - """ - - _validation = { - 'kind': {'required': True}, - 'size_disk': {'required': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'size_disk': {'key': 'sizeDisk', 'type': 'str'}, - } - - def __init__(self, size_disk, description=None): - super(ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, self).__init__(description=description) - self.size_disk = size_disk - self.kind = 'ServiceFabricVolumeDisk' diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/auto_scaling_mechanism.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/auto_scaling_mechanism.py deleted file mode 100644 index a104a433a4b..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/auto_scaling_mechanism.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutoScalingMechanism(Model): - """Describes the mechanism for performing auto scaling operation. Derived - classes will describe the actual mechanism. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AddRemoveReplicaScalingMechanism - - :param kind: Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AddRemoveReplica': 'AddRemoveReplicaScalingMechanism'} - } - - def __init__(self): - super(AutoScalingMechanism, self).__init__() - self.kind = None diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/auto_scaling_metric.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/auto_scaling_metric.py deleted file mode 100644 index 20082d055f3..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/auto_scaling_metric.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutoScalingMetric(Model): - """Describes the metric that is used for triggering auto scaling operation. - Derived classes will describe resources or metrics. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AutoScalingResourceMetric - - :param kind: Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Resource': 'AutoScalingResourceMetric'} - } - - def __init__(self): - super(AutoScalingMetric, self).__init__() - self.kind = None diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/auto_scaling_policy.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/auto_scaling_policy.py deleted file mode 100644 index f80f17ec976..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/auto_scaling_policy.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutoScalingPolicy(Model): - """Describes the auto scaling policy. - - :param name: The name of the auto scaling policy. - :type name: str - :param trigger: Determines when auto scaling operation will be invoked. - :type trigger: ~azure.mgmt.servicefabricmesh.models.AutoScalingTrigger - :param mechanism: The mechanism that is used to scale when auto scaling - operation is invoked. - :type mechanism: ~azure.mgmt.servicefabricmesh.models.AutoScalingMechanism - """ - - _validation = { - 'name': {'required': True}, - 'trigger': {'required': True}, - 'mechanism': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'trigger': {'key': 'trigger', 'type': 'AutoScalingTrigger'}, - 'mechanism': {'key': 'mechanism', 'type': 'AutoScalingMechanism'}, - } - - def __init__(self, name, trigger, mechanism): - super(AutoScalingPolicy, self).__init__() - self.name = name - self.trigger = trigger - self.mechanism = mechanism diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/auto_scaling_resource_metric.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/auto_scaling_resource_metric.py deleted file mode 100644 index 54d1b965932..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/auto_scaling_resource_metric.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .auto_scaling_metric import AutoScalingMetric - - -class AutoScalingResourceMetric(AutoScalingMetric): - """Describes the resource that is used for triggering auto scaling. - - :param kind: Constant filled by server. - :type kind: str - :param name: Name of the resource. Possible values include: 'cpu', - 'memoryInGB' - :type name: str or - ~azure.mgmt.servicefabricmesh.models.AutoScalingResourceMetricName - """ - - _validation = { - 'kind': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, name): - super(AutoScalingResourceMetric, self).__init__() - self.name = name - self.kind = 'Resource' diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/auto_scaling_trigger.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/auto_scaling_trigger.py deleted file mode 100644 index e6cabeec177..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/auto_scaling_trigger.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutoScalingTrigger(Model): - """Describes the trigger for performing auto scaling operation. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AverageLoadScalingTrigger - - :param kind: Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AverageLoad': 'AverageLoadScalingTrigger'} - } - - def __init__(self): - super(AutoScalingTrigger, self).__init__() - self.kind = None diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/available_operation_display.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/available_operation_display.py deleted file mode 100644 index b40322dbb3f..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/available_operation_display.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AvailableOperationDisplay(Model): - """An operation available at the listed Azure resource provider. - - :param provider: Name of the operation provider. - :type provider: str - :param resource: Name of the resource on which the operation is available. - :type resource: str - :param operation: Name of the available operation. - :type operation: str - :param description: Description of the available operation. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, provider=None, resource=None, operation=None, description=None): - super(AvailableOperationDisplay, self).__init__() - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/average_load_scaling_trigger.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/average_load_scaling_trigger.py deleted file mode 100644 index 721d7d6471f..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/average_load_scaling_trigger.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .auto_scaling_trigger import AutoScalingTrigger - - -class AverageLoadScalingTrigger(AutoScalingTrigger): - """Describes the average load trigger used for auto scaling. - - :param kind: Constant filled by server. - :type kind: str - :param metric: Description of the metric that is used for scaling. - :type metric: ~azure.mgmt.servicefabricmesh.models.AutoScalingMetric - :param lower_load_threshold: Lower load threshold (if average load is - below this threshold, service will scale down). - :type lower_load_threshold: float - :param upper_load_threshold: Upper load threshold (if average load is - above this threshold, service will scale up). - :type upper_load_threshold: float - :param scale_interval_in_seconds: Scale interval that indicates how often - will this trigger be checked. - :type scale_interval_in_seconds: int - """ - - _validation = { - 'kind': {'required': True}, - 'metric': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'minimum': 60}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'metric': {'key': 'metric', 'type': 'AutoScalingMetric'}, - 'lower_load_threshold': {'key': 'lowerLoadThreshold', 'type': 'float'}, - 'upper_load_threshold': {'key': 'upperLoadThreshold', 'type': 'float'}, - 'scale_interval_in_seconds': {'key': 'scaleIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, metric, lower_load_threshold, upper_load_threshold, scale_interval_in_seconds): - super(AverageLoadScalingTrigger, self).__init__() - self.metric = metric - self.lower_load_threshold = lower_load_threshold - self.upper_load_threshold = upper_load_threshold - self.scale_interval_in_seconds = scale_interval_in_seconds - self.kind = 'AverageLoad' diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/azure_internal_monitoring_pipeline_sink_description.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/azure_internal_monitoring_pipeline_sink_description.py deleted file mode 100644 index f547f0507b4..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/azure_internal_monitoring_pipeline_sink_description.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .diagnostics_sink_properties import DiagnosticsSinkProperties - - -class AzureInternalMonitoringPipelineSinkDescription(DiagnosticsSinkProperties): - """Diagnostics settings for Geneva. - - :param name: Name of the sink. This value is referenced by - DiagnosticsReferenceDescription - :type name: str - :param description: A description of the sink. - :type description: str - :param kind: Constant filled by server. - :type kind: str - :param account_name: Azure Internal monitoring pipeline account. - :type account_name: str - :param namespace: Azure Internal monitoring pipeline account namespace. - :type namespace: str - :param ma_config_url: Azure Internal monitoring agent configuration. - :type ma_config_url: str - :param fluentd_config_url: Azure Internal monitoring agent fluentd - configuration. - :type fluentd_config_url: object - :param auto_key_config_url: Azure Internal monitoring pipeline autokey - associated with the certificate. - :type auto_key_config_url: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'ma_config_url': {'key': 'maConfigUrl', 'type': 'str'}, - 'fluentd_config_url': {'key': 'fluentdConfigUrl', 'type': 'object'}, - 'auto_key_config_url': {'key': 'autoKeyConfigUrl', 'type': 'str'}, - } - - def __init__(self, name=None, description=None, account_name=None, namespace=None, ma_config_url=None, fluentd_config_url=None, auto_key_config_url=None): - super(AzureInternalMonitoringPipelineSinkDescription, self).__init__(name=name, description=description) - self.account_name = account_name - self.namespace = namespace - self.ma_config_url = ma_config_url - self.fluentd_config_url = fluentd_config_url - self.auto_key_config_url = auto_key_config_url - self.kind = 'AzureInternalMonitoringPipeline' diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_code_package_properties.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_code_package_properties.py deleted file mode 100644 index b82afce3546..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_code_package_properties.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerCodePackageProperties(Model): - """Describes a container and its runtime properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: The name of the code package. - :type name: str - :param image: The Container image to use. - :type image: str - :param image_registry_credential: Image registry credential. - :type image_registry_credential: - ~azure.mgmt.servicefabricmesh.models.ImageRegistryCredential - :param entrypoint: Override for the default entry point in the container. - :type entrypoint: str - :param commands: Command array to execute within the container in exec - form. - :type commands: list[str] - :param environment_variables: The environment variables to set in this - container - :type environment_variables: - list[~azure.mgmt.servicefabricmesh.models.EnvironmentVariable] - :param settings: The settings to set in this container. The setting file - path can be fetched from environment variable "Fabric_SettingPath". The - path for Windows container is "C:\\\\secrets". The path for Linux - container is "/var/secrets". - :type settings: list[~azure.mgmt.servicefabricmesh.models.Setting] - :param labels: The labels to set in this container. - :type labels: list[~azure.mgmt.servicefabricmesh.models.ContainerLabel] - :param endpoints: The endpoints exposed by this container. - :type endpoints: - list[~azure.mgmt.servicefabricmesh.models.EndpointProperties] - :param resources: The resources required by this container. - :type resources: ~azure.mgmt.servicefabricmesh.models.ResourceRequirements - :param volume_refs: Volumes to be attached to the container. The lifetime - of these volumes is independent of the application's lifetime. - :type volume_refs: - list[~azure.mgmt.servicefabricmesh.models.VolumeReference] - :param volumes: Volumes to be attached to the container. The lifetime of - these volumes is scoped to the application's lifetime. - :type volumes: - list[~azure.mgmt.servicefabricmesh.models.ApplicationScopedVolume] - :param diagnostics: Reference to sinks in DiagnosticsDescription. - :type diagnostics: ~azure.mgmt.servicefabricmesh.models.DiagnosticsRef - :param reliable_collections_refs: A list of ReliableCollection resources - used by this particular code package. Please refer to - ReliablecollectionsRef for more details. - :type reliable_collections_refs: - list[~azure.mgmt.servicefabricmesh.models.ReliableCollectionsRef] - :ivar instance_view: Runtime information of a container instance. - :vartype instance_view: - ~azure.mgmt.servicefabricmesh.models.ContainerInstanceView - """ - - _validation = { - 'name': {'required': True}, - 'image': {'required': True}, - 'resources': {'required': True}, - 'instance_view': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'image': {'key': 'image', 'type': 'str'}, - 'image_registry_credential': {'key': 'imageRegistryCredential', 'type': 'ImageRegistryCredential'}, - 'entrypoint': {'key': 'entrypoint', 'type': 'str'}, - 'commands': {'key': 'commands', 'type': '[str]'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '[EnvironmentVariable]'}, - 'settings': {'key': 'settings', 'type': '[Setting]'}, - 'labels': {'key': 'labels', 'type': '[ContainerLabel]'}, - 'endpoints': {'key': 'endpoints', 'type': '[EndpointProperties]'}, - 'resources': {'key': 'resources', 'type': 'ResourceRequirements'}, - 'volume_refs': {'key': 'volumeRefs', 'type': '[VolumeReference]'}, - 'volumes': {'key': 'volumes', 'type': '[ApplicationScopedVolume]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - 'reliable_collections_refs': {'key': 'reliableCollectionsRefs', 'type': '[ReliableCollectionsRef]'}, - 'instance_view': {'key': 'instanceView', 'type': 'ContainerInstanceView'}, - } - - def __init__(self, name, image, resources, image_registry_credential=None, entrypoint=None, commands=None, environment_variables=None, settings=None, labels=None, endpoints=None, volume_refs=None, volumes=None, diagnostics=None, reliable_collections_refs=None): - super(ContainerCodePackageProperties, self).__init__() - self.name = name - self.image = image - self.image_registry_credential = image_registry_credential - self.entrypoint = entrypoint - self.commands = commands - self.environment_variables = environment_variables - self.settings = settings - self.labels = labels - self.endpoints = endpoints - self.resources = resources - self.volume_refs = volume_refs - self.volumes = volumes - self.diagnostics = diagnostics - self.reliable_collections_refs = reliable_collections_refs - self.instance_view = None diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_event.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_event.py deleted file mode 100644 index 59d4f6ddf86..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_event.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerEvent(Model): - """A container event. - - :param name: The name of the container event. - :type name: str - :param count: The count of the event. - :type count: int - :param first_timestamp: Date/time of the first event. - :type first_timestamp: str - :param last_timestamp: Date/time of the last event. - :type last_timestamp: str - :param message: The event message - :type message: str - :param type: The event type. - :type type: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, - 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, name=None, count=None, first_timestamp=None, last_timestamp=None, message=None, type=None): - super(ContainerEvent, self).__init__() - self.name = name - self.count = count - self.first_timestamp = first_timestamp - self.last_timestamp = last_timestamp - self.message = message - self.type = type diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_instance_view.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_instance_view.py deleted file mode 100644 index 330dc725c7d..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_instance_view.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerInstanceView(Model): - """Runtime information of a container instance. - - :param restart_count: The number of times the container has been - restarted. - :type restart_count: int - :param current_state: Current container instance state. - :type current_state: ~azure.mgmt.servicefabricmesh.models.ContainerState - :param previous_state: Previous container instance state. - :type previous_state: ~azure.mgmt.servicefabricmesh.models.ContainerState - :param events: The events of this container instance. - :type events: list[~azure.mgmt.servicefabricmesh.models.ContainerEvent] - """ - - _attribute_map = { - 'restart_count': {'key': 'restartCount', 'type': 'int'}, - 'current_state': {'key': 'currentState', 'type': 'ContainerState'}, - 'previous_state': {'key': 'previousState', 'type': 'ContainerState'}, - 'events': {'key': 'events', 'type': '[ContainerEvent]'}, - } - - def __init__(self, restart_count=None, current_state=None, previous_state=None, events=None): - super(ContainerInstanceView, self).__init__() - self.restart_count = restart_count - self.current_state = current_state - self.previous_state = previous_state - self.events = events diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_label.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_label.py deleted file mode 100644 index f781203e755..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_label.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerLabel(Model): - """Describes a container label. - - :param name: The name of the container label. - :type name: str - :param value: The value of the container label. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, name, value): - super(ContainerLabel, self).__init__() - self.name = name - self.value = value diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_logs.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_logs.py deleted file mode 100644 index b6ed54ba6b6..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_logs.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerLogs(Model): - """Container logs. - - :param content: Container logs. - :type content: str - """ - - _attribute_map = { - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, content=None): - super(ContainerLogs, self).__init__() - self.content = content diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_state.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_state.py deleted file mode 100644 index f9ff85e93ad..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_state.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerState(Model): - """The container state. - - :param state: The state of this container - :type state: str - :param start_time: Date/time when the container state started. - :type start_time: datetime - :param exit_code: The container exit code. - :type exit_code: str - :param finish_time: Date/time when the container state finished. - :type finish_time: datetime - :param detail_status: Human-readable status of this state. - :type detail_status: str - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'exit_code': {'key': 'exitCode', 'type': 'str'}, - 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, - 'detail_status': {'key': 'detailStatus', 'type': 'str'}, - } - - def __init__(self, state=None, start_time=None, exit_code=None, finish_time=None, detail_status=None): - super(ContainerState, self).__init__() - self.state = state - self.start_time = start_time - self.exit_code = exit_code - self.finish_time = finish_time - self.detail_status = detail_status diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_volume.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_volume.py deleted file mode 100644 index e94e437f0b3..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/container_volume.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerVolume(Model): - """Describes how a volume is attached to a container. - - :param name: Name of the volume. - :type name: str - :param read_only: The flag indicating whether the volume is read only. - Default is 'false'. - :type read_only: bool - :param destination_path: The path within the container at which the volume - should be mounted. Only valid path characters are allowed. - :type destination_path: str - """ - - _validation = { - 'name': {'required': True}, - 'destination_path': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'destination_path': {'key': 'destinationPath', 'type': 'str'}, - } - - def __init__(self, name, destination_path, read_only=None): - super(ContainerVolume, self).__init__() - self.name = name - self.read_only = read_only - self.destination_path = destination_path diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/diagnostics_description.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/diagnostics_description.py deleted file mode 100644 index c92a51dce31..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/diagnostics_description.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsDescription(Model): - """Describes the diagnostics options available. - - :param sinks: List of supported sinks that can be referenced. - :type sinks: - list[~azure.mgmt.servicefabricmesh.models.DiagnosticsSinkProperties] - :param enabled: Status of whether or not sinks are enabled. - :type enabled: bool - :param default_sink_refs: The sinks to be used if diagnostics is enabled. - Sink choices can be overridden at the service and code package level. - :type default_sink_refs: list[str] - """ - - _attribute_map = { - 'sinks': {'key': 'sinks', 'type': '[DiagnosticsSinkProperties]'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'default_sink_refs': {'key': 'defaultSinkRefs', 'type': '[str]'}, - } - - def __init__(self, sinks=None, enabled=None, default_sink_refs=None): - super(DiagnosticsDescription, self).__init__() - self.sinks = sinks - self.enabled = enabled - self.default_sink_refs = default_sink_refs diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/diagnostics_ref.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/diagnostics_ref.py deleted file mode 100644 index 463ed35b910..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/diagnostics_ref.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsRef(Model): - """Reference to sinks in DiagnosticsDescription. - - :param enabled: Status of whether or not sinks are enabled. - :type enabled: bool - :param sink_refs: List of sinks to be used if enabled. References the list - of sinks in DiagnosticsDescription. - :type sink_refs: list[str] - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'sink_refs': {'key': 'sinkRefs', 'type': '[str]'}, - } - - def __init__(self, enabled=None, sink_refs=None): - super(DiagnosticsRef, self).__init__() - self.enabled = enabled - self.sink_refs = sink_refs diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/diagnostics_sink_properties.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/diagnostics_sink_properties.py deleted file mode 100644 index fbc4ad3845c..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/diagnostics_sink_properties.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsSinkProperties(Model): - """Properties of a DiagnosticsSink. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureInternalMonitoringPipelineSinkDescription - - :param name: Name of the sink. This value is referenced by - DiagnosticsReferenceDescription - :type name: str - :param description: A description of the sink. - :type description: str - :param kind: Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AzureInternalMonitoringPipeline': 'AzureInternalMonitoringPipelineSinkDescription'} - } - - def __init__(self, name=None, description=None): - super(DiagnosticsSinkProperties, self).__init__() - self.name = name - self.description = description - self.kind = None diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/endpoint_properties.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/endpoint_properties.py deleted file mode 100644 index 0148c543e8f..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/endpoint_properties.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EndpointProperties(Model): - """Describes a container endpoint. - - :param name: The name of the endpoint. - :type name: str - :param port: Port used by the container. - :type port: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__(self, name, port=None): - super(EndpointProperties, self).__init__() - self.name = name - self.port = port diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/endpoint_ref.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/endpoint_ref.py deleted file mode 100644 index 605be2dc6c9..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/endpoint_ref.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EndpointRef(Model): - """Describes a reference to a service endpoint. - - :param name: Name of the endpoint. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, name=None): - super(EndpointRef, self).__init__() - self.name = name diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/environment_variable.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/environment_variable.py deleted file mode 100644 index fe9c1134a49..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/environment_variable.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentVariable(Model): - """Describes an environment variable for the container. - - :param name: The name of the environment variable. - :type name: str - :param value: The value of the environment variable. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, name=None, value=None): - super(EnvironmentVariable, self).__init__() - self.name = name - self.value = value diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/error_details_model.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/error_details_model.py deleted file mode 100644 index d13441d20f5..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/error_details_model.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorDetailsModel(Model): - """Error model details information. - - :param code: - :type code: str - :param message: Error message. - :type message: str - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, code, message): - super(ErrorDetailsModel, self).__init__() - self.code = code - self.message = message diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/error_error_model.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/error_error_model.py deleted file mode 100644 index 33208a1a409..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/error_error_model.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorErrorModel(Model): - """Error model information. - - :param code: - :type code: str - :param message: Error message. - :type message: str - :param inner_error: - :type inner_error: str - :param details: List of error message details. - :type details: - list[~azure.mgmt.servicefabricmesh.models.ErrorDetailsModel] - """ - - _validation = { - 'code': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'inner_error': {'key': 'innerError', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetailsModel]'}, - } - - def __init__(self, code, message=None, inner_error=None, details=None): - super(ErrorErrorModel, self).__init__() - self.code = code - self.message = message - self.inner_error = inner_error - self.details = details diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/error_model.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/error_model.py deleted file mode 100644 index fcbd2e42d2f..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/error_model.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorModel(Model): - """The error details. - - :param error: Error model information - :type error: ~azure.mgmt.servicefabricmesh.models.ErrorErrorModel - """ - - _validation = { - 'error': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorErrorModel'}, - } - - def __init__(self, error): - super(ErrorModel, self).__init__() - self.error = error - - -class ErrorModelException(HttpOperationError): - """Server responsed with exception of type: 'ErrorModel'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorModelException, self).__init__(deserialize, response, 'ErrorModel', *args) diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/gateway_destination.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/gateway_destination.py deleted file mode 100644 index 0c1d38d0a3f..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/gateway_destination.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GatewayDestination(Model): - """Describes destination endpoint for routing traffic. - - :param application_name: Name of the service fabric Mesh application. - :type application_name: str - :param service_name: service that contains the endpoint. - :type service_name: str - :param endpoint_name: name of the endpoint in the service. - :type endpoint_name: str - """ - - _validation = { - 'application_name': {'required': True}, - 'service_name': {'required': True}, - 'endpoint_name': {'required': True}, - } - - _attribute_map = { - 'application_name': {'key': 'applicationName', 'type': 'str'}, - 'service_name': {'key': 'serviceName', 'type': 'str'}, - 'endpoint_name': {'key': 'endpointName', 'type': 'str'}, - } - - def __init__(self, application_name, service_name, endpoint_name): - super(GatewayDestination, self).__init__() - self.application_name = application_name - self.service_name = service_name - self.endpoint_name = endpoint_name diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/gateway_properties.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/gateway_properties.py deleted file mode 100644 index abe709b86e8..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/gateway_properties.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GatewayProperties(Model): - """Describes properties of a gateway resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param description: User readable description of the gateway. - :type description: str - :param source_network: Network the gateway should listen on for requests. - :type source_network: ~azure.mgmt.servicefabricmesh.models.NetworkRef - :param destination_network: Network that the Application is using. - :type destination_network: ~azure.mgmt.servicefabricmesh.models.NetworkRef - :param tcp: Configuration for tcp connectivity for this gateway. - :type tcp: list[~azure.mgmt.servicefabricmesh.models.TcpConfig] - :param http: Configuration for http connectivity for this gateway. - :type http: list[~azure.mgmt.servicefabricmesh.models.HttpConfig] - :ivar status: Status of the resource. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or - ~azure.mgmt.servicefabricmesh.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the gateway. - :vartype status_details: str - :ivar ip_address: IP address of the gateway. This is populated in the - response and is ignored for incoming requests. - :vartype ip_address: str - """ - - _validation = { - 'source_network': {'required': True}, - 'destination_network': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'ip_address': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'source_network': {'key': 'sourceNetwork', 'type': 'NetworkRef'}, - 'destination_network': {'key': 'destinationNetwork', 'type': 'NetworkRef'}, - 'tcp': {'key': 'tcp', 'type': '[TcpConfig]'}, - 'http': {'key': 'http', 'type': '[HttpConfig]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - } - - def __init__(self, source_network, destination_network, description=None, tcp=None, http=None): - super(GatewayProperties, self).__init__() - self.description = description - self.source_network = source_network - self.destination_network = destination_network - self.tcp = tcp - self.http = http - self.status = None - self.status_details = None - self.ip_address = None diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/gateway_resource_description.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/gateway_resource_description.py deleted file mode 100644 index 79a15b751c7..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/gateway_resource_description.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class GatewayResourceDescription(TrackedResource): - """This type describes a gateway resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: The geo-location where the resource lives - :type location: str - :ivar provisioning_state: State of the resource. - :vartype provisioning_state: str - :param description: User readable description of the gateway. - :type description: str - :param source_network: Network the gateway should listen on for requests. - :type source_network: ~azure.mgmt.servicefabricmesh.models.NetworkRef - :param destination_network: Network that the Application is using. - :type destination_network: ~azure.mgmt.servicefabricmesh.models.NetworkRef - :param tcp: Configuration for tcp connectivity for this gateway. - :type tcp: list[~azure.mgmt.servicefabricmesh.models.TcpConfig] - :param http: Configuration for http connectivity for this gateway. - :type http: list[~azure.mgmt.servicefabricmesh.models.HttpConfig] - :ivar status: Status of the resource. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or - ~azure.mgmt.servicefabricmesh.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the gateway. - :vartype status_details: str - :ivar ip_address: IP address of the gateway. This is populated in the - response and is ignored for incoming requests. - :vartype ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'source_network': {'required': True}, - 'destination_network': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'ip_address': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'source_network': {'key': 'properties.sourceNetwork', 'type': 'NetworkRef'}, - 'destination_network': {'key': 'properties.destinationNetwork', 'type': 'NetworkRef'}, - 'tcp': {'key': 'properties.tcp', 'type': '[TcpConfig]'}, - 'http': {'key': 'properties.http', 'type': '[HttpConfig]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, - } - - def __init__(self, location, source_network, destination_network, tags=None, description=None, tcp=None, http=None): - super(GatewayResourceDescription, self).__init__(tags=tags, location=location) - self.provisioning_state = None - self.description = description - self.source_network = source_network - self.destination_network = destination_network - self.tcp = tcp - self.http = http - self.status = None - self.status_details = None - self.ip_address = None diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/gateway_resource_description_list.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/gateway_resource_description_list.py deleted file mode 100644 index 0a47a86e331..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/gateway_resource_description_list.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GatewayResourceDescriptionList(Model): - """A pageable list of gateway resources. - - :param value: One page of the list. - :type value: - list[~azure.mgmt.servicefabricmesh.models.GatewayResourceDescription] - :param next_link: URI to fetch the next page of the list. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[GatewayResourceDescription]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, value=None, next_link=None): - super(GatewayResourceDescriptionList, self).__init__() - self.value = value - self.next_link = next_link diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/gateway_resource_description_paged.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/gateway_resource_description_paged.py deleted file mode 100644 index 16a403478c9..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/gateway_resource_description_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class GatewayResourceDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`GatewayResourceDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GatewayResourceDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(GatewayResourceDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/http_config.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/http_config.py deleted file mode 100644 index 472e6b460c1..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/http_config.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpConfig(Model): - """Describes the http configuration for external connectivity for this - network. - - :param name: http gateway config name. - :type name: str - :param port: Specifies the port at which the service endpoint below needs - to be exposed. - :type port: int - :param hosts: description for routing. - :type hosts: list[~azure.mgmt.servicefabricmesh.models.HttpHostConfig] - """ - - _validation = { - 'name': {'required': True}, - 'port': {'required': True}, - 'hosts': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'hosts': {'key': 'hosts', 'type': '[HttpHostConfig]'}, - } - - def __init__(self, name, port, hosts): - super(HttpConfig, self).__init__() - self.name = name - self.port = port - self.hosts = hosts diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/http_host_config.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/http_host_config.py deleted file mode 100644 index 677a71ab5e4..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/http_host_config.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpHostConfig(Model): - """Describes the hostname properties for http routing. - - :param name: http hostname config name. - :type name: str - :param routes: Route information to use for routing. Routes are processed - in the order they are specified. Specify routes that are more specific - before routes that can hamdle general cases. - :type routes: list[~azure.mgmt.servicefabricmesh.models.HttpRouteConfig] - """ - - _validation = { - 'name': {'required': True}, - 'routes': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'routes': {'key': 'routes', 'type': '[HttpRouteConfig]'}, - } - - def __init__(self, name, routes): - super(HttpHostConfig, self).__init__() - self.name = name - self.routes = routes diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/http_route_config.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/http_route_config.py deleted file mode 100644 index 24a782ecbef..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/http_route_config.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpRouteConfig(Model): - """Describes the hostname properties for http routing. - - :param name: http route name. - :type name: str - :param match: Describes a rule for http route matching. - :type match: ~azure.mgmt.servicefabricmesh.models.HttpRouteMatchRule - :param destination: Describes destination endpoint for routing traffic. - :type destination: ~azure.mgmt.servicefabricmesh.models.GatewayDestination - """ - - _validation = { - 'name': {'required': True}, - 'match': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'match': {'key': 'match', 'type': 'HttpRouteMatchRule'}, - 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, - } - - def __init__(self, name, match, destination): - super(HttpRouteConfig, self).__init__() - self.name = name - self.match = match - self.destination = destination diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/http_route_match_header.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/http_route_match_header.py deleted file mode 100644 index 3256206a649..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/http_route_match_header.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpRouteMatchHeader(Model): - """Describes header information for http route matching. - - :param name: Name of header to match in request. - :type name: str - :param value: Value of header to match in request. - :type value: str - :param type: how to match header value. Possible values include: 'exact' - :type type: str or ~azure.mgmt.servicefabricmesh.models.HeaderMatchType - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, name, value=None, type=None): - super(HttpRouteMatchHeader, self).__init__() - self.name = name - self.value = value - self.type = type diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/http_route_match_path.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/http_route_match_path.py deleted file mode 100644 index 4214f3cbb17..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/http_route_match_path.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpRouteMatchPath(Model): - """Path to match for routing. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param value: Uri path to match for request. - :type value: str - :param rewrite: replacement string for matched part of the Uri. - :type rewrite: str - :ivar type: how to match value in the Uri. Default value: "prefix" . - :vartype type: str - """ - - _validation = { - 'value': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'rewrite': {'key': 'rewrite', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "prefix" - - def __init__(self, value, rewrite=None): - super(HttpRouteMatchPath, self).__init__() - self.value = value - self.rewrite = rewrite diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/http_route_match_rule.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/http_route_match_rule.py deleted file mode 100644 index 397b3d45232..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/http_route_match_rule.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpRouteMatchRule(Model): - """Describes a rule for http route matching. - - :param path: Path to match for routing. - :type path: ~azure.mgmt.servicefabricmesh.models.HttpRouteMatchPath - :param headers: headers and their values to match in request. - :type headers: - list[~azure.mgmt.servicefabricmesh.models.HttpRouteMatchHeader] - """ - - _validation = { - 'path': {'required': True}, - } - - _attribute_map = { - 'path': {'key': 'path', 'type': 'HttpRouteMatchPath'}, - 'headers': {'key': 'headers', 'type': '[HttpRouteMatchHeader]'}, - } - - def __init__(self, path, headers=None): - super(HttpRouteMatchRule, self).__init__() - self.path = path - self.headers = headers diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/image_registry_credential.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/image_registry_credential.py deleted file mode 100644 index 2fd3553ac85..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/image_registry_credential.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageRegistryCredential(Model): - """Image registry credential. - - :param server: Docker image registry server, without protocol such as - `http` and `https`. - :type server: str - :param username: The username for the private registry. - :type username: str - :param password: The password for the private registry. The password is - required for create or update operations, however it is not returned in - the get or list operations. - :type password: str - """ - - _validation = { - 'server': {'required': True}, - 'username': {'required': True}, - } - - _attribute_map = { - 'server': {'key': 'server', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__(self, server, username, password=None): - super(ImageRegistryCredential, self).__init__() - self.server = server - self.username = username - self.password = password diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/ingress_config.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/ingress_config.py deleted file mode 100644 index 504c7f13961..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/ingress_config.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IngressConfig(Model): - """Describes public connectivity configuration for the network. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param qos_level: The QoS tier for ingress. Possible values include: - 'Bronze' - :type qos_level: str or - ~azure.mgmt.servicefabricmesh.models.IngressQoSLevel - :param layer4: Configuration for layer4 public connectivity for this - network. - :type layer4: - list[~azure.mgmt.servicefabricmesh.models.Layer4IngressConfig] - :ivar public_ip_address: The public IP address for reaching this network. - :vartype public_ip_address: str - """ - - _validation = { - 'public_ip_address': {'readonly': True}, - } - - _attribute_map = { - 'qos_level': {'key': 'qosLevel', 'type': 'str'}, - 'layer4': {'key': 'layer4', 'type': '[Layer4IngressConfig]'}, - 'public_ip_address': {'key': 'publicIPAddress', 'type': 'str'}, - } - - def __init__(self, qos_level=None, layer4=None): - super(IngressConfig, self).__init__() - self.qos_level = qos_level - self.layer4 = layer4 - self.public_ip_address = None diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/inlined_value_secret_resource_properties.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/inlined_value_secret_resource_properties.py deleted file mode 100644 index f265524c24a..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/inlined_value_secret_resource_properties.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .secret_resource_properties import SecretResourceProperties - - -class InlinedValueSecretResourceProperties(SecretResourceProperties): - """Describes the properties of a secret resource whose value is provided - explicitly as plaintext. The secret resource may have multiple values, each - being uniquely versioned. The secret value of each version is stored - encrypted, and delivered as plaintext into the context of applications - referencing it. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provisioning_state: State of the resource. - :vartype provisioning_state: str - :param kind: Constant filled by server. - :type kind: str - :param description: User readable description of the secret. - :type description: str - :ivar status: Status of the resource. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or - ~azure.mgmt.servicefabricmesh.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the secret. - :vartype status_details: str - :param content_type: The type of the content stored in the secret value. - The value of this property is opaque to Service Fabric. Once set, the - value of this property cannot be changed. - :type content_type: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - def __init__(self, description=None, content_type=None): - super(InlinedValueSecretResourceProperties, self).__init__(description=description, content_type=content_type) - self.kind = 'inlinedValue' diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/layer4_ingress_config.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/layer4_ingress_config.py deleted file mode 100644 index 61f1ef022ae..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/layer4_ingress_config.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Layer4IngressConfig(Model): - """Describes the layer4 configuration for public connectivity for this - network. - - :param name: Layer4 ingress config name. - :type name: str - :param public_port: Specifies the public port at which the service - endpoint below needs to be exposed. - :type public_port: int - :param application_name: The application name which contains the service - to be exposed. - :type application_name: str - :param service_name: The service whose endpoint needs to be exposed at the - public port. - :type service_name: str - :param endpoint_name: The service endpoint that needs to be exposed. - :type endpoint_name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'public_port': {'key': 'publicPort', 'type': 'int'}, - 'application_name': {'key': 'applicationName', 'type': 'str'}, - 'service_name': {'key': 'serviceName', 'type': 'str'}, - 'endpoint_name': {'key': 'endpointName', 'type': 'str'}, - } - - def __init__(self, name=None, public_port=None, application_name=None, service_name=None, endpoint_name=None): - super(Layer4IngressConfig, self).__init__() - self.name = name - self.public_port = public_port - self.application_name = application_name - self.service_name = service_name - self.endpoint_name = endpoint_name diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/local_network_resource_properties.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/local_network_resource_properties.py deleted file mode 100644 index 3be9d919238..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/local_network_resource_properties.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .network_resource_properties import NetworkResourceProperties - - -class LocalNetworkResourceProperties(NetworkResourceProperties): - """Information about a Service Fabric container network local to a single - Service Fabric cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provisioning_state: State of the resource. - :vartype provisioning_state: str - :param kind: Constant filled by server. - :type kind: str - :param description: User readable description of the network. - :type description: str - :ivar status: Status of the network. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or - ~azure.mgmt.servicefabricmesh.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the network. - :vartype status_details: str - :param network_address_prefix: Address space for the local container - network. - :type network_address_prefix: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'network_address_prefix': {'key': 'networkAddressPrefix', 'type': 'str'}, - } - - def __init__(self, description=None, network_address_prefix=None): - super(LocalNetworkResourceProperties, self).__init__(description=description) - self.network_address_prefix = network_address_prefix - self.kind = 'Local' diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/managed_proxy_resource.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/managed_proxy_resource.py deleted file mode 100644 index 02ae09e50eb..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/managed_proxy_resource.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedProxyResource(Model): - """The resource model definition for Azure Resource Manager proxy resource. It - will have everything other than required location and tags. This proxy - resource is explicitly created or updated by including it in the parent - resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :param name: The name of the resource - :type name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, name=None): - super(ManagedProxyResource, self).__init__() - self.id = None - self.name = name - self.type = None diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/network_properties.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/network_properties.py deleted file mode 100644 index 56acd286e1d..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/network_properties.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkProperties(Model): - """Describes properties of a network resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param description: User readable description of the network. - :type description: str - :param address_prefix: the address prefix for this network. - :type address_prefix: str - :param ingress_config: Configuration for public connectivity for this - network. - :type ingress_config: ~azure.mgmt.servicefabricmesh.models.IngressConfig - :param status: Status of the network. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :type status: str or ~azure.mgmt.servicefabricmesh.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the network. - :vartype status_details: str - """ - - _validation = { - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'address_prefix': {'key': 'addressPrefix', 'type': 'str'}, - 'ingress_config': {'key': 'ingressConfig', 'type': 'IngressConfig'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - } - - def __init__(self, description=None, address_prefix=None, ingress_config=None, status=None): - super(NetworkProperties, self).__init__() - self.description = description - self.address_prefix = address_prefix - self.ingress_config = ingress_config - self.status = status - self.status_details = None diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/network_ref.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/network_ref.py deleted file mode 100644 index 484ee2226ff..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/network_ref.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkRef(Model): - """Describes a network reference in a service. - - :param name: Name of the network - :type name: str - :param endpoint_refs: A list of endpoints that are exposed on this - network. - :type endpoint_refs: - list[~azure.mgmt.servicefabricmesh.models.EndpointRef] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'endpoint_refs': {'key': 'endpointRefs', 'type': '[EndpointRef]'}, - } - - def __init__(self, name=None, endpoint_refs=None): - super(NetworkRef, self).__init__() - self.name = name - self.endpoint_refs = endpoint_refs diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/network_resource_description.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/network_resource_description.py deleted file mode 100644 index 06e90969e1d..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/network_resource_description.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class NetworkResourceDescription(TrackedResource): - """This type describes a network resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: The geo-location where the resource lives - :type location: str - :param properties: Describes properties of a network resource. - :type properties: - ~azure.mgmt.servicefabricmesh.models.NetworkResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'NetworkResourceProperties'}, - } - - def __init__(self, location, properties, tags=None): - super(NetworkResourceDescription, self).__init__(tags=tags, location=location) - self.properties = properties diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/network_resource_description_paged.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/network_resource_description_paged.py deleted file mode 100644 index a6206dbec02..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/network_resource_description_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class NetworkResourceDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`NetworkResourceDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[NetworkResourceDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(NetworkResourceDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/network_resource_properties.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/network_resource_properties.py deleted file mode 100644 index b42d0fbf1b9..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/network_resource_properties.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .network_resource_properties_base import NetworkResourcePropertiesBase - - -class NetworkResourceProperties(NetworkResourcePropertiesBase): - """Describes properties of a network resource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LocalNetworkResourceProperties - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provisioning_state: State of the resource. - :vartype provisioning_state: str - :param kind: Constant filled by server. - :type kind: str - :param description: User readable description of the network. - :type description: str - :ivar status: Status of the network. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or - ~azure.mgmt.servicefabricmesh.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the network. - :vartype status_details: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Local': 'LocalNetworkResourceProperties'} - } - - def __init__(self, description=None): - super(NetworkResourceProperties, self).__init__() - self.description = description - self.status = None - self.status_details = None - self.kind = 'NetworkResourceProperties' diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/network_resource_properties_base.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/network_resource_properties_base.py deleted file mode 100644 index 0dc56acc1b3..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/network_resource_properties_base.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .provisioned_resource_properties import ProvisionedResourceProperties - - -class NetworkResourcePropertiesBase(ProvisionedResourceProperties): - """This type describes the properties of a network resource, including its - kind. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NetworkResourceProperties - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provisioning_state: State of the resource. - :vartype provisioning_state: str - :param kind: Constant filled by server. - :type kind: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'NetworkResourceProperties': 'NetworkResourceProperties'} - } - - def __init__(self): - super(NetworkResourcePropertiesBase, self).__init__() - self.kind = None - self.kind = 'NetworkResourcePropertiesBase' diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/operation_result.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/operation_result.py deleted file mode 100644 index e3094ad4492..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/operation_result.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationResult(Model): - """List of operations available at the listed Azure resource provider. - - :param name: The name of the operation. - :type name: str - :param display: The object that represents the operation. - :type display: - ~azure.mgmt.servicefabricmesh.models.AvailableOperationDisplay - :param origin: Origin result - :type origin: str - :param next_link: The URL to use for getting the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'AvailableOperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, name=None, display=None, origin=None, next_link=None): - super(OperationResult, self).__init__() - self.name = name - self.display = display - self.origin = origin - self.next_link = next_link diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/operation_result_paged.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/operation_result_paged.py deleted file mode 100644 index b95761b52fd..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/operation_result_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationResultPaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationResult ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationResult]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationResultPaged, self).__init__(*args, **kwargs) diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/provisioned_resource_properties.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/provisioned_resource_properties.py deleted file mode 100644 index 27f7efc1b83..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/provisioned_resource_properties.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProvisionedResourceProperties(Model): - """Describes common properties of a provisioned resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provisioning_state: State of the resource. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__(self): - super(ProvisionedResourceProperties, self).__init__() - self.provisioning_state = None diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/proxy_resource.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/proxy_resource.py deleted file mode 100644 index 22422b361aa..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/proxy_resource.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ProxyResource(Resource): - """The resource model definition for Azure Resource Manager proxy resource. It - will have everything other than required location and tags. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - def __init__(self): - super(ProxyResource, self).__init__() diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/reliable_collections_ref.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/reliable_collections_ref.py deleted file mode 100644 index c4d24fbe1ab..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/reliable_collections_ref.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReliableCollectionsRef(Model): - """Specifying this parameter adds support for reliable collections. - - :param name: Name of ReliableCollection resource. Right now it's not used - and you can use any string. - :type name: str - :param do_not_persist_state: False (the default) if ReliableCollections - state is persisted to disk as usual. True if you do not want to persist - state, in which case replication is still enabled and you can use - ReliableCollections as distributed cache. - :type do_not_persist_state: bool - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'do_not_persist_state': {'key': 'doNotPersistState', 'type': 'bool'}, - } - - def __init__(self, name, do_not_persist_state=None): - super(ReliableCollectionsRef, self).__init__() - self.name = name - self.do_not_persist_state = do_not_persist_state diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/resource.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/resource.py deleted file mode 100644 index b0c15593c67..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/resource.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The resource model definition for Azure Resource Manager resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self): - super(Resource, self).__init__() - self.id = None - self.name = None - self.type = None diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/resource_limits.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/resource_limits.py deleted file mode 100644 index 309d4c99af7..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/resource_limits.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceLimits(Model): - """This type describes the resource limits for a given container. It describes - the most amount of resources a container is allowed to use before being - restarted. - - :param memory_in_gb: The memory limit in GB. - :type memory_in_gb: float - :param cpu: CPU limits in cores. At present, only full cores are - supported. - :type cpu: float - """ - - _attribute_map = { - 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, - 'cpu': {'key': 'cpu', 'type': 'float'}, - } - - def __init__(self, memory_in_gb=None, cpu=None): - super(ResourceLimits, self).__init__() - self.memory_in_gb = memory_in_gb - self.cpu = cpu diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/resource_requests.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/resource_requests.py deleted file mode 100644 index 78bf8eba064..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/resource_requests.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceRequests(Model): - """This type describes the requested resources for a given container. It - describes the least amount of resources required for the container. A - container can consume more than requested resources up to the specified - limits before being restarted. Currently, the requested resources are - treated as limits. - - :param memory_in_gb: The memory request in GB for this container. - :type memory_in_gb: float - :param cpu: Requested number of CPU cores. At present, only full cores are - supported. - :type cpu: float - """ - - _validation = { - 'memory_in_gb': {'required': True}, - 'cpu': {'required': True}, - } - - _attribute_map = { - 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, - 'cpu': {'key': 'cpu', 'type': 'float'}, - } - - def __init__(self, memory_in_gb, cpu): - super(ResourceRequests, self).__init__() - self.memory_in_gb = memory_in_gb - self.cpu = cpu diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/resource_requirements.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/resource_requirements.py deleted file mode 100644 index 46c05ea344c..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/resource_requirements.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceRequirements(Model): - """This type describes the resource requirements for a container or a service. - - :param requests: Describes the requested resources for a given container. - :type requests: ~azure.mgmt.servicefabricmesh.models.ResourceRequests - :param limits: Describes the maximum limits on the resources for a given - container. - :type limits: ~azure.mgmt.servicefabricmesh.models.ResourceLimits - """ - - _validation = { - 'requests': {'required': True}, - } - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'ResourceRequests'}, - 'limits': {'key': 'limits', 'type': 'ResourceLimits'}, - } - - def __init__(self, requests, limits=None): - super(ResourceRequirements, self).__init__() - self.requests = requests - self.limits = limits diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_resource_description.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_resource_description.py deleted file mode 100644 index 0c47719967e..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_resource_description.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class SecretResourceDescription(TrackedResource): - """This type describes a secret resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: The geo-location where the resource lives - :type location: str - :param properties: Describes the properties of a secret resource. - :type properties: - ~azure.mgmt.servicefabricmesh.models.SecretResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'SecretResourceProperties'}, - } - - def __init__(self, location, properties, tags=None): - super(SecretResourceDescription, self).__init__(tags=tags, location=location) - self.properties = properties diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_resource_description_paged.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_resource_description_paged.py deleted file mode 100644 index c08f184e141..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_resource_description_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SecretResourceDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretResourceDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretResourceDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretResourceDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_resource_properties.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_resource_properties.py deleted file mode 100644 index c253684e3e2..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_resource_properties.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .secret_resource_properties_base import SecretResourcePropertiesBase - - -class SecretResourceProperties(SecretResourcePropertiesBase): - """Describes the properties of a secret resource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: InlinedValueSecretResourceProperties - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provisioning_state: State of the resource. - :vartype provisioning_state: str - :param kind: Constant filled by server. - :type kind: str - :param description: User readable description of the secret. - :type description: str - :ivar status: Status of the resource. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or - ~azure.mgmt.servicefabricmesh.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the secret. - :vartype status_details: str - :param content_type: The type of the content stored in the secret value. - The value of this property is opaque to Service Fabric. Once set, the - value of this property cannot be changed. - :type content_type: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'inlinedValue': 'InlinedValueSecretResourceProperties'} - } - - def __init__(self, description=None, content_type=None): - super(SecretResourceProperties, self).__init__() - self.description = description - self.status = None - self.status_details = None - self.content_type = content_type - self.kind = 'SecretResourceProperties' diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_resource_properties_base.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_resource_properties_base.py deleted file mode 100644 index 05823e0b6b0..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_resource_properties_base.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .provisioned_resource_properties import ProvisionedResourceProperties - - -class SecretResourcePropertiesBase(ProvisionedResourceProperties): - """This type describes the properties of a secret resource, including its - kind. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SecretResourceProperties - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provisioning_state: State of the resource. - :vartype provisioning_state: str - :param kind: Constant filled by server. - :type kind: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'SecretResourceProperties': 'SecretResourceProperties'} - } - - def __init__(self): - super(SecretResourcePropertiesBase, self).__init__() - self.kind = None - self.kind = 'SecretResourcePropertiesBase' diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_value.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_value.py deleted file mode 100644 index 9df7935c50f..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_value.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SecretValue(Model): - """This type represents the unencrypted value of the secret. - - :param value: The actual value of the secret. - :type value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, value=None): - super(SecretValue, self).__init__() - self.value = value diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_value_properties.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_value_properties.py deleted file mode 100644 index 22077cbbcda..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_value_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SecretValueProperties(Model): - """This type describes properties of secret value resource. - - :param value: The actual value of the secret. - :type value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, value=None): - super(SecretValueProperties, self).__init__() - self.value = value diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_value_resource_description.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_value_resource_description.py deleted file mode 100644 index 0aa04e806c8..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_value_resource_description.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class SecretValueResourceDescription(TrackedResource): - """This type describes a value of a secret resource. The name of this resource - is the version identifier corresponding to this secret value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: The geo-location where the resource lives - :type location: str - :ivar provisioning_state: State of the resource. - :vartype provisioning_state: str - :param value: The actual value of the secret. - :type value: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__(self, location, tags=None, value=None): - super(SecretValueResourceDescription, self).__init__(tags=tags, location=location) - self.provisioning_state = None - self.value = value diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_value_resource_description_paged.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_value_resource_description_paged.py deleted file mode 100644 index a3ad0d5dedc..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/secret_value_resource_description_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SecretValueResourceDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecretValueResourceDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecretValueResourceDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(SecretValueResourceDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_fabric_mesh_management_client_enums.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_fabric_mesh_management_client_enums.py deleted file mode 100644 index ce9c2f52946..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_fabric_mesh_management_client_enums.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ResourceStatus(Enum): - - unknown = "Unknown" - ready = "Ready" - upgrading = "Upgrading" - creating = "Creating" - deleting = "Deleting" - failed = "Failed" - - -class HealthState(Enum): - - invalid = "Invalid" - ok = "Ok" - warning = "Warning" - error = "Error" - unknown = "Unknown" - - -class SecretKind(Enum): - - inlined_value = "inlinedValue" - - -class VolumeProvider(Enum): - - sf_azure_file = "SFAzureFile" - - -class SizeTypes(Enum): - - small = "Small" - medium = "Medium" - large = "Large" - - -class ApplicationScopedVolumeKind(Enum): - - service_fabric_volume_disk = "ServiceFabricVolumeDisk" - - -class NetworkKind(Enum): - - local = "Local" - - -class HeaderMatchType(Enum): - - exact = "exact" - - -class OperatingSystemType(Enum): - - linux = "Linux" - windows = "Windows" - - -class DiagnosticsSinkKind(Enum): - - invalid = "Invalid" - azure_internal_monitoring_pipeline = "AzureInternalMonitoringPipeline" - - -class AutoScalingMechanismKind(Enum): - - add_remove_replica = "AddRemoveReplica" - - -class AutoScalingMetricKind(Enum): - - resource = "Resource" - - -class AutoScalingResourceMetricName(Enum): - - cpu = "cpu" - memory_in_gb = "memoryInGB" - - -class AutoScalingTriggerKind(Enum): - - average_load = "AverageLoad" diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_properties.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_properties.py deleted file mode 100644 index bbda28a0e16..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_properties.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceProperties(Model): - """Describes properties of a service resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param description: User readable description of the service. - :type description: str - :param replica_count: The number of replicas of the service to create. - Defaults to 1 if not specified. - :type replica_count: int - :param auto_scaling_policies: Auto scaling policies - :type auto_scaling_policies: - list[~azure.mgmt.servicefabricmesh.models.AutoScalingPolicy] - :ivar status: Status of the service. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or - ~azure.mgmt.servicefabricmesh.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the service. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :vartype health_state: str or - ~azure.mgmt.servicefabricmesh.models.HealthState - :ivar unhealthy_evaluation: When the service's health state is not 'Ok', - this additional details from service fabric Health Manager for the user to - know why the service is marked unhealthy. - :vartype unhealthy_evaluation: str - """ - - _validation = { - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'replica_count': {'key': 'replicaCount', 'type': 'int'}, - 'auto_scaling_policies': {'key': 'autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'health_state': {'key': 'healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, - } - - def __init__(self, description=None, replica_count=None, auto_scaling_policies=None): - super(ServiceProperties, self).__init__() - self.description = description - self.replica_count = replica_count - self.auto_scaling_policies = auto_scaling_policies - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_replica_description.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_replica_description.py deleted file mode 100644 index efd54ef904c..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_replica_description.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_replica_properties import ServiceReplicaProperties - - -class ServiceReplicaDescription(ServiceReplicaProperties): - """Describes a replica of a service resource. - - :param os_type: The operation system required by the code in service. - Possible values include: 'Linux', 'Windows' - :type os_type: str or - ~azure.mgmt.servicefabricmesh.models.OperatingSystemType - :param code_packages: Describes the set of code packages that forms the - service. A code package describes the container and the properties for - running it. All the code packages are started together on the same host - and share the same context (network, process etc.). - :type code_packages: - list[~azure.mgmt.servicefabricmesh.models.ContainerCodePackageProperties] - :param network_refs: The names of the private networks that this service - needs to be part of. - :type network_refs: list[~azure.mgmt.servicefabricmesh.models.NetworkRef] - :param diagnostics: Reference to sinks in DiagnosticsDescription. - :type diagnostics: ~azure.mgmt.servicefabricmesh.models.DiagnosticsRef - :param replica_name: Name of the replica. - :type replica_name: str - """ - - _validation = { - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - 'replica_name': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'str'}, - 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - 'replica_name': {'key': 'replicaName', 'type': 'str'}, - } - - def __init__(self, os_type, code_packages, replica_name, network_refs=None, diagnostics=None): - super(ServiceReplicaDescription, self).__init__(os_type=os_type, code_packages=code_packages, network_refs=network_refs, diagnostics=diagnostics) - self.replica_name = replica_name diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_replica_description_paged.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_replica_description_paged.py deleted file mode 100644 index 21e8c05cea5..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_replica_description_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServiceReplicaDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceReplicaDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceReplicaDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceReplicaDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_replica_properties.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_replica_properties.py deleted file mode 100644 index 6a660a65c5d..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_replica_properties.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceReplicaProperties(Model): - """Describes the properties of a service replica. - - :param os_type: The operation system required by the code in service. - Possible values include: 'Linux', 'Windows' - :type os_type: str or - ~azure.mgmt.servicefabricmesh.models.OperatingSystemType - :param code_packages: Describes the set of code packages that forms the - service. A code package describes the container and the properties for - running it. All the code packages are started together on the same host - and share the same context (network, process etc.). - :type code_packages: - list[~azure.mgmt.servicefabricmesh.models.ContainerCodePackageProperties] - :param network_refs: The names of the private networks that this service - needs to be part of. - :type network_refs: list[~azure.mgmt.servicefabricmesh.models.NetworkRef] - :param diagnostics: Reference to sinks in DiagnosticsDescription. - :type diagnostics: ~azure.mgmt.servicefabricmesh.models.DiagnosticsRef - """ - - _validation = { - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'str'}, - 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - } - - def __init__(self, os_type, code_packages, network_refs=None, diagnostics=None): - super(ServiceReplicaProperties, self).__init__() - self.os_type = os_type - self.code_packages = code_packages - self.network_refs = network_refs - self.diagnostics = diagnostics diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_resource_description.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_resource_description.py deleted file mode 100644 index ed54b6e14fe..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_resource_description.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .managed_proxy_resource import ManagedProxyResource - - -class ServiceResourceDescription(ManagedProxyResource): - """This type describes a service resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :param name: The name of the resource - :type name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar provisioning_state: State of the resource. - :vartype provisioning_state: str - :param os_type: The operation system required by the code in service. - Possible values include: 'Linux', 'Windows' - :type os_type: str or - ~azure.mgmt.servicefabricmesh.models.OperatingSystemType - :param code_packages: Describes the set of code packages that forms the - service. A code package describes the container and the properties for - running it. All the code packages are started together on the same host - and share the same context (network, process etc.). - :type code_packages: - list[~azure.mgmt.servicefabricmesh.models.ContainerCodePackageProperties] - :param network_refs: The names of the private networks that this service - needs to be part of. - :type network_refs: list[~azure.mgmt.servicefabricmesh.models.NetworkRef] - :param diagnostics: Reference to sinks in DiagnosticsDescription. - :type diagnostics: ~azure.mgmt.servicefabricmesh.models.DiagnosticsRef - :param description: User readable description of the service. - :type description: str - :param replica_count: The number of replicas of the service to create. - Defaults to 1 if not specified. - :type replica_count: int - :param auto_scaling_policies: Auto scaling policies - :type auto_scaling_policies: - list[~azure.mgmt.servicefabricmesh.models.AutoScalingPolicy] - :ivar status: Status of the service. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or - ~azure.mgmt.servicefabricmesh.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the service. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :vartype health_state: str or - ~azure.mgmt.servicefabricmesh.models.HealthState - :ivar unhealthy_evaluation: When the service's health state is not 'Ok', - this additional details from service fabric Health Manager for the user to - know why the service is marked unhealthy. - :vartype unhealthy_evaluation: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'code_packages': {'key': 'properties.codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'properties.networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsRef'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, - 'auto_scaling_policies': {'key': 'properties.autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'health_state': {'key': 'properties.healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, - } - - def __init__(self, os_type, code_packages, name=None, network_refs=None, diagnostics=None, description=None, replica_count=None, auto_scaling_policies=None): - super(ServiceResourceDescription, self).__init__(name=name) - self.provisioning_state = None - self.os_type = os_type - self.code_packages = code_packages - self.network_refs = network_refs - self.diagnostics = diagnostics - self.description = description - self.replica_count = replica_count - self.auto_scaling_policies = auto_scaling_policies - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_resource_description_paged.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_resource_description_paged.py deleted file mode 100644 index c0faa1ff352..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/service_resource_description_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ServiceResourceDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`ServiceResourceDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ServiceResourceDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(ServiceResourceDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/setting.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/setting.py deleted file mode 100644 index 71f5367d0b5..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/setting.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Setting(Model): - """Describes a setting for the container. The setting file path can be fetched - from environment variable "Fabric_SettingPath". The path for Windows - container is "C:\\secrets". The path for Linux container is "/var/secrets". - - :param name: The name of the setting. - :type name: str - :param value: The value of the setting. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, name=None, value=None): - super(Setting, self).__init__() - self.name = name - self.value = value diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/simple_secret_resource_properties.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/simple_secret_resource_properties.py deleted file mode 100644 index 65284e4583c..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/simple_secret_resource_properties.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .secret_resource_properties import SecretResourceProperties - - -class SimpleSecretResourceProperties(SecretResourceProperties): - """Describes the properties of a secret resource whose value is provided - explicitly as plaintext. The secret resource may have multiple values, each - being uniquely versioned. The secret value of each version is stored - encrypted, and delivered as plaintext into the context of applications - referencing it. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provisioning_state: State of the resource. - :vartype provisioning_state: str - :param kind: Constant filled by server. - :type kind: str - :param description: User readable description of the secret. - :type description: str - :param status: Status of the resource. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :type status: str or ~azure.mgmt.servicefabricmesh.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the secret. - :vartype status_details: str - :param content_type: The type of the content stored in the secret value. - The value of this property is opaque to Service Fabric. Once set, the - value of this property cannot be changed. - :type content_type: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'kind': {'required': True}, - 'status_details': {'readonly': True}, - } - - def __init__(self, description=None, status=None, content_type=None): - super(SimpleSecretResourceProperties, self).__init__(description=description, status=status, content_type=content_type) - self.kind = 'inlinedValue' diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/tcp_config.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/tcp_config.py deleted file mode 100644 index b074b525966..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/tcp_config.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TcpConfig(Model): - """Describes the tcp configuration for external connectivity for this network. - - :param name: tcp gateway config name. - :type name: str - :param port: Specifies the port at which the service endpoint below needs - to be exposed. - :type port: int - :param destination: Describes destination endpoint for routing traffic. - :type destination: ~azure.mgmt.servicefabricmesh.models.GatewayDestination - """ - - _validation = { - 'name': {'required': True}, - 'port': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, - } - - def __init__(self, name, port, destination): - super(TcpConfig, self).__init__() - self.name = name - self.port = port - self.destination = destination diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/tracked_resource.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/tracked_resource.py deleted file mode 100644 index fa9190fbe23..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/tracked_resource.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class TrackedResource(Resource): - """The resource model definition for Azure Resource Manager tracked top-level - resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: The geo-location where the resource lives - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, location, tags=None): - super(TrackedResource, self).__init__() - self.tags = tags - self.location = location diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/versioned_secret_value_properties.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/versioned_secret_value_properties.py deleted file mode 100644 index d326e83f896..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/versioned_secret_value_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VersionedSecretValueProperties(Model): - """This type describes properties of a versioned value of a secret. - - :param value: The value of the secret resource. - :type value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, value=None): - super(VersionedSecretValueProperties, self).__init__() - self.value = value diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/versioned_secret_value_resource_description.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/versioned_secret_value_resource_description.py deleted file mode 100644 index 069cabb2ad1..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/versioned_secret_value_resource_description.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class VersionedSecretValueResourceDescription(Resource): - """This type describes a versioned value of a secret resource. The name of - this resource consists of identifier of the parent secret resource combined - with the version identifier corresponding to this secret value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar provisioning_state: State of the resource. - :vartype provisioning_state: str - :param value: The value of the secret resource. - :type value: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__(self, value=None): - super(VersionedSecretValueResourceDescription, self).__init__() - self.provisioning_state = None - self.value = value diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/versioned_secret_value_resource_description_paged.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/versioned_secret_value_resource_description_paged.py deleted file mode 100644 index 755fed401c3..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/versioned_secret_value_resource_description_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VersionedSecretValueResourceDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`VersionedSecretValueResourceDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VersionedSecretValueResourceDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(VersionedSecretValueResourceDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/volume_properties.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/volume_properties.py deleted file mode 100644 index a45f2898c6f..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/volume_properties.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VolumeProperties(Model): - """Describes properties of a volume resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param description: User readable description of the volume. - :type description: str - :ivar status: Status of the volume. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or - ~azure.mgmt.servicefabricmesh.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the volume. - :vartype status_details: str - :ivar provider: Provider of the volume. Default value: "SFAzureFile" . - :vartype provider: str - :param azure_file_parameters: This type describes a volume provided by an - Azure Files file share. - :type azure_file_parameters: - ~azure.mgmt.servicefabricmesh.models.VolumeProviderParametersAzureFile - """ - - _validation = { - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'provider': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'provider': {'key': 'provider', 'type': 'str'}, - 'azure_file_parameters': {'key': 'azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, - } - - provider = "SFAzureFile" - - def __init__(self, description=None, azure_file_parameters=None): - super(VolumeProperties, self).__init__() - self.description = description - self.status = None - self.status_details = None - self.azure_file_parameters = azure_file_parameters diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/volume_provider_parameters_azure_file.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/volume_provider_parameters_azure_file.py deleted file mode 100644 index e631b1cd6fd..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/volume_provider_parameters_azure_file.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VolumeProviderParametersAzureFile(Model): - """This type describes a volume provided by an Azure Files file share. - - :param account_name: Name of the Azure storage account for the File Share. - :type account_name: str - :param account_key: Access key of the Azure storage account for the File - Share. - :type account_key: str - :param share_name: Name of the Azure Files file share that provides - storage for the volume. - :type share_name: str - """ - - _validation = { - 'account_name': {'required': True}, - 'share_name': {'required': True}, - } - - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'account_key': {'key': 'accountKey', 'type': 'str'}, - 'share_name': {'key': 'shareName', 'type': 'str'}, - } - - def __init__(self, account_name, share_name, account_key=None): - super(VolumeProviderParametersAzureFile, self).__init__() - self.account_name = account_name - self.account_key = account_key - self.share_name = share_name diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/volume_reference.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/volume_reference.py deleted file mode 100644 index 55a675a3135..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/volume_reference.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VolumeReference(Model): - """Describes a reference to a volume resource. - - :param name: Name of the volume being referenced. - :type name: str - :param read_only: The flag indicating whether the volume is read only. - Default is 'false'. - :type read_only: bool - :param destination_path: The path within the container at which the volume - should be mounted. Only valid path characters are allowed. - :type destination_path: str - """ - - _validation = { - 'name': {'required': True}, - 'destination_path': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'destination_path': {'key': 'destinationPath', 'type': 'str'}, - } - - def __init__(self, name, destination_path, read_only=None): - super(VolumeReference, self).__init__() - self.name = name - self.read_only = read_only - self.destination_path = destination_path diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/volume_resource_description.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/volume_resource_description.py deleted file mode 100644 index 38d209472d5..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/volume_resource_description.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class VolumeResourceDescription(TrackedResource): - """This type describes a volume resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: The geo-location where the resource lives - :type location: str - :ivar provisioning_state: State of the resource. - :vartype provisioning_state: str - :param description: User readable description of the volume. - :type description: str - :ivar status: Status of the volume. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or - ~azure.mgmt.servicefabricmesh.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the volume. - :vartype status_details: str - :ivar provider: Provider of the volume. Default value: "SFAzureFile" . - :vartype provider: str - :param azure_file_parameters: This type describes a volume provided by an - Azure Files file share. - :type azure_file_parameters: - ~azure.mgmt.servicefabricmesh.models.VolumeProviderParametersAzureFile - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'provider': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'provider': {'key': 'properties.provider', 'type': 'str'}, - 'azure_file_parameters': {'key': 'properties.azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, - } - - provider = "SFAzureFile" - - def __init__(self, location, tags=None, description=None, azure_file_parameters=None): - super(VolumeResourceDescription, self).__init__(tags=tags, location=location) - self.provisioning_state = None - self.description = description - self.status = None - self.status_details = None - self.azure_file_parameters = azure_file_parameters diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/volume_resource_description_paged.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/volume_resource_description_paged.py deleted file mode 100644 index 606c2f28f7e..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/models/volume_resource_description_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class VolumeResourceDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`VolumeResourceDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VolumeResourceDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(VolumeResourceDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/__init__.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/__init__.py deleted file mode 100644 index 72eb1e5e55c..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/__init__.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .operations import Operations -from .secret_operations import SecretOperations -from .secret_value_operations import SecretValueOperations -from .volume_operations import VolumeOperations -from .network_operations import NetworkOperations -from .gateway_operations import GatewayOperations -from .application_operations import ApplicationOperations -from .service_operations import ServiceOperations -from .service_replica_operations import ServiceReplicaOperations -from .code_package_operations import CodePackageOperations - -__all__ = [ - 'Operations', - 'SecretOperations', - 'SecretValueOperations', - 'VolumeOperations', - 'NetworkOperations', - 'GatewayOperations', - 'ApplicationOperations', - 'ServiceOperations', - 'ServiceReplicaOperations', - 'CodePackageOperations', -] diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/application_operations.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/application_operations.py deleted file mode 100644 index 16cd463a493..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/application_operations.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ApplicationOperations(object): - """ApplicationOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be `2018-09-01-preview`. Constant value: "2018-09-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-09-01-preview" - - self.config = config - - def create( - self, resource_group_name, application_resource_name, application_resource_description, custom_headers=None, raw=False, **operation_config): - """Creates or updates an application resource. - - Creates an application resource with the specified name, description - and properties. If an application resource with the same name exists, - then it is updated with the specified description and properties. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param application_resource_description: Description for creating a - Application resource. - :type application_resource_description: - ~azure.mgmt.servicefabricmesh.models.ApplicationResourceDescription - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationResourceDescription or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.servicefabricmesh.models.ApplicationResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(application_resource_description, 'ApplicationResourceDescription') - - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationResourceDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('ApplicationResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationResourceName}'} - - def get( - self, resource_group_name, application_resource_name, custom_headers=None, raw=False, **operation_config): - """Gets the application resource with the given name. - - Gets the information about the application resource with the given - name. The information include the description and other properties of - the application. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationResourceDescription or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.servicefabricmesh.models.ApplicationResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationResourceName}'} - - def delete( - self, resource_group_name, application_resource_name, custom_headers=None, raw=False, **operation_config): - """Deletes the application resource. - - Deletes the application resource identified by the name. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.ErrorModelException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationResourceName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets all the application resources in a given resource group. - - Gets the information about all application resources in a given - resource group. The information include the description and other - properties of the Application. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApplicationResourceDescription - :rtype: - ~azure.mgmt.servicefabricmesh.models.ApplicationResourceDescriptionPaged[~azure.mgmt.servicefabricmesh.models.ApplicationResourceDescription] - :raises: - :class:`ErrorModelException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ApplicationResourceDescriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ApplicationResourceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Gets all the application resources in a given subscription. - - Gets the information about all application resources in a given - resource group. The information include the description and other - properties of the application. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApplicationResourceDescription - :rtype: - ~azure.mgmt.servicefabricmesh.models.ApplicationResourceDescriptionPaged[~azure.mgmt.servicefabricmesh.models.ApplicationResourceDescription] - :raises: - :class:`ErrorModelException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ApplicationResourceDescriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ApplicationResourceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabricMesh/applications'} diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/code_package_operations.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/code_package_operations.py deleted file mode 100644 index 52020accf5c..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/code_package_operations.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class CodePackageOperations(object): - """CodePackageOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be `2018-09-01-preview`. Constant value: "2018-09-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-09-01-preview" - - self.config = config - - def get_container_logs( - self, resource_group_name, application_resource_name, service_resource_name, replica_name, code_package_name, tail=None, custom_headers=None, raw=False, **operation_config): - """Gets the logs from the container. - - Gets the logs for the container of the specified code package of the - service replica. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param service_resource_name: The identity of the service. - :type service_resource_name: str - :param replica_name: Service Fabric replica name. - :type replica_name: str - :param code_package_name: The name of code package of the service. - :type code_package_name: str - :param tail: Number of lines to show from the end of the logs. Default - is 100. - :type tail: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContainerLogs or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.servicefabricmesh.models.ContainerLogs or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.get_container_logs.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - 'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True), - 'replicaName': self._serialize.url("replica_name", replica_name, 'str', skip_quote=True), - 'codePackageName': self._serialize.url("code_package_name", code_package_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if tail is not None: - query_parameters['tail'] = self._serialize.query("tail", tail, 'int') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ContainerLogs', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationResourceName}/services/{serviceResourceName}/replicas/{replicaName}/codePackages/{codePackageName}/logs'} diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/gateway_operations.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/gateway_operations.py deleted file mode 100644 index 029e3858927..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/gateway_operations.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class GatewayOperations(object): - """GatewayOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be `2018-09-01-preview`. Constant value: "2018-09-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-09-01-preview" - - self.config = config - - def create( - self, resource_group_name, gateway_resource_name, gateway_resource_description, custom_headers=None, raw=False, **operation_config): - """Creates or updates a gateway resource. - - Creates a gateway resource with the specified name, description and - properties. If a gateway resource with the same name exists, then it is - updated with the specified description and properties. Use gateway - resources to create a gateway for public connectivity for services - within your application. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param gateway_resource_name: The identity of the gateway. - :type gateway_resource_name: str - :param gateway_resource_description: Description for creating a - Gateway resource. - :type gateway_resource_description: - ~azure.mgmt.servicefabricmesh.models.GatewayResourceDescription - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: GatewayResourceDescription or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.servicefabricmesh.models.GatewayResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'gatewayResourceName': self._serialize.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(gateway_resource_description, 'GatewayResourceDescription') - - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('GatewayResourceDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('GatewayResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/gateways/{gatewayResourceName}'} - - def get( - self, resource_group_name, gateway_resource_name, custom_headers=None, raw=False, **operation_config): - """Gets the gateway resource with the given name. - - Gets the information about the gateway resource with the given name. - The information include the description and other properties of the - gateway. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param gateway_resource_name: The identity of the gateway. - :type gateway_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: GatewayResourceDescription or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.servicefabricmesh.models.GatewayResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'gatewayResourceName': self._serialize.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('GatewayResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/gateways/{gatewayResourceName}'} - - def delete( - self, resource_group_name, gateway_resource_name, custom_headers=None, raw=False, **operation_config): - """Deletes the gateway resource. - - Deletes the gateway resource identified by the name. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param gateway_resource_name: The identity of the gateway. - :type gateway_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'gatewayResourceName': self._serialize.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.ErrorModelException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/gateways/{gatewayResourceName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets all the gateway resources in a given resource group. - - Gets the information about all gateway resources in a given resource - group. The information include the description and other properties of - the Gateway. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of GatewayResourceDescription - :rtype: - ~azure.mgmt.servicefabricmesh.models.GatewayResourceDescriptionPaged[~azure.mgmt.servicefabricmesh.models.GatewayResourceDescription] - :raises: - :class:`ErrorModelException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.GatewayResourceDescriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.GatewayResourceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/gateways'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Gets all the gateway resources in a given subscription. - - Gets the information about all gateway resources in a given resource - group. The information include the description and other properties of - the gateway. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of GatewayResourceDescription - :rtype: - ~azure.mgmt.servicefabricmesh.models.GatewayResourceDescriptionPaged[~azure.mgmt.servicefabricmesh.models.GatewayResourceDescription] - :raises: - :class:`ErrorModelException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.GatewayResourceDescriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.GatewayResourceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabricMesh/gateways'} diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/network_operations.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/network_operations.py deleted file mode 100644 index 74b5d3b1057..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/network_operations.py +++ /dev/null @@ -1,373 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class NetworkOperations(object): - """NetworkOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be `2018-09-01-preview`. Constant value: "2018-09-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-09-01-preview" - - self.config = config - - def create( - self, resource_group_name, network_resource_name, network_resource_description, custom_headers=None, raw=False, **operation_config): - """Creates or updates a network resource. - - Creates a network resource with the specified name, description and - properties. If a network resource with the same name exists, then it is - updated with the specified description and properties. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param network_resource_name: The identity of the network. - :type network_resource_name: str - :param network_resource_description: Description for creating a - Network resource. - :type network_resource_description: - ~azure.mgmt.servicefabricmesh.models.NetworkResourceDescription - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NetworkResourceDescription or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.servicefabricmesh.models.NetworkResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkResourceName': self._serialize.url("network_resource_name", network_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(network_resource_description, 'NetworkResourceDescription') - - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('NetworkResourceDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('NetworkResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/networks/{networkResourceName}'} - - def get( - self, resource_group_name, network_resource_name, custom_headers=None, raw=False, **operation_config): - """Gets the network resource with the given name. - - Gets the information about the network resource with the given name. - The information include the description and other properties of the - network. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param network_resource_name: The identity of the network. - :type network_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NetworkResourceDescription or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.servicefabricmesh.models.NetworkResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkResourceName': self._serialize.url("network_resource_name", network_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('NetworkResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/networks/{networkResourceName}'} - - def delete( - self, resource_group_name, network_resource_name, custom_headers=None, raw=False, **operation_config): - """Deletes the network resource. - - Deletes the network resource identified by the name. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param network_resource_name: The identity of the network. - :type network_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkResourceName': self._serialize.url("network_resource_name", network_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.ErrorModelException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/networks/{networkResourceName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets all the network resources in a given resource group. - - Gets the information about all network resources in a given resource - group. The information include the description and other properties of - the Network. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of NetworkResourceDescription - :rtype: - ~azure.mgmt.servicefabricmesh.models.NetworkResourceDescriptionPaged[~azure.mgmt.servicefabricmesh.models.NetworkResourceDescription] - :raises: - :class:`ErrorModelException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.NetworkResourceDescriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.NetworkResourceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/networks'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Gets all the network resources in a given subscription. - - Gets the information about all network resources in a given resource - group. The information include the description and other properties of - the network. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of NetworkResourceDescription - :rtype: - ~azure.mgmt.servicefabricmesh.models.NetworkResourceDescriptionPaged[~azure.mgmt.servicefabricmesh.models.NetworkResourceDescription] - :raises: - :class:`ErrorModelException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.NetworkResourceDescriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.NetworkResourceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabricMesh/networks'} diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/operations.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/operations.py deleted file mode 100644 index 3cbaf329ad3..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/operations.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be `2018-09-01-preview`. Constant value: "2018-09-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-09-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all of the available operations. - - Lists all the available operations provided by Service Fabric SeaBreeze - resource provider. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationResult - :rtype: - ~azure.mgmt.servicefabricmesh.models.OperationResultPaged[~azure.mgmt.servicefabricmesh.models.OperationResult] - :raises: - :class:`ErrorModelException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.OperationResultPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationResultPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ServiceFabricMesh/operations'} diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/replica_operations.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/replica_operations.py deleted file mode 100644 index 664077f256d..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/replica_operations.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ReplicaOperations(object): - """ReplicaOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be `2018-07-01-preview`. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list_by_service_name( - self, resource_group_name, application_name, service_name, custom_headers=None, raw=False, **operation_config): - """Gets replicas of a given service. - - Gets the information about all replicas of a given service of an - application. The information includes the runtime properties of the - replica instance. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param application_name: The identity of the application. - :type application_name: str - :param service_name: The identity of the service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ServiceReplicaDescription - :rtype: - ~azure.mgmt.servicefabricmesh.models.ServiceReplicaDescriptionPaged[~azure.mgmt.servicefabricmesh.models.ServiceReplicaDescription] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service_name.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationName': self._serialize.url("application_name", application_name, 'str', skip_quote=True), - 'serviceName': self._serialize.url("service_name", service_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ServiceReplicaDescriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ServiceReplicaDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}/services/{serviceName}/replicas'} - - def get( - self, resource_group_name, application_name, service_name, replica_name, custom_headers=None, raw=False, **operation_config): - """Gets a specific replica of a given service. - - Gets the information about the specified replica of a given service of - an application. The information includes the runtime properties of the - replica instance. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param application_name: The identity of the application. - :type application_name: str - :param service_name: The identity of the service. - :type service_name: str - :param replica_name: The identity of the service replica. - :type replica_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceReplicaDescription or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.servicefabricmesh.models.ServiceReplicaDescription - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationName': self._serialize.url("application_name", application_name, 'str', skip_quote=True), - 'serviceName': self._serialize.url("service_name", service_name, 'str', skip_quote=True), - 'replicaName': self._serialize.url("replica_name", replica_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ServiceReplicaDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}/services/{serviceName}/replicas/{replicaName}'} diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/secret_operations.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/secret_operations.py deleted file mode 100644 index 7a707737285..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/secret_operations.py +++ /dev/null @@ -1,370 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class SecretOperations(object): - """SecretOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be `2018-09-01-preview`. Constant value: "2018-09-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-09-01-preview" - - self.config = config - - def create( - self, resource_group_name, secret_resource_name, secret_resource_description, custom_headers=None, raw=False, **operation_config): - """Creates or updates a secret resource. - - Creates a secret resource with the specified name, description and - properties. If a secret resource with the same name exists, then it is - updated with the specified description and properties. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_resource_description: Description for creating a secret - resource. - :type secret_resource_description: - ~azure.mgmt.servicefabricmesh.models.SecretResourceDescription - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SecretResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.servicefabricmesh.models.SecretResourceDescription - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(secret_resource_description, 'SecretResourceDescription') - - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SecretResourceDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('SecretResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretResourceName}'} - - def get( - self, resource_group_name, secret_resource_name, custom_headers=None, raw=False, **operation_config): - """Gets the secret resource with the given name. - - Gets the information about the secret resource with the given name. The - information include the description and other properties of the secret. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SecretResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.servicefabricmesh.models.SecretResourceDescription - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SecretResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretResourceName}'} - - def delete( - self, resource_group_name, secret_resource_name, custom_headers=None, raw=False, **operation_config): - """Deletes the secret resource. - - Deletes the secret resource identified by the name. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.ErrorModelException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretResourceName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets all the secret resources in a given resource group. - - Gets the information about all secret resources in a given resource - group. The information include the description and other properties of - the Secret. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SecretResourceDescription - :rtype: - ~azure.mgmt.servicefabricmesh.models.SecretResourceDescriptionPaged[~azure.mgmt.servicefabricmesh.models.SecretResourceDescription] - :raises: - :class:`ErrorModelException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.SecretResourceDescriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SecretResourceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Gets all the secret resources in a given subscription. - - Gets the information about all secret resources in a given resource - group. The information include the description and other properties of - the secret. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SecretResourceDescription - :rtype: - ~azure.mgmt.servicefabricmesh.models.SecretResourceDescriptionPaged[~azure.mgmt.servicefabricmesh.models.SecretResourceDescription] - :raises: - :class:`ErrorModelException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.SecretResourceDescriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SecretResourceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabricMesh/secrets'} diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/secret_value_operations.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/secret_value_operations.py deleted file mode 100644 index 9316c56ee5b..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/secret_value_operations.py +++ /dev/null @@ -1,392 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class SecretValueOperations(object): - """SecretValueOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be `2018-09-01-preview`. Constant value: "2018-09-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-09-01-preview" - - self.config = config - - def create( - self, resource_group_name, secret_resource_name, secret_value_resource_name, secret_value_resource_description, custom_headers=None, raw=False, **operation_config): - """Adds the specified value as a new version of the specified secret - resource. - - Creates a new value of the specified secret resource. The name of the - value is typically the version identifier. Once created the value - cannot be changed. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_value_resource_name: The name of the secret resource - value which is typically the version identifier for the value. - :type secret_value_resource_name: str - :param secret_value_resource_description: Description for creating a - value of a secret resource. - :type secret_value_resource_description: - ~azure.mgmt.servicefabricmesh.models.SecretValueResourceDescription - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SecretValueResourceDescription or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.servicefabricmesh.models.SecretValueResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - 'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(secret_value_resource_description, 'SecretValueResourceDescription') - - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SecretValueResourceDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('SecretValueResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretResourceName}/values/{secretValueResourceName}'} - - def get( - self, resource_group_name, secret_resource_name, secret_value_resource_name, custom_headers=None, raw=False, **operation_config): - """Gets the specified secret value resource. - - Get the information about the specified named secret value resources. - The information does not include the actual value of the secret. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_value_resource_name: The name of the secret resource - value which is typically the version identifier for the value. - :type secret_value_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SecretValueResourceDescription or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.servicefabricmesh.models.SecretValueResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - 'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SecretValueResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretResourceName}/values/{secretValueResourceName}'} - - def delete( - self, resource_group_name, secret_resource_name, secret_value_resource_name, custom_headers=None, raw=False, **operation_config): - """Deletes the specified value of the named secret resource. - - Deletes the secret value resource identified by the name. The name of - the resource is typically the version associated with that value. - Deletion will fail if the specified value is in use. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_value_resource_name: The name of the secret resource - value which is typically the version identifier for the value. - :type secret_value_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - 'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.ErrorModelException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretResourceName}/values/{secretValueResourceName}'} - - def list( - self, resource_group_name, secret_resource_name, custom_headers=None, raw=False, **operation_config): - """List names of all values of the the specified secret resource. - - Gets information about all secret value resources of the specified - secret resource. The information includes the names of the secret value - resources, but not the actual values. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SecretValueResourceDescription - :rtype: - ~azure.mgmt.servicefabricmesh.models.SecretValueResourceDescriptionPaged[~azure.mgmt.servicefabricmesh.models.SecretValueResourceDescription] - :raises: - :class:`ErrorModelException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.SecretValueResourceDescriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SecretValueResourceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretResourceName}/values'} - - def list_value( - self, resource_group_name, secret_resource_name, secret_value_resource_name, custom_headers=None, raw=False, **operation_config): - """Lists the specified value of the secret resource. - - Lists the decrypted value of the specified named value of the secret - resource. This is a privileged operation. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_value_resource_name: The name of the secret resource - value which is typically the version identifier for the value. - :type secret_value_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SecretValue or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.servicefabricmesh.models.SecretValue or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.list_value.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - 'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SecretValue', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_value.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretResourceName}/values/{secretValueResourceName}/list_value'} diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/service_operations.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/service_operations.py deleted file mode 100644 index c6f5144e8f8..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/service_operations.py +++ /dev/null @@ -1,180 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ServiceOperations(object): - """ServiceOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be `2018-09-01-preview`. Constant value: "2018-09-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-09-01-preview" - - self.config = config - - def get( - self, resource_group_name, application_resource_name, service_resource_name, custom_headers=None, raw=False, **operation_config): - """Gets the service resource with the given name. - - Gets the information about the service resource with the given name. - The information include the description and other properties of the - service. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param service_resource_name: The identity of the service. - :type service_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceResourceDescription or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.servicefabricmesh.models.ServiceResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - 'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ServiceResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationResourceName}/services/{serviceResourceName}'} - - def list( - self, resource_group_name, application_resource_name, custom_headers=None, raw=False, **operation_config): - """Lists all the service resources. - - Gets the information about all services of an application resource. The - information include the description and other properties of the - Service. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ServiceResourceDescription - :rtype: - ~azure.mgmt.servicefabricmesh.models.ServiceResourceDescriptionPaged[~azure.mgmt.servicefabricmesh.models.ServiceResourceDescription] - :raises: - :class:`ErrorModelException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ServiceResourceDescriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ServiceResourceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationResourceName}/services'} diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/service_replica_operations.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/service_replica_operations.py deleted file mode 100644 index 1cf3f81fa7f..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/service_replica_operations.py +++ /dev/null @@ -1,185 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ServiceReplicaOperations(object): - """ServiceReplicaOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be `2018-09-01-preview`. Constant value: "2018-09-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-09-01-preview" - - self.config = config - - def get( - self, resource_group_name, application_resource_name, service_resource_name, replica_name, custom_headers=None, raw=False, **operation_config): - """Gets the given replica of the service of an application. - - Gets the information about the service replica with the given name. The - information include the description and other properties of the service - replica. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param service_resource_name: The identity of the service. - :type service_resource_name: str - :param replica_name: Service Fabric replica name. - :type replica_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceReplicaDescription or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.servicefabricmesh.models.ServiceReplicaDescription - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - 'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True), - 'replicaName': self._serialize.url("replica_name", replica_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ServiceReplicaDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationResourceName}/services/{serviceResourceName}/replicas/{replicaName}'} - - def list( - self, resource_group_name, application_resource_name, service_resource_name, custom_headers=None, raw=False, **operation_config): - """Gets replicas of a given service. - - Gets the information about all replicas of a given service of an - application. The information includes the runtime properties of the - replica instance. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param service_resource_name: The identity of the service. - :type service_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ServiceReplicaDescription - :rtype: - ~azure.mgmt.servicefabricmesh.models.ServiceReplicaDescriptionPaged[~azure.mgmt.servicefabricmesh.models.ServiceReplicaDescription] - :raises: - :class:`ErrorModelException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - 'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ServiceReplicaDescriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ServiceReplicaDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationResourceName}/services/{serviceResourceName}/replicas'} diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/versioned_secret_operations.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/versioned_secret_operations.py deleted file mode 100644 index d41afd89726..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/versioned_secret_operations.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class VersionedSecretOperations(object): - """VersionedSecretOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be `2018-07-01-preview`. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list_versions( - self, resource_group_name, secret_name, custom_headers=None, raw=False, **operation_config): - """List all versions of the specified secret resource. - - Lists the available versions of the specified secret resource. The - information does not includes the actual value. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param secret_name: The name of the secret resource. - :type secret_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - VersionedSecretValueResourceDescription - :rtype: - ~azure.mgmt.servicefabricmesh.models.VersionedSecretValueResourceDescriptionPaged[~azure.mgmt.servicefabricmesh.models.VersionedSecretValueResourceDescription] - :raises: - :class:`ErrorModelException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'secretName': self._serialize.url("secret_name", secret_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.VersionedSecretValueResourceDescriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VersionedSecretValueResourceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretName}/versioned_values'} diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/versioned_secret_value_operations.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/versioned_secret_value_operations.py deleted file mode 100644 index 75fd724bae8..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/versioned_secret_value_operations.py +++ /dev/null @@ -1,248 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class VersionedSecretValueOperations(object): - """VersionedSecretValueOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be `2018-07-01-preview`. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def create( - self, resource_group_name, secret_name, version_id, value=None, custom_headers=None, raw=False, **operation_config): - """Creates a versioned value of the specified secret resource. - - Creates a new versioned secret value resource with the specified value. - Once created, the value cannot be updated. The output does not include - the provided value. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param secret_name: The name of the secret resource. - :type secret_name: str - :param version_id: The identifier of this versioned value of a secret - resource. - :type version_id: str - :param value: The value of the secret resource. - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VersionedSecretValueResourceDescription or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.servicefabricmesh.models.VersionedSecretValueResourceDescription - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - versioned_secret_value_resource_description = models.VersionedSecretValueResourceDescription(value=value) - - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'secretName': self._serialize.url("secret_name", secret_name, 'str', skip_quote=True), - 'versionId': self._serialize.url("version_id", version_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(versioned_secret_value_resource_description, 'VersionedSecretValueResourceDescription') - - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VersionedSecretValueResourceDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('VersionedSecretValueResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretName}/versioned_values/{versionId}'} - - def get( - self, resource_group_name, secret_name, version_id, custom_headers=None, raw=False, **operation_config): - """Gets the value of the specified version of the secret resource. - - Gets the value of the specified version of the secret resource. This is - a privileged operation. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param secret_name: The name of the secret resource. - :type secret_name: str - :param version_id: The identifier of this versioned value of a secret - resource. - :type version_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VersionedSecretValueResourceDescription or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.servicefabricmesh.models.VersionedSecretValueResourceDescription - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'secretName': self._serialize.url("secret_name", secret_name, 'str', skip_quote=True), - 'versionId': self._serialize.url("version_id", version_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VersionedSecretValueResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretName}/versioned_values/{versionId}'} - - def delete( - self, resource_group_name, secret_name, version_id, custom_headers=None, raw=False, **operation_config): - """Deletes the specified version of the secret resource. - - Deletes the versioned secret value resource identified by the version - id. Deletion will fail if the version is in use. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param secret_name: The name of the secret resource. - :type secret_name: str - :param version_id: The identifier of this versioned value of a secret - resource. - :type version_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'secretName': self._serialize.url("secret_name", secret_name, 'str', skip_quote=True), - 'versionId': self._serialize.url("version_id", version_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.ErrorModelException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretName}/versioned_values/{versionId}'} diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/volume_operations.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/volume_operations.py deleted file mode 100644 index ee0d2303c8f..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/operations/volume_operations.py +++ /dev/null @@ -1,370 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class VolumeOperations(object): - """VolumeOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be `2018-09-01-preview`. Constant value: "2018-09-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-09-01-preview" - - self.config = config - - def create( - self, resource_group_name, volume_resource_name, volume_resource_description, custom_headers=None, raw=False, **operation_config): - """Creates or updates a volume resource. - - Creates a volume resource with the specified name, description and - properties. If a volume resource with the same name exists, then it is - updated with the specified description and properties. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param volume_resource_name: The identity of the volume. - :type volume_resource_name: str - :param volume_resource_description: Description for creating a Volume - resource. - :type volume_resource_description: - ~azure.mgmt.servicefabricmesh.models.VolumeResourceDescription - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VolumeResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.servicefabricmesh.models.VolumeResourceDescription - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'volumeResourceName': self._serialize.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(volume_resource_description, 'VolumeResourceDescription') - - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VolumeResourceDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('VolumeResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/volumes/{volumeResourceName}'} - - def get( - self, resource_group_name, volume_resource_name, custom_headers=None, raw=False, **operation_config): - """Gets the volume resource with the given name. - - Gets the information about the volume resource with the given name. The - information include the description and other properties of the volume. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param volume_resource_name: The identity of the volume. - :type volume_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VolumeResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.servicefabricmesh.models.VolumeResourceDescription - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'volumeResourceName': self._serialize.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VolumeResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/volumes/{volumeResourceName}'} - - def delete( - self, resource_group_name, volume_resource_name, custom_headers=None, raw=False, **operation_config): - """Deletes the volume resource. - - Deletes the volume resource identified by the name. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param volume_resource_name: The identity of the volume. - :type volume_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'volumeResourceName': self._serialize.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.ErrorModelException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/volumes/{volumeResourceName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets all the volume resources in a given resource group. - - Gets the information about all volume resources in a given resource - group. The information include the description and other properties of - the Volume. - - :param resource_group_name: Azure resource group name - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VolumeResourceDescription - :rtype: - ~azure.mgmt.servicefabricmesh.models.VolumeResourceDescriptionPaged[~azure.mgmt.servicefabricmesh.models.VolumeResourceDescription] - :raises: - :class:`ErrorModelException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.VolumeResourceDescriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VolumeResourceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/volumes'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Gets all the volume resources in a given subscription. - - Gets the information about all volume resources in a given resource - group. The information include the description and other properties of - the volume. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of VolumeResourceDescription - :rtype: - ~azure.mgmt.servicefabricmesh.models.VolumeResourceDescriptionPaged[~azure.mgmt.servicefabricmesh.models.VolumeResourceDescription] - :raises: - :class:`ErrorModelException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.VolumeResourceDescriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.VolumeResourceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabricMesh/volumes'} diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/service_fabric_mesh_management_client.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/service_fabric_mesh_management_client.py deleted file mode 100644 index 54160108800..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/service_fabric_mesh_management_client.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import ServiceClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.secret_operations import SecretOperations -from .operations.secret_value_operations import SecretValueOperations -from .operations.volume_operations import VolumeOperations -from .operations.network_operations import NetworkOperations -from .operations.gateway_operations import GatewayOperations -from .operations.application_operations import ApplicationOperations -from .operations.service_operations import ServiceOperations -from .operations.service_replica_operations import ServiceReplicaOperations -from .operations.code_package_operations import CodePackageOperations -from . import models - - -class ServiceFabricMeshManagementClientConfiguration(AzureConfiguration): - """Configuration for ServiceFabricMeshManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The customer subscription identifier - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ServiceFabricMeshManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-servicefabricmesh/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ServiceFabricMeshManagementClient(object): - """Service Fabric Mesh Management Client - - :ivar config: Configuration for client. - :vartype config: ServiceFabricMeshManagementClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.servicefabricmesh.operations.Operations - :ivar secret: Secret operations - :vartype secret: azure.mgmt.servicefabricmesh.operations.SecretOperations - :ivar secret_value: SecretValue operations - :vartype secret_value: azure.mgmt.servicefabricmesh.operations.SecretValueOperations - :ivar volume: Volume operations - :vartype volume: azure.mgmt.servicefabricmesh.operations.VolumeOperations - :ivar network: Network operations - :vartype network: azure.mgmt.servicefabricmesh.operations.NetworkOperations - :ivar gateway: Gateway operations - :vartype gateway: azure.mgmt.servicefabricmesh.operations.GatewayOperations - :ivar application: Application operations - :vartype application: azure.mgmt.servicefabricmesh.operations.ApplicationOperations - :ivar service: Service operations - :vartype service: azure.mgmt.servicefabricmesh.operations.ServiceOperations - :ivar service_replica: ServiceReplica operations - :vartype service_replica: azure.mgmt.servicefabricmesh.operations.ServiceReplicaOperations - :ivar code_package: CodePackage operations - :vartype code_package: azure.mgmt.servicefabricmesh.operations.CodePackageOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The customer subscription identifier - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ServiceFabricMeshManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-09-01-preview' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.secret = SecretOperations( - self._client, self.config, self._serialize, self._deserialize) - self.secret_value = SecretValueOperations( - self._client, self.config, self._serialize, self._deserialize) - self.volume = VolumeOperations( - self._client, self.config, self._serialize, self._deserialize) - self.network = NetworkOperations( - self._client, self.config, self._serialize, self._deserialize) - self.gateway = GatewayOperations( - self._client, self.config, self._serialize, self._deserialize) - self.application = ApplicationOperations( - self._client, self.config, self._serialize, self._deserialize) - self.service = ServiceOperations( - self._client, self.config, self._serialize, self._deserialize) - self.service_replica = ServiceReplicaOperations( - self._client, self.config, self._serialize, self._deserialize) - self.code_package = CodePackageOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/version.py b/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/version.py deleted file mode 100644 index 2fe1b15ebee..00000000000 --- a/src/mesh/azext_mesh/servicefabricmesh/mgmt/servicefabricmesh/version.py +++ /dev/null @@ -1,12 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2018-09-01-preview" diff --git a/src/mesh/azext_mesh/tests/latest/data/template1.json b/src/mesh/azext_mesh/tests/latest/data/template1.json index b2e5cb1b4fa..62e722ebb7d 100644 --- a/src/mesh/azext_mesh/tests/latest/data/template1.json +++ b/src/mesh/azext_mesh/tests/latest/data/template1.json @@ -1,92 +1,9 @@ { - "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json", - "contentVersion": "1.0.0.0", - "parameters": { - "location": { - "type": "string", - "metadata": { - "description": "Location of the resources." - }, - "defaultValue": "eastus" - } + "description": "Service Fabric Mesh sample volume.", + "azure_file_parameters": { + "account_name": "sbzdemoaccount", + "account_key": "provide-account-key-here", + "share_name": "sharel" }, - "resources": [ - { - "apiVersion": "2018-07-01-preview", - "name": "helloWorldNetwork", - "type": "Microsoft.ServiceFabricMesh/networks", - "location": "[parameters('location')]", - "dependsOn": [], - "properties": { - "addressPrefix": "10.0.0.4/22", - "ingressConfig": { - "layer4": [ - { - "name": "helloWorldIngress", - "publicPort": "80", - "applicationName": "helloWorldApp", - "serviceName": "helloWorldService", - "endpointName": "helloWorldListener" - } - ] - } - } - }, - { - "apiVersion": "2018-07-01-preview", - "name": "helloWorldApp", - "type": "Microsoft.ServiceFabricMesh/applications", - "location": "[parameters('location')]", - "dependsOn": [ - "Microsoft.ServiceFabricMesh/networks/helloWorldNetwork" - ], - "properties": { - "description": "Service Fabric Mesh HelloWorld Application!", - "services": [ - { - "type": "Microsoft.ServiceFabricMesh/services", - "name": "helloWorldService", - "properties": { - "description": "Service Fabric Mesh Hello World Service.", - "osType": "linux", - "codePackages": [ - { - "name": "helloWorldCode", - "image": "seabreeze/azure-mesh-helloworld:1.1-alpine", - "endpoints": [ - { - "name": "helloWorldListener", - "port": "80" - } - ], - "resources": { - "requests": { - "cpu": "1", - "memoryInGB": "1" - } - } - }, - { - "name": "helloWorldSideCar", - "image": "seabreeze/azure-mesh-helloworld-sidecar:1.0-alpine", - "resources": { - "requests": { - "cpu": "1", - "memoryInGB": "1" - } - } - } - ], - "replicaCount": "1", - "networkRefs": [ - { - "name": "[resourceId('Microsoft.ServiceFabricMesh/networks', 'helloWorldNetwork')]" - } - ] - } - } - ] - } - } - ] -} \ No newline at end of file + "provider": "SFAzureFile" +} diff --git a/src/mesh/azext_mesh/tests/latest/recordings/test_app_commands.yaml b/src/mesh/azext_mesh/tests/latest/recordings/test_app_commands.yaml index 47c41ae8216..65147697d94 100644 --- a/src/mesh/azext_mesh/tests/latest/recordings/test_app_commands.yaml +++ b/src/mesh/azext_mesh/tests/latest/recordings/test_app_commands.yaml @@ -37,7 +37,7 @@ interactions: User-Agent: - AZURECLI/2.51.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2022-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2024-11-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Resources/deployments/cli000002","name":"cli000002","type":"Microsoft.Resources/deployments","properties":{"templateHash":"1634222566823060083","parameters":{"location":{"type":"String","value":"eastus"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2023-08-15T07:43:20.5019888Z","duration":"PT0.0001104S","correlationId":"56ca75bd-cd62-4605-9e75-243ef1917ff1","providers":[{"namespace":"Microsoft.ServiceFabricMesh","resourceTypes":[{"resourceType":"networks","locations":["eastus"]},{"resourceType":"applications","locations":["eastus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ServiceFabricMesh/networks/helloWorldNetwork","resourceType":"Microsoft.ServiceFabricMesh/networks","resourceName":"helloWorldNetwork"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ServiceFabricMesh/applications/helloWorldApp","resourceType":"Microsoft.ServiceFabricMesh/applications","resourceName":"helloWorldApp"}]}}' diff --git a/src/mesh/azext_mesh/tests/latest/recordings/test_create_volume_with_json_file.yaml b/src/mesh/azext_mesh/tests/latest/recordings/test_create_volume_with_json_file.yaml new file mode 100644 index 00000000000..447f63403d2 --- /dev/null +++ b/src/mesh/azext_mesh/tests/latest/recordings/test_create_volume_with_json_file.yaml @@ -0,0 +1,67 @@ +interactions: +- request: + body: '{"location": "eastus", "properties": {"azureFileParameters": {"accountKey": + "provide-account-key-here", "accountName": "sbzdemoaccount", "shareName": "sharel"}, + "description": "Service Fabric Mesh sample volume.", "provider": "SFAzureFile"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - mesh volume create + Connection: + - keep-alive + Content-Length: + - '241' + Content-Type: + - application/json + ParameterSetName: + - -g -l -n --template-file + User-Agent: + - AZURECLI/2.74.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_create_volume_with_json_file000001/providers/Microsoft.ServiceFabricMesh/volumes/volume000002?api-version=2018-09-01-preview + response: + body: + string: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CLI_TEST_CREATE_VOLUME_WITH_JSON_FILEHLCB4OU4UBNI2RLO237LZNVDGJDVJ2A7BFIVBS/providers/Microsoft.ServiceFabricMesh/volumes/VOLUME26AR\",\r\n + \ \"name\": \"volume000002\",\r\n \"type\": \"Microsoft.ServiceFabricMesh/volumes\",\r\n + \ \"tags\": {},\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"description\": \"Service + Fabric Mesh sample volume.\",\r\n \"azureFileParameters\": {\r\n \"accountName\": + \"sbzdemoaccount\",\r\n \"shareName\": \"sharel\"\r\n },\r\n \"provider\": + \"SFAzureFile\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '592' + content-type: + - application/json + date: + - Wed, 18 Jun 2025 07:14:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-atlas-response-duration: + - '93' + - '284' + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=b5ee6c06-c2c2-4e3c-8606-5f170cee077a,objectId=5944f00a-6fd4-4820-b3b7-1c8eaedcc836/japaneast/1184d9a0-d1c9-4ba2-8d2e-b33e87cdc2c5 + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: 42D56D7F5871411E9BF4CAB8ECEBA1DB Ref B: TYO201151004060 Ref C: 2025-06-18T07:14:04Z' + status: + code: 200 + message: OK +version: 1 diff --git a/src/mesh/azext_mesh/tests/latest/recordings/test_service_commands.yaml b/src/mesh/azext_mesh/tests/latest/recordings/test_service_commands.yaml index 72d7bd9f2e4..3aaf1e2f369 100644 --- a/src/mesh/azext_mesh/tests/latest/recordings/test_service_commands.yaml +++ b/src/mesh/azext_mesh/tests/latest/recordings/test_service_commands.yaml @@ -37,7 +37,7 @@ interactions: User-Agent: - AZURECLI/2.51.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2022-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2024-11-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Resources/deployments/cli000002","name":"cli000002","type":"Microsoft.Resources/deployments","properties":{"templateHash":"1634222566823060083","parameters":{"location":{"type":"String","value":"eastus"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2023-08-15T07:04:15.4096Z","duration":"PT0.0007424S","correlationId":"68d6cc98-13aa-43af-ad97-36d9687852cc","providers":[{"namespace":"Microsoft.ServiceFabricMesh","resourceTypes":[{"resourceType":"networks","locations":["eastus"]},{"resourceType":"applications","locations":["eastus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ServiceFabricMesh/networks/helloWorldNetwork","resourceType":"Microsoft.ServiceFabricMesh/networks","resourceName":"helloWorldNetwork"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ServiceFabricMesh/applications/helloWorldApp","resourceType":"Microsoft.ServiceFabricMesh/applications","resourceName":"helloWorldApp"}]}}' diff --git a/src/mesh/azext_mesh/tests/latest/test_mesh_commands.py b/src/mesh/azext_mesh/tests/latest/test_mesh_commands.py index be5236ca8df..cb8377a9661 100644 --- a/src/mesh/azext_mesh/tests/latest/test_mesh_commands.py +++ b/src/mesh/azext_mesh/tests/latest/test_mesh_commands.py @@ -186,6 +186,24 @@ def test_code_package_log_commands(self, resource_group): self.cmd('az mesh app delete -g {rg} --name {app_name} --yes') + @ResourceGroupPreparer(name_prefix='cli_test_create_volume_with_json_file') + def test_create_volume_with_json_file(self, resource_group): + curr_dir = os.path.dirname(os.path.realpath(__file__)) + data_file = os.path.join(curr_dir, 'data/template1.json').replace('\\', '\\\\') + + self.kwargs.update({ + 'volume': self.create_random_name('volume', 10), + 'data_file': data_file + }) + + self.cmd('mesh volume create -g {rg} -l eastus -n {volume} --template-file {data_file}', checks=[ + self.check('name', '{volume}'), + self.check('azureFileParameters.accountName', 'sbzdemoaccount'), + self.check('azureFileParameters.shareName', 'sharel'), + self.check('description', 'Service Fabric Mesh sample volume.'), + self.check('provider', 'SFAzureFile') + ]) + if __name__ == '__main__': unittest.main() diff --git a/src/mesh/setup.py b/src/mesh/setup.py index 40ec1de850f..b8d059487d5 100644 --- a/src/mesh/setup.py +++ b/src/mesh/setup.py @@ -8,7 +8,7 @@ from codecs import open from setuptools import setup, find_packages -VERSION = "1.0.0a1" +VERSION = "1.0.0b2" CLASSIFIERS = [