Skip to content
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
9 changes: 9 additions & 0 deletions azure-mgmt-serialconsole/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. :changelog:

Release History
===============

0.1.0 (1970-01-01)
++++++++++++++++++

* Initial Release
5 changes: 5 additions & 0 deletions azure-mgmt-serialconsole/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

33 changes: 33 additions & 0 deletions azure-mgmt-serialconsole/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Microsoft Azure SDK for Python
==============================

This is the Microsoft Azure MyService 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.4, 3.5, 3.6 and 3.7.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.

For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Usage
=====

For code examples, see `MyService Management
<https://docs.microsoft.com/python/api/overview/azure/>`__
on docs.microsoft.com.


Provide Feedback
================

If you encounter any bugs or have suggestions, please file an issue in the
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
section of the project.


.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-serialconsole%2FREADME.png
1 change: 1 addition & 0 deletions azure-mgmt-serialconsole/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
1 change: 1 addition & 0 deletions azure-mgmt-serialconsole/azure/mgmt/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
18 changes: 18 additions & 0 deletions azure-mgmt-serialconsole/azure/mgmt/serialconsole/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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 .microsoft_serial_console_client import MicrosoftSerialConsoleClient
from .version import VERSION

__all__ = ['MicrosoftSerialConsoleClient']

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# 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.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.list_operations import ListOperations
from .operations.list_console_operations import ListConsoleOperations
from .operations.console_operations import ConsoleOperations
from . import models


class MicrosoftSerialConsoleClientConfiguration(AzureConfiguration):
"""Configuration for MicrosoftSerialConsoleClient
Note that all parameters used to create this instance are saved as instance
attributes.

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(MicrosoftSerialConsoleClientConfiguration, self).__init__(base_url)

self.add_user_agent('azure-mgmt-serialconsole/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id


class MicrosoftSerialConsoleClient(SDKClient):
"""Azure Virtual Machine Serial Console allows you to access serial console of a Virtual Machine

:ivar config: Configuration for client.
:vartype config: MicrosoftSerialConsoleClientConfiguration

:ivar list: List operations
:vartype list: azure.mgmt.serialconsole.operations.ListOperations
:ivar list_console: ListConsole operations
:vartype list_console: azure.mgmt.serialconsole.operations.ListConsoleOperations
:ivar console: Console operations
:vartype console: azure.mgmt.serialconsole.operations.ConsoleOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

self.config = MicrosoftSerialConsoleClientConfiguration(credentials, subscription_id, base_url)
super(MicrosoftSerialConsoleClient, 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-05-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.list = ListOperations(
self._client, self.config, self._serialize, self._deserialize)
self.list_console = ListConsoleOperations(
self._client, self.config, self._serialize, self._deserialize)
self.console = ConsoleOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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.
# --------------------------------------------------------------------------

try:
from .serial_console_get_result_py3 import SerialConsoleGetResult
from .get_disabled_result_py3 import GetDisabledResult
from .set_disabled_result_py3 import SetDisabledResult
from .deployment_validate_result_py3 import DeploymentValidateResult, DeploymentValidateResultException
from .serial_console_operations_py3 import SerialConsoleOperations
except (SyntaxError, ImportError):
from .serial_console_get_result import SerialConsoleGetResult
from .get_disabled_result import GetDisabledResult
from .set_disabled_result import SetDisabledResult
from .deployment_validate_result import DeploymentValidateResult, DeploymentValidateResultException
from .serial_console_operations import SerialConsoleOperations

__all__ = [
'SerialConsoleGetResult',
'GetDisabledResult',
'SetDisabledResult',
'DeploymentValidateResult', 'DeploymentValidateResultException',
'SerialConsoleOperations',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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 DeploymentValidateResult(Model):
"""Details on Failure.

Details on Failure.

:param error_message: Error message
:type error_message: str
"""

_attribute_map = {
'error_message': {'key': 'errorMessage', 'type': 'str'},
}

def __init__(self, **kwargs):
super(DeploymentValidateResult, self).__init__(**kwargs)
self.error_message = kwargs.get('error_message', None)


class DeploymentValidateResultException(HttpOperationError):
"""Server responsed with exception of type: 'DeploymentValidateResult'.

:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""

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

super(DeploymentValidateResultException, self).__init__(deserialize, response, 'DeploymentValidateResult', *args)
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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 DeploymentValidateResult(Model):
"""Details on Failure.

Details on Failure.

:param error_message: Error message
:type error_message: str
"""

_attribute_map = {
'error_message': {'key': 'errorMessage', 'type': 'str'},
}

def __init__(self, *, error_message: str=None, **kwargs) -> None:
super(DeploymentValidateResult, self).__init__(**kwargs)
self.error_message = error_message


class DeploymentValidateResultException(HttpOperationError):
"""Server responsed with exception of type: 'DeploymentValidateResult'.

:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""

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

super(DeploymentValidateResultException, self).__init__(deserialize, response, 'DeploymentValidateResult', *args)
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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 GetDisabledResult(Model):
"""Get Disabled result.

Returns whether or not Serial Console is disabled for this given
subscription.

:param disabled: Disabled result
:type disabled: bool
"""

_attribute_map = {
'disabled': {'key': 'disabled', 'type': 'bool'},
}

def __init__(self, **kwargs):
super(GetDisabledResult, self).__init__(**kwargs)
self.disabled = kwargs.get('disabled', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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 GetDisabledResult(Model):
"""Get Disabled result.

Returns whether or not Serial Console is disabled for this given
subscription.

:param disabled: Disabled result
:type disabled: bool
"""

_attribute_map = {
'disabled': {'key': 'disabled', 'type': 'bool'},
}

def __init__(self, *, disabled: bool=None, **kwargs) -> None:
super(GetDisabledResult, self).__init__(**kwargs)
self.disabled = disabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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 SerialConsoleGetResult(Model):
"""Serial Console GET Result.

Returns whether or not Serial Console is disabled.

:param value: Whether or not Serial Console is disabled.
:type value: bool
"""

_attribute_map = {
'value': {'key': 'value', 'type': 'bool'},
}

def __init__(self, **kwargs):
super(SerialConsoleGetResult, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
Loading