Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
name=name,
custom_headers=custom_headers,
raw=True,
**operation_config
)
def get_long_running_output(response):
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response
lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}'}
def __init__(
self, base_url=None):
self.config = AutoRestResourceFlatteningTestServiceConfiguration(base_url)
self._client = ServiceClient(None, self.config)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '1.0.0'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
def __init__(
self, subscription_id, dns_suffix):
self.config = AutoRestParameterizedCustomHostTestClientConfiguration(subscription_id, dns_suffix)
self._client = ServiceClient(None, self.config)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '1.0.0'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self.paths = PathsOperations(
self._client, self.config, self._serialize, self._deserialize)
# Construct parameters
query_parameters = {}
# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if custom_headers:
header_parameters.update(custom_headers)
# Construct and send request
request = self._client.get(url, query_parameters)
response = self._client.send(request, header_parameters, **operation_config)
if response.status_code < 200 or response.status_code >= 300:
raise HttpOperationError(self._deserialize, response)
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response
def __init__(self, config):
self._client = ServiceClient(None, config)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer()
self._deserialize = Deserializer(client_models)
self.config = config
self.paths = Paths(
self._client, self.config, self._serialize, self._deserialize)
def __init__(
self, credentials, base_url=None):
self.config = AutoRestLongRunningOperationTestServiceConfiguration(credentials, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '1.0.0'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self.lr_os = LROsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.lro_retrys = LRORetrysOperations(
self._client, self.config, self._serialize, self._deserialize)
self.lrosa_ds = LROSADsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.lr_os_custom_header = LROsCustomHeaderOperations(
self._client, self.config, self._serialize, self._deserialize)
def __init__(
self, base_url=None):
self.config = AutoRestRFC1123DateTimeTestServiceConfiguration(base_url)
self._client = ServiceClient(None, self.config)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '1.0.0'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self.datetimerfc1123 = Datetimerfc1123Operations(
self._client, self.config, self._serialize, self._deserialize)
def __init__(self, config):
self._client = ServiceClient(None, config)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer()
self._deserialize = Deserializer(client_models)
self.config = config
self.paths = Paths(
self._client, self.config, self._serialize, self._deserialize)
self.queries = Queries(
self._client, self.config, self._serialize, self._deserialize)
self.path_items = PathItems(
self._client, self.config, self._serialize, self._deserialize)
def setUp(self):
cfg = Configuration("https://my_service.com")
cfg.retry_policy.backoff_factor=0
cfg.redirect_policy.max_redirects=2
cfg.credentials = Authentication()
self.client = ServiceClient(None, cfg)
return super(TestRedirect, self).setUp()
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrest.service_client import ServiceClient
from msrest import Configuration, Serializer, Deserializer
from .version import VERSION
from .operations.paths_operations import PathsOperations
from .operations.queries_operations import QueriesOperations
from .operations.path_items_operations import PathItemsOperations
from . import models
class AutoRestUrlTestServiceConfiguration(Configuration):
"""Configuration for AutoRestUrlTestService
Note that all parameters used to create this instance are saved as instance
attributes.
:param global_string_path: A string value 'globalItemStringPath' that
appears in the path
:type global_string_path: str
:param global_string_query: should contain value null
:type global_string_query: str
:param str base_url: Service URL
"""
def __init__(
self, global_string_path, global_string_query=None, base_url=None):
if global_string_path is None: