Example #1
0
    def __check_vm_operation_status(self, sctx, on_success, on_failed, on_continue):
        ctx = sctx.job_ctxs[sctx.current_job_index]
        adapter = VirtualMachineAdapter(ctx.subscription_id, ctx.pem_url, host=ctx.management_host)

        res = adapter.get_operation_status(ctx.request_id)

        if res.status == ASYNC_OP_RESULT.SUCCEEDED:
            on_success(sctx)
        elif res.error:
            on_failed(sctx)
        else:
            on_continue(sctx)
Example #2
0
    def __check_vm_operation_status(self, sctx, on_success, on_failed,
                                    on_continue):
        ctx = sctx.job_ctxs[sctx.current_job_index]
        adapter = VirtualMachineAdapter(ctx.subscription_id,
                                        ctx.pem_url,
                                        host=ctx.management_host)

        res = adapter.get_operation_status(ctx.request_id)

        if res.status == ASYNC_OP_RESULT.SUCCEEDED:
            on_success(sctx)
        elif res.error:
            on_failed(sctx)
        else:
            on_continue(sctx)