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
47 changes: 47 additions & 0 deletions azure-mgmt-loganalytics/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,53 @@
Release History
===============

0.2.0 (2018-05-29)
++++++++++++++++++

**Features**

- Model IntelligencePack has a new parameter display_name
- Model SavedSearch has a new parameter name
- Model SavedSearch has a new parameter type
- Added operation WorkspacesOperations.purge
- Added operation WorkspacesOperations.update
- Added operation group Operations
- Client class can be used as a context manager to keep the underlying HTTP session open for performance

**Breaking changes**

- Model SavedSearch no longer has parameter etag (replaced by e_tag)
- Model SearchMetadata no longer has parameter etag (replaced by e_tag)

**General Breaking changes**

This version uses a next-generation code generator that *might* introduce breaking changes.

- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments.
To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments.
- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered.
While this is not a breaking change, the distinctions are important, and are documented here:
https://docs.python.org/3/library/enum.html#others
At a glance:

- "is" should not be used at all.
- "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered.

- New Long Running Operation:

- Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same.
- Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used.
- The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`,
without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`.
- New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`,
the response of the initial call will be returned without polling.
- `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`.
- `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away.

**Bugfixes**

- Compatibility of the sdist with wheel 0.31.0

0.1.0 (2017-11-01)
++++++++++++++++++

Expand Down
6 changes: 3 additions & 3 deletions azure-mgmt-loganalytics/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is the Microsoft Azure Log Analytics 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.3, 3.4, 3.5 and 3.6.
This package has been tested with Python 2.7, 3.4, 3.5 and 3.6.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.
Expand Down Expand Up @@ -37,8 +37,8 @@ Usage
=====

For code examples, see `Log Analytics Management
<https://azure-sdk-for-python.readthedocs.org/en/latest/sample_azure-mgmt-loganalytics.html>`__
on readthedocs.org.
<https://docs.microsoft.com/python/api/overview/azure/>`__
on docs.microsoft.com.


Provide Feedback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import ServiceClient
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.linked_services_operations import LinkedServicesOperations
from .operations.data_sources_operations import DataSourcesOperations
from .operations.workspaces_operations import WorkspacesOperations
from .operations.storage_insights_operations import StorageInsightsOperations
from .operations.workspaces_operations import WorkspacesOperations
from .operations.saved_searches_operations import SavedSearchesOperations
from .operations.linked_services_operations import LinkedServicesOperations
from .operations.data_sources_operations import DataSourcesOperations
from .operations.operations import Operations
from . import models


