Skip to content

Commit

Permalink
CodeGen from PR 13683 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Exposing undocumented Databricks workspace properties for fixing S360 issues (Azure#13683)

* exposing storage account name, sku

* Prettier fixes

* Fixing the review comment

* Adding No Public IP related properties

* Updating the remaining properties related to S360

* Fixing review comments

* Fixing Spell Check issue
  • Loading branch information
SDKAuto committed Apr 15, 2021
1 parent 1051a43 commit b9fd0be
Show file tree
Hide file tree
Showing 37 changed files with 2,392 additions and 1,131 deletions.
1 change: 1 addition & 0 deletions sdk/databricks/azure-mgmt-databricks/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
8 changes: 8 additions & 0 deletions sdk/databricks/azure-mgmt-databricks/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "V2",
"use": "@microsoft.azure/autorest.python@~4.0.71",
"commit": "bffd010720f8447b659c9b1881a4547100e3e1d1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/databricks/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk [email protected]/autorest.python@~4.0.71 --version=V2",
"readme": "specification/databricks/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
# regenerated.
# --------------------------------------------------------------------------

from .databricks_client import DatabricksClient
from .version import VERSION
from ._configuration import DatabricksClientConfiguration
from ._databricks_client import DatabricksClient
__all__ = ['DatabricksClient', 'DatabricksClientConfiguration']

__all__ = ['DatabricksClient']
from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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 msrestazure import AzureConfiguration

from .version import VERSION


class DatabricksClientConfiguration(AzureConfiguration):
"""Configuration for DatabricksClient
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(DatabricksClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

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

self.credentials = credentials
self.subscription_id = subscription_id
Original file line number Diff line number Diff line change
Expand Up @@ -11,43 +11,12 @@

from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.workspaces_operations import WorkspacesOperations
from .operations.operations import Operations
from . import models


class DatabricksClientConfiguration(AzureConfiguration):
"""Configuration for DatabricksClient
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(DatabricksClientConfiguration, self).__init__(base_url)

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

self.credentials = credentials
self.subscription_id = subscription_id
from ._configuration import DatabricksClientConfiguration
from .operations import WorkspacesOperations
from .operations import VNetPeeringOperations
from .operations import Operations
from . import models


class DatabricksClient(SDKClient):
Expand All @@ -58,6 +27,8 @@ class DatabricksClient(SDKClient):
:ivar workspaces: Workspaces operations
:vartype workspaces: azure.mgmt.databricks.operations.WorkspacesOperations
:ivar vnet_peering: VNetPeering operations
:vartype vnet_peering: azure.mgmt.databricks.operations.VNetPeeringOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.databricks.operations.Operations
Expand All @@ -82,5 +53,7 @@ def __init__(

self.workspaces = WorkspacesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.vnet_peering = VNetPeeringOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
Expand Up @@ -10,48 +10,94 @@
# --------------------------------------------------------------------------

try:
from .workspace_provider_authorization_py3 import WorkspaceProviderAuthorization
from .sku_py3 import Sku
from .workspace_py3 import Workspace
from .tracked_resource_py3 import TrackedResource
from .resource_py3 import Resource
from .workspace_update_py3 import WorkspaceUpdate
from .error_detail_py3 import ErrorDetail
from .error_info_py3 import ErrorInfo
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from ._models_py3 import AddressSpace
from ._models_py3 import CreatedBy
from ._models_py3 import Encryption
from ._models_py3 import ErrorDetail
from ._models_py3 import ErrorInfo
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import ManagedIdentityConfiguration
from ._models_py3 import Operation
from ._models_py3 import OperationDisplay
from ._models_py3 import Resource
from ._models_py3 import Sku
from ._models_py3 import TrackedResource
from ._models_py3 import VirtualNetworkPeering
from ._models_py3 import VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork
from ._models_py3 import VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork
from ._models_py3 import Workspace
from ._models_py3 import WorkspaceCustomBooleanParameter
from ._models_py3 import WorkspaceCustomObjectParameter
from ._models_py3 import WorkspaceCustomParameters
from ._models_py3 import WorkspaceCustomStringParameter
from ._models_py3 import WorkspaceEncryptionParameter
from ._models_py3 import WorkspaceProviderAuthorization
from ._models_py3 import WorkspaceUpdate
except (SyntaxError, ImportError):
from .workspace_provider_authorization import WorkspaceProviderAuthorization
from .sku import Sku
from .workspace import Workspace
from .tracked_resource import TrackedResource
from .resource import Resource
from .workspace_update import WorkspaceUpdate
from .error_detail import ErrorDetail
from .error_info import ErrorInfo
from .error_response import ErrorResponse, ErrorResponseException
from .operation_display import OperationDisplay
from .operation import Operation
from .workspace_paged import WorkspacePaged
from .operation_paged import OperationPaged
from .databricks_client_enums import (
from ._models import AddressSpace
from ._models import CreatedBy
from ._models import Encryption
from ._models import ErrorDetail
from ._models import ErrorInfo
from ._models import ErrorResponse, ErrorResponseException
from ._models import ManagedIdentityConfiguration
from ._models import Operation
from ._models import OperationDisplay
from ._models import Resource
from ._models import Sku
from ._models import TrackedResource
from ._models import VirtualNetworkPeering
from ._models import VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork
from ._models import VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork
from ._models import Workspace
from ._models import WorkspaceCustomBooleanParameter
from ._models import WorkspaceCustomObjectParameter
from ._models import WorkspaceCustomParameters
from ._models import WorkspaceCustomStringParameter
from ._models import WorkspaceEncryptionParameter
from ._models import WorkspaceProviderAuthorization
from ._models import WorkspaceUpdate
from ._paged_models import OperationPaged
from ._paged_models import VirtualNetworkPeeringPaged
from ._paged_models import WorkspacePaged
from ._databricks_client_enums import (
CustomParameterType,
KeySource,
ProvisioningState,
PeeringProvisioningState,
PeeringState,
)

__all__ = [
'WorkspaceProviderAuthorization',
'Sku',
'Workspace',
'TrackedResource',
'Resource',
'WorkspaceUpdate',
'AddressSpace',
'CreatedBy',
'Encryption',
'ErrorDetail',
'ErrorInfo',
'ErrorResponse', 'ErrorResponseException',
'OperationDisplay',
'ManagedIdentityConfiguration',
'Operation',
'OperationDisplay',
'Resource',
'Sku',
'TrackedResource',
'VirtualNetworkPeering',
'VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork',
'VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork',
'Workspace',
'WorkspaceCustomBooleanParameter',
'WorkspaceCustomObjectParameter',
'WorkspaceCustomParameters',
'WorkspaceCustomStringParameter',
'WorkspaceEncryptionParameter',
'WorkspaceProviderAuthorization',
'WorkspaceUpdate',
'WorkspacePaged',
'VirtualNetworkPeeringPaged',
'OperationPaged',
'CustomParameterType',
'KeySource',
'ProvisioningState',
'PeeringProvisioningState',
'PeeringState',
]
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@
from enum import Enum


class CustomParameterType(str, Enum):

bool_enum = "Bool"
object_enum = "Object"
string = "String"


class KeySource(str, Enum):

default = "Default"
microsoft_keyvault = "Microsoft.Keyvault"


class ProvisioningState(str, Enum):

accepted = "Accepted"
Expand All @@ -25,3 +38,18 @@ class ProvisioningState(str, Enum):
failed = "Failed"
succeeded = "Succeeded"
updating = "Updating"


class PeeringProvisioningState(str, Enum):

succeeded = "Succeeded"
updating = "Updating"
deleting = "Deleting"
failed = "Failed"


class PeeringState(str, Enum):

initiated = "Initiated"
connected = "Connected"
disconnected = "Disconnected"
Loading

0 comments on commit b9fd0be

Please sign in to comment.