Skip to content

Commit 765af34

Browse files
authored
Generated from c219e4e969a6443efa588eadc8ed77f611baa53e (#4638)
Merge pull request #15 from leonardbf/NFSAAS-1875-correction NFSAAS-1875 small correction
1 parent 57e987d commit 765af34

16 files changed

+150
-26
lines changed

azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@
1515
from .metric_specification_py3 import MetricSpecification
1616
from .service_specification_py3 import ServiceSpecification
1717
from .operation_py3 import Operation
18-
from .active_directories_py3 import ActiveDirectories
18+
from .active_directory_py3 import ActiveDirectory
1919
from .net_app_account_py3 import NetAppAccount
2020
from .net_app_account_patch_py3 import NetAppAccountPatch
2121
from .capacity_pool_py3 import CapacityPool
2222
from .capacity_pool_patch_py3 import CapacityPoolPatch
2323
from .export_policy_rule_py3 import ExportPolicyRule
24+
from .volume_properties_export_policy_py3 import VolumePropertiesExportPolicy
2425
from .volume_py3 import Volume
26+
from .volume_patch_properties_export_policy_py3 import VolumePatchPropertiesExportPolicy
2527
from .volume_patch_py3 import VolumePatch
2628
from .mount_target_py3 import MountTarget
2729
from .snapshot_py3 import Snapshot
@@ -33,13 +35,15 @@
3335
from .metric_specification import MetricSpecification
3436
from .service_specification import ServiceSpecification
3537
from .operation import Operation
36-
from .active_directories import ActiveDirectories
38+
from .active_directory import ActiveDirectory
3739
from .net_app_account import NetAppAccount
3840
from .net_app_account_patch import NetAppAccountPatch
3941
from .capacity_pool import CapacityPool
4042
from .capacity_pool_patch import CapacityPoolPatch
4143
from .export_policy_rule import ExportPolicyRule
44+
from .volume_properties_export_policy import VolumePropertiesExportPolicy
4245
from .volume import Volume
46+
from .volume_patch_properties_export_policy import VolumePatchPropertiesExportPolicy
4347
from .volume_patch import VolumePatch
4448
from .mount_target import MountTarget
4549
from .snapshot import Snapshot
@@ -61,13 +65,15 @@
6165
'MetricSpecification',
6266
'ServiceSpecification',
6367
'Operation',
64-
'ActiveDirectories',
68+
'ActiveDirectory',
6569
'NetAppAccount',
6670
'NetAppAccountPatch',
6771
'CapacityPool',
6872
'CapacityPoolPatch',
6973
'ExportPolicyRule',
74+
'VolumePropertiesExportPolicy',
7075
'Volume',
76+
'VolumePatchPropertiesExportPolicy',
7177
'VolumePatch',
7278
'MountTarget',
7379
'Snapshot',

azure-mgmt-netapp/azure/mgmt/netapp/models/active_directories.py renamed to azure-mgmt-netapp/azure/mgmt/netapp/models/active_directory.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
from msrest.serialization import Model
1313

1414

15-
class ActiveDirectories(Model):
16-
"""Active Directories.
15+
class ActiveDirectory(Model):
16+
"""Active Directory.
1717
1818
:param active_directory_id: Id of the Active Directory
1919
:type active_directory_id: str
@@ -49,7 +49,7 @@ class ActiveDirectories(Model):
4949
}
5050

5151
def __init__(self, **kwargs):
52-
super(ActiveDirectories, self).__init__(**kwargs)
52+
super(ActiveDirectory, self).__init__(**kwargs)
5353
self.active_directory_id = kwargs.get('active_directory_id', None)
5454
self.username = kwargs.get('username', None)
5555
self.password = kwargs.get('password', None)

azure-mgmt-netapp/azure/mgmt/netapp/models/active_directories_py3.py renamed to azure-mgmt-netapp/azure/mgmt/netapp/models/active_directory_py3.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
from msrest.serialization import Model
1313

1414

15-
class ActiveDirectories(Model):
16-
"""Active Directories.
15+
class ActiveDirectory(Model):
16+
"""Active Directory.
1717
1818
:param active_directory_id: Id of the Active Directory
1919
:type active_directory_id: str
@@ -49,7 +49,7 @@ class ActiveDirectories(Model):
4949
}
5050

