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

All Samples(93)  |  Call(54)  |  Derive(0)  |  Import(39)

src/k/a/karesansui-HEAD/karesansui/lib/conf.py   karesansui(Download)
 
    if type(webobj) == types.InstanceType:
        from karesansui.db.model._2pysilhouette import Job, JobGroup, \
                                                       JOBGROUP_TYPE
        from karesansui.db.access._2pysilhouette import jg_findby1, jg_save,corp
 
        jobgroup = JobGroup(cmd_name, karesansui.sheconf['env.uniqkey'])
        jobgroup.jobs.append(Job('%s command' % cmd_name, 0, _cmd))
        jobgroup.type = JOBGROUP_TYPE['PARALLEL']
 
 
    if type(webobj) == types.InstanceType:
        from karesansui.db.model._2pysilhouette import Job, JobGroup, \
                                                       JOBGROUP_TYPE
        from karesansui.db.access._2pysilhouette import jg_findby1, jg_save,corp
 
        _jobgroup = JobGroup(cmd_name, karesansui.sheconf['env.uniqkey'])
        _jobgroup.jobs.append(Job('%s command' % cmd_name, 0, _cmd))
 
        _machine2jobgroup = m2j_new(machine=machine,

src/k/a/karesansui-HEAD/karesansui/lib/iptables.py   karesansui(Download)
 
    if type(webobj) == types.InstanceType:
        from karesansui.db.model._2pysilhouette import Job, JobGroup, \
                                                       JOBGROUP_TYPE
        from karesansui.db.access._2pysilhouette import jg_findby1, jg_save,corp
 
        jobgroup = JobGroup(cmd_name, karesansui.sheconf['env.uniqkey'])
        jobgroup.jobs.append(Job('%s command' % cmd_name, 0, _cmd))
        jobgroup.type = JOBGROUP_TYPE['PARALLEL']
 

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1networkstorageby1status.py   karesansui(Download)
from karesansui.lib.rest import Rest, auth
 
from karesansui.db.model._2pysilhouette import Job, JobGroup, JOBGROUP_TYPE
from karesansui.db.access.machine import findbyhost1
from karesansui.db.access._2pysilhouette import jg_findby1, jg_save
                    {"name" : pool})
                pool_cmdname = "Start Storage Pool"
                jobgroup.jobs.append(Job('%s command' % pool_cmdname, 1, pool_cmd))
                job_order = 0
 
                    {"name" : pool})
                pool_cmdname = "Stop Storage Pool"
                jobgroup.jobs.append(Job('%s command' % pool_cmdname, 0, pool_cmd))
                job_order = 1
 
            "%s/%s" % (karesansui.config['application.bin.dir'], network_storage_cmd), options)
 
        jobgroup.jobs.append(Job('%s command' % cmd_name, job_order, _cmd))
 
        host = findbyhost1(self.orm, host_id)

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1networkstorageby1.py   karesansui(Download)
from karesansui.lib.rest import Rest, auth
 
from karesansui.db.model._2pysilhouette import Job, JobGroup, JOBGROUP_TYPE
from karesansui.db.access.machine import findbyhost1
from karesansui.db.access._2pysilhouette import jg_findby1, jg_save, corp
        cmd_name = u'Get iSCSI Detail'
        jobgroup = JobGroup(cmd_name, karesansui.sheconf['env.uniqkey'])
        jobgroup.jobs.append(Job('%s command' % cmd_name, 0, _cmd))
        jobgroup.type = JOBGROUP_TYPE['PARALLEL']
 
        cmd_name = u'Update iSCSI'
        jobgroup = JobGroup(cmd_name, karesansui.sheconf['env.uniqkey'])
        jobgroup.jobs.append(Job('%s command' % cmd_name, 0, _cmd))
 
        host = findbyhost1(self.orm, host_id)
                    {"name" : pool})
                stop_pool_cmdname = "Stop Storage Pool"
                jobgroup.jobs.append(Job('%s command' % stop_pool_cmdname, 0, stop_pool_cmd))
                job_order = 1
 
                    {"name" : pool})
                delete_pool_cmdname = "Delete Storage Pool"
                jobgroup.jobs.append(Job('%s command' % delete_pool_cmdname, job_order, delete_pool_cmd))
                job_order = 2
 

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1networkstorage.py   karesansui(Download)
from karesansui.lib.rest import Rest, auth
 
