Beispiel #1
0
    def execute(self, options_dict, non_option_args):
        manager = self.Manager()

        print "State: %s" % nm.manager_state_to_str(manager.get_state())
        print "Wireless Enabled: %s" % nmformat.bool_to_str(manager.get_wireless_state())
        print "Wireless hardware enabled: %s" % nmformat.bool_to_str(manager.get_wireless_hw_state())

        #print manager.get_active_connections()

        return 0
Beispiel #2
0
    def execute(self, options_dict, non_option_args):
        manager = self.Manager()

        print "State: %s" % nm.manager_state_to_str(manager.get_state())
        print "Wireless Enabled: %s" % nmformat.bool_to_str(
            manager.get_wireless_state())
        print "Wireless hardware enabled: %s" % nmformat.bool_to_str(
            manager.get_wireless_hw_state())

        #print manager.get_active_connections()

        return 0
Beispiel #3
0
    def get_properties(self):
        props = []
        props.append(("Type", str(self)))
        props.append(("State", device_state_to_str(self.get_state())))
        props.append(("Udi", self.get_udi()))
        props.append(("Driver", self.get_driver()))
        caps = self.get_capabilities()
        props.append(("Capabilities", device_cap_to_str (caps)))
        if caps & DEVICE_CAP_CARRIER_DETECT:
            props.append(("Carrier", nmformat.bool_to_str(self.get_carrier())))

        return props
Beispiel #4
0
 def on_carrier_changed(self, carrier_on):
     print "Device carrier changed: %s" % nmformat.bool_to_str(carrier_on)