Skip to content
24 changes: 12 additions & 12 deletions azure-batch/azure/batch/batch_service_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
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 @@ -34,23 +33,26 @@ class BatchServiceClientConfiguration(AzureConfiguration):
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param str base_url: Service URL
:param batch_url: The base URL for all Azure Batch service requests.
:type batch_url: str
"""

def __init__(
self, credentials, base_url=None):
self, credentials, batch_url):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if not base_url:
base_url = 'https://batch.core.windows.net'
if batch_url is None:
raise ValueError("Parameter 'batch_url' must not be None.")
base_url = '{batchUrl}'

super(BatchServiceClientConfiguration, self).__init__(base_url)

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

self.credentials = credentials
self.batch_url = batch_url


class BatchServiceClient(SDKClient):
Expand Down Expand Up @@ -81,17 +83,18 @@ class BatchServiceClient(SDKClient):
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param str base_url: Service URL
:param batch_url: The base URL for all Azure Batch service requests.
:type batch_url: str
"""

def __init__(
self, credentials, base_url=None):
self, credentials, batch_url):

self.config = BatchServiceClientConfiguration(credentials, base_url)
self.config = BatchServiceClientConfiguration(credentials, batch_url)
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-08-01.7.0'
self.api_version = '2018-12-01.8.0'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

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


patch_client()
Empty file.
19 changes: 0 additions & 19 deletions azure-batch/azure/batch/custom/custom_errors.py

This file was deleted.

301 changes: 0 additions & 301 deletions azure-batch/azure/batch/custom/patch.py

This file was deleted.

Loading