Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR netapp/resource-manager] Microsoft.NetApp first version #3144

Merged
merged 2 commits into from
Aug 27, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Generated from c82f7e0779efda2a9a97a99664679711ce8d7e73
Microsoft.NetApp first version
  • Loading branch information
AutorestCI committed Aug 14, 2018
commit da9e174dacd76ff2a9df03f3c3e0472b74ca2a5e
18 changes: 18 additions & 0 deletions azure-mgmt-netapp/azure/mgmt/netapp/__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 .cloud_volume_management_client import CloudVolumeManagementClient
from .version import VERSION

__all__ = ['CloudVolumeManagementClient']

__version__ = VERSION

110 changes: 110 additions & 0 deletions azure-mgmt-netapp/azure/mgmt/netapp/cloud_volume_management_client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# 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.operations import Operations
from .operations.accounts_operations import AccountsOperations
from .operations.pools_operations import PoolsOperations
from .operations.volumes_operations import VolumesOperations
from .operations.mount_targets_operations import MountTargetsOperations
from .operations.snapshots_operations import SnapshotsOperations
from . import models


class CloudVolumeManagementClientConfiguration(AzureConfiguration):
"""Configuration for CloudVolumeManagementClient
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: Subscription credentials which uniquely identify
Microsoft Azure subscription. The subscription ID forms part of the URI
for every service call.
: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(CloudVolumeManagementClientConfiguration, self).__init__(base_url)

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

self.credentials = credentials
self.subscription_id = subscription_id


class CloudVolumeManagementClient(SDKClient):
"""Microsoft NetApp Azure Resource Provider specification

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

:ivar operations: Operations operations
:vartype operations: azure.mgmt.netapp.operations.Operations
:ivar accounts: Accounts operations
:vartype accounts: azure.mgmt.netapp.operations.AccountsOperations
:ivar pools: Pools operations
:vartype pools: azure.mgmt.netapp.operations.PoolsOperations
:ivar volumes: Volumes operations
:vartype volumes: azure.mgmt.netapp.operations.VolumesOperations
:ivar mount_targets: MountTargets operations
:vartype mount_targets: azure.mgmt.netapp.operations.MountTargetsOperations
:ivar snapshots: Snapshots operations
:vartype snapshots: azure.mgmt.netapp.operations.SnapshotsOperations

: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: Subscription credentials which uniquely identify
Microsoft Azure subscription. The subscription ID forms part of the URI
for every service call.
:type subscription_id: str
:param str base_url: Service URL
"""

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

self.config = CloudVolumeManagementClientConfiguration(credentials, subscription_id, base_url)
super(CloudVolumeManagementClient, 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 = '2017-08-15'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.accounts = AccountsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.pools = PoolsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.volumes = VolumesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.mount_targets = MountTargetsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.snapshots = SnapshotsOperations(
self._client, self.config, self._serialize, self._deserialize)
71 changes: 71 additions & 0 deletions azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# 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 .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .operation_list_result_py3 import OperationListResult
from .net_app_account_py3 import NetAppAccount
from .net_app_account_list_py3 import NetAppAccountList
from .net_app_account_patch_py3 import NetAppAccountPatch
from .capacity_pool_py3 import CapacityPool
from .capacity_pool_list_py3 import CapacityPoolList
from .capacity_pool_patch_py3 import CapacityPoolPatch
from .volume_py3 import Volume
from .volume_list_py3 import VolumeList
from .volume_patch_py3 import VolumePatch
from .mount_target_py3 import MountTarget
from .mount_target_list_py3 import MountTargetList
from .snapshot_py3 import Snapshot
from .snapshots_list_py3 import SnapshotsList
from .error_py3 import Error, ErrorException
except (SyntaxError, ImportError):
from .operation_display import OperationDisplay
from .operation import Operation
from .operation_list_result import OperationListResult
from .net_app_account import NetAppAccount
from .net_app_account_list import NetAppAccountList
from .net_app_account_patch import NetAppAccountPatch
from .capacity_pool import CapacityPool
from .capacity_pool_list import CapacityPoolList
from .capacity_pool_patch import CapacityPoolPatch
from .volume import Volume
from .volume_list import VolumeList
from .volume_patch import VolumePatch
from .mount_target import MountTarget
from .mount_target_list import MountTargetList
from .snapshot import Snapshot
from .snapshots_list import SnapshotsList
from .error import Error, ErrorException
from .cloud_volume_management_client_enums import (
ServiceLevel,
)

__all__ = [
'OperationDisplay',
'Operation',
'OperationListResult',
'NetAppAccount',
'NetAppAccountList',
'NetAppAccountPatch',
'CapacityPool',
'CapacityPoolList',
'CapacityPoolPatch',
'Volume',
'VolumeList',
'VolumePatch',
'MountTarget',
'MountTargetList',
'Snapshot',
'SnapshotsList',
'Error', 'ErrorException',
'ServiceLevel',
]
84 changes: 84 additions & 0 deletions azure-mgmt-netapp/azure/mgmt/netapp/models/capacity_pool.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# 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 CapacityPool(Model):
"""Capacity pool resource.

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.

