Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion sdk/storage/azure-mgmt-storage/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is the Microsoft Azure Storage 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.
This package has been tested with Python 2.7, 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin
from .version import VERSION
from ._configuration import StorageManagementClientConfiguration


Expand Down Expand Up @@ -51,8 +50,8 @@ class StorageManagementClient(MultiApiClientMixin, SDKClient):
_PROFILE_TAG = "azure.mgmt.storage.StorageManagementClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
None: DEFAULT_API_VERSION,
'usage': '2018-02-01',
None: DEFAULT_API_VERSION
}},
_PROFILE_TAG + " latest"
)
Expand Down Expand Up @@ -161,6 +160,32 @@ def blob_services(self):
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def file_services(self):
"""Instance depends on the API version:

* 2019-04-01: :class:`FileServicesOperations<azure.mgmt.storage.v2019_04_01.operations.FileServicesOperations>`
"""
api_version = self._get_api_version('file_services')
if api_version == '2019-04-01':
from .v2019_04_01.operations import FileServicesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def file_shares(self):
"""Instance depends on the API version:

* 2019-04-01: :class:`FileSharesOperations<azure.mgmt.storage.v2019_04_01.operations.FileSharesOperations>`
"""
api_version = self._get_api_version('file_shares')
if api_version == '2019-04-01':
from .v2019_04_01.operations import FileSharesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def management_policies(self):
"""Instance depends on the API version:
Expand Down
8 changes: 0 additions & 8 deletions sdk/storage/azure-mgmt-storage/azure/mgmt/storage/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,5 @@
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from .v2015_06_15.models import *
from .v2016_01_01.models import *
from .v2016_12_01.models import *
from .v2017_06_01.models import *
from .v2017_10_01.models import *
from .v2018_02_01.models import *
from .v2018_03_01_preview.models import *
from .v2018_07_01.models import *
from .v2018_11_01.models import *
from .v2019_04_01.models import *
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
from .operations import ManagementPoliciesOperations
from .operations import BlobServicesOperations
from .operations import BlobContainersOperations
from .operations import FileServicesOperations
from .operations import FileSharesOperations
from . import models


Expand All @@ -43,6 +45,10 @@ class StorageManagementClient(SDKClient):
:vartype blob_services: azure.mgmt.storage.v2019_04_01.operations.BlobServicesOperations
:ivar blob_containers: BlobContainers operations
:vartype blob_containers: azure.mgmt.storage.v2019_04_01.operations.BlobContainersOperations
:ivar file_services: FileServices operations
:vartype file_services: azure.mgmt.storage.v2019_04_01.operations.FileServicesOperations
:ivar file_shares: FileShares operations
:vartype file_shares: azure.mgmt.storage.v2019_04_01.operations.FileSharesOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand Down Expand Up @@ -77,3 +83,7 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.blob_containers = BlobContainersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.file_services = FileServicesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.file_shares = FileSharesOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
from ._models_py3 import EncryptionService
from ._models_py3 import EncryptionServices
from ._models_py3 import Endpoints
from ._models_py3 import FileServiceItems
from ._models_py3 import FileServiceProperties
from ._models_py3 import FileShare
from ._models_py3 import FileShareItem
from ._models_py3 import FileShareItems
from ._models_py3 import GeoReplicationStats
from ._models_py3 import Identity
from ._models_py3 import ImmutabilityPolicy
Expand Down Expand Up @@ -90,6 +95,11 @@
from ._models import EncryptionService
from ._models import EncryptionServices
from ._models import Endpoints
from ._models import FileServiceItems
from ._models import FileServiceProperties
from ._models import FileShare
from ._models import FileShareItem
from ._models import FileShareItems
from ._models import GeoReplicationStats
from ._models import Identity
from ._models import ImmutabilityPolicy
Expand Down Expand Up @@ -135,6 +145,7 @@
from ._models import Usage
from ._models import UsageName
from ._models import VirtualNetworkRule
from ._paged_models import BlobServicePropertiesPaged
from ._paged_models import ListContainerItemPaged
from ._paged_models import OperationPaged
from ._paged_models import SkuPaged
Expand Down Expand Up @@ -190,6 +201,11 @@
'EncryptionService',
'EncryptionServices',
'Endpoints',
'FileServiceItems',
'FileServiceProperties',
'FileShare',
'FileShareItem',
'FileShareItems',
'GeoReplicationStats',
'Identity',
'ImmutabilityPolicy',
Expand Down Expand Up @@ -239,6 +255,7 @@
'SkuPaged',
'StorageAccountPaged',
'UsagePaged',
'BlobServicePropertiesPaged',
'ListContainerItemPaged',
'ReasonCode',
'SkuName',
Expand Down
Loading