phenome.extensions.classtypes.OBJECT.powered_object module¶
-
class
PoweredObject¶ Bases:
phenome_core.core.base.base_object.BaseObject-
add_relation(relation, relation_type_id, relation_details)¶ Overrides superclass “add_relation” method in order to set the connected outlet, if applicable
- Returns:
None
-
admin_disabled¶
-
get_power_usage_watts()¶ Attempts to return power usage in WATTS for this object.
- Returns:
Integer
-
get_powered_state(refresh_state=True)¶ Returns the Powered State of the object. Please see the ENUM: _STATE_TYPES_ in the system metadata file.
- Returns:
Integer: _STATE_TYPES_
-
has_power_source()¶ Returns if a powered object has a configured power source.
- Returns:
True - if there is a configured power source False - if there is not a configured power source
-
id¶
-
ip¶
-
is_plugged_into(pdu, outlet=None)¶ Determines whether a powered object is plugged into a PDU. Specifying the outlet number will also check the outlet.
- Returns:
True if plugged in False if not plugged in
-
is_powered_off()¶ Determines if the object is Powered OFF
- Returns:
True - if OFF False - if ON
-
is_powered_on()¶ Determines if the object is Powered ON
- Returns:
True - if ON False - if OFF
-
mac¶
-
model¶
-
model_id¶
-
notify_on_power_change= False¶
-
plug_into(power_object, outlet=None)¶ “Plugs” an object to a configured power source.
- Returns:
True - if the relationship is created between object and power source False - if the object cannot be “plugged” into the power source
-
power_off(message=None)¶ Powers OFF the object
- Returns:
True - if OFF False - if ON
-
power_on(message=None)¶ Powers ON the object
- Returns:
True - if ON False - if OFF
-
powercycle()¶ Attempts to PowerCycle the object.
- Returns:
True - if power cycled
-
properties¶
-
relations_from¶
-
relations_to¶
-
remove_relation(relation, relation_type_id)¶ Overrides superclass “remove_relation” method in order to disconnect the connected outlet, if applicable
- Returns:
None
-
set_enabled(enabled)¶ Sets a powered object’s Administrative State
- Returns:
None
-
unique_id¶
-
wake_on_lan()¶ Attempts to send Magic Packet (WOL) to the object.
- Returns:
True - if packet is sent
Note: True is returned only if packet is “sent”. There is no checking to see if it really worked and the machine woke up because of that packet.
-