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 authorization/resource-manager] Python conf for Authorization 2018-09-01-preview #3710

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
3e7a525
KeyVault multiapi template
lmazuel Jul 13, 2018
8cdf3b5
Multi-api template for KV data-plane
lmazuel Jul 13, 2018
f84bfea
Generated from 7f4d093f3d4cdee21f74d6cf1538a2c7e9197a9d
lmazuel Jul 13, 2018
573c91e
Fix multiapi Client
lmazuel Jul 13, 2018
912fd07
[AutoPR keyvault/resource-manager] KV multiapi Readme (#2928)
AutorestCI Jul 16, 2018
a3e4580
Merge branch 'restapi_auto_keyvault/resource-manager' of https://gith…
schaabs Jul 25, 2018
fe4d2a0
Merge branch 'restapi_auto_keyvault/data-plane' of https://github.com…
schaabs Jul 25, 2018
fd9f6d1
Remove pointless SwaggerToSdk conf if KV is multiapi
lmazuel Jul 27, 2018
bca73e4
updates for DP multi-api client
schaabs Jul 31, 2018
39a9695
test import updates
schaabs Jul 31, 2018
63239e4
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-pytho…
schaabs Jul 31, 2018
e9771ee
Merge branch 'restapi_auto_keyvault/data-plane' of https://github.com…
schaabs Aug 2, 2018
4a62ff7
[AutoPR] hanaonazure/resource-manager (#3070)
AutorestCI Aug 6, 2018
12dffec
docstring and PR feedback updates
schaabs Aug 6, 2018
a73e7e6
updated pythonsdk for new swagger api-version for botservice (#3073)
swagatmishra2007 Aug 7, 2018
0d98e5d
Update OSX Travis (#3083)
lmazuel Aug 7, 2018
4c4e86e
updates for msrest pipeline compatibility
schaabs Aug 7, 2018
65cb175
update msrest version and release status in setup.py
schaabs Aug 7, 2018
bfcd947
Merge pull request #3053 from schaabs/dp-multi-api
schaabs Aug 7, 2018
4387f2d
updating release notes for azure-keyvault and azure-mgmt-keyvault
schaabs Aug 7, 2018
c7c9a9b
[AutoPR] network/resource-manager (#3090)
AutorestCI Aug 7, 2018
cd93a26
Merge pull request #3091 from schaabs/multiapi-release
schaabs Aug 7, 2018
bebd997
[AutoPR] iotcentral/resource-manager (#2987)
AutorestCI Aug 8, 2018
7ff60da
[AutoPR] containerservices/resource-manager (#3097)
AutorestCI Aug 8, 2018
da64fa6
[HDInsight] Adding support for HDInsight (#3088)
wawon-msft Aug 8, 2018
087d646
[AutoPR] containerservices/resource-manager (#3110)
AutorestCI Aug 9, 2018
bd8c204
[AutoPR] azure-kusto/resource-manager (#3082)
AutorestCI Aug 9, 2018
61234a3
Clean tests (#3130)
lmazuel Aug 13, 2018
1963834
[AutoPR cognitiveservices/data-plane/LUIS/Runtime/cognitiveservices/d…
AutorestCI Aug 15, 2018
c50bf85
ContentModerator patched models (#3165)
lmazuel Aug 16, 2018
66b4ec2
[AutoPR] reservations/resource-manager (#3185)
AutorestCI Aug 23, 2018
1252d58
EventGrid DataPlane SDK: Regenerated the SDK based on latest swagger.…
kalyanaj Aug 27, 2018
5d4889e
[AutoPR] iothub/resource-manager (#3201)
AutorestCI Aug 27, 2018
fb5185e
[AutoPR] web/resource-manager (#2065)
AutorestCI Aug 28, 2018
565d873
Generated from 2cc983b453f0fe2064a3242375bc0979d990bde8 (#3164)
AutorestCI Aug 28, 2018
011b1f0
Update Batch SDK to new API version 2018-08-01.7.0. (#3194)
xingwu1 Aug 28, 2018
930047d
[AutoPR] network/resource-manager (#3154)
AutorestCI Aug 28, 2018
ec4622f
Support __init__.py in packaging [skip ci]
lmazuel Aug 30, 2018
d3741d0
Remove unused space [skip ci]
lmazuel Aug 30, 2018
4fd5a93
Update swagger_to_sdk_config.json with JSON schema (#3253)
lmazuel Aug 31, 2018
e6d2abb
Privates folder and SDK
lmazuel Aug 31, 2018
4a76ec8
[AutoPR] hanaonazure/resource-manager (#3251)
AutorestCI Aug 31, 2018
8b6155f
[AutoPR] signalr/resource-manager (#2835)
AutorestCI Sep 4, 2018
e57d6af
Packaging on Jenkins (#3263)
lmazuel Sep 4, 2018
5b7bb30
Update PR [skip ci]
lmazuel Sep 6, 2018
9abecc6
[AutoPR] containerinstance/resource-manager (#3055)
AutorestCI Sep 6, 2018
71984de
[AutoPR] containerservices/resource-manager (#3298)
AutorestCI Sep 7, 2018
a755de5
[AutoPR] resourcegraph/resource-manager (#3208)
AutorestCI Sep 7, 2018
8e010d7
[AutoPR] datamigration/resource-manager (#3213)
AutorestCI Sep 7, 2018
1b2a849
[AutoPR] dns/resource-manager (#3272)
AutorestCI Sep 10, 2018
dcc8ef3
PyPI client [skip ci]
lmazuel Sep 11, 2018
7351ae0
Detect mixed operation group (#3289)
lmazuel Sep 11, 2018
c4c28c7
[AutoPR] network/resource-manager (#3246)
AutorestCI Sep 11, 2018
ff1d4a8
[AutoPR] containerregistry/resource-manager (#3140)
AutorestCI Sep 12, 2018
07a9108
Code report scanning package [skip ci]
lmazuel Sep 12, 2018
26b9b31
[AutoPR] compute/resource-manager (#2982)
AutorestCI Sep 13, 2018
50d001a
Add new profile 2018-03-01-hybrid (#3288)
viananth Sep 13, 2018
bc0bbaa
azure-common 1.1.15
lmazuel Sep 13, 2018
a4b1065
Rdbms1.3.0 (#3340)
lmazuel Sep 13, 2018
8b0b354
Add support for more complex output file [skip ci]
lmazuel Sep 14, 2018
d54068d
[AutoPR] network/resource-manager (#3347)
AutorestCI Sep 14, 2018
a918e59
Improve code report [skip ci]
lmazuel Sep 14, 2018
5b87ef6
Code report and ChangeLog improvment [skip ci]
lmazuel Sep 15, 2018
ceeb803
[Batch] Patch TaskOperations.add_collection with convenience function…
bgklein Sep 17, 2018
e2fd2c5
[AutoPR] alertsmanagement/resource-manager (#3342)
AutorestCI Sep 17, 2018
41ff15b
3.4 allowed failure to workaround vcrpy 2.0.0 (#3405)
lmazuel Sep 21, 2018
e14eaf7
Update PR should do nothing on nspkg
lmazuel Sep 21, 2018
da159e1
Revert "3.4 allowed failure to workaround vcrpy 2.0.0" (#3416)
lmazuel Sep 24, 2018
9195624
Auto-update parameter for toml (#3419)
lmazuel Sep 24, 2018
bf3478b
Update Batch patch structure and documentation - no functionality cha…
bgklein Sep 25, 2018
44e09c3
azure nspkg 3.0 (#3412)
lmazuel Sep 25, 2018
c034a52
Update ADL nspkg
lmazuel Sep 25, 2018
ed4dbf6
PEP420 ChangeLog [skip ci]
lmazuel Sep 25, 2018
4817a54
[AutoPR] compute/resource-manager (#3383)
AutorestCI Sep 25, 2018
8ae3866
azure-common 1.1.16 (#3441)
lmazuel Sep 26, 2018
54bdf99
[AutoPR] storage/resource-manager (#3352)
AutorestCI Sep 27, 2018
bd6197a
[AutoPR] servicebus/resource-manager (#3331)
AutorestCI Sep 28, 2018
aea01fa
ChangeLog fixes [skip ci]
lmazuel Sep 28, 2018
9eeaf8d
azure-nspkg 3.0.1 (#3483)
lmazuel Oct 2, 2018
54edddc
azure-mgmt-nspkg 3.0.1
lmazuel Oct 2, 2018
8f41f4c
nspkg 3.0.2 (#3488)
lmazuel Oct 2, 2018
c8cbce3
[AutoPR] compute/resource-manager (#3437)
AutorestCI Oct 3, 2018
a8b56b3
[AutoPR] mediaservices/resource-manager (#3446)
AutorestCI Oct 3, 2018
3f636c3
[AutoPR] containerinstance/resource-manager (#3489)
AutorestCI Oct 8, 2018
70041a3
[AutoPR] cosmos-db/resource-manager (#2781)
AutorestCI Oct 8, 2018
8275dce
[AutoPR] restapi_auto_graphrbac/data-plane (#2032)
lmazuel Oct 10, 2018
2c5f990
GraphRBAC 0.50.0 from #2032
lmazuel Oct 10, 2018
9d51cf2
Generated from dad49351288e4f30220300156d2cfccf9055a949 (#3546) (#3547)
AutorestCI Oct 10, 2018
f8c6958
[AutoPR] mysql/resource-manager (#3469)
AutorestCI Oct 11, 2018
555a4e1
[AutoPR] graphrbac/data-plane (#3570)
AutorestCI Oct 11, 2018
245328c
Make multiapi script better in extracting api_version from inside the…
lmazuel Oct 12, 2018
e85b53b
[AutoPR] advisor/resource-manager (#2843)
AutorestCI Oct 15, 2018
3cce3ea
Fix sdist template
lmazuel Oct 16, 2018
7ebacd6
Compute 4.3.1 (#3619)
lmazuel Oct 16, 2018
d8b0b44
Fixes warning about session reuse. (#3613)
zooba Oct 16, 2018
14205ff
azure-batch 5.1.1 (#3625)
lmazuel Oct 16, 2018
acc1fb5
Fixing broken sdist (#3624)
lmazuel Oct 16, 2018
824468c
ADL nskpkg 3.0.1 (#3631)
lmazuel Oct 17, 2018
f489206
[AutoPR] cognitiveservices/data-plane/Face (#3011)
AutorestCI Oct 17, 2018
934fc3c
Face packaging adjustement
lmazuel Oct 17, 2018
11439f2
Improve venv management [skip ci]
lmazuel Oct 17, 2018
afc2be4
[AutoPR] containerregistry/resource-manager (#3467)
AutorestCI Oct 17, 2018
2b2d26f
[AutoPR] sql/resource-manager (#2671)
AutorestCI Oct 18, 2018
ce09935
Update HISTORY.rst
lmazuel Oct 18, 2018
cf1df01
[AutoPR] eventgrid/resource-manager (#2902)
AutorestCI Oct 26, 2018
4b8b001
[AutoPR] iotcentral/resource-manager (#3137)
AutorestCI Oct 26, 2018
210c630
SBMgmt 0.5.3 (#3708)
lmazuel Oct 29, 2018
45cfb1b
[AutoPR] eventhub/resource-manager (#3240)
AutorestCI Oct 29, 2018
959c09d
Generated from 891aee387f50b4c4cad82149d7eefb77cc477e54
AutorestCI Oct 29, 2018
798e0a9
Packaging update of azure-mgmt-authorization
azuresdkci Oct 29, 2018
3729224
Generated from a9de6520660dc3ec1b309616e098c2d6668898c0
AutorestCI Oct 29, 2018
c298e81
Remove pointless file
lmazuel Nov 2, 2018
5e75c36
Hub client for authorization
lmazuel Nov 2, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
/azure-mgmt-datalake-store/ @ro-joowan
/azure-mgmt-datamigration/ @vchske
/azure-mgmt-eventgrid/ @kalyanaj
/azure-mgmt-hdinsight/ @wawon-msft
/azure-mgmt-keyvault/ @schaabs
/azure-mgmt-machinelearningcompute/ @shutchings
/azure-mgmt-recoveryservices/ @DheerendraRathor
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
__pycache__/
*.pyc
.pytest_cache
.mypy_cache
.cache

# Virtual environment
env*/
Expand All @@ -26,7 +28,7 @@ build/
# Test results
TestResults/

# Credentials
# Credentials
credentials_real.json
testsettings_local.json
testsettings_local.cfg
Expand Down
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ matrix:
python: "pypy3.5-5.8.0"
dist: trusty
- os: osx
osx_image: xcode7.3
osx_image: xcode9.4
language: generic
allow_failures:
- os: osx
Expand All @@ -34,7 +34,6 @@ matrix:
# Perform the manual steps on osx to install python3 and activate venv
before_install:
- if [[ -n "$TRAVIS_TAG" && "$TRAVIS_PYTHON_VERSION" != "3.6" ]]; then travis_terminate 0; fi; # Deploy on 3.6
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade python; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then python3 -m venv venv; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source venv/bin/activate; fi
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"git.ignoreLimitWarning": true,
"python.unitTest.pyTestArgs": [],
"python.unitTest.pyTestEnabled": true
}
}
1 change: 0 additions & 1 deletion azure-applicationinsights/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
include *.rst
include azure_bdist_wheel.py
2 changes: 1 addition & 1 deletion azure-applicationinsights/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is the Microsoft Azure Application Insights 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 and 3.6.
This package has been tested with Python 2.7, 3.4, 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
2 changes: 1 addition & 1 deletion azure-applicationinsights/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
54 changes: 0 additions & 54 deletions azure-applicationinsights/azure_bdist_wheel.py

This file was deleted.

1 change: 0 additions & 1 deletion azure-applicationinsights/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
[bdist_wheel]
universal=1
azure-namespace-package=azure-nspkg
18 changes: 9 additions & 9 deletions azure-applicationinsights/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@
import os.path
from io import open
from setuptools import find_packages, setup
try:
from azure_bdist_wheel import cmdclass
except ImportError:
from distutils import log as logger
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}

# Change the PACKAGE_NAME only to change folder and different name
PACKAGE_NAME = "azure-applicationinsights"
Expand Down Expand Up @@ -76,10 +70,16 @@
'License :: OSI Approved :: MIT License',
],
zip_safe=False,
packages=find_packages(exclude=["tests"]),
packages=find_packages(exclude=[
'tests',
# Exclude packages that will be covered by PEP420 or nspkg
'azure',
]),
install_requires=[
'msrest>=0.5.4,<2.0.0',
'msrest>=0.5.0',
'azure-common~=1.1',
],
cmdclass=cmdclass
extras_require={
":python_version<'3.0'": ['azure-nspkg'],
}
)
52 changes: 45 additions & 7 deletions azure-batch/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,44 @@
Release History
===============

5.1.1 (2018-10-16)
++++++++++++++++++

**Bugfixes**

- Fix authentication class to allow HTTP session to be re-used

**Note**

- azure-nspkg is not installed anymore on Python 3 (PEP420-based namespace package)

5.1.0 (2018-08-28)
++++++++++++++++++

- Update operation TaskOperations.add_collection with the following added functionality:
- Retry server side errors.
- Automatically chunk lists of more than 100 tasks to multiple requests.
- If tasks are too large to be submitted in chunks of 100, reduces number of tasks per request.
- Add a parameter to specify number of threads to use when submitting tasks.

5.0.0 (2018-08-24)
++++++++++++++++++

- Using REST API version 2018-08-01.7.0.
- Added `node_agent_info` in ComputeNode to return the node agent information
- **Breaking** Removed the `validation_status` property from `TaskCounts`.
- **Breaking** The default caching type for `DataDisk` and `OSDisk` is now `read_write` instead of `none`.
- `BatchServiceClient` can be used as a context manager to keep the underlying HTTP session open for performance.
- **Breaking** Model signatures are now using only keywords-arguments syntax. Each positional argument must be rewritten as a keyword argument.
- **Breaking** The following operations signatures are changed:
- Operation PoolOperations.enable_auto_scale
- Operation TaskOperations.update
- Operation ComputeNodeOperations.reimage
- Operation ComputeNodeOperations.disable_scheduling
- Operation ComputeNodeOperations.reboot
- Operation JobOperations.terminate
- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered.

4.1.3 (2018-04-24)
++++++++++++++++++

Expand Down Expand Up @@ -36,10 +74,10 @@ Release History
- Using REST API version 2017-09-01.6.0.
- Added the ability to get a discount on Windows VM pricing if you have on-premises licenses for the OS SKUs you are deploying, via `license_type` on `VirtualMachineConfiguration`.
- Added support for attaching empty data drives to `VirtualMachineConfiguration` based pools, via the new `data_disks` attribute on `VirtualMachineConfiguration`.
- [Breaking] Custom images must now be deployed using a reference to an ARM Image, instead of pointing to .vhd files in blobs directly.
- **Breaking** Custom images must now be deployed using a reference to an ARM Image, instead of pointing to .vhd files in blobs directly.
- The new `virtual_machine_image_id` property on `ImageReference` contains the reference to the ARM Image, and `OSDisk.image_uris` no longer exists.
- Because of this, `image_reference` is now a required attribute of `VirtualMachineConfiguration`.
- [Breaking] Multi-instance tasks (created using `MultiInstanceSettings`) must now specify a `coordination_commandLine`, and `number_of_instances` is now optional and defaults to 1.
- **Breaking** Multi-instance tasks (created using `MultiInstanceSettings`) must now specify a `coordination_commandLine`, and `number_of_instances` is now optional and defaults to 1.
- Added support for tasks run using Docker containers. To run a task using a Docker container you must specify a `container_configuration` on the `VirtualMachineConfiguration` for a pool, and then add `container_settings` on the Task.

3.1.0 (2017-07-24)
Expand All @@ -60,16 +98,16 @@ Release History
- Added a new `allow_low_priority_node` property to `JobManagerTask`, which if `true` allows the `JobManagerTask` to run on a low-priority compute node.
- `PoolResizeParameter` now takes two optional parameters, `target_dedicated_nodes` and `target_low_priority_nodes`, instead of one required parameter `target_dedicated`.
At least one of these two parameters must be specified.
- Added support for uploading task output files to persistent storage, via the `OutputFiles` property on `CloudTask` and `JobManagerTask`.
- Added support for specifying actions to take based on a task's output file upload status, via the `file_upload_error` property on `ExitConditions`.
- Added support for uploading task output files to persistent storage, via the `OutputFiles` property on `CloudTask` and `JobManagerTask`.
- Added support for specifying actions to take based on a task's output file upload status, via the `file_upload_error` property on `ExitConditions`.
- Added support for determining if a task was a success or a failure via the new `result` property on all task execution information objects.
- Renamed `scheduling_error` on all task execution information objects to `failure_information`. `TaskFailureInformation` replaces `TaskSchedulingError` and is returned any
time there is a task failure. This includes all previous scheduling error cases, as well as nonzero task exit codes, and file upload failures from the new output files feature.
time there is a task failure. This includes all previous scheduling error cases, as well as nonzero task exit codes, and file upload failures from the new output files feature.
- Renamed `SchedulingErrorCategory` enum to `ErrorCategory`.
- Renamed `scheduling_error` on `ExitConditions` to `pre_processing_error` to more clearly clarify when the error took place in the task life-cycle.
- Added support for provisioning application licenses to your pool, via a new `application_licenses` property on `PoolAddParameter`, `CloudPool` and `PoolSpecification`.
Please note that this feature is in gated public preview, and you must request access to it via a support ticket.
- The `ssh_private_key` attribute of a `UserAccount` object has been replaced with an expanded `LinuxUserConfiguration` object with additional settings for a user ID and group ID of the
- The `ssh_private_key` attribute of a `UserAccount` object has been replaced with an expanded `LinuxUserConfiguration` object with additional settings for a user ID and group ID of the
user account.
- Removed `unmapped` enum state from `AddTaskStatus`, `CertificateFormat`, `CertificateVisibility`, `CertStoreLocation`, `ComputeNodeFillType`, `OSType`, and `PoolLifetimeOption` as they were not ever used.
- Improved and clarified documentation.
Expand Down Expand Up @@ -106,7 +144,7 @@ Release History

- Added support for joining a CloudPool to a virtual network on using the network_configuration property.
- Added support for application package references on CloudTask and JobManagerTask.
- Added support for automatically terminating jobs when all tasks complete or when a task fails, via the on_all_tasks_complete property and
- Added support for automatically terminating jobs when all tasks complete or when a task fails, via the on_all_tasks_complete property and
the CloudTask exit_conditions property.

0.30.0rc5
Expand Down
3 changes: 2 additions & 1 deletion azure-batch/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include *.rst
include azure_bdist_wheel.py
include azure/__init__.py

7 changes: 4 additions & 3 deletions azure-batch/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ Microsoft Azure SDK for Python

This is the Microsoft Azure Batch Client Library.

This package has been tested with Python 2.7, 3.4, 3.5 and 3.6.
This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.

For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
Expand All @@ -28,14 +30,13 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first:
Usage
=====

For code examples, see `the Batch samples repo
For code examples, see `the Batch samples repo
<https://github.com/Azure/azure-batch-samples/tree/master/Python>`__
on GitHub or see `Batch
<https://docs.microsoft.com/python/api/overview/azure/batch>`__
on docs.microsoft.com.



Provide Feedback
================

Expand Down
2 changes: 1 addition & 1 deletion azure-batch/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
8 changes: 3 additions & 5 deletions azure-batch/azure/batch/batch_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ def __call__(self, request):

url = urlparse(request.url)
uri_path = url.path
uri_path = uri_path.replace('%5C', '/')
uri_path = uri_path.replace('%2F', '/')

# method to sign
string_to_sign = request.method + '\n'
Expand Down Expand Up @@ -118,10 +116,10 @@ def __init__(self, account_name, key):
super(SharedKeyCredentials, self).__init__()
self.auth = SharedKeyAuth(self.header, account_name, key)

def signed_session(self):
def signed_session(self, session=None):

session = super(SharedKeyCredentials, self).signed_session()
session = super(SharedKeyCredentials, self).signed_session(session=session)
session.auth = self.auth

return session


14 changes: 9 additions & 5 deletions azure-batch/azure/batch/batch_service_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# 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
Expand All @@ -23,6 +23,7 @@
from .operations.task_operations import TaskOperations
from .operations.compute_node_operations import ComputeNodeOperations
from . import models
from .custom.patch import patch_client


class BatchServiceClientConfiguration(AzureConfiguration):
Expand All @@ -46,13 +47,13 @@ def __init__(

super(BatchServiceClientConfiguration, self).__init__(base_url)

self.add_user_agent('batchserviceclient/{}'.format(VERSION))
self.add_user_agent('azure-batch/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials


class BatchServiceClient(object):
class BatchServiceClient(SDKClient):
"""A client for issuing REST requests to the Azure Batch service.

:ivar config: Configuration for client.
Expand Down Expand Up @@ -87,10 +88,10 @@ def __init__(
self, credentials, base_url=None):

self.config = BatchServiceClientConfiguration(credentials, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
super(BatchServiceClient, self).__init__(self.config.credentials, self.config)

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

Expand All @@ -112,3 +113,6 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.compute_node = ComputeNodeOperations(
self._client, self.config, self._serialize, self._deserialize)


patch_client()
19 changes: 19 additions & 0 deletions azure-batch/azure/batch/custom/custom_errors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------


class CreateTasksErrorException(Exception):
""" Aggregate Exception containing details for any failures from a task add operation.

:param str message: Error message describing exit reason
:param [~TaskAddParameter] pending_task_list: List of tasks remaining to be submitted.
:param [~TaskAddResult] failure_tasks: List of tasks which failed to add
:param [~Exception] errors: List of unknown errors forcing early termination
"""
def __init__(self, message, pending_task_list=None, failure_tasks=None, errors=None):
self.message = message
self.pending_tasks = list(pending_task_list)
self.failure_tasks = list(failure_tasks)
self.errors = list(errors)
Loading