From 6e5697b4bb9ce95bff3e1dd6664fa7677c23734f Mon Sep 17 00:00:00 2001 From: Ali Egal Date: Thu, 15 Jul 2021 14:30:29 -0700 Subject: [PATCH 1/3] update version in history --- src/dnc/HISTORY.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dnc/HISTORY.rst b/src/dnc/HISTORY.rst index 42daa77c75b..4da97f93899 100644 --- a/src/dnc/HISTORY.rst +++ b/src/dnc/HISTORY.rst @@ -2,7 +2,7 @@ Release History =============== -0.1.1 +0.1.2 ++++++ * Remove list commands From cc43d88a54c48a67b29c7f13c2d82d529c48eb34 Mon Sep 17 00:00:00 2001 From: Ali Egal Date: Mon, 19 Jul 2021 23:12:48 -0700 Subject: [PATCH 2/3] bug fix with delegate subnet --- src/dnc/HISTORY.rst | 3 + src/dnc/azext_dnc/generated/custom.py | 2 +- .../vendored_sdks/dnc/models/__init__.py | 3 - .../vendored_sdks/dnc/models/_models.py | 50 +++++------------ .../vendored_sdks/dnc/models/_models_py3.py | 56 +++++-------------- src/dnc/setup.py | 2 +- 6 files changed, 33 insertions(+), 83 deletions(-) diff --git a/src/dnc/HISTORY.rst b/src/dnc/HISTORY.rst index 4da97f93899..cabe765f2de 100644 --- a/src/dnc/HISTORY.rst +++ b/src/dnc/HISTORY.rst @@ -2,6 +2,9 @@ Release History =============== +0.1.3 +++++++ +* Correct bug with delegate subnet 0.1.2 ++++++ * Remove list commands diff --git a/src/dnc/azext_dnc/generated/custom.py b/src/dnc/azext_dnc/generated/custom.py index fdb1bc6a46d..aa1cfe66081 100644 --- a/src/dnc/azext_dnc/generated/custom.py +++ b/src/dnc/azext_dnc/generated/custom.py @@ -69,7 +69,7 @@ def dnc_orchestrator_instance_service_create(client, parameters['location'] = location parameters['kind'] = "Kubernetes" parameters['tags'] = tags - parameters['identity'] = {} + parameters['identity'] = {}d parameters['identity']['type'] = type_ parameters['properties'] = {} parameters['properties']['orchestrator_app_id'] = orchestrator_app_id diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/models/__init__.py b/src/dnc/azext_dnc/vendored_sdks/dnc/models/__init__.py index 8ae71baf993..6dcdd368f6b 100644 --- a/src/dnc/azext_dnc/vendored_sdks/dnc/models/__init__.py +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/models/__init__.py @@ -14,7 +14,6 @@ from ._models_py3 import DelegatedControllerProperties from ._models_py3 import DelegatedControllers from ._models_py3 import DelegatedSubnet - from ._models_py3 import DelegatedSubnetProperties from ._models_py3 import DelegatedSubnetResource from ._models_py3 import DelegatedSubnets from ._models_py3 import ErrorAdditionalInfo @@ -39,7 +38,6 @@ from ._models import DelegatedControllerProperties # type: ignore from ._models import DelegatedControllers # type: ignore from ._models import DelegatedSubnet # type: ignore - from ._models import DelegatedSubnetProperties # type: ignore from ._models import DelegatedSubnetResource # type: ignore from ._models import DelegatedSubnets # type: ignore from ._models import ErrorAdditionalInfo # type: ignore @@ -75,7 +73,6 @@ 'DelegatedControllerProperties', 'DelegatedControllers', 'DelegatedSubnet', - 'DelegatedSubnetProperties', 'DelegatedSubnetResource', 'DelegatedSubnets', 'ErrorAdditionalInfo', diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/models/_models.py b/src/dnc/azext_dnc/vendored_sdks/dnc/models/_models.py index 9de0401b928..1c2d5252031 100644 --- a/src/dnc/azext_dnc/vendored_sdks/dnc/models/_models.py +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/models/_models.py @@ -271,38 +271,6 @@ class DelegatedSubnet(DelegatedSubnetResource): :type location: str :param tags: A set of tags. The resource tags. :type tags: dict[str, str] - :param properties: Properties of the provision operation request. - :type properties: ~dnc.models.DelegatedSubnetProperties - """ - - _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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'DelegatedSubnetProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(DelegatedSubnet, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class DelegatedSubnetProperties(msrest.serialization.Model): - """Properties of delegated subnet. - - Variables are only populated by the server, and will be ignored when sending a request. - :ivar resource_guid: Resource guid. :vartype resource_guid: str :ivar provisioning_state: The current state of dnc delegated subnet resource. Possible values @@ -315,22 +283,30 @@ class DelegatedSubnetProperties(msrest.serialization.Model): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'resource_guid': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { - 'resource_guid': {'key': 'resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'subnet_details': {'key': 'subnetDetails', 'type': 'SubnetDetails'}, - 'controller_details': {'key': 'controllerDetails', 'type': 'ControllerDetails'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'subnet_details': {'key': 'properties.subnetDetails', 'type': 'SubnetDetails'}, + 'controller_details': {'key': 'properties.controllerDetails', 'type': 'ControllerDetails'}, } def __init__( self, **kwargs ): - super(DelegatedSubnetProperties, self).__init__(**kwargs) + super(DelegatedSubnet, self).__init__(**kwargs) self.resource_guid = None self.provisioning_state = None self.subnet_details = kwargs.get('subnet_details', None) diff --git a/src/dnc/azext_dnc/vendored_sdks/dnc/models/_models_py3.py b/src/dnc/azext_dnc/vendored_sdks/dnc/models/_models_py3.py index 645febf1abb..740650a1fae 100644 --- a/src/dnc/azext_dnc/vendored_sdks/dnc/models/_models_py3.py +++ b/src/dnc/azext_dnc/vendored_sdks/dnc/models/_models_py3.py @@ -290,42 +290,6 @@ class DelegatedSubnet(DelegatedSubnetResource): :type location: str :param tags: A set of tags. The resource tags. :type tags: dict[str, str] - :param properties: Properties of the provision operation request. - :type properties: ~dnc.models.DelegatedSubnetProperties - """ - - _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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'DelegatedSubnetProperties'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - properties: Optional["DelegatedSubnetProperties"] = None, - **kwargs - ): - super(DelegatedSubnet, self).__init__(location=location, tags=tags, **kwargs) - self.properties = properties - - -class DelegatedSubnetProperties(msrest.serialization.Model): - """Properties of delegated subnet. - - Variables are only populated by the server, and will be ignored when sending a request. - :ivar resource_guid: Resource guid. :vartype resource_guid: str :ivar provisioning_state: The current state of dnc delegated subnet resource. Possible values @@ -338,25 +302,35 @@ class DelegatedSubnetProperties(msrest.serialization.Model): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'resource_guid': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { - 'resource_guid': {'key': 'resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'subnet_details': {'key': 'subnetDetails', 'type': 'SubnetDetails'}, - 'controller_details': {'key': 'controllerDetails', 'type': 'ControllerDetails'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'subnet_details': {'key': 'properties.subnetDetails', 'type': 'SubnetDetails'}, + 'controller_details': {'key': 'properties.controllerDetails', 'type': 'ControllerDetails'}, } def __init__( self, *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, subnet_details: Optional["SubnetDetails"] = None, controller_details: Optional["ControllerDetails"] = None, **kwargs ): - super(DelegatedSubnetProperties, self).__init__(**kwargs) + super(DelegatedSubnet, self).__init__(location=location, tags=tags, **kwargs) self.resource_guid = None self.provisioning_state = None self.subnet_details = subnet_details diff --git a/src/dnc/setup.py b/src/dnc/setup.py index da705583c97..0821e203528 100644 --- a/src/dnc/setup.py +++ b/src/dnc/setup.py @@ -10,7 +10,7 @@ from setuptools import setup, find_packages # HISTORY.rst entry. -VERSION = '0.1.2' +VERSION = '0.1.3' try: from azext_dnc.manual.version import VERSION except ImportError: From 62ce1807b9515785d07f1ce791b7be2edb2599af Mon Sep 17 00:00:00 2001 From: Ali Egal Date: Mon, 19 Jul 2021 23:15:42 -0700 Subject: [PATCH 3/3] remove extra character --- src/dnc/azext_dnc/generated/custom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dnc/azext_dnc/generated/custom.py b/src/dnc/azext_dnc/generated/custom.py index aa1cfe66081..fdb1bc6a46d 100644 --- a/src/dnc/azext_dnc/generated/custom.py +++ b/src/dnc/azext_dnc/generated/custom.py @@ -69,7 +69,7 @@ def dnc_orchestrator_instance_service_create(client, parameters['location'] = location parameters['kind'] = "Kubernetes" parameters['tags'] = tags - parameters['identity'] = {}d + parameters['identity'] = {} parameters['identity']['type'] = type_ parameters['properties'] = {} parameters['properties']['orchestrator_app_id'] = orchestrator_app_id