5151
def __init__(self, *, active_directory_id: str=None, username: str=None, password: str=None, domain: str=None, d_ns: str=None, status: str=None, s_mb_server_name: str=None, organizational_unit: str=None, **kwargs) -> None:
52-
super(ActiveDirectories, self).__init__(**kwargs)
52+
super(ActiveDirectory, self).__init__(**kwargs)
5353
self.active_directory_id = active_directory_id
5454
self.username = username
5555
self.password = password

azure-mgmt-netapp/azure/mgmt/netapp/models/net_app_account.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class NetAppAccount(Model):
3333
:ivar provisioning_state: Azure lifecycle management
3434
:vartype provisioning_state: str
3535
:param active_directories: Active Directories
36-
:type active_directories: ~azure.mgmt.netapp.models.ActiveDirectories
36+
:type active_directories: list[~azure.mgmt.netapp.models.ActiveDirectory]
3737
"""
3838

3939
_validation = {
@@ -51,7 +51,7 @@ class NetAppAccount(Model):
5151
'type': {'key': 'type', 'type': 'str'},
5252
'tags': {'key': 'tags', 'type': 'object'},
5353
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
54-
'active_directories': {'key': 'properties.activeDirectories', 'type': 'ActiveDirectories'},
54+
'active_directories': {'key': 'properties.activeDirectories', 'type': '[ActiveDirectory]'},
5555
}
5656

5757
def __init__(self, **kwargs):

azure-mgmt-netapp/azure/mgmt/netapp/models/net_app_account_patch.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class NetAppAccountPatch(Model):
3131
:ivar provisioning_state: Azure lifecycle management
3232
:vartype provisioning_state: str
3333
:param active_directories: Active Directories
34-
:type active_directories: ~azure.mgmt.netapp.models.ActiveDirectories
34+
:type active_directories: list[~azure.mgmt.netapp.models.ActiveDirectory]
3535
"""
3636

3737
_validation = {
@@ -48,7 +48,7 @@ class NetAppAccountPatch(Model):
4848
'type': {'key': 'type', 'type': 'str'},
4949
'tags': {'key': 'tags', 'type': 'object'},
5050
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
51-
'active_directories': {'key': 'properties.activeDirectories', 'type': 'ActiveDirectories'},
51+
'active_directories': {'key': 'properties.activeDirectories', 'type': '[ActiveDirectory]'},
5252
}
5353

5454
def __init__(self, **kwargs):

azure-mgmt-netapp/azure/mgmt/netapp/models/net_app_account_patch_py3.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class NetAppAccountPatch(Model):
3131
:ivar provisioning_state: Azure lifecycle management
3232
:vartype provisioning_state: str
3333
:param active_directories: Active Directories
34-
:type active_directories: ~azure.mgmt.netapp.models.ActiveDirectories
34+
:type active_directories: list[~azure.mgmt.netapp.models.ActiveDirectory]
3535
"""
3636

3737
_validation = {
@@ -48,7 +48,7 @@ class NetAppAccountPatch(Model):
4848
'type': {'key': 'type', 'type': 'str'},
4949
'tags': {'key': 'tags', 'type': 'object'},
5050
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
51-
'active_directories': {'key': 'properties.activeDirectories', 'type': 'ActiveDirectories'},
51+
'active_directories': {'key': 'properties.activeDirectories', 'type': '[ActiveDirectory]'},
5252
}
5353

5454
def __init__(self, *, location: str=None, tags=None, active_directories=None, **kwargs) -> None:

azure-mgmt-netapp/azure/mgmt/netapp/models/net_app_account_py3.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class NetAppAccount(Model):
3333
:ivar provisioning_state: Azure lifecycle management
3434
:vartype provisioning_state: str
3535
:param active_directories: Active Directories
36-
:type active_directories: ~azure.mgmt.netapp.models.ActiveDirectories
36+
:type active_directories: list[~azure.mgmt.netapp.models.ActiveDirectory]
3737
"""
3838

