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 #3203

Merged
merged 11 commits into from
Jan 3, 2019
Merged
9 changes: 9 additions & 0 deletions azure-mgmt-netapp/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. :changelog:

Release History
===============

0.1.0 (2018-01-02)
++++++++++++++++++

* Initial Release
4 changes: 4 additions & 0 deletions azure-mgmt-netapp/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

49 changes: 49 additions & 0 deletions azure-mgmt-netapp/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Microsoft Azure SDK for Python
==============================

This is the Microsoft Azure NetApp Files Management Client Library.

Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.

For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell

pip freeze

If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell

pip uninstall azure


Usage
=====

For code examples, see `NetApp Files Management
<https://docs.microsoft.com/python/api/overview/azure/>`__
on docs.microsoft.com.


Provide Feedback
================

If you encounter any bugs or have suggestions, please file an issue in the
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
section of the project.
1 change: 1 addition & 0 deletions azure-mgmt-netapp/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
1 change: 1 addition & 0 deletions azure-mgmt-netapp/azure/mgmt/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
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 .azure_net_app_files_management_client import AzureNetAppFilesManagementClient
from .version import VERSION

__all__ = ['AzureNetAppFilesManagementClient']

__version__ = VERSION

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 AzureNetAppFilesManagementClientConfiguration(AzureConfiguration):
"""Configuration for AzureNetAppFilesManagementClient
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(AzureNetAppFilesManagementClientConfiguration, 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 AzureNetAppFilesManagementClient(SDKClient):
"""Microsoft NetApp Azure Resource Provider specification

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

: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 = AzureNetAppFilesManagementClientConfiguration(credentials, subscription_id, base_url)
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._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)
77 changes: 77 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,77 @@
# 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 .dimension_py3 import Dimension
from .metric_specification_py3 import MetricSpecification
from .service_specification_py3 import ServiceSpecification
from .operation_py3 import Operation
from .net_app_account_py3 import NetAppAccount
from .net_app_account_patch_py3 import NetAppAccountPatch
from .capacity_pool_py3 import CapacityPool
from .capacity_pool_patch_py3 import CapacityPoolPatch
from .volume_py3 import Volume
from .volume_patch_py3 import VolumePatch
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 .net_app_account import NetAppAccount
from .net_app_account_patch import NetAppAccountPatch
from .capacity_pool import CapacityPool
from .capacity_pool_patch import CapacityPoolPatch
from .volume import Volume
from .volume_patch import VolumePatch
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 (
ServiceLevel,
)

__all__ = [
'OperationDisplay',
'Dimension',
'MetricSpecification',
'ServiceSpecification',
'Operation',
'NetAppAccount',
'NetAppAccountPatch',
'CapacityPool',
'CapacityPoolPatch',
'Volume',
'VolumePatch',
'MountTarget',
'Snapshot',
'SnapshotPatch',
'Error', 'ErrorException',
'OperationPaged',
'NetAppAccountPaged',
'CapacityPoolPaged',
'VolumePaged',
'MountTargetPaged',
'SnapshotPaged',
'ServiceLevel',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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 enum import Enum


class ServiceLevel(str, Enum):

standard = "Standard" #: Standard service level
premium = "Premium" #: Premium service level
extreme = "Extreme" #: Extreme service level
79 changes: 79 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,79 @@
# 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
:ivar pool_id: poolId. UUID v4 used to identify the Pool
:vartype pool_id: str
:param size: size. Provisioned size of the pool (in bytes). Allowed values
are in 4TiB chunks (value must be multiply of 4398046511104). Default
value: 4398046511104 .
:type size: long
:param service_level: serviceLevel. The service level of the file system.
Possible values include: 'Standard', 'Premium', 'Extreme'. Default value:
"Premium" .
: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},
'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': {'maximum': 549755813888000, 'minimum': 4398046511104},
'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'},
'pool_id': {'key': 'properties.poolId', 'type': 'str'},
'size': {'key': 'properties.size', 'type': 'long'},
'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.pool_id = None
self.size = kwargs.get('size', 4398046511104)
self.service_level = kwargs.get('service_level', "Premium")
self.provisioning_state = None
Loading