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

All Samples(9)  |  Call(9)  |  Derive(0)  |  Import(0)

src/s/y/synnefo-HEAD/snf-cyclades-app/synnefo/logic/management/commands/server-modify.py   synnefo(Download)
        if action is not None:
            if action == "start":
                server = servers.start(server)
            elif action == "stop":
                server = servers.stop(server)

src/s/y/synnefo-HEAD/snf-cyclades-app/synnefo/api/servers.py   synnefo(Download)
def start(request, vm, args):
    # Normal Response Code: 202
    # Error Response Codes: serviceUnavailable (503),
    #                       itemNotFound (404)
    vm = servers.start(vm)

src/s/y/synnefo-HEAD/snf-cyclades-app/synnefo/helpdesk/views.py   synnefo(Download)
    error = None
    try:
        jobId = servers_backend.start(vm)
    except Exception, e:
        error = e.message

src/s/y/synnefo-HEAD/snf-cyclades-app/synnefo/logic/tests/servers.py   synnefo(Download)
        mrapi().StartupInstance.return_value = 1
        with mocked_quotaholder():
            servers.start(vm)
        vm.task = None
        vm.task_job_id = None
        with mocked_quotaholder() as m:
            with self.assertRaises(quotas.ResolveError):
                servers.start(vm)
        # Not pending, rejct
        vm.task = None
        mrapi().StartupInstance.return_value = 1
        with mocked_quotaholder() as m:
            servers.start(vm)
            m.resolve_commissions.assert_called_once_with([],
                                                          [serial.serial])
        mrapi().StartupInstance.return_value = 1
        with mocked_quotaholder() as m:
            servers.start(vm)
            m.resolve_commissions.assert_called_once_with([serial.serial],
                                                          [])
        with mocked_quotaholder() as m:
            try:
                servers.start(vm)
            except Exception:
                (accept, reject), kwargs = m.resolve_commissions.call_args