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

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)

        def get_dom_list():
    from karesansui.lib.const import VIRT_XML_CONFIG_DIR
    retval = []
    for _name in os.listdir(VIRT_XML_CONFIG_DIR):
        if _name[-4:] == ".xml":
            _path = os.path.join(VIRT_XML_CONFIG_DIR, _name)
            doc = get_xml_parse(_path)
            domain_name = get_xml_xpath(doc,'/domain/name/text()')
            retval.append(domain_name)
    return retval
        


src/k/a/karesansui-HEAD/karesansui/gadget/guest.py   karesansui(Download)
from karesansui.lib.const import XEN_KEYMAP_DIR, KVM_KEYMAP_DIR, KVM_BRIDGE_PREFIX
 
from karesansui.lib.utils import comma_split, \
     generate_mac_address, is_param, \
     next_number, generate_uuid, string_from_uuid, uniq_sort, \
            ) and check
 
        if obj.input.domain_name in get_dom_list():
            dom_type = get_dom_type(obj.input.domain_name)
            checker.add_error(_("The same domain name already exists for hypervisor '%s'.") % dom_type.upper())

src/k/a/karesansui-HEAD/karesansui/gadget/guestimport.py   karesansui(Download)
from karesansui.lib.rest import Rest, auth
 
from karesansui.lib.utils import chk_create_disk, json_dumps, is_param, \
  base64_encode, base64_decode, get_dom_list, get_dom_type, \
  string_from_uuid, generate_uuid, comma_split, uniq_sort, get_partition_info

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1reportby1.py   karesansui(Download)
from karesansui.lib.virt.virt import KaresansuiVirtConnection
from karesansui.lib.rrd.rrd import RRD
from karesansui.lib.utils import is_param, is_empty, \
    str2datetime, create_epochsec, get_proc_cpuinfo, \
    get_fs_info, get_hdd_list, get_ifconfig_info, \
                kvc = KaresansuiVirtConnection()
 
                for domname in get_dom_list():
                    virt_list[domname] = {}
 

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1watch.py   karesansui(Download)
 
            ## guest os list
            from karesansui.lib.utils import get_dom_list
            from karesansui.lib.virt.virt import KaresansuiVirtConnection
            from karesansui.lib.merge import MergeGuest
            self.view.dom_list = get_dom_list()
 
            dom_info = {}
            for domname in get_dom_list():