Module Expr Str ImportFrom alias Import alias Import alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Assign NameStore Dict Assign NameStore Dict Str NameLoad FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str If CompareIs NameLoad NameLoad body Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Return TupleLoad NameLoad Str orelse If CompareNotIn Str Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Return TupleLoad NameLoad Str orelse Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str Str If Call NameLoad GeneratorExp CompareNotIn NameLoad NameLoad comprehension NameStore SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call AttributeLoad Str attr NameLoad Return TupleLoad NameLoad Call AttributeLoad Str attr Call AttributeLoad Str attr NameLoad Return TupleLoad NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad Assign NameStore Call NameLoad NameLoad If UnaryOpNot SubscriptLoad NameLoad Index Num body Return NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str Str keyword Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Slice Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore NameLoad body TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad If BoolOpOr CompareNotIn NameLoad NameLoad BoolOpAnd CompareIn Str SubscriptLoad NameLoad Index NameLoad CompareNotEq SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str NameLoad body If CompareIn NameLoad SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr Dict Str Str Str NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad Dict Str NameLoad If CompareIn Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Dict Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad Call SubscriptLoad NameLoad Index Str NameLoad keyword Call AttributeLoad NameLoad attr Str NameLoad attr Str For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad If CompareLtLt Num NameLoad Num body If BoolOpOr CompareNotIn Str NameLoad CompareNotEq NameLoad SubscriptLoad NameLoad Index Str body If BoolOpAnd BoolOpOr CompareNotIn Str NameLoad CompareGt SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str CompareLtE NameLoad SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr Dict Str Str Str NameLoad NameLoad Str If CompareNotIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Dict Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Dict Str NameLoad handlers ExceptHandler type NameLoad body Continue For NameStore NameLoad body If CompareNotIn NameLoad NameLoad body If CompareIn Str SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr Dict Str Str Str NameLoad Str Str Delete SubscriptDel NameLoad Index NameLoad If BoolOpAnd CompareIn Str NameLoad CompareIs SubscriptLoad NameLoad Index Str NameLoad body If BoolOpAnd CompareEq Call NameLoad NameLoad Num UnaryOpNot SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr Dict Str Str Assign SubscriptStore NameLoad Index Str CompareEq Call NameLoad NameLoad Num Return NameLoad decorator_list
N/A N/A 
Beacon to emit adb device state changes for Android devices

.. versionadded:: 2016.3.0
 __future__ absolute_import N/A logging N/A salt.utils N/A log N/A N/A logging getLogger __name__ N/A __virtualname__ adb N/A last_state N/A N/A last_state_extra N/A value False __virtual__ N/A N/A N/A N/A N/A which_result N/A N/A N/A salt utils which adb N/A N/A which_result None N/A N/A False N/A N/A __virtualname__ N/A validate N/A N/A config N/A N/A N/A 
    Validate the beacon configuration
     N/A N/A N/A isinstance config dict N/A N/A N/A N/A log info Configuration for adb beacon must be a dict. N/A N/A False Configuration for adb beacon must be a dict. N/A N/A N/A states N/A N/A config keys N/A N/A N/A N/A log info Configuration for adb beacon must include a states array. N/A N/A False Configuration for adb beacon must include a states array. N/A N/A states N/A offline bootloader device host recovery no permissions sideload unauthorized unknown missing N/A N/A any N/A N/A s states N/A s N/A config N/A states N/A N/A N/A N/A log info N/A N/A Need a one of the following adb states: {0} format N/A N/A ,  join states N/A N/A False N/A N/A Need a one of the following adb states: {0} format N/A N/A ,  join states N/A N/A True Valid beacon configuration N/A beacon N/A N/A config N/A N/A N/A 
    Emit the status of all devices returned by adb

    Specify the device states that should emit an event,
    there will be an event for each device with the
    event type and device specified.

    .. code-block:: yaml

        beacons:
          adb:
            - states:
                - offline
                - unauthorized
                - missing
            - no_devices_event: True
            - battery_low: 25

     N/A N/A N/A log trace adb beacon starting N/A ret N/A N/A _validate N/A validate config N/A N/A N/A _validate N/A 0 N/A N/A ret N/A out N/A N/A __salt__ N/A cmd.run adb devices runas N/A N/A config get user None N/A lines N/A N/A N/A out split N/A 1 N/A last_state_devices N/A N/A last_state keys N/A found_devices N/A N/A line lines N/A N/A N/A N/A N/A device state N/A N/A line split N/A N/A N/A found_devices append device N/A N/A N/A device last_state_devices N/A N/A state N/A last_state N/A device N/A N/A N/A last_state N/A device N/A state state N/A N/A N/A state N/A config N/A states N/A N/A N/A N/A ret append N/A device state tag device state state N/A N/A last_state N/A device N/A state state N/A N/A battery_low config N/A N/A val N/A N/A last_state get device N/A N/A cmd N/A N/A adb -s {0} shell cat /sys/class/power_supply/*/capacity format device N/A battery_levels N/A N/A N/A N/A __salt__ N/A cmd.run cmd runas N/A N/A config get user None split N/A l battery_levels N/A N/A battery_level N/A int l N/A N/A 0 battery_level 100 N/A N/A N/A N/A battery val N/A battery_level N/A val N/A battery N/A N/A N/A N/A N/A battery val N/A N/A val N/A battery N/A config N/A battery_low N/A battery_level N/A config N/A battery_low N/A N/A N/A N/A ret append N/A device battery_level tag device battery_level battery_low N/A N/A device last_state N/A N/A N/A last_state N/A device N/A N/A N/A N/A N/A last_state N/A device update N/A battery battery_level N/A N/A N/A ValueError N/A N/A N/A device last_state_devices N/A N/A N/A device found_devices N/A N/A N/A missing N/A config N/A states N/A N/A N/A N/A ret append N/A device state tag device missing missing N/A N/A last_state N/A device N/A N/A N/A no_devices_event config N/A N/A config N/A no_devices_event True N/A N/A N/A N/A N/A len lines 0 N/A N/A last_state_extra N/A no_devices N/A N/A N/A N/A ret append N/A tag no_devices N/A N/A last_state_extra N/A no_devices N/A N/A len lines 0 N/A ret N/A