Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Args:
headers(dict): Dictionary of HTTP Headers to send with the Request
.
**request_parameters: Additional request parameters (provides
support for parameters that may be added in the future).
Returns:
MyDict: JSON response. Access the object's properties by using
the dot notation or the bracket notation.
Raises:
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)
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 = {
}
with_custom_headers = False
_headers = self._session.headers or {}
if headers:
body of the Request.
active_validation(bool): Enable/Disable payload validation.
Defaults to True.
**request_parameters: Additional request parameters (provides
support for parameters that may be added in the future).
Returns:
MyDict: JSON response. Access the object's properties by using
the dot notation or the bracket notation.
Raises:
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(payload, dict)
if headers is not None:
if 'Content-Type' in headers:
check_type(headers.get('Content-Type'),
basestring, may_be_none=False)
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 = {
}
check_type(headers, dict)
check_type(payload, dict)
check_type(site_id, basestring,
may_be_none=False)
if headers is not None:
if '__runsync' in headers:
check_type(headers.get('__runsync'),
bool, may_be_none=False)
if '__persistbapioutput' in headers:
check_type(headers.get('__persistbapioutput'),
bool, may_be_none=False)
if '__runsynctimeout' in headers:
check_type(headers.get('__runsynctimeout'),
int)
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 = {
'siteId': site_id,
}
_payload = {
'device':
device,
}
_payload.update(payload or {})
def get_modules(self, param_device_id, param_limit = None, param_name_list = None, param_offset = None, param_operational_state_code_list = None, param_part_number_list = None, param_vendor_equipment_type_list = None, headers=None,payload=None,**request_parameters):
check_type( param_device_id, basestring, may_be_none=False)
check_type( param_limit, basestring)
check_type( param_offset, basestring)
check_type( param_name_list, basestring)
check_type( param_vendor_equipment_type_list, basestring)
check_type( param_part_number_list, basestring)
check_type( param_operational_state_code_list, basestring)
if headers is not None:
check_type( headers.get('X-Auth-Token', self._session.headers.get('X-Auth-Token')), basestring, may_be_none=False)
params = { }
if param_device_id is not None: params.update( { 'deviceId': param_device_id })
if param_limit is not None: params.update( { 'limit': param_limit })
if param_offset is not None: params.update( { 'offset': param_offset })
if param_name_list is not None: params.update( { 'nameList': param_name_list })
if param_vendor_equipment_type_list is not None: params.update( { 'vendorEquipmentTypeList': param_vendor_equipment_type_list })
if param_part_number_list is not None: params.update( { 'partNumberList': param_part_number_list })
if param_operational_state_code_list is not None: params.update( { 'operationalStateCodeList': param_operational_state_code_list })
params.update(dict_filt(request_parameters, 'params'))
body of the Request.
active_validation(bool): Enable/Disable payload validation.
Defaults to True.
**request_parameters: Additional request parameters (provides
support for parameters that may be added in the future).
Returns:
MyDict: JSON response. Access the object's properties by using
the dot notation or the bracket notation.
Raises:
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(payload, list)
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 = {
}
_payload = payload or []
if active_validation:
**request_parameters: Additional request parameters (provides
support for parameters that may be added in the future).
Returns:
MyDict: JSON response. Access the object's properties by using
the dot notation or the bracket notation.
Raises:
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(payload, list)
check_type(schedule_at, basestring)
check_type(schedule_desc, basestring)
check_type(schedule_origin, basestring)
if headers is not None:
if 'Content-Type' in headers:
check_type(headers.get('Content-Type'),
basestring, may_be_none=False)
if 'X-Auth-Token' in headers:
check_type(headers.get('X-Auth-Token'),
basestring, may_be_none=False)
params = {
'scheduleAt':
schedule_at,
'scheduleDesc':
schedule_desc,
'scheduleOrigin':
schedule_origin,
active_validation(bool): Enable/Disable payload validation.
Defaults to True.
**request_parameters: Additional request parameters (provides
support for parameters that may be added in the future).
Returns:
MyDict: JSON response. Access the object's properties by using
the dot notation or the bracket notation.
Raises:
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(payload, list)
if headers is not None:
if 'Content-Type' in headers:
check_type(headers.get('Content-Type'),
basestring, may_be_none=False)
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 = {
}
Returns:
MyDict: JSON response. Access the object's properties by using
the dot notation or the bracket notation.
Raises:
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(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 = {
'id': id,
}
with_custom_headers = False
_headers = self._session.headers or {}
if headers:
_headers.update(dict_of_str(headers))
with_custom_headers = True
body of the Request.
active_validation(bool): Enable/Disable payload validation.
Defaults to True.
**request_parameters: Additional request parameters (provides
support for parameters that may be added in the future).
Returns:
MyDict: JSON response. Access the object's properties by using
the dot notation or the bracket notation.
Raises:
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(payload, dict)
if headers is not None:
if 'Content-Type' in headers:
check_type(headers.get('Content-Type'),
basestring, may_be_none=False)
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 = {
}
body of the Request.
active_validation(bool): Enable/Disable payload validation.
Defaults to True.
**request_parameters: Additional request parameters (provides
support for parameters that may be added in the future).
Returns:
MyDict: JSON response. Access the object's properties by using
the dot notation or the bracket notation.
Raises:
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(payload, dict)
if headers is not None:
if 'Content-Type' in headers:
check_type(headers.get('Content-Type'),
basestring, may_be_none=False)
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 = {
}