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

[ReleasePR track2_azure-mgmt-storagepool] [Go] Track2 modify readme.go.md 9 #20528

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
10 changes: 5 additions & 5 deletions sdk/storagepool/azure-mgmt-storagepool/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.4.2",
"autorest": "3.4.5",
"use": [
"@autorest/python@5.8.0",
"@autorest/modelerfour@4.19.1"
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
],
"commit": "61b4ce18d89d493e94d15bb101786a6e8a675ac8",
"commit": "2b451435758d4c1b45e014b15c756c2b75132875",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/storagepool/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.0 --use=@autorest/modelerfour@4.19.1 --version=3.4.2",
"autorest_command": "autorest specification/storagepool/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
"readme": "specification/storagepool/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-04-01-preview"
self.api_version = "2021-08-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-storagepool/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"chosen_version": "2021-04-01-preview",
"total_api_version_list": ["2021-04-01-preview"],
"chosen_version": "2021-08-01",
"total_api_version_list": ["2021-08-01"],
"client": {
"name": "StoragePoolManagement",
"filename": "_storage_pool_management",
Expand Down Expand Up @@ -101,6 +101,7 @@
"operations": "Operations",
"disk_pools": "DiskPoolsOperations",
"disk_pool_zones": "DiskPoolZonesOperations",
"resource_skus": "ResourceSkusOperations",
"iscsi_targets": "IscsiTargetsOperations"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from .operations import Operations
from .operations import DiskPoolsOperations
from .operations import DiskPoolZonesOperations
from .operations import ResourceSkusOperations
from .operations import IscsiTargetsOperations
from . import models

Expand All @@ -35,6 +36,8 @@ class StoragePoolManagement(object):
:vartype disk_pools: storage_pool_management.operations.DiskPoolsOperations
:ivar disk_pool_zones: DiskPoolZonesOperations operations
:vartype disk_pool_zones: storage_pool_management.operations.DiskPoolZonesOperations
:ivar resource_skus: ResourceSkusOperations operations
:vartype resource_skus: storage_pool_management.operations.ResourceSkusOperations
:ivar iscsi_targets: IscsiTargetsOperations operations
:vartype iscsi_targets: storage_pool_management.operations.IscsiTargetsOperations
:param credential: Credential needed for the client to connect to Azure.
Expand Down Expand Up @@ -69,6 +72,8 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.disk_pool_zones = DiskPoolZonesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.resource_skus = ResourceSkusOperations(
self._client, self._config, self._serialize, self._deserialize)
self.iscsi_targets = IscsiTargetsOperations(
self._client, self._config, self._serialize, self._deserialize)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-04-01-preview"
self.api_version = "2021-08-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-storagepool/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from .operations import Operations
from .operations import DiskPoolsOperations
from .operations import DiskPoolZonesOperations
from .operations import ResourceSkusOperations
from .operations import IscsiTargetsOperations
from .. import models

Expand All @@ -33,6 +34,8 @@ class StoragePoolManagement(object):
:vartype disk_pools: storage_pool_management.aio.operations.DiskPoolsOperations
:ivar disk_pool_zones: DiskPoolZonesOperations operations
:vartype disk_pool_zones: storage_pool_management.aio.operations.DiskPoolZonesOperations
:ivar resource_skus: ResourceSkusOperations operations
:vartype resource_skus: storage_pool_management.aio.operations.ResourceSkusOperations
:ivar iscsi_targets: IscsiTargetsOperations operations
:vartype iscsi_targets: storage_pool_management.aio.operations.IscsiTargetsOperations
:param credential: Credential needed for the client to connect to Azure.
Expand Down Expand Up @@ -66,6 +69,8 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.disk_pool_zones = DiskPoolZonesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.resource_skus = ResourceSkusOperations(
self._client, self._config, self._serialize, self._deserialize)
self.iscsi_targets = IscsiTargetsOperations(
self._client, self._config, self._serialize, self._deserialize)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
from ._operations import Operations
from ._disk_pools_operations import DiskPoolsOperations
from ._disk_pool_zones_operations import DiskPoolZonesOperations
from ._resource_skus_operations import ResourceSkusOperations
from ._iscsi_targets_operations import IscsiTargetsOperations

__all__ = [
'Operations',
'DiskPoolsOperations',
'DiskPoolZonesOperations',
'ResourceSkusOperations',
'IscsiTargetsOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01-preview"
api_version = "2021-08-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def list_by_subscription(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01-preview"
api_version = "2021-08-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -129,7 +129,7 @@ def list_by_resource_group(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01-preview"
api_version = "2021-08-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -193,7 +193,7 @@ async def _create_or_update_initial(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01-preview"
api_version = "2021-08-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -246,7 +246,8 @@ async def begin_create_or_update(
disk_pool_create_payload: "_models.DiskPoolCreate",
**kwargs: Any
) -> AsyncLROPoller["_models.DiskPool"]:
"""Create or Update Disk pool.
"""Create or Update Disk pool. This create or update operation can take 15 minutes to complete.
This is expected service behavior.

:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
Expand Down Expand Up @@ -322,7 +323,7 @@ async def _update_initial(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01-preview"
api_version = "2021-08-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -448,7 +449,7 @@ async def _delete_initial(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01-preview"
api_version = "2021-08-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -488,7 +489,8 @@ async def begin_delete(
disk_pool_name: str,
**kwargs: Any
) -> AsyncLROPoller[None]:
"""Delete a Disk pool.
"""Delete a Disk pool; attached disks are not affected. This delete operation can take 10 minutes
to complete. This is expected service behavior.

:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
Expand Down Expand Up @@ -568,7 +570,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01-preview"
api_version = "2021-08-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -627,7 +629,7 @@ def list_outbound_network_dependencies_endpoints(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01-preview"
api_version = "2021-08-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -691,7 +693,7 @@ async def _start_initial(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01-preview"
api_version = "2021-08-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -731,7 +733,8 @@ async def begin_start(
disk_pool_name: str,
**kwargs: Any
) -> AsyncLROPoller[None]:
"""The operation to start a Disk Pool.
"""The operation to start a Disk Pool. This start operation can take 10 minutes to complete. This
is expected service behavior.

:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
Expand Down Expand Up @@ -800,7 +803,7 @@ async def _deallocate_initial(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01-preview"
api_version = "2021-08-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -841,7 +844,8 @@ async def begin_deallocate(
**kwargs: Any
) -> AsyncLROPoller[None]:
"""Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute
resources that this Disk Pool uses.
resources that this Disk Pool uses. This operation can take 10 minutes to complete. This is
expected service behavior.

:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
Expand Down Expand Up @@ -898,3 +902,113 @@ def get_long_running_output(pipeline_response):
else:
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}/deallocate'} # type: ignore

async def _upgrade_initial(
self,
resource_group_name: str,
disk_pool_name: str,
**kwargs: Any
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-08-01"
accept = "application/json"

# Construct URL
url = self._upgrade_initial.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]*[0-9A-Za-z]$'),
'diskPoolName': self._serialize.url("disk_pool_name", disk_pool_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)

# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.Error, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

if cls:
return cls(pipeline_response, None, {})

_upgrade_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}/upgrade'} # type: ignore

async def begin_upgrade(
self,
resource_group_name: str,
disk_pool_name: str,
**kwargs: Any
) -> AsyncLROPoller[None]:
"""Upgrade replaces the underlying virtual machine hosts one at a time. This operation can take
10-15 minutes to complete. This is expected service behavior.

:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param disk_pool_name: The name of the Disk Pool.
:type disk_pool_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be AsyncARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType[None]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
raw_result = await self._upgrade_initial(
resource_group_name=resource_group_name,
disk_pool_name=disk_pool_name,
cls=lambda x,y,z: x,
**kwargs
)

kwargs.pop('error_map', None)
kwargs.pop('content_type', None)

def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})

path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]*[0-9A-Za-z]$'),
'diskPoolName': self._serialize.url("disk_pool_name", disk_pool_name, 'str'),
}

if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
return AsyncLROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output
)
else:
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}/upgrade'} # type: ignore
Loading