Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)
str(object='') -> string

Return a nice string representation of the object.
If the argument is a string, the return value is the same object.

src/k/a/karesansui-HEAD/bin/delete_bonding.py   karesansui(Download)
    from karesansui.lib.parser.ifcfg import ifcfgParser
    from karesansui.lib.parser.modprobe_conf import modprobe_confParser
    from karesansui.lib.const import BONDING_MODE, BONDING_CONFIG_MII_DEFAULT, \
        VENDOR_DATA_BONDING_EVACUATION_DIR, NETWORK_IFCFG_DIR, NETWORK_COMMAND, \
        SYSTEM_COMMAND_REMOVE_MODULE, NETWORK_IFDOWN_COMMAND, NETWORK_BRCTL_COMMAND
        self.up_progress(10)
        for restore_dev in restore_dev_list:
            if move_file("%s/ifcfg-%s" % (VENDOR_DATA_BONDING_EVACUATION_DIR, restore_dev), NETWORK_IFCFG_DIR) is False:
                raise KssCommandException('Failure restore ifcfg file.')
            if os.path.isfile("%s/ifcfg-p%s" % (VENDOR_DATA_BONDING_EVACUATION_DIR, restore_dev)):
                if move_file("%s/ifcfg-p%s" % (VENDOR_DATA_BONDING_EVACUATION_DIR, restore_dev), NETWORK_IFCFG_DIR) is False:
 
        self.up_progress(10)
        remove_file("%s/ifcfg-%s" % (NETWORK_IFCFG_DIR, opts.dev))
 
        self.up_progress(10)
                raise KssCommandException('Failure delete bridge. bridge:%s' % (dev, brif))
 
            remove_file("%s/ifcfg-%s" % (NETWORK_IFCFG_DIR, bond_bridge))
 
        #

src/k/a/karesansui-HEAD/bin/add_bonding.py   karesansui(Download)
    from karesansui.lib.parser.ifcfg import ifcfgParser
    from karesansui.lib.parser.modprobe_conf import modprobe_confParser
    from karesansui.lib.const import BONDING_MODE, BONDING_CONFIG_MII_DEFAULT, \
        VENDOR_DATA_BONDING_EVACUATION_DIR, NETWORK_IFCFG_DIR, NETWORK_COMMAND, \
        NETWORK_IFDOWN_COMMAND,             NETWORK_BRCTL_COMMAND
 
        for dev in dev_list:
            if os.path.isfile("%s/ifcfg-%s" % (NETWORK_IFCFG_DIR, dev)):
                copy_file("%s/ifcfg-%s" % (NETWORK_IFCFG_DIR, dev), VENDOR_DATA_BONDING_EVACUATION_DIR)
            if os.path.isfile("%s/ifcfg-p%s" % (NETWORK_IFCFG_DIR, dev)):
                move_file("%s/ifcfg-p%s" % (NETWORK_IFCFG_DIR, dev), VENDOR_DATA_BONDING_EVACUATION_DIR)