Skip to content

Commit a7d4470

Browse files
authored
[AutoPR netapp/resource-manager] Microsoft.NetApp first version (#3144)
* Generated from c82f7e0779efda2a9a97a99664679711ce8d7e73 Microsoft.NetApp first version * Generated from 51268a3aa9892dabce143e347f225bf74be4cc49 Addressing pullrequest comments
1 parent 61234a3 commit a7d4470

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+4099
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .azure_net_app_files_management_client import AzureNetAppFilesManagementClient
13+
from .version import VERSION
14+
15+
__all__ = ['AzureNetAppFilesManagementClient']
16+
17+
__version__ = VERSION
18+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.service_client import SDKClient
13+
from msrest import Serializer, Deserializer
14+
from msrestazure import AzureConfiguration
15+
from .version import VERSION
16+
from .operations.operations import Operations
17+
from .operations.accounts_operations import AccountsOperations
18+
from .operations.pools_operations import PoolsOperations
19+
from .operations.volumes_operations import VolumesOperations
20+
from .operations.mount_targets_operations import MountTargetsOperations
21+
from .operations.snapshots_operations import SnapshotsOperations
22+
from . import models
23+
24+
25+
class AzureNetAppFilesManagementClientConfiguration(AzureConfiguration):
26+
"""Configuration for AzureNetAppFilesManagementClient
27+
Note that all parameters used to create this instance are saved as instance
28+
attributes.
29+
30+
:param credentials: Credentials needed for the client to connect to Azure.
31+
:type credentials: :mod:`A msrestazure Credentials
32+
object<msrestazure.azure_active_directory>`
33+
:param subscription_id: Subscription credentials which uniquely identify
34+
Microsoft Azure subscription. The subscription ID forms part of the URI
35+
for every service call.
36+
:type subscription_id: str
37+
:param str base_url: Service URL
38+
"""
39+
40+
def __init__(
41+
self, credentials, subscription_id, base_url=None):
42+
43+
if credentials is None:
44+
raise ValueError("Parameter 'credentials' must not be None.")
45+
if subscription_id is None:
46+
raise ValueError("Parameter 'subscription_id' must not be None.")
47+
if not base_url:
48+
base_url = 'https://management.azure.com'
49+
50+
super(AzureNetAppFilesManagementClientConfiguration, self).__init__(base_url)
51+
52+
self.add_user_agent('azure-mgmt-netapp/{}'.format(VERSION))
53+
self.add_user_agent('Azure-SDK-For-Python')
54+
55+
self.credentials = credentials
56+
self.subscription_id = subscription_id
57+
58+
59+
class AzureNetAppFilesManagementClient(SDKClient):
60+
"""Microsoft NetApp Azure Resource Provider specification
61+
62+
:ivar config: Configuration for client.
63+
:vartype config: AzureNetAppFilesManagementClientConfiguration
64+
65+
:ivar operations: Operations operations
66+
:vartype operations: azure.mgmt.netapp.operations.Operations
67+
:ivar accounts: Accounts operations
68+
:vartype accounts: azure.mgmt.netapp.operations.AccountsOperations
69+
:ivar pools: Pools operations
70+
:vartype pools: azure.mgmt.netapp.operations.PoolsOperations
71+
:ivar volumes: Volumes operations
72+
:vartype volumes: azure.mgmt.netapp.operations.VolumesOperations
73+
:ivar mount_targets: MountTargets operations
74+
:vartype mount_targets: azure.mgmt.netapp.operations.MountTargetsOperations
75+
:ivar snapshots: Snapshots operations
76+
:vartype snapshots: azure.mgmt.netapp.operations.SnapshotsOperations
77+
78+
:param credentials: Credentials needed for the client to connect to Azure.
79+
:type credentials: :mod:`A msrestazure Credentials
80+
object<msrestazure.azure_active_directory>`
81+
:param subscription_id: Subscription credentials which uniquely identify
82+
Microsoft Azure subscription. The subscription ID forms part of the URI
83+
for every service call.
84+
:type subscription_id: str
85+
:param str base_url: Service URL
86+
"""
87+
88+
def __init__(
89+
self, credentials, subscription_id, base_url=None):
90+
91+
self.config = AzureNetAppFilesManagementClientConfiguration(credentials, subscription_id, base_url)
92+
super(AzureNetAppFilesManagementClient, self).__init__(self.config.credentials, self.config)
93+
94+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
95+
self.api_version = '2017-08-15'
96+
self._serialize = Serializer(client_models)
97+
self._deserialize = Deserializer(client_models)
98+
99+
self.operations = Operations(
100+
self._client, self.config, self._serialize, self._deserialize)
101+
self.accounts = AccountsOperations(
102+
self._client, self.config, self._serialize, self._deserialize)
103+
self.pools = PoolsOperations(
104+
self._client, self.config, self._serialize, self._deserialize)
105+
self.volumes = VolumesOperations(
106+
self._client, self.config, self._serialize, self._deserialize)
107+
self.mount_targets = MountTargetsOperations(
108+
self._client, self.config, self._serialize, self._deserialize)
109+
self.snapshots = SnapshotsOperations(
110+
self._client, self.config, self._serialize, self._deserialize)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
try:
13+
from .operation_display_py3 import OperationDisplay
14+
from .dimension_py3 import Dimension
15+
from .metric_specification_py3 import MetricSpecification
16+
from .service_specification_py3 import ServiceSpecification
17+
from .operation_py3 import Operation
18+
from .operation_list_result_py3 import OperationListResult
19+
from .net_app_account_py3 import NetAppAccount
20+
from .net_app_account_list_py3 import NetAppAccountList
21+
from .net_app_account_patch_py3 import NetAppAccountPatch
22+
from .capacity_pool_py3 import CapacityPool
23+
from .capacity_pool_list_py3 import CapacityPoolList
24+
from .capacity_pool_patch_py3 import CapacityPoolPatch
25+
from .volume_py3 import Volume
26+
from .volume_list_py3 import VolumeList
27+
from .volume_patch_py3 import VolumePatch
28+
from .mount_target_py3 import MountTarget
29+
from .mount_target_list_py3 import MountTargetList
30+
from .snapshot_py3 import Snapshot
31+
from .snapshots_list_py3 import SnapshotsList
32+
from .error_py3 import Error, ErrorException
33+
except (SyntaxError, ImportError):
34+
from .operation_display import OperationDisplay
35+
from .dimension import Dimension
36+
from .metric_specification import MetricSpecification
37+
from .service_specification import ServiceSpecification
38+
from .operation import Operation
39+
from .operation_list_result import OperationListResult
40+
from .net_app_account import NetAppAccount
41+
from .net_app_account_list import NetAppAccountList
42+
from .net_app_account_patch import NetAppAccountPatch
43+
from .capacity_pool import CapacityPool
44+
from .capacity_pool_list import CapacityPoolList
45+
from .capacity_pool_patch import CapacityPoolPatch
46+
from .volume import Volume
47+
from .volume_list import VolumeList
48+
from .volume_patch import VolumePatch
49+
from .mount_target import MountTarget
50+
from .mount_target_list import MountTargetList
51+
from .snapshot import Snapshot
52+
from .snapshots_list import SnapshotsList
53+
from .error import Error, ErrorException
54+
from .azure_net_app_files_management_client_enums import (
55+
ServiceLevel,
56+
)
57+
58+
__all__ = [
59+
'OperationDisplay',
60+
'Dimension',
61+
'MetricSpecification',
62+
'ServiceSpecification',
63+
'Operation',
64+
'OperationListResult',
65+
'NetAppAccount',
66+
'NetAppAccountList',
67+
'NetAppAccountPatch',
68+
'CapacityPool',
69+
'CapacityPoolList',
70+
'CapacityPoolPatch',
71+
'Volume',
72+
'VolumeList',
73+
'VolumePatch',
74+
'MountTarget',
75+
'MountTargetList',
76+
'Snapshot',
77+
'SnapshotsList',
78+
'Error', 'ErrorException',
79+
'ServiceLevel',
80+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from enum import Enum
13+
14+
15+
class ServiceLevel(str, Enum):
16+
17+
basic = "Basic" #: Basic service level
18+
standard = "Standard" #: Standard service level
19+
premium = "Premium" #: Premium service level
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class CapacityPool(Model):
16+
"""Capacity pool resource.
17+
18+
Variables are only populated by the server, and will be ignored when
19+
sending a request.
20+
21+
All required parameters must be populated in order to send to Azure.
22+
23+
:param location: Required. Resource location
24+
:type location: str
25+
:ivar id: Resource Id
26+
:vartype id: str
27+
:ivar name: Resource name
28+
:vartype name: str
29+
:ivar type: Resource type
30+
:vartype type: str
31+
:param tags: Resource tags
32+
:type tags: object
33+
:param account_id: Required. accountId. UUID v4 used to identify the
34+
Account
35+
:type account_id: str
36+
:ivar pool_id: poolId. UUID v4 used to identify the Pool
37+
:vartype pool_id: str
38+
:param size: size. Provisioned size of the pool (in GB). Default value:
39+
4096 .
40+
:type size: int
41+
:param service_level: serviceLevel. The service level of the file system.
42+
Possible values include: 'Basic', 'Standard', 'Premium'. Default value:
43+
"Standard" .
44+
:type service_level: str or ~azure.mgmt.netapp.models.ServiceLevel
45+
:ivar provisioning_state: Azure lifecycle management
46+
:vartype provisioning_state: str
47+
"""
48+
49+
_validation = {
50+
'location': {'required': True},
51+
'id': {'readonly': True},
52+
'name': {'readonly': True},
53+
'type': {'readonly': True},
54+
'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}$'},
55+
'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}$'},
56+
'size': {'minimum': 4096},
57+
'provisioning_state': {'readonly': True},
58+
}
59+
60+
_attribute_map = {
61+
'location': {'key': 'location', 'type': 'str'},
62+
'id': {'key': 'id', 'type': 'str'},
63+
'name': {'key': 'name', 'type': 'str'},
64+
'type': {'key': 'type', 'type': 'str'},
65+
'tags': {'key': 'tags', 'type': 'object'},
66+
'account_id': {'key': 'properties.accountId', 'type': 'str'},
67+
'pool_id': {'key': 'properties.poolId', 'type': 'str'},
68+
'size': {'key': 'properties.size', 'type': 'int'},
69+
'service_level': {'key': 'properties.serviceLevel', 'type': 'str'},
70+
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
71+
}
72+
73+
def __init__(self, **kwargs):
74+
super(CapacityPool, self).__init__(**kwargs)
75+
self.location = kwargs.get('location', None)
76+
self.id = None
77+
self.name = None
78+
self.type = None
79+
self.tags = kwargs.get('tags', None)
80+
self.account_id = kwargs.get('account_id', None)
81+
self.pool_id = None
82+
self.size = kwargs.get('size', 4096)
83+
self.service_level = kwargs.get('service_level', "Standard")
84+
self.provisioning_state = None
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class CapacityPoolList(Model):
16+
"""List of capacity pool resources.
17+
18+
:param value: List of Capacity pools
19+
:type value: list[~azure.mgmt.netapp.models.CapacityPool]
20+
"""
21+
22+
_attribute_map = {
23+
'value': {'key': 'value', 'type': '[CapacityPool]'},
24+
}
25+
26+
def __init__(self, **kwargs):
27+
super(CapacityPoolList, self).__init__(**kwargs)
28+
self.value = kwargs.get('value', None)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class CapacityPoolList(Model):
16+
"""List of capacity pool resources.
17+
18+
:param value: List of Capacity pools
19+
:type value: list[~azure.mgmt.netapp.models.CapacityPool]
20+
"""
21+
22+
_attribute_map = {
23+
'value': {'key': 'value', 'type': '[CapacityPool]'},
24+
}
25+
26+
def __init__(self, *, value=None, **kwargs) -> None:
27+
super(CapacityPoolList, self).__init__(**kwargs)
28+
self.value = value

0 commit comments

Comments
 (0)