from karesansui.db.model._2pysilhouette import Job, JobGroup, JOBGROUP_TYPE
from karesansui.db.access.machine import findbyhost1
from karesansui.db.access._2pysilhouette import jg_findby1, jg_save, corp
def get_iscsi_cmd(obj, host_id):
    cmd_name = u'Get iSCSI List'
    jobgroup = JobGroup(cmd_name, karesansui.sheconf['env.uniqkey'])
    jobgroup.jobs.append(Job('%s command' % cmd_name, 0, "%s/%s" \
                             % (karesansui.config['application.bin.dir'], ISCSI_COMMAND_GET)))
        cmd_name = u'Add iSCSI'
        jobgroup = JobGroup(cmd_name, karesansui.sheconf['env.uniqkey'])
        jobgroup.jobs.append(Job('%s command' % cmd_name, 0, _cmd))
 
        host = findbyhost1(self.orm, host_id)

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1storagepoolby1status.py   karesansui(Download)
from karesansui.db.access._2pysilhouette import save_job_collaboration
from karesansui.db.access.machine2jobgroup import new as m2j_new
from karesansui.db.model._2pysilhouette import JobGroup, Job
 
from pysilhouette.command import dict2command
                {"iqn" : pool_info['source']['dev_path']})
            cmdname = "Start iSCSI"
            _iscsi_job = Job('%s command' % cmdname, 0, _cmd)
 
        _cmd = dict2command(
    if _iscsi_job:
        _jobgroup.jobs.append(_iscsi_job)
        _job = Job('%s command' % cmdname, 1, _cmd)
    else:
        _job = Job('%s command' % cmdname, 0, _cmd)

src/k/a/karesansui-HEAD/karesansui/gadget/guestby1diskby1.py   karesansui(Download)
from karesansui.db.access._2pysilhouette import save_job_collaboration
from karesansui.db.access.machine2jobgroup import new as m2j_new
from karesansui.db.model._2pysilhouette import Job, JobGroup
 
from pysilhouette.command import dict2command
        "%s/%s" % (karesansui.config['application.bin.dir'], cmd), options)
 
    job = Job('%s command' % cmdname, order, _cmd)
    return job
 
        "%s/%s" % (karesansui.config['application.bin.dir'], VIRT_COMMAND_DELETE_DISK), options)
 
    job = Job('Delete disk', order, cmd)
    return job
 

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1storagepool.py   karesansui(Download)
from karesansui.db.access._2pysilhouette import save_job_collaboration
from karesansui.db.access.machine2jobgroup import new as m2j_new
from karesansui.db.model._2pysilhouette import JobGroup, Job
 
from karesansui.gadget.hostby1networkstorage import get_iscsi_cmd
 
    _jobgroup = JobGroup(cmdname, karesansui.sheconf['env.uniqkey'])
    _job = Job('%s command' % cmdname, 0, _cmd)
 
    _job.rollback_command = rollback_cmd
 
    _jobgroup = JobGroup(cmdname, karesansui.sheconf['env.uniqkey'])
    _job = Job('%s command' % cmdname, 0, _cmd)
    _job.rollback_command = rollback_cmd
    _jobgroup.jobs.append(_job)
        readymount_cmd = dict2command(
            "%s/%s" % (karesansui.config['application.bin.dir'], ISCSI_COMMAND_READY_MOUNT), readymount_options)
        readymount_job = Job('Check mount command', 0, readymount_cmd)
 
        automount_cmd = dict2command(
            "%s/%s" % (karesansui.config['application.bin.dir'], cmd), automount_options)
        automount_job = Job('%s command' % cmdname, 1, automount_cmd)

src/k/a/karesansui-HEAD/karesansui/gadget/guestreplicate.py   karesansui(Download)
from karesansui.db.access.machine2jobgroup import new as m2j_new
from karesansui.db.access._2pysilhouette import jg_save, jg_delete
from karesansui.db.model._2pysilhouette import Job, JobGroup
from karesansui.db.access.machine import \
     findbyhost1guestall, findbyhost1, \
        rollback_options)
 
    job = Job('%s command' % cmdname, order, _cmd)
    job.rollback_command = rollback_cmd
    return job
        rollback_options)
 
    job = Job(cmdname, order, action_cmd)
    job.rollback_command = rollback_cmd
    return job

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1networksettings.py   karesansui(Download)
from karesansui.lib.rest import Rest, auth
 
from karesansui.db.model._2pysilhouette import Job, JobGroup
from karesansui.db.access.machine import findbyhost1
from karesansui.db.access._2pysilhouette import save_job_collaboration
 
        _jobgroup = JobGroup(cmdname, karesansui.sheconf['env.uniqkey'])
        _job = Job('%s command' % cmdname, 0, _cmd)
        _jobgroup.jobs.append(_job)
 
 
        _jobgroup = JobGroup(cmdname, karesansui.sheconf['env.uniqkey'])
        _job = Job('%s command' % cmdname, 0, _cmd)
        _jobgroup.jobs.append(_job)
 

  1 | 2 | 3 | 4  Next