Skip to content

Commit

Permalink
Generated from cb68ced
Browse files Browse the repository at this point in the history
  • Loading branch information
travis committed Apr 12, 2016
1 parent ebb9940 commit 5bf3002
Show file tree
Hide file tree
Showing 26 changed files with 265 additions and 205 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ class GraphRbacManagementClientConfiguration(AzureConfiguration):
:param credentials: Gets Azure subscription credentials.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Gets subscription credentials which uniquely
identify Microsoft Azure subscription. The subscription ID forms part of
the URI for every service call.
:type subscription_id: str
:param api_version: Client Api Version.
:type api_version: str
:param tenant_id: Gets or sets the tenant Id.
Expand All @@ -62,12 +58,10 @@ class GraphRbacManagementClientConfiguration(AzureConfiguration):
"""

def __init__(
self, credentials, subscription_id, tenant_id, api_version='1.42-previewInternal', accept_language='en-US', long_running_operation_retry_timeout=30, generate_client_request_id=True, base_url=None, filepath=None):
self, credentials, tenant_id, api_version='1.42-previewInternal', accept_language='en-US', long_running_operation_retry_timeout=30, generate_client_request_id=True, base_url=None, filepath=None):

if credentials is None:
raise ValueError('credentials must not be None.')
if subscription_id is None:
raise ValueError('subscription_id must not be None.')
if tenant_id is None:
raise ValueError('tenant_id must not be None.')
if not base_url:
Expand All @@ -79,7 +73,6 @@ def __init__(
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
self.api_version = api_version
self.tenant_id = tenant_id
self.accept_language = accept_language
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def create(
# Construct URL
url = '/{tenantID}/applications'
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -126,7 +125,6 @@ def list(
# Construct URL
url = '/{tenantID}/applications'
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -187,7 +185,6 @@ def delete(
url = '/{tenantID}/applications/{applicationObjectId}'
path_format_arguments = {
'applicationObjectId': self._serialize.url("application_object_id", application_object_id, 'str', skip_quote=True),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -239,7 +236,6 @@ def get(
url = '/{tenantID}/applications/{applicationObjectId}'
path_format_arguments = {
'applicationObjectId': self._serialize.url("application_object_id", application_object_id, 'str', skip_quote=True),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -301,7 +297,6 @@ def update(
url = '/{tenantID}/applications/{applicationObjectId}'
path_format_arguments = {
'applicationObjectId': self._serialize.url("application_object_id", application_object_id, 'str', skip_quote=True),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down
10 changes: 0 additions & 10 deletions azure-graphrbac/azure/graphrbac/operations/group_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def remove_member(
path_format_arguments = {
'groupObjectId': self._serialize.url("group_object_id", group_object_id, 'str', skip_quote=True),
'memberObjectId': self._serialize.url("member_object_id", member_object_id, 'str', skip_quote=True),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -122,7 +121,6 @@ def add_member(
url = '/{tenantID}/groups/{groupObjectId}/$links/members'
path_format_arguments = {
'groupObjectId': self._serialize.url("group_object_id", group_object_id, 'str', skip_quote=True),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -178,7 +176,6 @@ def delete(
url = '/{tenantID}/groups/{groupObjectId}'
path_format_arguments = {
'groupObjectId': self._serialize.url("group_object_id", group_object_id, 'str', skip_quote=True),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -230,7 +227,6 @@ def create(
# Construct URL
url = '/{tenantID}/groups'
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -293,7 +289,6 @@ def internal_paging(next_link=None, raw=False):
# Construct URL
url = '/{tenantID}/groups'
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -362,7 +357,6 @@ def internal_paging(next_link=None, raw=False):
url = '/{tenantID}/groups/{objectId}/members'
path_format_arguments = {
'objectId': self._serialize.url("object_id", object_id, 'str', skip_quote=True),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -427,7 +421,6 @@ def get(
url = '/{tenantID}/groups/{objectId}'
path_format_arguments = {
'objectId': self._serialize.url("object_id", object_id, 'str', skip_quote=True),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -494,7 +487,6 @@ def internal_paging(next_link=None, raw=False):
url = '/{tenantID}/groups/{objectId}/getMemberGroups'
path_format_arguments = {
'objectId': self._serialize.url("object_id", object_id, 'str', skip_quote=True),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -563,7 +555,6 @@ def internal_paging(next_link=None, raw=False):
url = '/{tenantID}/{nextLink}'
path_format_arguments = {
'nextLink': self._serialize.url("next_link", next_link, 'str', skip_quote=True),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -630,7 +621,6 @@ def internal_paging(next_link=None, raw=False):
url = '/{tenantID}/{nextLink}'
path_format_arguments = {
'nextLink': self._serialize.url("next_link", next_link, 'str', skip_quote=True),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def get_current_user(
# Construct URL
url = '/{tenantID}/me'
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -121,7 +120,6 @@ def internal_paging(next_link=None, raw=False):
# Construct URL
url = '/{tenantID}/getObjectsByObjectIds'
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -191,7 +189,6 @@ def internal_paging(next_link=None, raw=False):
url = '/{tenantID}/{nextLink}'
path_format_arguments = {
'nextLink': self._serialize.url("next_link", next_link, 'str', skip_quote=True),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def create(
# Construct URL
url = '/{tenantID}/servicePrincipals'
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -131,7 +130,6 @@ def internal_paging(next_link=None, raw=False):
# Construct URL
url = '/{tenantID}/servicePrincipals'
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -198,7 +196,6 @@ def delete(
url = '/{tenantID}/servicePrincipals/{objectId}'
path_format_arguments = {
'objectId': self._serialize.url("object_id", object_id, 'str', skip_quote=True),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -251,7 +248,6 @@ def get(
url = '/{tenantID}/servicePrincipals/{objectId}'
path_format_arguments = {
'objectId': self._serialize.url("object_id", object_id, 'str', skip_quote=True),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -312,7 +308,6 @@ def internal_paging(next_link=None, raw=False):
url = '/{tenantID}/{nextLink}'
path_format_arguments = {
'nextLink': self._serialize.url("next_link", next_link, 'str', skip_quote=True),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down
6 changes: 0 additions & 6 deletions azure-graphrbac/azure/graphrbac/operations/user_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def delete(
url = '/{tenantID}/users/{user}'
path_format_arguments = {
'user': self._serialize.url("user", user, 'str', skip_quote=True),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -115,7 +114,6 @@ def create(
# Construct URL
url = '/{tenantID}/users'
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -178,7 +176,6 @@ def internal_paging(next_link=None, raw=False):
# Construct URL
url = '/{tenantID}/users'
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -246,7 +243,6 @@ def get(
url = '/{tenantID}/users/{upnOrObjectId}'
path_format_arguments = {
'upnOrObjectId': self._serialize.url("upn_or_object_id", upn_or_object_id, 'str', skip_quote=True),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -313,7 +309,6 @@ def internal_paging(next_link=None, raw=False):
url = '/{tenantID}/users/{objectId}/getMemberGroups'
path_format_arguments = {
'objectId': self._serialize.url("object_id", object_id, 'str', skip_quote=True),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -382,7 +377,6 @@ def internal_paging(next_link=None, raw=False):
url = '/{tenantID}/{nextLink}'
path_format_arguments = {
'nextLink': self._serialize.url("next_link", next_link, 'str', skip_quote=True),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'tenantID': self._serialize.url("self.config.tenant_id", self.config.tenant_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down
24 changes: 20 additions & 4 deletions azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,8 @@ def start(
deserialized response
:rtype:
:class:`AzureOperationPoller<msrestazure.azure_operation.AzureOperationPoller>`
instance that returns None
instance that returns :class:`Endpoint
<azure.mgmt.cdn.models.Endpoint>`
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
"""
Expand Down Expand Up @@ -513,10 +514,17 @@ def get_long_running_output(response):
if response.status_code not in [202]:
raise models.ErrorResponseException(self._deserialize, response)

