Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .docsettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ known_content_issues:
- ['sdk/loganalytics/azure-loganalytics/README.rst', '#4554']
- ['sdk/servicefabric/azure-servicefabric/README.rst', '#4554']
- ['sdk/core/azure-servicemanagement-legacy/README.rst', '#4554']
- ['sdk/storage/azure-storage-file/swagger/README.md', '#4554']
- ['sdk/storage/azure-storage-queue/swagger/README.md', '#4554']
- ['sdk/storage/azure-storage-blob/swagger/README.md', '#4554']

# nspckg and common.
- ['sdk/cognitiveservices/azure-cognitiveservices-nspkg/README.rst', 'nspkg and common']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# pylint: skip-file

from ._configuration import AzureBlobStorageConfiguration
from ._azure_blob_storage import AzureBlobStorage
__all__ = ['AzureBlobStorage', 'AzureBlobStorageConfiguration']
__all__ = ['AzureBlobStorage']

from .version import VERSION

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# pylint: skip-file

from azure.core import PipelineClient
from msrest import Serializer, Deserializer
Expand All @@ -17,6 +16,7 @@
from azure.core.exceptions import map_error
from .operations import ServiceOperations
from .operations import ContainerOperations
from .operations import DirectoryOperations
from .operations import BlobOperations
from .operations import PageBlobOperations
from .operations import AppendBlobOperations
Expand All @@ -29,38 +29,42 @@ class AzureBlobStorage(object):


:ivar service: Service operations
:vartype service: blob.operations.ServiceOperations
:vartype service: azure.storage.blob.operations.ServiceOperations
:ivar container: Container operations
:vartype container: blob.operations.ContainerOperations
:vartype container: azure.storage.blob.operations.ContainerOperations
:ivar directory: Directory operations
:vartype directory: azure.storage.blob.operations.DirectoryOperations
:ivar blob: Blob operations
:vartype blob: blob.operations.BlobOperations
:vartype blob: azure.storage.blob.operations.BlobOperations
:ivar page_blob: PageBlob operations
:vartype page_blob: blob.operations.PageBlobOperations
:vartype page_blob: azure.storage.blob.operations.PageBlobOperations
:ivar append_blob: AppendBlob operations
:vartype append_blob: blob.operations.AppendBlobOperations
:vartype append_blob: azure.storage.blob.operations.AppendBlobOperations
:ivar block_blob: BlockBlob operations
:vartype block_blob: blob.operations.BlockBlobOperations
:vartype block_blob: azure.storage.blob.operations.BlockBlobOperations

