Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ApiError: If the DNA Center cloud returns an error.
"""
check_type(headers, dict)
check_type(site_name_hierarchy, basestring,
may_be_none=False)
if headers is not None:
if 'X-Auth-Token' in headers:
check_type(headers.get('X-Auth-Token'),
basestring, may_be_none=False)
params = {
'siteNameHierarchy':
site_name_hierarchy,
}
params.update(request_parameters)
params = dict_from_items_with_values(params)
path_params = {
}
with_custom_headers = False
_headers = self._session.headers or {}
if headers:
_headers.update(dict_of_str(headers))
with_custom_headers = True
e_url = ('/dna/intent/api/v1/business/sda/authentication-profile')
endpoint_full_url = apply_path_params(e_url, path_params)
if with_custom_headers:
json_data = self._session.delete(endpoint_full_url, params=params,
headers=_headers)
else:
may_be_none=False)
if headers is not None:
if 'X-Auth-Token' in headers:
check_type(headers.get('X-Auth-Token'),
basestring, may_be_none=False)
params = {
'offset':
offset,
'limit':
limit,
'ipAddress':
ip_address,
}
params.update(request_parameters)
params = dict_from_items_with_values(params)
path_params = {
'id': id,
}
with_custom_headers = False
_headers = self._session.headers or {}
if headers:
_headers.update(dict_of_str(headers))
with_custom_headers = True
e_url = ('/dna/intent/api/v1/discovery/${id}/job')
endpoint_full_url = apply_path_params(e_url, path_params)
if with_custom_headers:
json_data = self._session.get(endpoint_full_url, params=params,
headers=_headers)
TypeError: If the parameter types are incorrect.
MalformedRequest: If the request body created is invalid.
ApiError: If the DNA Center cloud returns an error.
"""
check_type(headers, dict)
check_type(global_credential_id, basestring,
may_be_none=False)
if headers is not None:
if 'X-Auth-Token' in headers:
check_type(headers.get('X-Auth-Token'),
basestring, may_be_none=False)
params = {
}
params.update(request_parameters)
params = dict_from_items_with_values(params)
path_params = {
'globalCredentialId': global_credential_id,
}
with_custom_headers = False
_headers = self._session.headers or {}
if headers:
_headers.update(dict_of_str(headers))
with_custom_headers = True
e_url = ('/dna/intent/api/v1/global-'
+ 'credential/${globalCredentialId}')
endpoint_full_url = apply_path_params(e_url, path_params)
if with_custom_headers:
json_data = self._session.delete(endpoint_full_url, params=params,
MalformedRequest: If the request body created is invalid.
ApiError: If the DNA Center cloud returns an error.
"""
check_type(headers, dict)
check_type(profile_name, basestring)
if headers is not None:
if 'X-Auth-Token' in headers:
check_type(headers.get('X-Auth-Token'),
basestring, may_be_none=False)
params = {
'profileName':
profile_name,
}
params.update(request_parameters)
params = dict_from_items_with_values(params)
path_params = {
}
with_custom_headers = False
_headers = self._session.headers or {}
if headers:
_headers.update(dict_of_str(headers))
with_custom_headers = True
e_url = ('/dna/intent/api/v1/wireless/profile')
endpoint_full_url = apply_path_params(e_url, path_params)
if with_custom_headers:
json_data = self._session.get(endpoint_full_url, params=params,
headers=_headers)
else:
MalformedRequest: If the request body created is invalid.
ApiError: If the DNA Center cloud returns an error.
"""
check_type(headers, dict)
check_type(node_type, basestring)
if headers is not None:
if 'X-Auth-Token' in headers:
check_type(headers.get('X-Auth-Token'),
basestring, may_be_none=False)
params = {
'nodeType':
node_type,
}
params.update(request_parameters)
params = dict_from_items_with_values(params)
path_params = {
}
with_custom_headers = False
_headers = self._session.headers or {}
if headers:
_headers.update(dict_of_str(headers))
with_custom_headers = True
e_url = ('/dna/intent/api/v1/topology/physical-topology')
endpoint_full_url = apply_path_params(e_url, path_params)
if with_custom_headers:
json_data = self._session.get(endpoint_full_url, params=params,
headers=_headers)
else:
check_type(headers, dict)
check_type(operation_id, basestring,
may_be_none=False)
check_type(offset, int,
may_be_none=False)
check_type(limit, int,
may_be_none=False)
if headers is not None:
if 'X-Auth-Token' in headers:
check_type(headers.get('X-Auth-Token'),
basestring, may_be_none=False)
params = {
}
params.update(request_parameters)
params = dict_from_items_with_values(params)
path_params = {
'operationId': operation_id,
'offset': offset,
'limit': limit,
}
with_custom_headers = False
_headers = self._session.headers or {}
if headers:
_headers.update(dict_of_str(headers))
with_custom_headers = True
e_url = ('/dna/intent/api/v1/task/operation/${operationId}/${offse'
+ 't}/${limit}')
endpoint_full_url = apply_path_params(e_url, path_params)
may_be_none=False)
check_type(site_name_hierarchy, basestring,
may_be_none=False)
if headers is not None:
if 'X-Auth-Token' in headers:
check_type(headers.get('X-Auth-Token'),
basestring, may_be_none=False)
params = {
'virtualNetworkName':
virtual_network_name,
'siteNameHierarchy':
site_name_hierarchy,
}
params.update(request_parameters)
params = dict_from_items_with_values(params)
path_params = {
}
with_custom_headers = False
_headers = self._session.headers or {}
if headers:
_headers.update(dict_of_str(headers))
with_custom_headers = True
e_url = ('/dna/intent/api/v1/business/sda/virtual-network')
endpoint_full_url = apply_path_params(e_url, path_params)
if with_custom_headers:
json_data = self._session.delete(endpoint_full_url, params=params,
headers=_headers)
else:
check_type(timestamp, (int, basestring))
if headers is not None:
if 'X-Auth-Token' in headers:
check_type(headers.get('X-Auth-Token'),
basestring, may_be_none=False)
params = {
'timestamp':
timestamp,
}
if params['timestamp'] is None:
params['timestamp'] = ''
params.update(request_parameters)
params = dict_from_items_with_values(params)
path_params = {
}
with_custom_headers = False
_headers = self._session.headers or {}
if headers:
_headers.update(dict_of_str(headers))
with_custom_headers = True
e_url = ('/dna/intent/api/v1/client-health')
endpoint_full_url = apply_path_params(e_url, path_params)
if with_custom_headers:
json_data = self._session.get(endpoint_full_url, params=params,
headers=_headers)
else:
startTime,
'state':
state,
'tasks':
tasks,
'tenantId':
tenantId,
'type':
type,
'useState':
useState,
'version':
version,
}
_payload.update(payload or {})
_payload = dict_from_items_with_values(_payload)
if active_validation:
self._request_validator('jsd_848b5a7b4f9b8c12_v1_3_1')\
.validate(_payload)
with_custom_headers = False
_headers = self._session.headers or {}
if headers:
_headers.update(dict_of_str(headers))
with_custom_headers = True
e_url = ('/dna/intent/api/v1/onboarding/pnp-workflow')
endpoint_full_url = apply_path_params(e_url, path_params)
if with_custom_headers:
json_data = self._session.post(endpoint_full_url, params=params,
json=_payload,
headers=_headers)
MalformedRequest: If the request body created is invalid.
ApiError: If the DNA Center cloud returns an error.
"""
check_type(headers, dict)
check_type(rf_profile_name, basestring)
if headers is not None:
if 'X-Auth-Token' in headers:
check_type(headers.get('X-Auth-Token'),
basestring, may_be_none=False)
params = {
'rf-profile-name':
rf_profile_name,
}
params.update(request_parameters)
params = dict_from_items_with_values(params)
path_params = {
}
with_custom_headers = False
_headers = self._session.headers or {}
if headers:
_headers.update(dict_of_str(headers))
with_custom_headers = True
e_url = ('/dna/intent/api/v1/wireless/rf-profile')
endpoint_full_url = apply_path_params(e_url, path_params)
if with_custom_headers:
json_data = self._session.get(endpoint_full_url, params=params,
headers=_headers)
else: