cterasdk.common.object module#
- cterasdk.common.object.delete_attr(obj, path)#
Delete attribute
- Parameters:
object (cterasdk.common.object.Object) – The object
path (str) – Attribute path
- Returns:
The modified object
- Return type:
- cterasdk.common.object.delete_attrs(obj, paths)#
Delete attributes
- Parameters:
object (cterasdk.common.object.Object) – The object
paths (list[str]) – List of attributes to remove
- Returns:
The modified object
- Return type:
- cterasdk.common.object.find_attr(obj, path)#
Find attribute
- Parameters:
object (cterasdk.common.object.Object) – The object
path (str) – A string or an array of the attribute path
- Returns:
The attribute, or
None
if not found
- cterasdk.common.object.get_attr(obj, attr)#
Get attribute
- Parameters:
object (cterasdk.common.object.Object) – The object
attr (str) – The name of the attribute to retrieve
- Returns:
The attribute, or
None
if not found
- cterasdk.common.object.remove_array_element(array, attr)#
- cterasdk.common.object.remove_array_element_by_key(array, key, value)#
- cterasdk.common.object.remove_attr(obj, attr)#
Remove attribute
- Parameters:
object (cterasdk.common.object.Object) – The object
attr (str) – The name of the attribute to remove