Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR track2_azure-mgmt-subscription] {AzureSubscription} Fixes Azure/azure-sdk-for-go#18619 #890

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sdk/subscription/azure-mgmt-subscription/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.7.2",
"use": [
"@autorest/python@5.12.0",
"@autorest/python@5.16.0",
"@autorest/modelerfour@4.19.3"
],
"commit": "1b0a465061c68175898f8f5d27f0301f42ce994c",
"commit": "e5d213cd9a55f4a0c51050eb42d4f2c7f59f3180",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/subscription/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"autorest_command": "autorest specification/subscription/resource-manager/readme.md --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.16.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"readme": "specification/subscription/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@
from ._version import VERSION

__version__ = VERSION

try:
from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
__all__ = ['SubscriptionClient']
__all__.extend([p for p in _patch_all if p not in __all__])

# `._patch.py` is used for handwritten extensions to the generated code
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
from ._patch import patch_sdk
patch_sdk()
_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from azure.core.credentials import TokenCredential


class SubscriptionClientConfiguration(Configuration):
class SubscriptionClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for SubscriptionClient.

Note that all parameters used to create this instance are saved as instance
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
# --------------------------------------------------------------------------

from copy import deepcopy
from typing import Any, Optional, TYPE_CHECKING
from typing import Any, TYPE_CHECKING

from msrest import Deserializer, Serializer

from azure.core.rest import HttpRequest, HttpResponse
from azure.mgmt.core import ARMPipelineClient
from msrest import Deserializer, Serializer

from . import models
from ._configuration import SubscriptionClientConfiguration
Expand All @@ -21,7 +22,7 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential

class SubscriptionClient:
class SubscriptionClient: # pylint: disable=too-many-instance-attributes
"""The subscription client.

:ivar subscriptions: SubscriptionsOperations operations
Expand All @@ -40,7 +41,7 @@ class SubscriptionClient:
:vartype billing_account: azure.mgmt.subscription.operations.BillingAccountOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param base_url: Service URL. Default value is 'https://management.azure.com'.
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand All @@ -59,18 +60,32 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.subscriptions = SubscriptionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.tenants = TenantsOperations(self._client, self._config, self._serialize, self._deserialize)
self.subscription = SubscriptionOperations(self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.alias = AliasOperations(self._client, self._config, self._serialize, self._deserialize)
self.subscription_policy = SubscriptionPolicyOperations(self._client, self._config, self._serialize, self._deserialize)
self.billing_account = BillingAccountOperations(self._client, self._config, self._serialize, self._deserialize)
self.subscriptions = SubscriptionsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.tenants = TenantsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.subscription = SubscriptionOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize
)
self.alias = AliasOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.subscription_policy = SubscriptionPolicyOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.billing_account = BillingAccountOperations(
self._client, self._config, self._serialize, self._deserialize
)


def _send_request(
self,
request, # type: HttpRequest
request: HttpRequest,
**kwargs: Any
) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "3.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@
# --------------------------------------------------------------------------

from ._subscription_client import SubscriptionClient

try:
from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
__all__ = ['SubscriptionClient']
__all__.extend([p for p in _patch_all if p not in __all__])

# `._patch.py` is used for handwritten extensions to the generated code
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
from ._patch import patch_sdk
patch_sdk()
_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from azure.core.credentials_async import AsyncTokenCredential


class SubscriptionClientConfiguration(Configuration):
class SubscriptionClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for SubscriptionClient.

Note that all parameters used to create this instance are saved as instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
# --------------------------------------------------------------------------

from copy import deepcopy
from typing import Any, Awaitable, Optional, TYPE_CHECKING
from typing import Any, Awaitable, TYPE_CHECKING

from msrest import Deserializer, Serializer

from azure.core.rest import AsyncHttpResponse, HttpRequest
from azure.mgmt.core import AsyncARMPipelineClient
from msrest import Deserializer, Serializer

from .. import models
from ._configuration import SubscriptionClientConfiguration
Expand All @@ -21,7 +22,7 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential

class SubscriptionClient:
class SubscriptionClient: # pylint: disable=too-many-instance-attributes
"""The subscription client.

:ivar subscriptions: SubscriptionsOperations operations
Expand All @@ -41,7 +42,7 @@ class SubscriptionClient:
:vartype billing_account: azure.mgmt.subscription.aio.operations.BillingAccountOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param base_url: Service URL. Default value is 'https://management.azure.com'.
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand All @@ -60,13 +61,27 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.subscriptions = SubscriptionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.tenants = TenantsOperations(self._client, self._config, self._serialize, self._deserialize)
self.subscription = SubscriptionOperations(self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.alias = AliasOperations(self._client, self._config, self._serialize, self._deserialize)
self.subscription_policy = SubscriptionPolicyOperations(self._client, self._config, self._serialize, self._deserialize)
self.billing_account = BillingAccountOperations(self._client, self._config, self._serialize, self._deserialize)
self.subscriptions = SubscriptionsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.tenants = TenantsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.subscription = SubscriptionOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize
)
self.alias = AliasOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.subscription_policy = SubscriptionPolicyOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.billing_account = BillingAccountOperations(
self._client, self._config, self._serialize, self._deserialize
)


def _send_request(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
from ._subscription_policy_operations import SubscriptionPolicyOperations
from ._billing_account_operations import BillingAccountOperations

from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
from ._patch import patch_sdk as _patch_sdk
__all__ = [
'SubscriptionsOperations',
'TenantsOperations',
Expand All @@ -23,3 +26,5 @@
'SubscriptionPolicyOperations',
'BillingAccountOperations',
]
__all__.extend([p for p in _patch_all if p not in __all__])
_patch_sdk()
Loading