Skip to content

Commit 5f5b6b0

Browse files
committed
Merge branch 'master' of https://github.com/azure/azure-sdk-for-python into update-dependencies
2 parents c56e04d + e12b658 commit 5f5b6b0

File tree

329 files changed

+21097
-18919
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

329 files changed

+21097
-18919
lines changed

eng/pipelines/templates/steps/publish-coverage.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ steps:
1313
- task: PublishCodeCoverageResults@1
1414
displayName: 'Publish Code Coverage to DevOps'
1515
continueOnError: true
16+
condition: ne(variables['Build.Reason'], 'PullRequest')
1617
inputs:
1718
codeCoverageTool: Cobertura
1819
summaryFileLocation: '$(Build.SourcesDirectory)/coverage.xml'

pylintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ reports=no
77
# locally-disabled: Warning locally suppressed using disable-msg
88
# cyclic-import: because of https://github.com/PyCQA/pylint/issues/850
99
# too-many-arguments: Due to the nature of the CLI many commands have large arguments set which reflect in large arguments set in corresponding methods.
10-
disable=useless-object-inheritance,missing-docstring,locally-disabled,fixme,cyclic-import,too-many-arguments,invalid-name,duplicate-code,too-few-public-methods
10+
# Let's black deal with bad-continuation
11+
disable=useless-object-inheritance,missing-docstring,locally-disabled,fixme,cyclic-import,too-many-arguments,invalid-name,duplicate-code,too-few-public-methods,bad-continuation
1112

1213
[FORMAT]
1314
max-line-length=120

scripts/devops_tasks/common_tasks.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import sys
1616

1717
DEFAULT_BUILD_PACKAGES = ['azure-keyvault', 'azure-servicebus']
18+
OMITTED_CI_PACKAGES = ['azure-mgmt-documentdb']
1819

1920
# this function is where a glob string gets translated to a list of packages
2021
# It is called by both BUILD (package) and TEST. In the future, this function will be the central location
@@ -31,7 +32,20 @@ def process_glob_string(glob_string, target_root_dir):
3132
collected_top_level_directories.extend([os.path.dirname(p) for p in globbed])
3233

3334
# dedup, in case we have double coverage from the glob strings. Example: "azure-mgmt-keyvault,azure-mgmt-*"
34-
return list(set(collected_top_level_directories))
35+
collected_directories = list(set(collected_top_level_directories))
36+
37+
# if we have individually queued this specific package, it's obvious that we want to build it specifically
38+
# in this case, do not honor the omission list
39+
if len(collected_directories) == 1:
40+
return collected_directories
41+
# however, if there are multiple packages being built, we should honor the omission list and NOT build the omitted
42+
# packages
43+
else :
44+
return remove_omitted_packages(collected_directories)
45+
46+
def remove_omitted_packages(collected_directories):
47+
return [package_dir for package_dir in collected_directories if os.path.basename(package_dir) not in OMITTED_CI_PACKAGES]
48+
3549

3650
def run_check_call(command_array, working_directory, acceptable_return_codes = [], run_as_shell = False):
3751
try:

scripts/devops_tasks/setup_execute_tests.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ def run_tests(targeted_packages, python_version, test_res):
9595
else:
9696
target_dir = root_dir
9797

98-
print(args.glob_string);
99-
10098
targeted_packages = process_glob_string(args.glob_string, target_dir)
10199
test_results_arg = []
102100
if args.test_results:

sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
Release History
44
===============
55

6+
0.2.0rc2 (2019-07-31)
7+
+++++++++++++++++++++
8+
9+
**Bugfix**
10+
11+
- Fixed autogenerated code problems
12+
613
0.2.0rc1 (2019-07-29)
714
+++++++++++++++++++++
815

sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,15 @@ class AlertsManagementClient(SDKClient):
4141
:param credentials: Credentials needed for the client to connect to Azure.
4242
:type credentials: :mod:`A msrestazure Credentials
4343
object<msrestazure.azure_active_directory>`
44-
:param subscription_id: Subscription credentials which uniquely identify
45-
Microsoft Azure subscription. The subscription ID forms part of the URI
46-
for every service call.
44+
:param subscription_id: The ID of the target subscription.
4745
:type subscription_id: str
48-
:param subscription_id1: The Azure subscription id.
49-
:type subscription_id1: str
5046
:param str base_url: Service URL
5147
"""
5248

5349
def __init__(
54-
self, credentials, subscription_id, subscription_id1, base_url=None):
50+
self, credentials, subscription_id, base_url=None):
5551

56-
self.config = AlertsManagementClientConfiguration(credentials, subscription_id, subscription_id1, base_url)
52+
self.config = AlertsManagementClientConfiguration(credentials, subscription_id, base_url)
5753
super(AlertsManagementClient, self).__init__(self.config.credentials, self.config)
5854

5955
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}

sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,18 @@ class AlertsManagementClientConfiguration(AzureConfiguration):
2121
:param credentials: Credentials needed for the client to connect to Azure.
2222
:type credentials: :mod:`A msrestazure Credentials
2323
object<msrestazure.azure_active_directory>`
24-
:param subscription_id: Subscription credentials which uniquely identify
25-
Microsoft Azure subscription. The subscription ID forms part of the URI
26-
for every service call.
24+
:param subscription_id: The ID of the target subscription.
2725
:type subscription_id: str
28-
:param subscription_id1: The Azure subscription id.
29-
:type subscription_id1: str
3026
:param str base_url: Service URL
3127
"""
3228

3329
def __init__(
34-
self, credentials, subscription_id, subscription_id1, base_url=None):
30+
self, credentials, subscription_id, base_url=None):
3531

3632
if credentials is None:
3733
raise ValueError("Parameter 'credentials' must not be None.")
3834
if subscription_id is None:
3935
raise ValueError("Parameter 'subscription_id' must not be None.")
40-
if subscription_id1 is None:
41-
raise ValueError("Parameter 'subscription_id1' must not be None.")
4236
if not base_url:
4337
base_url = 'https://management.azure.com'
4438

@@ -52,4 +46,3 @@ def __init__(
5246

5347
self.credentials = credentials
5448
self.subscription_id = subscription_id
55-
self.subscription_id1 = subscription_id1

sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def prepare_request(next_link=None):
9393
# Construct URL
9494
url = self.list_by_subscription.metadata['url']
9595
path_format_arguments = {
96-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
96+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1)
9797
}
9898
url = self._client.format_url(url, **path_format_arguments)
9999