deserialized = None

if response.status_code == 202:
deserialized = self._deserialize('Endpoint', response)

if raw:
client_raw_response = ClientRawResponse(None, response)
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response

return deserialized

if raw:
response = long_running_send()
return get_long_running_output(response)
Expand Down Expand Up @@ -546,7 +554,8 @@ def stop(
deserialized response
:rtype:
:class:`AzureOperationPoller<msrestazure.azure_operation.AzureOperationPoller>`
instance that returns None
instance that returns :class:`Endpoint
<azure.mgmt.cdn.models.Endpoint>`
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
"""
Expand Down Expand Up @@ -592,10 +601,17 @@ def get_long_running_output(response):
if response.status_code not in [202]:
raise models.ErrorResponseException(self._deserialize, response)

deserialized = None

if response.status_code == 202:
deserialized = self._deserialize('Endpoint', response)

if raw:
client_raw_response = ClientRawResponse(None, response)
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response

return deserialized

if raw:
response = long_running_send()
return get_long_running_output(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,11 +388,13 @@ def get_long_running_status(status_link, headers={}):

def get_long_running_output(response):

if response.status_code not in [202]:
if response.status_code not in [200, 202]:
raise models.ErrorResponseException(self._deserialize, response)

deserialized = None

if response.status_code == 200:
deserialized = self._deserialize('Profile', response)
if response.status_code == 202:
deserialized = self._deserialize('Profile', response)

Expand Down
Loading

0 comments on commit 5bf3002

Please sign in to comment.