Skip to content

Commit

Permalink
[AutoPR] servermanagement/resource-manager (#2638)
Browse files Browse the repository at this point in the history
* Generated from 300bab4809ca4ab7cf066367d26f77f311c9724b (#2636)

Fix ServerManager Py Conf

* Server Manager auto packaging

* azure-mgmt-servermanager 2.0.0

* Regenerate ServerManager auto packaging
  • Loading branch information
AutorestCI authored and lmazuel committed May 29, 2018
1 parent ce3fc09 commit d3ae137
Show file tree
Hide file tree
Showing 58 changed files with 2,357 additions and 927 deletions.
36 changes: 36 additions & 0 deletions azure-mgmt-servermanager/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,42 @@
Release History
===============

2.0.0 (2018-05-25)
++++++++++++++++++

**Features**

- Client class can be used as a context manager to keep the underlying HTTP session open for performance

**General Breaking changes**

This version uses a next-generation code generator that *might* introduce breaking changes.

- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments.
To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments.
- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered.
While this is not a breaking change, the distinctions are important, and are documented here:
https://docs.python.org/3/library/enum.html#others
At a glance:

- "is" should not be used at all.
- "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered.

- New Long Running Operation:

- Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same.
- Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used.
- The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`,
without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`.
- New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`,
the response of the initial call will be returned without polling.
- `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`.
- `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away.

**Bugfixes**

- Compatibility of the sdist with wheel 0.31.0

1.2.0 (2017-06-23)
++++++++++++++++++

Expand Down
6 changes: 3 additions & 3 deletions azure-mgmt-servermanager/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is the Microsoft Azure Server Manager Management Client Library.
Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6.
This package has been tested with Python 2.7, 3.4, 3.5 and 3.6.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.
Expand Down Expand Up @@ -37,8 +37,8 @@ Usage
=====

For code examples, see `Server Manager Management
<https://azure-sdk-for-python.readthedocs.org/en/latest/sample_azure-mgmt-servermanager.html>`__
on readthedocs.org.
<https://docs.microsoft.com/python/api/overview/azure/server-manager>`__
on docs.microsoft.com.


Provide Feedback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,52 @@
# regenerated.
# --------------------------------------------------------------------------

from .resource import Resource
from .encryption_jwk_resource import EncryptionJwkResource
from .gateway_status import GatewayStatus
from .gateway_resource import GatewayResource
from .gateway_profile import GatewayProfile
from .gateway_parameters import GatewayParameters
from .node_resource import NodeResource
from .node_parameters import NodeParameters
from .session_resource import SessionResource
from .session_parameters import SessionParameters
from .version import Version
from .power_shell_session_resource import PowerShellSessionResource
from .prompt_field_description import PromptFieldDescription
from .power_shell_command_result import PowerShellCommandResult
from .power_shell_command_results import PowerShellCommandResults
from .power_shell_command_status import PowerShellCommandStatus
from .power_shell_session_resources import PowerShellSessionResources
from .power_shell_command_parameters import PowerShellCommandParameters
from .prompt_message_response import PromptMessageResponse
from .power_shell_tab_completion_parameters import PowerShellTabCompletionParameters
from .power_shell_tab_completion_results import PowerShellTabCompletionResults
from .error import Error, ErrorException
try:
from .resource_py3 import Resource
from .encryption_jwk_resource_py3 import EncryptionJwkResource
from .gateway_status_py3 import GatewayStatus
from .gateway_resource_py3 import GatewayResource
from .gateway_profile_py3 import GatewayProfile
from .gateway_parameters_py3 import GatewayParameters
from .node_resource_py3 import NodeResource
from .node_parameters_py3 import NodeParameters
from .session_resource_py3 import SessionResource
from .session_parameters_py3 import SessionParameters
from .version_py3 import Version
from .power_shell_session_resource_py3 import PowerShellSessionResource
from .prompt_field_description_py3 import PromptFieldDescription
from .power_shell_command_result_py3 import PowerShellCommandResult
from .power_shell_command_results_py3 import PowerShellCommandResults
from .power_shell_command_status_py3 import PowerShellCommandStatus
from .power_shell_session_resources_py3 import PowerShellSessionResources
from .power_shell_command_parameters_py3 import PowerShellCommandParameters
from .prompt_message_response_py3 import PromptMessageResponse
from .power_shell_tab_completion_parameters_py3 import PowerShellTabCompletionParameters
from .power_shell_tab_completion_results_py3 import PowerShellTabCompletionResults
from .error_py3 import Error, ErrorException
except (SyntaxError, ImportError):
from .resource import Resource
from .encryption_jwk_resource import EncryptionJwkResource
from .gateway_status import GatewayStatus
from .gateway_resource import GatewayResource
from .gateway_profile import GatewayProfile
from .gateway_parameters import GatewayParameters
from .node_resource import NodeResource
from .node_parameters import NodeParameters
from .session_resource import SessionResource
from .session_parameters import SessionParameters
from .version import Version
from .power_shell_session_resource import PowerShellSessionResource
from .prompt_field_description import PromptFieldDescription
from .power_shell_command_result import PowerShellCommandResult
from .power_shell_command_results import PowerShellCommandResults
from .power_shell_command_status import PowerShellCommandStatus
from .power_shell_session_resources import PowerShellSessionResources
from .power_shell_command_parameters import PowerShellCommandParameters
from .prompt_message_response import PromptMessageResponse
from .power_shell_tab_completion_parameters import PowerShellTabCompletionParameters
from .power_shell_tab_completion_results import PowerShellTabCompletionResults
from .error import Error, ErrorException
from .gateway_resource_paged import GatewayResourcePaged
from .node_resource_paged import NodeResourcePaged
from .server_management_enums import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ class EncryptionJwkResource(Model):
'n': {'key': 'n', 'type': 'str'},
}

def __init__(self, kty=None, alg=None, e=None, n=None):
self.kty = kty
self.alg = alg
self.e = e
self.n = n
def __init__(self, **kwargs):
super(EncryptionJwkResource, self).__init__(**kwargs)
self.kty = kwargs.get('kty', None)
self.alg = kwargs.get('alg', None)
self.e = kwargs.get('e', None)
self.n = kwargs.get('n', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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 EncryptionJwkResource(Model):
"""The public key of the gateway.
:param kty:
:type kty: str
:param alg:
:type alg: str
:param e:
:type e: str
:param n:
:type n: str
"""

_attribute_map = {
'kty': {'key': 'kty', 'type': 'str'},
'alg': {'key': 'alg', 'type': 'str'},
'e': {'key': 'e', 'type': 'str'},
'n': {'key': 'n', 'type': 'str'},
}

def __init__(self, *, kty: str=None, alg: str=None, e: str=None, n: str=None, **kwargs) -> None:
super(EncryptionJwkResource, self).__init__(**kwargs)
self.kty = kty
self.alg = alg
self.e = e
self.n = n
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ class Error(Model):
'fields': {'key': 'fields', 'type': 'str'},
}

def __init__(self, code=None, message=None, fields=None):
self.code = code
self.message = message
self.fields = fields
def __init__(self, **kwargs):
super(Error, self).__init__(**kwargs)
self.code = kwargs.get('code', None)
self.message = kwargs.get('message', None)
self.fields = kwargs.get('fields', None)


class ErrorException(HttpOperationError):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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 Error(Model):
"""Error message.
:param code:
:type code: int
:param message:
:type message: str
:param fields:
:type fields: str
"""

_attribute_map = {
'code': {'key': 'code', 'type': 'int'},
'message': {'key': 'message', 'type': 'str'},
'fields': {'key': 'fields', 'type': 'str'},
}

def __init__(self, *, code: int=None, message: str=None, fields: str=None, **kwargs) -> None:
super(Error, self).__init__(**kwargs)
self.code = code
self.message = message
self.fields = fields


class ErrorException(HttpOperationError):
"""Server responsed with exception of type: 'Error'.
:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""

def __init__(self, deserialize, response, *args):

super(ErrorException, self).__init__(deserialize, response, 'Error', *args)
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ class GatewayParameters(Model):
gateway to auto upgrade itself. If properties value not specified, then we
assume upgradeMode = Automatic. Possible values include: 'Manual',
'Automatic'
:type upgrade_mode: str or :class:`UpgradeMode
<azure.mgmt.servermanager.models.UpgradeMode>`
:type upgrade_mode: str or ~azure.mgmt.servermanager.models.UpgradeMode
"""

_attribute_map = {
Expand All @@ -33,7 +32,8 @@ class GatewayParameters(Model):
'upgrade_mode': {'key': 'properties.upgradeMode', 'type': 'UpgradeMode'},
}

def __init__(self, location=None, tags=None, upgrade_mode=None):
self.location = location
self.tags = tags
self.upgrade_mode = upgrade_mode
def __init__(self, **kwargs):
super(GatewayParameters, self).__init__(**kwargs)
self.location = kwargs.get('location', None)
self.tags = kwargs.get('tags', None)
self.upgrade_mode = kwargs.get('upgrade_mode', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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 GatewayParameters(Model):
"""Collection of parameters for operations on a gateway resource.
:param location: Location of the resource.
:type location: str
:param tags: Resource tags.
:type tags: object
:param upgrade_mode: The upgradeMode property gives the flexibility to
gateway to auto upgrade itself. If properties value not specified, then we
assume upgradeMode = Automatic. Possible values include: 'Manual',
'Automatic'
:type upgrade_mode: str or ~azure.mgmt.servermanager.models.UpgradeMode
"""

_attribute_map = {
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': 'object'},
'upgrade_mode': {'key': 'properties.upgradeMode', 'type': 'UpgradeMode'},
}

def __init__(self, *, location: str=None, tags=None, upgrade_mode=None, **kwargs) -> None:
super(GatewayParameters, self).__init__(**kwargs)
self.location = location
self.tags = tags
self.upgrade_mode = upgrade_mode
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,15 @@ class GatewayProfile(Model):
'status_blob_signature': {'key': 'statusBlobSignature', 'type': 'str'},
}

def __init__(self, data_plane_service_base_address=None, gateway_id=None, environment=None, upgrade_manifest_url=None, messaging_namespace=None, messaging_account=None, messaging_key=None, request_queue=None, response_topic=None, status_blob_signature=None):
self.data_plane_service_base_address = data_plane_service_base_address
self.gateway_id = gateway_id
self.environment = environment
self.upgrade_manifest_url = upgrade_manifest_url
self.messaging_namespace = messaging_namespace
self.messaging_account = messaging_account
self.messaging_key = messaging_key
self.request_queue = request_queue
self.response_topic = response_topic
self.status_blob_signature = status_blob_signature
def __init__(self, **kwargs):
super(GatewayProfile, self).__init__(**kwargs)
self.data_plane_service_base_address = kwargs.get('data_plane_service_base_address', None)
self.gateway_id = kwargs.get('gateway_id', None)
self.environment = kwargs.get('environment', None)
self.upgrade_manifest_url = kwargs.get('upgrade_manifest_url', None)
self.messaging_namespace = kwargs.get('messaging_namespace', None)
self.messaging_account = kwargs.get('messaging_account', None)
self.messaging_key = kwargs.get('messaging_key', None)
self.request_queue = kwargs.get('request_queue', None)
self.response_topic = kwargs.get('response_topic', None)
self.status_blob_signature = kwargs.get('status_blob_signature', None)
Loading

0 comments on commit d3ae137

Please sign in to comment.