3939
_validation = {
@@ -51,7 +51,7 @@ class NetAppAccount(Model):
5151
'type': {'key': 'type', 'type': 'str'},
5252
'tags': {'key': 'tags', 'type': 'object'},
5353
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
54-
'active_directories': {'key': 'properties.activeDirectories', 'type': 'ActiveDirectories'},
54+
'active_directories': {'key': 'properties.activeDirectories', 'type': '[ActiveDirectory]'},
5555
}
5656

5757
def __init__(self, *, location: str, tags=None, active_directories=None, **kwargs) -> None:

azure-mgmt-netapp/azure/mgmt/netapp/models/volume.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ class Volume(Model):
4545
107374182400 .
4646
:type usage_threshold: long
4747
:param export_policy: Export policy rule
48-
:type export_policy: ~azure.mgmt.netapp.models.ExportPolicyRule
48+
:type export_policy:
49+
~azure.mgmt.netapp.models.VolumePropertiesExportPolicy
4950
:ivar provisioning_state: Azure lifecycle management
5051
:vartype provisioning_state: str
5152
:param subnet_id: The Azure Resource URI for a delegated subnet. Must have
@@ -75,7 +76,7 @@ class Volume(Model):
7576
'creation_token': {'key': 'properties.creationToken', 'type': 'str'},
7677
'service_level': {'key': 'properties.serviceLevel', 'type': 'str'},
7778
'usage_threshold': {'key': 'properties.usageThreshold', 'type': 'long'},
78-
'export_policy': {'key': 'properties.exportPolicy', 'type': 'ExportPolicyRule'},
79+
'export_policy': {'key': 'properties.exportPolicy', 'type': 'VolumePropertiesExportPolicy'},
7980
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
8081
'subnet_id': {'key': 'properties.subnetId', 'type': 'str'},
8182
}

azure-mgmt-netapp/azure/mgmt/netapp/models/volume_patch.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ class VolumePatch(Model):
3838
107374182400 .
3939
:type usage_threshold: long
4040
:param export_policy: Export policy rule
41-
:type export_policy: ~azure.mgmt.netapp.models.ExportPolicyRule
41+
:type export_policy:
42+
~azure.mgmt.netapp.models.VolumePatchPropertiesExportPolicy
4243
"""
4344

4445
_validation = {
@@ -56,7 +57,7 @@ class VolumePatch(Model):
5657
'tags': {'key': 'tags', 'type': 'object'},
5758
'service_level': {'key': 'properties.serviceLevel', 'type': 'str'},
5859
'usage_threshold': {'key': 'properties.usageThreshold', 'type': 'long'},
59-
'export_policy': {'key': 'properties.exportPolicy', 'type': 'ExportPolicyRule'},
60+
'export_policy': {'key': 'properties.exportPolicy', 'type': 'VolumePatchPropertiesExportPolicy'},
6061
}
6162

6263
def __init__(self, **kwargs):
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 VolumePatchPropertiesExportPolicy(Model):
16+
"""Export policy rule.
17+
18+
:param rules:
19+
:type rules: list[~azure.mgmt.netapp.models.ExportPolicyRule]
20+
"""
21+
22+
_attribute_map = {
23+
'rules': {'key': 'rules', 'type': '[ExportPolicyRule]'},
24+
}
25+
26+
def __init__(self, **kwargs):
27+
super(VolumePatchPropertiesExportPolicy, self).__init__(**kwargs)
28+
self.rules = kwargs.get('rules', 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 VolumePatchPropertiesExportPolicy(Model):
16+
"""Export policy rule.
17+
18+
:param rules:
19+
:type rules: list[~azure.mgmt.netapp.models.ExportPolicyRule]
20+
"""
21+
22+
_attribute_map = {
23+
'rules': {'key': 'rules', 'type': '[ExportPolicyRule]'},
24+
}
25+
26+
def __init__(self, *, rules=None, **kwargs) -> None:
27+
super(VolumePatchPropertiesExportPolicy, self).__init__(**kwargs)
28+
self.rules = rules

azure-mgmt-netapp/azure/mgmt/netapp/models/volume_patch_py3.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ class VolumePatch(Model):
3838
107374182400 .
3939
:type usage_threshold: long
4040
:param export_policy: Export policy rule
41-
:type export_policy: ~azure.mgmt.netapp.models.ExportPolicyRule
41+
:type export_policy:
42+
~azure.mgmt.netapp.models.VolumePatchPropertiesExportPolicy
4243
"""
4344