:param location: Required. Resource location
:type location: str
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
:param tags: Resource tags
:type tags: object
:param account_id: Required. accountId. UUID v4 used to identify the
Account
:type account_id: str
:ivar pool_id: poolId. UUID v4 used to identify the Pool
:vartype pool_id: str
:param size: size. Provisioned size of the pool (in GB). Default value:
4096 .
:type size: int
:param service_level: serviceLevel. The service level of the file system.
Possible values include: 'Basic', 'Standard', 'Premium'. Default value:
"Standard" .
:type service_level: str or ~azure.mgmt.netapp.models.ServiceLevel
:ivar provisioning_state: Azure lifecycle management
:vartype provisioning_state: str
"""

_validation = {
'location': {'required': True},
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'account_id': {'required': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'},
'pool_id': {'readonly': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'},
'size': {'minimum': 4096},
'provisioning_state': {'readonly': True},
}

_attribute_map = {
'location': {'key': 'location', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'tags': {'key': 'tags', 'type': 'object'},
'account_id': {'key': 'properties.accountId', 'type': 'str'},
'pool_id': {'key': 'properties.poolId', 'type': 'str'},
'size': {'key': 'properties.size', 'type': 'int'},
'service_level': {'key': 'properties.serviceLevel', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}

def __init__(self, **kwargs):
super(CapacityPool, self).__init__(**kwargs)
self.location = kwargs.get('location', None)
self.id = None
self.name = None
self.type = None
self.tags = kwargs.get('tags', None)
self.account_id = kwargs.get('account_id', None)
self.pool_id = None
self.size = kwargs.get('size', 4096)
self.service_level = kwargs.get('service_level', "Standard")
self.provisioning_state = None
28 changes: 28 additions & 0 deletions azure-mgmt-netapp/azure/mgmt/netapp/models/capacity_pool_list.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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 CapacityPoolList(Model):
"""List of capacity pool resources.

:param value: List of Capacity pools
:type value: list[~azure.mgmt.netapp.models.CapacityPool]
"""

_attribute_map = {
'value': {'key': 'value', 'type': '[CapacityPool]'},
}

def __init__(self, **kwargs):
super(CapacityPoolList, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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 CapacityPoolList(Model):
"""List of capacity pool resources.

:param value: List of Capacity pools
:type value: list[~azure.mgmt.netapp.models.CapacityPool]
"""

_attribute_map = {
'value': {'key': 'value', 'type': '[CapacityPool]'},
}

def __init__(self, *, value=None, **kwargs) -> None:
super(CapacityPoolList, self).__init__(**kwargs)
self.value = value
28 changes: 28 additions & 0 deletions azure-mgmt-netapp/azure/mgmt/netapp/models/capacity_pool_patch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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 CapacityPoolPatch(Model):
"""Capacity pool patch resource.

:param tags: Resource tags
:type tags: object
"""

_attribute_map = {
'tags': {'key': 'tags', 'type': 'object'},
}

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