Expand All @@ -43,36 +44,36 @@ def __init__(
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not isinstance(subscription_id, str):
raise TypeError("Parameter 'subscription_id' must be str.")
if not base_url:
base_url = 'https://management.azure.com'

super(LogAnalyticsManagementClientConfiguration, self).__init__(base_url)

self.add_user_agent('loganalyticsmanagementclient/{}'.format(VERSION))
self.add_user_agent('azure-mgmt-loganalytics/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id


class LogAnalyticsManagementClient(object):
class LogAnalyticsManagementClient(SDKClient):
"""The Log Analytics Client.

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

:ivar linked_services: LinkedServices operations
:vartype linked_services: azure.mgmt.loganalytics.operations.LinkedServicesOperations
:ivar data_sources: DataSources operations
:vartype data_sources: azure.mgmt.loganalytics.operations.DataSourcesOperations
:ivar workspaces: Workspaces operations
:vartype workspaces: azure.mgmt.loganalytics.operations.WorkspacesOperations
:ivar storage_insights: StorageInsights operations
:vartype storage_insights: azure.mgmt.loganalytics.operations.StorageInsightsOperations
:ivar workspaces: Workspaces operations
:vartype workspaces: azure.mgmt.loganalytics.operations.WorkspacesOperations
:ivar saved_searches: SavedSearches operations
:vartype saved_searches: azure.mgmt.loganalytics.operations.SavedSearchesOperations
:ivar linked_services: LinkedServices operations
:vartype linked_services: azure.mgmt.loganalytics.operations.LinkedServicesOperations
:ivar data_sources: DataSources operations
:vartype data_sources: azure.mgmt.loganalytics.operations.DataSourcesOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.loganalytics.operations.Operations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand All @@ -88,19 +89,21 @@ def __init__(
self, credentials, subscription_id, base_url=None):

self.config = LogAnalyticsManagementClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
super(LogAnalyticsManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.linked_services = LinkedServicesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.data_sources = DataSourcesOperations(
self.storage_insights = StorageInsightsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.workspaces = WorkspacesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.storage_insights = StorageInsightsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.saved_searches = SavedSearchesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.linked_services = LinkedServicesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.data_sources = DataSourcesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
155 changes: 104 additions & 51 deletions azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,62 +9,95 @@
# regenerated.
# --------------------------------------------------------------------------

from .linked_service import LinkedService
from .data_source import DataSource
from .data_source_filter import DataSourceFilter
from .intelligence_pack import IntelligencePack
from .shared_keys import SharedKeys
from .metric_name import MetricName
from .usage_metric import UsageMetric
from .management_group import ManagementGroup
from .sku import Sku
from .workspace import Workspace
from .resource import Resource
from .proxy_resource import ProxyResource
from .link_target import LinkTarget
from .tag import Tag
from .core_summary import CoreSummary
from .search_sort import SearchSort
from .search_metadata_schema import SearchMetadataSchema
from .search_metadata import SearchMetadata
from .saved_search import SavedSearch
from .saved_searches_list_result import SavedSearchesListResult
from .search_error import SearchError
from .search_results_response import SearchResultsResponse
from .search_schema_value import SearchSchemaValue
from .search_get_schema_response import SearchGetSchemaResponse
from .search_highlight import SearchHighlight
from .search_parameters import SearchParameters
from .storage_account import StorageAccount
from .storage_insight_status import StorageInsightStatus
from .storage_insight import StorageInsight
from .linked_service_paged import LinkedServicePaged
from .data_source_paged import DataSourcePaged
try:
from .link_target_py3 import LinkTarget
from .tag_py3 import Tag
from .core_summary_py3 import CoreSummary
from .search_sort_py3 import SearchSort
from .search_metadata_schema_py3 import SearchMetadataSchema
from .search_metadata_py3 import SearchMetadata
from .saved_search_py3 import SavedSearch
from .saved_searches_list_result_py3 import SavedSearchesListResult
from .search_error_py3 import SearchError
from .search_results_response_py3 import SearchResultsResponse
from .search_schema_value_py3 import SearchSchemaValue
from .search_get_schema_response_py3 import SearchGetSchemaResponse
from .search_highlight_py3 import SearchHighlight
from .search_parameters_py3 import SearchParameters
from .storage_account_py3 import StorageAccount
from .storage_insight_status_py3 import StorageInsightStatus
from .storage_insight_py3 import StorageInsight
from .resource_py3 import Resource
from .proxy_resource_py3 import ProxyResource
from .workspace_purge_body_filters_py3 import WorkspacePurgeBodyFilters
from .workspace_purge_body_py3 import WorkspacePurgeBody
from .workspace_purge_response_py3 import WorkspacePurgeResponse
from .workspace_purge_status_response_py3 import WorkspacePurgeStatusResponse
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .linked_service_py3 import LinkedService
from .data_source_py3 import DataSource
from .data_source_filter_py3 import DataSourceFilter
from .intelligence_pack_py3 import IntelligencePack
from .shared_keys_py3 import SharedKeys
from .metric_name_py3 import MetricName
from .usage_metric_py3 import UsageMetric
from .management_group_py3 import ManagementGroup
from .sku_py3 import Sku
from .workspace_py3 import Workspace
except (SyntaxError, ImportError):
from .link_target import LinkTarget
from .tag import Tag
from .core_summary import CoreSummary
from .search_sort import SearchSort
from .search_metadata_schema import SearchMetadataSchema
from .search_metadata import SearchMetadata
from .saved_search import SavedSearch
from .saved_searches_list_result import SavedSearchesListResult
from .search_error import SearchError
from .search_results_response import SearchResultsResponse
from .search_schema_value import SearchSchemaValue
from .search_get_schema_response import SearchGetSchemaResponse
from .search_highlight import SearchHighlight
from .search_parameters import SearchParameters
from .storage_account import StorageAccount
from .storage_insight_status import StorageInsightStatus
from .storage_insight import StorageInsight
from .resource import Resource
from .proxy_resource import ProxyResource
from .workspace_purge_body_filters import WorkspacePurgeBodyFilters
from .workspace_purge_body import WorkspacePurgeBody
from .workspace_purge_response import WorkspacePurgeResponse
from .workspace_purge_status_response import WorkspacePurgeStatusResponse
from .operation_display import OperationDisplay
from .operation import Operation
from .linked_service import LinkedService
from .data_source import DataSource
from .data_source_filter import DataSourceFilter
from .intelligence_pack import IntelligencePack
from .shared_keys import SharedKeys
from .metric_name import MetricName
from .usage_metric import UsageMetric
from .management_group import ManagementGroup
from .sku import Sku
from .workspace import Workspace
from .storage_insight_paged import StorageInsightPaged
from .usage_metric_paged import UsageMetricPaged
from .management_group_paged import ManagementGroupPaged
from .workspace_paged import WorkspacePaged
from .storage_insight_paged import StorageInsightPaged
from .linked_service_paged import LinkedServicePaged
from .data_source_paged import DataSourcePaged
from .operation_paged import OperationPaged
from .log_analytics_management_client_enums import (
SearchSortEnum,
StorageInsightState,
PurgeState,
DataSourceKind,
SkuNameEnum,
EntityStatus,
SearchSortEnum,
StorageInsightState,
)

__all__ = [
'LinkedService',
'DataSource',
'DataSourceFilter',
'IntelligencePack',
'SharedKeys',
'MetricName',
'UsageMetric',
'ManagementGroup',
'Sku',
'Workspace',
'Resource',
'ProxyResource',
'LinkTarget',
'Tag',
'CoreSummary',
Expand All @@ -82,15 +115,35 @@
'StorageAccount',
'StorageInsightStatus',
'StorageInsight',
'LinkedServicePaged',
'DataSourcePaged',
'Resource',
'ProxyResource',
'WorkspacePurgeBodyFilters',
'WorkspacePurgeBody',
'WorkspacePurgeResponse',
'WorkspacePurgeStatusResponse',
'OperationDisplay',
'Operation',
'LinkedService',
'DataSource',
'DataSourceFilter',
'IntelligencePack',
'SharedKeys',
'MetricName',
'UsageMetric',
'ManagementGroup',
'Sku',
'Workspace',
'StorageInsightPaged',
'UsageMetricPaged',
'ManagementGroupPaged',
'WorkspacePaged',
'StorageInsightPaged',
'LinkedServicePaged',
'DataSourcePaged',
'OperationPaged',
'SearchSortEnum',
'StorageInsightState',
'PurgeState',
'DataSourceKind',
'SkuNameEnum',
'EntityStatus',
'SearchSortEnum',
'StorageInsightState',
]
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@
class CoreSummary(Model):
"""The core summary of a search.

All required parameters must be populated in order to send to Azure.

:param status: The status of a core summary.
:type status: str
:param number_of_documents: The number of documents of a core summary.
:param number_of_documents: Required. The number of documents of a core
summary.
:type number_of_documents: long
"""

Expand All @@ -26,10 +29,11 @@ class CoreSummary(Model):
}

_attribute_map = {
'status': {'key': 'Status', 'type': 'str'},
'number_of_documents': {'key': 'NumberOfDocuments', 'type': 'long'},
'status': {'key': 'status', 'type': 'str'},
'number_of_documents': {'key': 'numberOfDocuments', 'type': 'long'},
}

def __init__(self, number_of_documents, status=None):
self.status = status
self.number_of_documents = number_of_documents
def __init__(self, **kwargs):
super(CoreSummary, self).__init__(**kwargs)
self.status = kwargs.get('status', None)
self.number_of_documents = kwargs.get('number_of_documents', None)
Loading