@@ -217,7 +217,7 @@ def prepare_request(next_link=None):
217217
# Construct URL
218218
url = self.list_by_resource_group.metadata['url']
219219
path_format_arguments = {
220-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
220+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
221221
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str')
222222
}
223223
url = self._client.format_url(url, **path_format_arguments)
@@ -309,7 +309,7 @@ def get_by_name(
309309
# Construct URL
310310
url = self.get_by_name.metadata['url']
311311
path_format_arguments = {
312-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
312+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
313313
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
314314
'actionRuleName': self._serialize.url("action_rule_name", action_rule_name, 'str')
315315
}
@@ -380,7 +380,7 @@ def create_update(
380380
# Construct URL
381381
url = self.create_update.metadata['url']
382382
path_format_arguments = {
383-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
383+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
384384
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
385385
'actionRuleName': self._serialize.url("action_rule_name", action_rule_name, 'str')
386386
}
@@ -451,7 +451,7 @@ def delete(
451451
# Construct URL
452452
url = self.delete.metadata['url']
453453
path_format_arguments = {
454-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
454+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
455455
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
456456
'actionRuleName': self._serialize.url("action_rule_name", action_rule_name, 'str')
457457
}
@@ -527,7 +527,7 @@ def update(
527527
# Construct URL
528528
url = self.update.metadata['url']
529529
path_format_arguments = {
530-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
530+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
531531
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
532532
'actionRuleName': self._serialize.url("action_rule_name", action_rule_name, 'str')
533533
}

sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def prepare_request(next_link=None):
191191
# Construct URL
192192
url = self.get_all.metadata['url']
193193
path_format_arguments = {
194-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
194+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1)
195195
}
196196
url = self._client.format_url(url, **path_format_arguments)
197197

@@ -292,7 +292,7 @@ def get_by_id(
292292
# Construct URL
293293
url = self.get_by_id.metadata['url']
294294
path_format_arguments = {
295-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
295+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
296296
'alertId': self._serialize.url("alert_id", alert_id, 'str')
297297
}
298298
url = self._client.format_url(url, **path_format_arguments)
@@ -352,7 +352,7 @@ def change_state(
352352
# Construct URL
353353
url = self.change_state.metadata['url']
354354
path_format_arguments = {
355-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
355+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
356356
'alertId': self._serialize.url("alert_id", alert_id, 'str')
357357
}
358358
url = self._client.format_url(url, **path_format_arguments)
@@ -412,7 +412,7 @@ def get_history(
412412
# Construct URL
413413
url = self.get_history.metadata['url']
414414
path_format_arguments = {
415-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
415+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
416416
'alertId': self._serialize.url("alert_id", alert_id, 'str')
417417
}
418418
url = self._client.format_url(url, **path_format_arguments)
@@ -522,7 +522,7 @@ def get_summary(
522522
# Construct URL
523523
url = self.get_summary.metadata['url']
524524
path_format_arguments = {
525-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
525+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1)
526526
}
527527
url = self._client.format_url(url, **path_format_arguments)
528528

sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def prepare_request(next_link=None):
6262
# Construct URL
6363
url = self.list.metadata['url']
6464
path_format_arguments = {
65-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
65+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1)
6666
}
6767
url = self._client.format_url(url, **path_format_arguments)
6868

@@ -135,7 +135,7 @@ def prepare_request(next_link=None):
135135
# Construct URL
136136
url = self.list_by_resource_group.metadata['url']
137137
path_format_arguments = {
138-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
138+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
139139
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str')
140140
}
141141
url = self._client.format_url(url, **path_format_arguments)
@@ -208,7 +208,7 @@ def get(
208208
# Construct URL
209209
url = self.get.metadata['url']
210210
path_format_arguments = {
211-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
211+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
212212
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
213213
'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_name, 'str')
214214
}
@@ -272,7 +272,7 @@ def create_or_update(
272272
# Construct URL
273273
url = self.create_or_update.metadata['url']
274274
path_format_arguments = {
275-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
275+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
276276
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
277277
'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_name, 'str')
278278
}
@@ -341,7 +341,7 @@ def patch(
341341
# Construct URL
342342
url = self.patch.metadata['url']
343343
path_format_arguments = {
344-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
344+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
345345
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
346346
'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_name, 'str')
347347
}
@@ -404,7 +404,7 @@ def delete(
404404
# Construct URL
405405
url = self.delete.metadata['url']
406406
path_format_arguments = {
407-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
407+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
408408
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
409409
'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_name, 'str')
410410
}

sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def prepare_request(next_link=None):
109109
# Construct URL
110110
url = self.get_all.metadata['url']
111111
path_format_arguments = {
112-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
112+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1)
113113
}
114114
url = self._client.format_url(url, **path_format_arguments)
115115

@@ -198,7 +198,7 @@ def get_by_id(
198198
# Construct URL
199199
url = self.get_by_id.metadata['url']
200200
path_format_arguments = {
201-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
201+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
202202
'smartGroupId': self._serialize.url("smart_group_id", smart_group_id, 'str')
203203
}
204204
url = self._client.format_url(url, **path_format_arguments)
@@ -263,7 +263,7 @@ def change_state(
263263
# Construct URL
264264
url = self.change_state.metadata['url']
265265
path_format_arguments = {
266-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
266+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
267267
'smartGroupId': self._serialize.url("smart_group_id", smart_group_id, 'str')
268268
}
269269
url = self._client.format_url(url, **path_format_arguments)
@@ -327,7 +327,7 @@ def get_history(
327327
# Construct URL
328328
url = self.get_history.metadata['url']
329329
path_format_arguments = {
330-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
330+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
331331
'smartGroupId': self._serialize.url("smart_group_id", smart_group_id, 'str')
332332
}
333333
url = self._client.format_url(url, **path_format_arguments)

sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
VERSION = "0.2.0rc1"
12+
VERSION = "0.2.0rc2"
1313

sdk/core/azure-core/HISTORY.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,27 @@
33

44
-------------------
55

6+
2019-08-XX Version 1.0.0b2
7+
8+
## Breaking changes
9+
10+
- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372
11+
- `azure.core.paging` has been completely refactored #6420
12+
- HttpResponse.content_type attribute is now a string (was a list) #6490
13+
- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490
14+
15+
## Bug fixes
16+
17+
- aiohttp is not required to import async pipelines classes #6496
18+
- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490
19+
- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372
20+
- `AiohttpTransport` does not raise on unexpected kwargs #6355
21+
22+
## Features
23+
24+
- New paging base classes that support `continuation_token` and `by_page()` #6420
25+
- Proxy support for `AiohttpTransport` #6372
26+
627
2019-06-26 Version 1.0.0b1
728

829
- Preview 1 release

0 commit comments

Comments
 (0)