4445
_validation = {
@@ -56,7 +57,7 @@ class VolumePatch(Model):
5657
'tags': {'key': 'tags', 'type': 'object'},
5758
'service_level': {'key': 'properties.serviceLevel', 'type': 'str'},
5859
'usage_threshold': {'key': 'properties.usageThreshold', 'type': 'long'},
59-
'export_policy': {'key': 'properties.exportPolicy', 'type': 'ExportPolicyRule'},
60+
'export_policy': {'key': 'properties.exportPolicy', 'type': 'VolumePatchPropertiesExportPolicy'},
6061
}
6162

6263
def __init__(self, *, location: str=None, tags=None, service_level="Premium", usage_threshold: int=107374182400, export_policy=None, **kwargs) -> 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 VolumePropertiesExportPolicy(Model):
16+
"""Export policy rule.
17+
18+
:param rules:
19+
:type rules: list[~azure.mgmt.netapp.models.ExportPolicyRule]
20+
"""
21+
22+
_attribute_map = {
23+
'rules': {'key': 'rules', 'type': '[ExportPolicyRule]'},
24+
}
25+
26+
def __init__(self, **kwargs):
27+
super(VolumePropertiesExportPolicy, self).__init__(**kwargs)
28+
self.rules = kwargs.get('rules', 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 VolumePropertiesExportPolicy(Model):
16+
"""Export policy rule.
17+
18+
:param rules:
19+
:type rules: list[~azure.mgmt.netapp.models.ExportPolicyRule]
20+
"""
21+
22+
_attribute_map = {
23+
'rules': {'key': 'rules', 'type': '[ExportPolicyRule]'},
24+
}
25+
26+
def __init__(self, *, rules=None, **kwargs) -> None:
27+
super(VolumePropertiesExportPolicy, self).__init__(**kwargs)
28+
self.rules = rules

azure-mgmt-netapp/azure/mgmt/netapp/models/volume_py3.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ class Volume(Model):
4545
107374182400 .
4646
:type usage_threshold: long
4747
:param export_policy: Export policy rule
48-
:type export_policy: ~azure.mgmt.netapp.models.ExportPolicyRule
48+
:type export_policy:
49+
~azure.mgmt.netapp.models.VolumePropertiesExportPolicy
4950
:ivar provisioning_state: Azure lifecycle management
5051
:vartype provisioning_state: str
5152
:param subnet_id: The Azure Resource URI for a delegated subnet. Must have
@@ -75,7 +76,7 @@ class Volume(Model):
7576
'creation_token': {'key': 'properties.creationToken', 'type': 'str'},
7677
'service_level': {'key': 'properties.serviceLevel', 'type': 'str'},
7778
'usage_threshold': {'key': 'properties.usageThreshold', 'type': 'long'},
78-
'export_policy': {'key': 'properties.exportPolicy', 'type': 'ExportPolicyRule'},
79+
'export_policy': {'key': 'properties.exportPolicy', 'type': 'VolumePropertiesExportPolicy'},
7980
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
8081
'subnet_id': {'key': 'properties.subnetId', 'type': 'str'},
8182
}

azure-mgmt-netapp/azure/mgmt/netapp/operations/accounts_operations.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,13 @@ def _create_or_update_initial(
199199
request = self._client.put(url, query_parameters, header_parameters, body_content)
200200
response = self._client.send(request, stream=False, **operation_config)
201201

202-
if response.status_code not in [201, 202]:
202+
if response.status_code not in [200, 201, 202]:
203203
raise models.ErrorException(self._deserialize, response)
204204

205205
deserialized = None
206206

207+
if response.status_code == 200:
208+
deserialized = self._deserialize('NetAppAccount', response)
207209
if response.status_code == 201:
208210
deserialized = self._deserialize('NetAppAccount', response)
209211

0 commit comments

Comments
 (0)