当前位置: 首页>>代码示例>>Python>>正文


Python vmmAsyncJob.simple_async_noshow函数代码示例

本文整理汇总了Python中virtManager.asyncjob.vmmAsyncJob.simple_async_noshow函数的典型用法代码示例。如果您正苦于以下问题:Python simple_async_noshow函数的具体用法?Python simple_async_noshow怎么用?Python simple_async_noshow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了simple_async_noshow函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _do_resume_domain

    def _do_resume_domain(self, src, uri, uuid):
        conn = self._lookup_conn(uri)
        vm = conn.get_vm(uuid)

        logging.debug("Unpausing vm '%s'", vm.get_name())
        vmmAsyncJob.simple_async_noshow(vm.resume, [], src,
                                        _("Error unpausing domain"))
开发者ID:yumingfei,项目名称:virt-manager,代码行数:7,代码来源:engine.py

示例2: start_pool

    def start_pool(self, src_ignore):
        pool = self.current_pool()
        if pool is None:
            return

        logging.debug("Starting pool '%s'", pool.get_name())
        vmmAsyncJob.simple_async_noshow(pool.start, [], self,
                            _("Error starting pool '%s'") % pool.get_name())
开发者ID:jiemohuishou,项目名称:virt-manager-0.9.3,代码行数:8,代码来源:host.py

示例3: stop_network

    def stop_network(self, src_ignore):
        net = self.current_network()
        if net is None:
            return

        logging.debug("Stopping network '%s'", net.get_name())
        vmmAsyncJob.simple_async_noshow(net.stop, [], self,
                            _("Error stopping network '%s'") % net.get_name())
开发者ID:jiemohuishou,项目名称:virt-manager-0.9.3,代码行数:8,代码来源:host.py

示例4: _do_shutdown_domain

    def _do_shutdown_domain(self, src, uri, uuid):
        conn = self._lookup_conn(uri)
        vm = conn.get_vm(uuid)

        if not util.chkbox_helper(src, self.config.get_confirm_poweroff,
            self.config.set_confirm_poweroff,
            text1=_("Are you sure you want to poweroff '%s'?" %
                    vm.get_name())):
            return

        logging.debug("Shutting down vm '%s'", vm.get_name())
        vmmAsyncJob.simple_async_noshow(vm.shutdown, [], src,
                                        _("Error shutting down domain"))
开发者ID:yumingfei,项目名称:virt-manager,代码行数:13,代码来源:engine.py

示例5: _do_suspend_domain

    def _do_suspend_domain(self, src, uri, uuid):
        conn = self._lookup_conn(uri)
        vm = conn.get_vm(uuid)

        if not util.chkbox_helper(src, self.config.get_confirm_pause,
            self.config.set_confirm_pause,
            text1=_("Are you sure you want to pause '%s'?" %
                    vm.get_name())):
            return

        logging.debug("Pausing vm '%s'", vm.get_name())
        vmmAsyncJob.simple_async_noshow(vm.suspend, [], src,
                                        _("Error pausing domain"))
开发者ID:yumingfei,项目名称:virt-manager,代码行数:13,代码来源:engine.py

示例6: delete_pool

    def delete_pool(self, src_ignore):
        pool = self.current_pool()
        if pool is None:
            return

        result = self.err.yes_no(_("Are you sure you want to permanently "
                                   "delete the pool %s?") % pool.get_name())
        if not result:
            return

        logging.debug("Deleting pool '%s'", pool.get_name())
        vmmAsyncJob.simple_async_noshow(pool.delete, [], self,
                            _("Error deleting pool '%s'") % pool.get_name())
开发者ID:jiemohuishou,项目名称:virt-manager-0.9.3,代码行数:13,代码来源:host.py

示例7: delete_network

    def delete_network(self, src_ignore):
        net = self.current_network()
        if net is None:
            return

        result = self.err.yes_no(_("Are you sure you want to permanently "
                                   "delete the network %s?") % net.get_name())
        if not result:
            return

        logging.debug("Deleting network '%s'", net.get_name())
        vmmAsyncJob.simple_async_noshow(net.delete, [], self,
                            _("Error deleting network '%s'") % net.get_name())
开发者ID:jiemohuishou,项目名称:virt-manager-0.9.3,代码行数:13,代码来源:host.py

示例8: delete_interface

    def delete_interface(self, src_ignore):
        interface = self.current_interface()
        if interface is None:
            return

        result = self.err.yes_no(_("Are you sure you want to permanently "
                                   "delete the interface %s?")
                                   % interface.get_name())
        if not result:
            return

        logging.debug("Deleting interface '%s'", interface.get_name())
        vmmAsyncJob.simple_async_noshow(interface.delete, [], self,
                    _("Error deleting interface '%s'") % interface.get_name())
开发者ID:jiemohuishou,项目名称:virt-manager-0.9.3,代码行数:14,代码来源:host.py

示例9: start_interface

    def start_interface(self, src_ignore):
        interface = self.current_interface()
        if interface is None:
            return

        if not util.chkbox_helper(self, self.config.get_confirm_interface,
            self.config.set_confirm_interface,
            text1=_("Are you sure you want to start the interface "
                    "'%s'?" % interface.get_name())):
            return

        logging.debug("Starting interface '%s'", interface.get_name())
        vmmAsyncJob.simple_async_noshow(interface.start, [], self,
                    _("Error starting interface '%s'") % interface.get_name())
