Skip to content

Commit

Permalink
[AutoPR] devspaces/resource-manager (#2922)
Browse files Browse the repository at this point in the history
* Generated from 1247bce971f152f932cc9a92ea4f4d7f048be88e (#2921)

DevSpaces Python

* Dev spaces packaging
  • Loading branch information
AutorestCI authored and lmazuel committed Jul 12, 2018
1 parent 76b0901 commit e6dcc5b
Show file tree
Hide file tree
Showing 45 changed files with 2,305 additions and 0 deletions.
9 changes: 9 additions & 0 deletions azure-mgmt-devspaces/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. :changelog:
Release History
===============

0.1.0 (2018-07-12)
++++++++++++++++++

* Initial Release
2 changes: 2 additions & 0 deletions azure-mgmt-devspaces/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include *.rst
include azure_bdist_wheel.py
49 changes: 49 additions & 0 deletions azure-mgmt-devspaces/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Microsoft Azure SDK for Python
==============================

This is the Microsoft Azure Dev Spaces 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.


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
=====

For code examples, see `Dev Spaces
<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.
1 change: 1 addition & 0 deletions azure-mgmt-devspaces/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
1 change: 1 addition & 0 deletions azure-mgmt-devspaces/azure/mgmt/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
18 changes: 18 additions & 0 deletions azure-mgmt-devspaces/azure/mgmt/devspaces/__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 .dev_spaces_management_client import DevSpacesManagementClient
from .version import VERSION

__all__ = ['DevSpacesManagementClient']

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# 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.controllers_operations import ControllersOperations
from .operations.operations import Operations
from . import models


class DevSpacesManagementClientConfiguration(AzureConfiguration):
"""Configuration for DevSpacesManagementClient
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: Azure subscription ID.
: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(DevSpacesManagementClientConfiguration, self).__init__(base_url)

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

self.credentials = credentials
self.subscription_id = subscription_id


class DevSpacesManagementClient(SDKClient):
"""Dev Spaces Client
:ivar config: Configuration for client.
:vartype config: DevSpacesManagementClientConfiguration
:ivar controllers: Controllers operations
:vartype controllers: azure.mgmt.devspaces.operations.ControllersOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.devspaces.operations.Operations
: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: Azure subscription ID.
:type subscription_id: str
:param str base_url: Service URL
"""

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

self.config = DevSpacesManagementClientConfiguration(credentials, subscription_id, base_url)
super(DevSpacesManagementClient, 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-06-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.controllers = ControllersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
65 changes: 65 additions & 0 deletions azure-mgmt-devspaces/azure/mgmt/devspaces/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# 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 .sku_py3 import Sku
from .controller_py3 import Controller
from .controller_update_parameters_py3 import ControllerUpdateParameters
from .orchestrator_specific_connection_details_py3 import OrchestratorSpecificConnectionDetails
from .controller_connection_details_py3 import ControllerConnectionDetails
from .controller_connection_details_list_py3 import ControllerConnectionDetailsList
from .tracked_resource_py3 import TrackedResource
from .resource_provider_operation_display_py3 import ResourceProviderOperationDisplay
from .resource_provider_operation_definition_py3 import ResourceProviderOperationDefinition
from .resource_py3 import Resource
from .kubernetes_connection_details_py3 import KubernetesConnectionDetails
from .error_details_py3 import ErrorDetails
from .error_response_py3 import ErrorResponse, ErrorResponseException
except (SyntaxError, ImportError):
from .sku import Sku
from .controller import Controller
from .controller_update_parameters import ControllerUpdateParameters
from .orchestrator_specific_connection_details import OrchestratorSpecificConnectionDetails
from .controller_connection_details import ControllerConnectionDetails
from .controller_connection_details_list import ControllerConnectionDetailsList
from .tracked_resource import TrackedResource
from .resource_provider_operation_display import ResourceProviderOperationDisplay
from .resource_provider_operation_definition import ResourceProviderOperationDefinition
from .resource import Resource
from .kubernetes_connection_details import KubernetesConnectionDetails
from .error_details import ErrorDetails
from .error_response import ErrorResponse, ErrorResponseException
from .controller_paged import ControllerPaged
from .resource_provider_operation_definition_paged import ResourceProviderOperationDefinitionPaged
from .dev_spaces_management_client_enums import (
ProvisioningState,
SkuTier,
)

__all__ = [
'Sku',
'Controller',
'ControllerUpdateParameters',
'OrchestratorSpecificConnectionDetails',
'ControllerConnectionDetails',
'ControllerConnectionDetailsList',
'TrackedResource',
'ResourceProviderOperationDisplay',
'ResourceProviderOperationDefinition',
'Resource',
'KubernetesConnectionDetails',
'ErrorDetails',
'ErrorResponse', 'ErrorResponseException',
'ControllerPaged',
'ResourceProviderOperationDefinitionPaged',
'ProvisioningState',
'SkuTier',
]
86 changes: 86 additions & 0 deletions azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# 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 .tracked_resource import TrackedResource


class Controller(TrackedResource):
"""Controller.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id: Fully qualified resource Id for the resource.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the resource.
:vartype type: str
:param tags: Tags for the Azure resource.
:type tags: dict[str, str]
:param location: Region where the Azure resource is located.
:type location: str
:ivar provisioning_state: Provisioning state of the Azure Dev Spaces
Controller. Possible values include: 'Succeeded', 'Failed', 'Canceled',
'Updating', 'Creating', 'Deleting'
:vartype provisioning_state: str or
~azure.mgmt.devspaces.models.ProvisioningState
:param host_suffix: Required. DNS suffix for public endpoints running in
the Azure Dev Spaces Controller.
:type host_suffix: str
:ivar data_plane_fqdn: DNS name for accessing DataPlane services
:vartype data_plane_fqdn: str
:param target_container_host_resource_id: Required. Resource ID of the
target container host
:type target_container_host_resource_id: str
:param target_container_host_credentials_base64: Required. Credentials of
the target container host (base64).
:type target_container_host_credentials_base64: str
:param sku: Required.
:type sku: ~azure.mgmt.devspaces.models.Sku
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'provisioning_state': {'readonly': True},
'host_suffix': {'required': True},
'data_plane_fqdn': {'readonly': True},
'target_container_host_resource_id': {'required': True},
'target_container_host_credentials_base64': {'required': True},
'sku': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'location': {'key': 'location', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'host_suffix': {'key': 'properties.hostSuffix', 'type': 'str'},
'data_plane_fqdn': {'key': 'properties.dataPlaneFqdn', 'type': 'str'},
'target_container_host_resource_id': {'key': 'properties.targetContainerHostResourceId', 'type': 'str'},
'target_container_host_credentials_base64': {'key': 'properties.targetContainerHostCredentialsBase64', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'Sku'},
}

def __init__(self, **kwargs):
super(Controller, self).__init__(**kwargs)
self.provisioning_state = None
self.host_suffix = kwargs.get('host_suffix', None)
self.data_plane_fqdn = None
self.target_container_host_resource_id = kwargs.get('target_container_host_resource_id', None)
self.target_container_host_credentials_base64 = kwargs.get('target_container_host_credentials_base64', None)
self.sku = kwargs.get('sku', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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 ControllerConnectionDetails(Model):
"""ControllerConnectionDetails.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar auth_key: Authentication key for communicating with services.
:vartype auth_key: str
:ivar workspace_storage_account_name: Workspace storage account name.
:vartype workspace_storage_account_name: str
:ivar workspace_storage_sas_token: Workspace storage account SAS token.
:vartype workspace_storage_sas_token: str
:param orchestrator_specific_connection_details:
:type orchestrator_specific_connection_details:
~azure.mgmt.devspaces.models.OrchestratorSpecificConnectionDetails
"""

_validation = {
'auth_key': {'readonly': True},
'workspace_storage_account_name': {'readonly': True},
'workspace_storage_sas_token': {'readonly': True},
}

_attribute_map = {
'auth_key': {'key': 'authKey', 'type': 'str'},
'workspace_storage_account_name': {'key': 'workspaceStorageAccountName', 'type': 'str'},
'workspace_storage_sas_token': {'key': 'workspaceStorageSasToken', 'type': 'str'},
'orchestrator_specific_connection_details': {'key': 'orchestratorSpecificConnectionDetails', 'type': 'OrchestratorSpecificConnectionDetails'},
}

def __init__(self, **kwargs):
super(ControllerConnectionDetails, self).__init__(**kwargs)
self.auth_key = None
self.workspace_storage_account_name = None
self.workspace_storage_sas_token = None
self.orchestrator_specific_connection_details = kwargs.get('orchestrator_specific_connection_details', None)
Loading

0 comments on commit e6dcc5b

Please sign in to comment.