Skip to content

Commit

Permalink
[AutoPR] signalr/resource-manager (#3706)
Browse files Browse the repository at this point in the history
* [AutoPR signalr/resource-manager] Oct10 (#3705)

* Generated from ad5e41880ed7c7206796e71c3ecac77831d44ad7

add new api-version 2018-10-01

* Packaging update of azure-mgmt-signalr

* Generated from 689631a7dfdcdd85ab2ef8bea49799c58f73c73e (#4003)

typo: signalr/resource-manager/Microsoft.SignalRService

- excuting -> executing
- SingalR -> SignalR
- resouce -> resource
- indentifier -> identifier

* Packaging update of azure-mgmt-signalr

* updated versioning and changelog

* Update version.py

* [AutoPR signalr/resource-manager] 3 new APIs added to SignalR service and rename the sample files (#4237)

* Generated from 11688ecee0e4debad9c3bc5dade3ea5134e89279

fix typos

* Generated from df6ed133536ac9854663a1ea0958807915ae2cbd

resolve comments

* Packaging update of azure-mgmt-signalr

* Packaging update of azure-mgmt-signalr

* Move signal R to SDK folder

* Packaging update of azure-mgmt-signalr

* Generated from 9c29294988174f42b0a86e1049899a56e7b875f4 (#5379)

Change SDK folder

* ChangeLog
  • Loading branch information
AutorestCI authored and lmazuel committed May 21, 2019
1 parent 501535e commit 28efc95
Show file tree
Hide file tree
Showing 59 changed files with 120 additions and 48 deletions.
1 change: 0 additions & 1 deletion azure-mgmt-signalr/MANIFEST.in

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
Release History
===============

0.2.0 (2019-05-21)
++++++++++++++++++

* Add restart operation

0.1.1 (2018-09-04)
++++++++++++++++++

Expand Down
5 changes: 5 additions & 0 deletions sdk/signalr/azure-mgmt-signalr/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell
pip freeze
If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell
pip uninstall azure
Usage
=====

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Resource(Model):
:ivar id: Fully qualified resource Id for the resource.
:vartype id: str
:ivar name: The name of the resouce.
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the service - e.g.
"Microsoft.SignalRService/SignalR"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Resource(Model):
:ivar id: Fully qualified resource Id for the resource.
:vartype id: str
:ivar name: The name of the resouce.
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the service - e.g.
"Microsoft.SignalRService/SignalR"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class ResourceSku(Model):
number code, such as A0 or P3. Required (if sku is specified)
:type name: str
:param tier: Optional tier of this particular SKU. `Basic` is deprecated,
use `Standard` instead for Basic tier. Possible values include: 'Free',
'Basic', 'Standard', 'Premium'
use `Standard` instead. Possible values include: 'Free', 'Basic',
'Standard', 'Premium'
:type tier: str or ~azure.mgmt.signalr.models.SignalRSkuTier
:param size: Optional, string. When the name field is the combination of
tier and some other value, this would be the standalone code.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class ResourceSku(Model):
number code, such as A0 or P3. Required (if sku is specified)
:type name: str
:param tier: Optional tier of this particular SKU. `Basic` is deprecated,
use `Standard` instead for Basic tier. Possible values include: 'Free',
'Basic', 'Standard', 'Premium'
use `Standard` instead. Possible values include: 'Free', 'Basic',
'Standard', 'Premium'
:type tier: str or ~azure.mgmt.signalr.models.SignalRSkuTier
:param size: Optional, string. When the name field is the combination of
tier and some other value, this would be the standalone code.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class SignalRResource(TrackedResource):
:ivar id: Fully qualified resource Id for the resource.
:vartype id: str
:ivar name: The name of the resouce.
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the service - e.g.
"Microsoft.SignalRService/SignalR"
Expand Down Expand Up @@ -48,10 +48,10 @@ class SignalRResource(TrackedResource):
:ivar host_name: FQDN of the SignalR service instance. Format:
xxx.service.signalr.net
:vartype host_name: str
:ivar public_port: The publicly accessibly port of the SignalR service
:ivar public_port: The publicly accessible port of the SignalR service
which is designed for browser/client side usage.
:vartype public_port: int
:ivar server_port: The publicly accessibly port of the SignalR service
:ivar server_port: The publicly accessible port of the SignalR service
which is designed for customer server side usage.
:vartype server_port: int
:param version: Version of the SignalR resource. Probably you need the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class SignalRResource(TrackedResource):
:ivar id: Fully qualified resource Id for the resource.
:vartype id: str
:ivar name: The name of the resouce.
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the service - e.g.
"Microsoft.SignalRService/SignalR"
Expand Down Expand Up @@ -48,10 +48,10 @@ class SignalRResource(TrackedResource):
:ivar host_name: FQDN of the SignalR service instance. Format:
xxx.service.signalr.net
:vartype host_name: str
:ivar public_port: The publicly accessibly port of the SignalR service
:ivar public_port: The publicly accessible port of the SignalR service
which is designed for browser/client side usage.
:vartype public_port: int
:ivar server_port: The publicly accessibly port of the SignalR service
:ivar server_port: The publicly accessible port of the SignalR service
which is designed for customer server side usage.
:vartype server_port: int
:param version: Version of the SignalR resource. Probably you need the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
class SignalRUsageName(Model):
"""Localizable String object containing the name and a localized value.
:param value: The indentifier of the usage.
:param value: The identifier of the usage.
:type value: str
:param localized_value: Localized name of the usage.
:type localized_value: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
class SignalRUsageName(Model):
"""Localizable String object containing the name and a localized value.
:param value: The indentifier of the usage.
:param value: The identifier of the usage.
:type value: str
:param localized_value: Localized name of the usage.
:type localized_value: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TrackedResource(Resource):
:ivar id: Fully qualified resource Id for the resource.
:vartype id: str
:ivar name: The name of the resouce.
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the service - e.g.
"Microsoft.SignalRService/SignalR"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TrackedResource(Resource):
:ivar id: Fully qualified resource Id for the resource.
:vartype id: str
:ivar name: The name of the resouce.
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the service - e.g.
"Microsoft.SignalRService/SignalR"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Operations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: Client Api Version. Constant value: "2018-03-01-preview".
:ivar api_version: Client Api Version. Possible values include: '2018-03-01-preview', '2018-10-01'. Constant value: "2018-10-01".
"""

models = models
Expand All @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2018-03-01-preview"
self.api_version = "2018-10-01"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class SignalROperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: Client Api Version. Constant value: "2018-03-01-preview".
:ivar api_version: Client Api Version. Possible values include: '2018-03-01-preview', '2018-10-01'. Constant value: "2018-10-01".
"""

models = models
Expand All @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2018-03-01-preview"
self.api_version = "2018-10-01"

self.config = config

Expand Down Expand Up @@ -486,7 +486,7 @@ def get(
return client_raw_response

return deserialized
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}'}
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}'}


def _create_or_update_initial(
Expand Down Expand Up @@ -591,7 +591,7 @@ def get_long_running_output(response):
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}'}
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}'}


def _delete_initial(
Expand Down Expand Up @@ -672,7 +672,7 @@ def get_long_running_output(response):
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}'}
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}'}


def _update_initial(
Expand Down Expand Up @@ -777,4 +777,85 @@ def get_long_running_output(response):
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}'}
update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}'}


def _restart_initial(
self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
# Construct URL
url = self.restart.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'),
'resourceName': self._serialize.url("resource_name", resource_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')

# Construct headers
header_parameters = {}
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, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [202, 204]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp

if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response

def restart(
self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Operation to restart a SignalR service.
:param resource_group_name: The name of the resource group that
contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal.
:type resource_group_name: str
:param resource_name: The name of the SignalR resource.
:type resource_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: The poller return type is ClientRawResponse, the
direct response alongside the deserialized response
:param polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:return: An instance of LROPoller that returns None or
ClientRawResponse<None> if raw==True
:rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
raw_result = self._restart_initial(
resource_group_name=resource_group_name,
resource_name=resource_name,
custom_headers=custom_headers,
raw=True,
**operation_config
)

def get_long_running_output(response):
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response

lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/restart'}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class UsagesOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: Client Api Version. Constant value: "2018-03-01-preview".
:ivar api_version: Client Api Version. Possible values include: '2018-03-01-preview', '2018-10-01'. Constant value: "2018-10-01".
"""

models = models
Expand All @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2018-03-01-preview"
self.api_version = "2018-10-01"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def __init__(
super(SignalRManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2018-03-01-preview'
self.api_version = '2018-10-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
# regenerated.
# --------------------------------------------------------------------------

VERSION = "0.1.1"
VERSION = "0.2.0"

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
version=version,
description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME),
long_description=readme + '\n\n' + history,
long_description_content_type='text/x-rst',
license='MIT License',
author='Microsoft Corporation',
author_email='azpysdkhelp@microsoft.com',
Expand Down

0 comments on commit 28efc95

Please sign in to comment.