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

All Samples(12)  |  Call(0)  |  Derive(0)  |  Import(12)
dict() -> new empty dictionary
dict(mapping) -> new dictionary initialized from a mapping object's
    (key, value) pairs
dict(iterable) -> new dictionary initialized as if via:
    d = {}
    for k, v in iterable:
        d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value pairs
    in the keyword argument list.  For example:  dict(one=1, two=2)

src/k/a/karesansui-HEAD/karesansui/gadget/guest.py   karesansui(Download)
    CHECK_MIN, CHECK_MAX, CHECK_EXIST
 
from karesansui.lib.const import \
    NOTE_TITLE_MIN_LENGTH, NOTE_TITLE_MAX_LENGTH, \
    MACHINE_NAME_MIN_LENGTH, MACHINE_NAME_MAX_LENGTH, \
 
        #import pdb; pdb.set_trace()
        if model.attribute == MACHINE_ATTRIBUTE["URI"]:
            uri_guests = []
            uri_guests_status = {}
                       uniq_key=uni_force(uuid),
                       name=self.input.m_name,
                       attribute=MACHINE_ATTRIBUTE['GUEST'],
                       hypervisor=i_hypervisor,
                       notebook=_notebook,

src/k/a/karesansui-HEAD/karesansui/gadget/guestreplicate.py   karesansui(Download)
 
from karesansui.lib.rest import Rest, auth
from karesansui.lib.const import \
    VIRT_COMMAND_REPLICATE_GUEST, \
    GRAPHICS_PORT_MIN_NUMBER, PORT_MAX_NUMBER, \
                           uniq_key=uni_force(uuid),
                           name=self.input.m_name,
                           attribute=MACHINE_ATTRIBUTE['GUEST'],
                           hypervisor=src_guest.hypervisor,
                           notebook=_notebook,

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1.py   karesansui(Download)
    CHECK_MIN, CHECK_MAX
 
from karesansui.lib.const import \
    NOTE_TITLE_MIN_LENGTH, NOTE_TITLE_MAX_LENGTH, \
    MACHINE_NAME_MIN_LENGTH, MACHINE_NAME_MAX_LENGTH, \
 
        if self.input.m_connect_type == "karesansui":
            host.attribute = MACHINE_ATTRIBUTE['HOST']
            if is_param(self.input, "m_hostname"):
                host.hostname = self.input.m_hostname
 
        if self.input.m_connect_type == "libvirt":
            host.attribute = MACHINE_ATTRIBUTE['URI']

src/k/a/karesansui-HEAD/karesansui/gadget/host.py   karesansui(Download)
    CHECK_MIN, CHECK_MAX
 
from karesansui.lib.const import \
    NOTE_TITLE_MIN_LENGTH, NOTE_TITLE_MAX_LENGTH, \
    MACHINE_NAME_MIN_LENGTH, MACHINE_NAME_MAX_LENGTH, \
        if self.input.m_connect_type == "karesansui":
            uniq_key = self.input.m_uuid
            attribute = MACHINE_ATTRIBUTE['HOST']
            if is_param(self.input, "m_hostname"):
                hostname = self.input.m_hostname
 
        if self.input.m_connect_type == "libvirt":
            uniq_key = string_from_uuid(generate_uuid())
            attribute = MACHINE_ATTRIBUTE['URI']

src/k/a/karesansui-HEAD/karesansui/gadget/init.py   karesansui(Download)
from karesansui.lib.file.k2v import K2V
from karesansui.lib.crypt import sha1encrypt, sha1compare
from karesansui.lib.const import MACHINE_ATTRIBUTE, MACHINE_HYPERVISOR
from karesansui.db import get_engine, get_metadata, get_session
from karesansui.db.model.user import User
                       u"%s" % uuid,
                       u"%s" % fqdn,
                       MACHINE_ATTRIBUTE['HOST'],
                       MACHINE_HYPERVISOR['REAL'],
                       notebook,

src/k/a/karesansui-HEAD/tools/initialize_database.py   karesansui(Download)
    from karesansui.lib.file.k2v import K2V
    from karesansui.lib.crypt import sha1encrypt
    from karesansui.lib.const import MACHINE_ATTRIBUTE, MACHINE_HYPERVISOR
    from karesansui.db import get_engine, get_metadata, get_session
    from karesansui.db.model.user import User
                       u"%s" % uuid,
                       u"%s" % fqdn,
                       MACHINE_ATTRIBUTE['HOST'],
                       MACHINE_HYPERVISOR['REAL'],
                       notebook,

src/k/a/karesansui-HEAD/karesansui/db/access/machine_machine2jobgroup.py   karesansui(Download)
#
 
from karesansui.lib.const import MACHINE_ATTRIBUTE
from karesansui.db.model.machine import Machine
from karesansui.db.model.machine2jobgroup import Machine2Jobgroup
    query = query.filter(
                or_(
                    and_(Machine.parent_id == host_id, Machine.attribute == MACHINE_ATTRIBUTE['GUEST']),
                    and_(Machine.id == host_id, Machine.attribute == MACHINE_ATTRIBUTE['HOST']),
                    and_(Machine.id == host_id, Machine.attribute == MACHINE_ATTRIBUTE['URI'])
    query = query.filter(
        Machine.id == guest_id).filter(
        Machine.attribute == MACHINE_ATTRIBUTE['GUEST'])
 
    #if created_user_id:

src/k/a/karesansui-HEAD/karesansui/lib/merge.py   karesansui(Download)
import logging
 
from karesansui.lib.const import MACHINE_ATTRIBUTE, MACHINE_HYPERVISOR
from karesansui.db.model.machine import Machine
from karesansui.db.model.user import User
                                        u"%s" % uuid,
                                        u"%s" % guest_name,
                                        MACHINE_ATTRIBUTE['GUEST'],
                                        MACHINE_HYPERVISOR['URI'],
                                        notebook,

src/k/a/karesansui-HEAD/karesansui/lib/template.py   karesansui(Download)
    </comment-en>
    """
    from karesansui.lib.const import MACHINE_ATTRIBUTE
 
    for key, value in MACHINE_ATTRIBUTE.items():

src/k/a/karesansui-HEAD/karesansui/db/access/machine.py   karesansui(Download)
from sqlalchemy import and_, or_
 
from karesansui.lib.const import MACHINE_ATTRIBUTE
from karesansui.db.model.machine import Machine
from karesansui.db.access import dbsave, dbupdate, dbdelete
def logical_delete(session, machine):
    if machine.attribute == MACHINE_ATTRIBUTE['HOST']:
        machine.hostname = None
 
    if machine.attribute == MACHINE_ATTRIBUTE['URI']:

  1 | 2  Next