:param url: The URL of the service account, container, or blob that is the
targe of the desired operation.
:type url: str
"""

def __init__(self, url, config=None, **kwargs):
def __init__(self, url, **kwargs):

base_url = '{url}'
self._config = config or AzureBlobStorageConfiguration(url, **kwargs)
self._config = AzureBlobStorageConfiguration(url, **kwargs)
self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2018-03-28'
self.api_version = '2019-02-02'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.service = ServiceOperations(
self._client, self._config, self._serialize, self._deserialize)
self.container = ContainerOperations(
self._client, self._config, self._serialize, self._deserialize)
self.directory = DirectoryOperations(
self._client, self._config, self._serialize, self._deserialize)
self.blob = BlobOperations(
self._client, self._config, self._serialize, self._deserialize)
self.page_blob = PageBlobOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# pylint: skip-file

from azure.core.configuration import Configuration, ConnectionConfiguration
from azure.core.configuration import Configuration
from azure.core.pipeline import policies

from .version import VERSION
Expand All @@ -37,18 +36,17 @@ def __init__(self, url, **kwargs):
super(AzureBlobStorageConfiguration, self).__init__(**kwargs)
self._configure(**kwargs)

self.user_agent_policy.add_user_agent('azureblobstorage/{}'.format(VERSION))
self.user_agent_policy.add_user_agent('azsdk-python-azureblobstorage/{}'.format(VERSION))
self.generate_client_request_id = True
self.accept_language = None

self.url = url
self.version = "2018-03-28"
self.version = "2019-02-02"

def _configure(self, **kwargs):
self.connection = ConnectionConfiguration(**kwargs)
self.user_agent_policy = policies.UserAgentPolicy(**kwargs)
self.headers_policy = policies.HeadersPolicy(**kwargs)
self.proxy_policy = policies.ProxyPolicy(**kwargs)
self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs)
self.retry_policy = policies.RetryPolicy(**kwargs)
self.redirect_policy = policies.RedirectPolicy(**kwargs)
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# pylint: skip-file

from ._azure_blob_storage_async import AzureBlobStorage
from ._configuration_async import AzureBlobStorageConfiguration
__all__ = ['AzureBlobStorage', 'AzureBlobStorageConfiguration']
__all__ = ['AzureBlobStorage']
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# pylint: skip-file

from azure.core import AsyncPipelineClient
from msrest import Serializer, Deserializer
Expand All @@ -17,6 +16,7 @@
from azure.core.exceptions import map_error
from .operations_async import ServiceOperations
from .operations_async import ContainerOperations
from .operations_async import DirectoryOperations
from .operations_async import BlobOperations
from .operations_async import PageBlobOperations
from .operations_async import AppendBlobOperations
Expand All @@ -29,39 +29,43 @@ class AzureBlobStorage(object):


:ivar service: Service operations
:vartype service: blob.aio.operations_async.ServiceOperations
:vartype service: azure.storage.blob.aio.operations_async.ServiceOperations
:ivar container: Container operations
:vartype container: blob.aio.operations_async.ContainerOperations
:vartype container: azure.storage.blob.aio.operations_async.ContainerOperations
:ivar directory: Directory operations
:vartype directory: azure.storage.blob.aio.operations_async.DirectoryOperations
:ivar blob: Blob operations
:vartype blob: blob.aio.operations_async.BlobOperations
:vartype blob: azure.storage.blob.aio.operations_async.BlobOperations
:ivar page_blob: PageBlob operations
:vartype page_blob: blob.aio.operations_async.PageBlobOperations
:vartype page_blob: azure.storage.blob.aio.operations_async.PageBlobOperations
:ivar append_blob: AppendBlob operations
:vartype append_blob: blob.aio.operations_async.AppendBlobOperations
:vartype append_blob: azure.storage.blob.aio.operations_async.AppendBlobOperations
:ivar block_blob: BlockBlob operations
:vartype block_blob: blob.aio.operations_async.BlockBlobOperations
:vartype block_blob: azure.storage.blob.aio.operations_async.BlockBlobOperations

:param url: The URL of the service account, container, or blob that is the
targe of the desired operation.
:type url: str
"""

def __init__(
self, url, config=None, **kwargs):
self, url, **kwargs):

base_url = '{url}'
self._config = config or AzureBlobStorageConfiguration(url, **kwargs)
self._config = AzureBlobStorageConfiguration(url, **kwargs)
self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2018-03-28'
self.api_version = '2019-02-02'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.service = ServiceOperations(
self._client, self._config, self._serialize, self._deserialize)
self.container = ContainerOperations(
self._client, self._config, self._serialize, self._deserialize)
self.directory = DirectoryOperations(
self._client, self._config, self._serialize, self._deserialize)
self.blob = BlobOperations(
self._client, self._config, self._serialize, self._deserialize)
self.page_blob = PageBlobOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# pylint: skip-file

from azure.core.configuration import Configuration, ConnectionConfiguration
from azure.core.configuration import Configuration
from azure.core.pipeline import policies

from ..version import VERSION
Expand All @@ -37,18 +36,18 @@ def __init__(self, url, **kwargs):
super(AzureBlobStorageConfiguration, self).__init__(**kwargs)
self._configure(**kwargs)

self.user_agent_policy.add_user_agent('azureblobstorage/{}'.format(VERSION))
self.user_agent_policy.add_user_agent('azsdk-python-azureblobstorage/{}'.format(VERSION))
self.generate_client_request_id = True
self.accept_language = None

self.url = url
self.version = "2018-03-28"
self.version = "2019-02-02"

def _configure(self, **kwargs):
self.connection = ConnectionConfiguration(**kwargs)
self.user_agent_policy = policies.UserAgentPolicy(**kwargs)
self.headers_policy = policies.HeadersPolicy(**kwargs)
self.proxy_policy = policies.ProxyPolicy(**kwargs)
self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs)
self.retry_policy = policies.AsyncRetryPolicy(**kwargs)
self.redirect_policy = policies.AsyncRedirectPolicy(**kwargs)
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# pylint: skip-file

from ._service_operations_async import ServiceOperations
from ._container_operations_async import ContainerOperations
from ._directory_operations_async import DirectoryOperations
from ._blob_operations_async import BlobOperations
from ._page_blob_operations_async import PageBlobOperations
from ._append_blob_operations_async import AppendBlobOperations
Expand All @@ -20,6 +20,7 @@
__all__ = [
'ServiceOperations',
'ContainerOperations',
'DirectoryOperations',
'BlobOperations',
'PageBlobOperations',
'AppendBlobOperations',
Expand Down
Loading