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 monitor/resource-manager] BUG fix: Fixing type of MetricValue.Count to be double instead of the incorrect int64 it had before #6142

Merged
merged 3 commits into from
Jul 8, 2019
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
2 changes: 1 addition & 1 deletion sdk/monitor/azure-mgmt-monitor/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is the Microsoft Azure Monitor 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 @@ -39,11 +39,12 @@ def __init__(self, client, config, serializer, deserializer):
self.config = config

def list(
self, filter=None, select=None, custom_headers=None, raw=False, **operation_config):
self, filter, select=None, custom_headers=None, raw=False, **operation_config):
"""Provides the list of records from the activity logs.

:param filter: Reduces the set of data collected.<br>The **$filter**
argument is very restricted and allows only the following
:param filter: Reduces the set of data collected.<br>This argument is
required and it also requires at least the start date/time.<br>The
**$filter** argument is very restricted and allows only the following
patterns.<br>- *List events for a resource group*:
$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and
eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceGroupName
Expand Down Expand Up @@ -93,8 +94,7 @@ def prepare_request(next_link=None):
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
if filter is not None:
query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
if select is not None:
query_parameters['$select'] = self._serialize.query("select", select, 'str')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class MetricValue(Model):
:type total: float
:param count: the number of samples in the time range. Can be used to
determine the number of values that contributed to the average value.
:type count: long
:type count: float
"""

_validation = {
Expand All @@ -268,7 +268,7 @@ class MetricValue(Model):
'minimum': {'key': 'minimum', 'type': 'float'},
'maximum': {'key': 'maximum', 'type': 'float'},
'total': {'key': 'total', 'type': 'float'},
'count': {'key': 'count', 'type': 'long'},
'count': {'key': 'count', 'type': 'float'},
}

def __init__(self, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class MetricValue(Model):
:type total: float
:param count: the number of samples in the time range. Can be used to
determine the number of values that contributed to the average value.
:type count: long
:type count: float
"""

_validation = {
Expand All @@ -268,10 +268,10 @@ class MetricValue(Model):
'minimum': {'key': 'minimum', 'type': 'float'},
'maximum': {'key': 'maximum', 'type': 'float'},
'total': {'key': 'total', 'type': 'float'},
'count': {'key': 'count', 'type': 'long'},
'count': {'key': 'count', 'type': 'float'},
}

def __init__(self, *, time_stamp, average: float=None, minimum: float=None, maximum: float=None, total: float=None, count: int=None, **kwargs) -> None:
def __init__(self, *, time_stamp, average: float=None, minimum: float=None, maximum: float=None, total: float=None, count: float=None, **kwargs) -> None:
super(MetricValue, self).__init__(**kwargs)
self.time_stamp = time_stamp
self.average = average
Expand Down
1 change: 0 additions & 1 deletion sdk/monitor/azure-mgmt-monitor/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
Expand Down