开发者ID:jiemohuishou,项目名称:virt-manager-0.9.3,代码行数:14,代码来源:host.py

示例10: _do_reset_domain

    def _do_reset_domain(self, src, uri, uuid):
        conn = self._lookup_conn(uri)
        vm = conn.get_vm(uuid)

        if not util.chkbox_helper(src, self.config.get_confirm_forcepoweroff,
            self.config.set_confirm_forcepoweroff,
            text1=_("Are you sure you want to force reset '%s'?" %
                    vm.get_name()),
            text2=_("This will immediately reset the VM without "
                    "shutting down the OS and may cause data loss.")):
            return

        logging.debug("Resetting vm '%s'", vm.get_name())
        vmmAsyncJob.simple_async_noshow(vm.reset, [], src,
                                        _("Error resetting domain"))
开发者ID:yumingfei,项目名称:virt-manager,代码行数:15,代码来源:engine.py

示例11: _do_restore_domain

    def _do_restore_domain(self, src, uri):
        conn = self._lookup_conn(uri)
        if conn.is_remote():
            src.err.val_err(_("Restoring virtual machines over remote "
                              "connections is not yet supported"))
            return

        path = src.err.browse_local(
            conn, _("Restore Virtual Machine"),
            browse_reason=self.config.CONFIG_DIR_RESTORE)

        if not path:
            return

        vmmAsyncJob.simple_async_noshow(conn.restore, [path], src,
                                        _("Error restoring domain"))
开发者ID:aurex-linux,项目名称:virt-manager,代码行数:16,代码来源:engine.py

示例12: _on_delete_clicked

    def _on_delete_clicked(self, ignore):
        snap = self._get_current_snapshot()
        if not snap:
            return

        result = self.err.yes_no(_("Are you sure you want to permanently "
                                   "delete the snapshot '%s'?") %
                                   snap.get_name())
        if not result:
            return

        # XXX: how does the work for 'current' snapshot?
        # XXX: all sorts of flags here like 'delete children', do we care?

        logging.debug("Deleting snapshot '%s'", snap.get_name())
        vmmAsyncJob.simple_async_noshow(snap.delete, [], self,
                        _("Error deleting snapshot '%s'") % snap.get_name(),
                        finish_cb=self._refresh_snapshots)
开发者ID:TelekomCloud,项目名称:virt-manager,代码行数:18,代码来源:snapshots.py

示例13: delete_vol

    def delete_vol(self, src_ignore):
        vol = self.current_vol()
        if vol is None:
            return

        result = self.err.yes_no(_("Are you sure you want to permanently "
                                   "delete the volume %s?") % vol.get_name())
        if not result:
            return

        def cb():
            vol.delete()
            def idlecb():
                self.refresh_current_pool()
                self.populate_storage_volumes()
            self.idle_add(idlecb)

        logging.debug("Deleting volume '%s'", vol.get_name())
        vmmAsyncJob.simple_async_noshow(cb, [], self,
                        _("Error refreshing volume '%s'") % vol.get_name())
开发者ID:jiemohuishou,项目名称:virt-manager-0.9.3,代码行数:20,代码来源:host.py

示例14: pool_refresh

    def pool_refresh(self, src_ignore):
        if self._in_refresh:
            logging.debug("Already refreshing the pool, skipping")
            return

        pool = self.current_pool()
        if pool is None:
            return

        self._in_refresh = True

        def cb():
            try:
                pool.refresh()
                self.idle_add(self.refresh_current_pool)
            finally:
                self._in_refresh = False

        logging.debug("Refresh pool '%s'", pool.get_name())
        vmmAsyncJob.simple_async_noshow(cb, [], self,
                            _("Error refreshing pool '%s'") % pool.get_name())
开发者ID:jiemohuishou,项目名称:virt-manager-0.9.3,代码行数:21,代码来源:host.py

示例15: _on_start_clicked

    def _on_start_clicked(self, ignore):
        snap = self._get_current_snapshot()
        if not snap:
            return

        # XXX: Not true with external disk snapshots, disk changes are
        #          encoded in the latest snapshot
        # XXX: Don't run current?
        # XXX: Warn about state change?
        result = self.err.yes_no(_("Are you sure you want to revert to "
                                   "snapshot '%s'? All disk changes since "
                                   "the last snapshot will be discarded.") %
                                   snap.get_name())
        if not result:
            return

        logging.debug("Revertin to snapshot '%s'", snap.get_name())
        vmmAsyncJob.simple_async_noshow(self.vm.revert_to_snapshot,
                            [snap], self,
                            _("Error reverting to snapshot '%s'") %
                            snap.get_name(),
                            finish_cb=self._refresh_snapshots)
开发者ID:TelekomCloud,项目名称:virt-manager,代码行数:22,代码来源:snapshots.py


注:本文中的virtManager.asyncjob.vmmAsyncJob.simple_async_noshow函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。