def set_power_supplies(self, power_supplies):
        """
        Sets the 2 power supplies with 0 = off, 1 = on.

        :param power_supplies: list of 2 power supplies.
        Example: [1, 0] = first power supply is on, second is off.
        """

        power_supply_id = 0
        for power_supply in power_supplies:
            yield from self._hypervisor.send('c7200 set_power_supply "{name}" {power_supply_id} {powered_on}'.format(name=self._name,
                                                                                                                     power_supply_id=power_supply_id,
                                                                                                                     powered_on=power_supply))

            log.info('Router "{name}" [{id}]: power supply {power_supply_id} state updated to {powered_on}'.format(name=self._name,
                                                                                                                   id=self._id,
                                                                                                                   power_supply_id=power_supply_id,
                                                                                                                   powered_on=power_supply))
            power_supply_id += 1

        self._power_supplies = power_supplies
def set_power_supplies ( self , power_supplies ) : power_supply_id = 0 for power_supply in power_supplies : yield from self . _hypervisor . send ( 'c7200 set_power_supply "{name}" {power_supply_id} {powered_on}' . format ( name = self . _name , power_supply_id = power_supply_id , powered_on = power_supply ) ) log . info ( 'Router "{name}" [{id}]: power supply {power_supply_id} state updated to {powered_on}' . format ( name = self . _name , id = self . _id , power_supply_id = power_supply_id , powered_on = power_supply ) ) power_supply_id += 1 self . _power_supplies = power_supplies
Sets the 2 power supplies with 0 = off, 1 = on.

        :param power_supplies: list of 2 power supplies.
        Example: [1, 0] = first power supply is on, second is off.