Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
payload.update( dict_filt(request_parameters, 'payload') )
self._request_validator('jsd_d888ab6d4d59a8c1').validate(payload)
with_custom_headers = False
_headers = self._session.headers or {}
if headers:
_headers.update(headers)
with_custom_headers = True
if dict_filt(request_parameters, 'headers'):
_headers.update(dict_filt(request_parameters, 'headers'))
with_custom_headers = True
# API request
json_data = self._session.get(apply_path_params('/api/v1/network-device/serial-number/${serialNumber}', path_params), params=params, json=payload, headers=_headers) if with_custom_headers \
else self._session.get(apply_path_params('/api/v1/network-device/serial-number/${serialNumber}', path_params), params=params, json=payload)
return self._object_factory('bpm_d888ab6d4d59a8c1', json_data)
params = dict_from_items_with_values(params)
path_params = {
'startIndex': start_index,
'recordsToReturn': records_to_return,
}
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/${startIndex}/${recordsToRe'
+ 'turn}')
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:
json_data = self._session.get(endpoint_full_url, params=params)
return self._object_factory('bpm_33b799d04d0a8907_v1_3_3', json_data)
'sda/border-device': sda_border_device,
}
_payload = payload or []
if active_validation:
self._request_validator('jsd_bead7b3443b996a7_v1_2_10')\
.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/business/${sda/border-device}')
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)
else:
json_data = self._session.post(endpoint_full_url, params=params,
json=_payload)
return self._object_factory('bpm_bead7b3443b996a7_v1_2_10', json_data)
system_tag,
}
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/tag/count')
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:
json_data = self._session.get(endpoint_full_url, params=params)
return self._object_factory('bpm_8091a9b84bfba53b_v1_3_1', json_data)
userNameList,
}
_payload.update(payload or {})
_payload = dict_from_items_with_values(_payload)
if active_validation:
self._request_validator('jsd_55b439dc4239b140_v1_2_10')\
.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/discovery')
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)
else:
json_data = self._session.post(endpoint_full_url, params=params,
json=_payload)
return self._object_factory('bpm_55b439dc4239b140_v1_2_10', json_data)
instanceTenantId,
}
_payload.update(payload or {})
_payload = dict_from_items_with_values(_payload)
if active_validation:
self._request_validator('jsd_1399891c42a8be64_v1_3_0')\
.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/tag')
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)
else:
json_data = self._session.post(endpoint_full_url, params=params,
json=_payload)
return self._object_factory('bpm_1399891c42a8be64_v1_3_0', json_data)
}
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/hostonboarding/user-'
+ 'device')
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:
json_data = self._session.get(endpoint_full_url, params=params)
return self._object_factory('bpm_a4a1e8ed41cb9653_v1_3_1', json_data)
username,
}
_payload.update(payload or {})
_payload = dict_from_items_with_values(_payload)
if active_validation:
self._request_validator('jsd_fba0d80747eb82e8_v1_3_3')\
.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/global-credential/cli')
endpoint_full_url = apply_path_params(e_url, path_params)
if with_custom_headers:
json_data = self._session.put(endpoint_full_url, params=params,
json=_payload,
headers=_headers)
else:
json_data = self._session.put(endpoint_full_url, params=params,
json=_payload)
return self._object_factory('bpm_fba0d80747eb82e8_v1_3_3', json_data)
sourcePort,
}
_payload.update(payload or {})
_payload = dict_from_items_with_values(_payload)
if active_validation:
self._request_validator('jsd_a395fae644ca899c_v1_3_3')\
.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/flow-analysis')
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)
else:
json_data = self._session.post(endpoint_full_url, params=params,
json=_payload)
return self._object_factory('bpm_a395fae644ca899c_v1_3_3', json_data)
device_ipaddress,
}
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/border-device')
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:
json_data = self._session.delete(endpoint_full_url, params=params)
return self._object_factory('bpm_cb81b93540baaab0_v1_3_1', json_data)