aciFaults module

This module deals with Fault objects.

class acitoolkit.aciFaults.Faults

Bases: acitoolkit.acibaseobject.BaseACIObject

A class for Fault objects

classmethod get_fault(session, extension='')

Not implemented for this class. Use get_faults() instead

Parameters:
  • session – Not used
  • extension – Not used
Raises:

AttributeError

classmethod get_faults(session, fault_filter=None, tenant_name=None)

Gets the fault that is pending for this class. Faults are returned in the form of objects.

Parameters:
  • session – the instance of Session used for APIC communication
  • fault_filter – fault_filter is used to filter the attributes of a fault. given in a hash format with domain, types, severity
  • tenant_name – tenant_name is a string
get_faults_by_filter(fault_filter=None)

filters a fault obj based on the keys given in fault_filter

Parameters:fault_filter – fault_filter is used to filter the attributes of a fault. given in a hash format with domain, types, severity
Returns:fault obj if it satisfies fault_filter
classmethod has_faults(session, fault_filter=None)

Check for pending events from the APIC that pertain to instances of this class.

Parameters:
  • session – the instance of Session used for APIC communication
  • fault_filter – fault_filter is used to filter the attributes of a fault. given in a hash format with domain, types, severity
Returns:

True or False. True if there are events pending.

is_deleted()

Not supported

Raises:AttributeError
mark_as_deleted()

Not supported

Raises:AttributeError
classmethod subscribe_faults(session, fault_filter=None, only_new=False)

Subscribe to faults from the APIC that pertain to instances of this class.

Parameters:
  • session – the instance of Session used for APIC communication
  • fault_filter – fault_filter is used to filter the attributes of a fault. given in a hash format with domain, types, severity
  • only_new – Boolean indicating whether to get all events or only the new events. All events (indicated by setting only_new to False) will queue a create event for all of the currently existing objects. Setting only_new to True will only queue events that occur after the initial subscribe. The default has only_new set to False.
classmethod validate_fault_filter(fault_filter=None)

validates the fault_filter with the schema

Parameters:fault_filter – fault_filter is used to filter the attributes of a fault. given in a hash format with domain, types, severity