Skip to content

Commit

Permalink
[AutoPR] netapp/resource-manager (#4948)
Browse files Browse the repository at this point in the history
* [AutoPR netapp/resource-manager] Initial stable version (#4890)

* Generated from 0d5ee15214bbfdeb6cf1e6c406014d7f7f5dbf41

Merge pull request #16 from leonardbf/NFSAAS-2185-R4-swagger-standard

NFSAAS-2185 update to R4 standard

* Packaging update of azure-mgmt-netapp

* Generated from 8153135b38dbcaf4b145bad5db7d4e662b053ef5

Merge pull request #17 from leonardbf/NFSAAS-2185-R4-swagger-standard

NFSAAS-2185 update to R4 RP standard

* Generated from 194e44a6ce8900ab9dcdc934c61e527e45f685af

Merge pull request #19 from leonardbf/NFSAAS-2185-R4-swagger-standard

NFSAAS-2185 update to R4 RP standard

* ChangeLog

* NFSAAS-2318 rerun tests for R4 RP standard (#5144)
  • Loading branch information
AutorestCI authored and lmazuel committed May 8, 2019
1 parent d5cf9ed commit a6447ce
Show file tree
Hide file tree
Showing 49 changed files with 2,894 additions and 2,381 deletions.
12 changes: 12 additions & 0 deletions azure-mgmt-netapp/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
Release History
===============

0.4.0 (2019-04-29)
++++++++++++++++++

**Features**

- Model Volume has a new parameter baremetal_tenant_id
- Model Volume has a new parameter snapshot_id

**Breaking changes**

- Model ActiveDirectory fixing d_ns to dns, and s_mb_server_name to smb_server_name

0.3.0 (2019-03-25)
++++++++++++++++++

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
from msrest.polling import LROPoller, NoPolling
from msrestazure.polling.arm_polling import ARMPolling
import uuid
from .operations.operations import Operations
from .operations.accounts_operations import AccountsOperations
from .operations.pools_operations import PoolsOperations
Expand Down Expand Up @@ -92,7 +97,7 @@ def __init__(
super(AzureNetAppFilesManagementClient, 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.api_version = '2019-05-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand All @@ -108,3 +113,125 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.snapshots = SnapshotsOperations(
self._client, self.config, self._serialize, self._deserialize)

def check_name_availability(
self, location, custom_headers=None, raw=False, **operation_config):
"""Check resource name availability.
Check if a resource name is available.
:param location: The location
:type location: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: ResourceNameAvailability or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.netapp.models.ResourceNameAvailability or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = self.check_name_availability.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'location': self._serialize.url("location", location, 'str')
}
url = self._client.format_url(url, **path_format_arguments)

# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.post(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp

deserialized = None

if response.status_code == 200:
deserialized = self._deserialize('ResourceNameAvailability', response)

if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response

return deserialized
check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkNameAvailability'}

def check_file_path_availability(
self, location, custom_headers=None, raw=False, **operation_config):
"""Check file path availability.
Check if a file path is available.
:param location: The location
:type location: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: ResourceNameAvailability or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.netapp.models.ResourceNameAvailability or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = self.check_file_path_availability.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'location': self._serialize.url("location", location, 'str')
}
url = self._client.format_url(url, **path_format_arguments)

# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.post(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp

deserialized = None

if response.status_code == 200:
deserialized = self._deserialize('ResourceNameAvailability', response)

if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response

return deserialized
check_file_path_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkFilePathAvailability'}
13 changes: 10 additions & 3 deletions azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
from .metric_specification_py3 import MetricSpecification
from .service_specification_py3 import ServiceSpecification
from .operation_py3 import Operation
from .resource_name_availability_py3 import ResourceNameAvailability
from .resource_name_availability_request_py3 import ResourceNameAvailabilityRequest
from .active_directory_py3 import ActiveDirectory
from .net_app_account_py3 import NetAppAccount
from .net_app_account_patch_py3 import NetAppAccountPatch
Expand All @@ -28,13 +30,14 @@
from .mount_target_py3 import MountTarget
from .snapshot_py3 import Snapshot
from .snapshot_patch_py3 import SnapshotPatch
from .error_py3 import Error, ErrorException
except (SyntaxError, ImportError):
from .operation_display import OperationDisplay
from .dimension import Dimension
from .metric_specification import MetricSpecification
from .service_specification import ServiceSpecification
from .operation import Operation
from .resource_name_availability import ResourceNameAvailability
from .resource_name_availability_request import ResourceNameAvailabilityRequest
from .active_directory import ActiveDirectory
from .net_app_account import NetAppAccount
from .net_app_account_patch import NetAppAccountPatch
Expand All @@ -48,14 +51,15 @@
from .mount_target import MountTarget
from .snapshot import Snapshot
from .snapshot_patch import SnapshotPatch
from .error import Error, ErrorException
from .operation_paged import OperationPaged
from .net_app_account_paged import NetAppAccountPaged
from .capacity_pool_paged import CapacityPoolPaged
from .volume_paged import VolumePaged
from .mount_target_paged import MountTargetPaged
from .snapshot_paged import SnapshotPaged
from .azure_net_app_files_management_client_enums import (
InAvailabilityReasonType,
CheckNameResourceTypes,
ServiceLevel,
)

Expand All @@ -65,6 +69,8 @@
'MetricSpecification',
'ServiceSpecification',
'Operation',
'ResourceNameAvailability',
'ResourceNameAvailabilityRequest',
'ActiveDirectory',
'NetAppAccount',
'NetAppAccountPatch',
Expand All @@ -78,12 +84,13 @@
'MountTarget',
'Snapshot',
'SnapshotPatch',
'Error', 'ErrorException',
'OperationPaged',
'NetAppAccountPaged',
'CapacityPoolPaged',
'VolumePaged',
'MountTargetPaged',
'SnapshotPaged',
'InAvailabilityReasonType',
'CheckNameResourceTypes',
'ServiceLevel',
]
18 changes: 9 additions & 9 deletions azure-mgmt-netapp/azure/mgmt/netapp/models/active_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ class ActiveDirectory(Model):
:type password: str
:param domain: Name of the Active Directory domain
:type domain: str
:param d_ns: Comma separated list of DNS server IP addresses for the
Active Directory domain
:type d_ns: str
:param dns: Comma separated list of DNS server IP addresses for the Active
Directory domain
:type dns: str
:param status: Status of the Active Directory
:type status: str
:param s_mb_server_name: NetBIOS name of the SMB server. This name will be
:param smb_server_name: NetBIOS name of the SMB server. This name will be
registered as a computer account in the AD and used to mount volumes
:type s_mb_server_name: str
:type smb_server_name: str
:param organizational_unit: The Organizational Unit (OU) within the
Windows Active Directory
:type organizational_unit: str
Expand All @@ -42,9 +42,9 @@ class ActiveDirectory(Model):
'username': {'key': 'username', 'type': 'str'},
'password': {'key': 'password', 'type': 'str'},
'domain': {'key': 'domain', 'type': 'str'},
'd_ns': {'key': 'dNS', 'type': 'str'},
'dns': {'key': 'dns', 'type': 'str'},
'status': {'key': 'status', 'type': 'str'},
's_mb_server_name': {'key': 'sMBServerName', 'type': 'str'},
'smb_server_name': {'key': 'smbServerName', 'type': 'str'},
'organizational_unit': {'key': 'organizationalUnit', 'type': 'str'},
}

Expand All @@ -54,7 +54,7 @@ def __init__(self, **kwargs):
self.username = kwargs.get('username', None)
self.password = kwargs.get('password', None)
self.domain = kwargs.get('domain', None)
self.d_ns = kwargs.get('d_ns', None)
self.dns = kwargs.get('dns', None)
self.status = kwargs.get('status', None)
self.s_mb_server_name = kwargs.get('s_mb_server_name', None)
self.smb_server_name = kwargs.get('smb_server_name', None)
self.organizational_unit = kwargs.get('organizational_unit', None)
20 changes: 10 additions & 10 deletions azure-mgmt-netapp/azure/mgmt/netapp/models/active_directory_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ class ActiveDirectory(Model):
:type password: str
:param domain: Name of the Active Directory domain
:type domain: str
:param d_ns: Comma separated list of DNS server IP addresses for the
Active Directory domain
:type d_ns: str
:param dns: Comma separated list of DNS server IP addresses for the Active
Directory domain
:type dns: str
:param status: Status of the Active Directory
:type status: str
:param s_mb_server_name: NetBIOS name of the SMB server. This name will be
:param smb_server_name: NetBIOS name of the SMB server. This name will be
registered as a computer account in the AD and used to mount volumes
:type s_mb_server_name: str
:type smb_server_name: str
:param organizational_unit: The Organizational Unit (OU) within the
Windows Active Directory
:type organizational_unit: str
Expand All @@ -42,19 +42,19 @@ class ActiveDirectory(Model):
'username': {'key': 'username', 'type': 'str'},
'password': {'key': 'password', 'type': 'str'},
'domain': {'key': 'domain', 'type': 'str'},
'd_ns': {'key': 'dNS', 'type': 'str'},
'dns': {'key': 'dns', 'type': 'str'},
'status': {'key': 'status', 'type': 'str'},
's_mb_server_name': {'key': 'sMBServerName', 'type': 'str'},
'smb_server_name': {'key': 'smbServerName', 'type': 'str'},
'organizational_unit': {'key': 'organizationalUnit', 'type': 'str'},
}

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:
def __init__(self, *, active_directory_id: str=None, username: str=None, password: str=None, domain: str=None, dns: str=None, status: str=None, smb_server_name: str=None, organizational_unit: str=None, **kwargs) -> None:
super(ActiveDirectory, self).__init__(**kwargs)
self.active_directory_id = active_directory_id
self.username = username
self.password = password
self.domain = domain
self.d_ns = d_ns
self.dns = dns
self.status = status
self.s_mb_server_name = s_mb_server_name
self.smb_server_name = smb_server_name
self.organizational_unit = organizational_unit
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@
from enum import Enum


class InAvailabilityReasonType(str, Enum):

invalid = "Invalid"
already_exists = "AlreadyExists"


class CheckNameResourceTypes(str, Enum):

microsoft_net_appnet_app_account = "Microsoft.NetApp/netAppAccount"
microsoft_net_appnet_app_accountcapacity_pools = "Microsoft.NetApp/netAppAccount/capacityPools"
microsoft_net_appnet_app_accountcapacity_poolsvolumes = "Microsoft.NetApp/netAppAccount/capacityPools/volumes"
microsoft_net_appnet_app_accountcapacity_poolsvolumessnapshots = "Microsoft.NetApp/netAppAccount/capacityPools/volumes/snapshots"


class ServiceLevel(str, Enum):

standard = "Standard" #: Standard service level
Expand Down
52 changes: 0 additions & 52 deletions azure-mgmt-netapp/azure/mgmt/netapp/models/error.py

This file was deleted.

Loading

0 comments on commit a6447ce

Please sign in to comment.