本文整理匯總了Python中vol.VolMgr.update_user_home_image方法的典型用法代碼示例。如果您正苦於以下問題:Python VolMgr.update_user_home_image方法的具體用法?Python VolMgr.update_user_home_image怎麽用?Python VolMgr.update_user_home_image使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類vol.VolMgr
的用法示例。
在下文中一共展示了VolMgr.update_user_home_image方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: run
# 需要導入模塊: from vol import VolMgr [as 別名]
# 或者: from vol.VolMgr import update_user_home_image [as 別名]
def run(self):
Compute.deregister_instance_dns()
Compute.register_instance_dns()
JBoxd.publish_perf_counters()
JBoxd.log_debug("Setting up signal handlers")
signal.signal(signal.SIGINT, JBoxd.signal_handler)
signal.signal(signal.SIGTERM, JBoxd.signal_handler)
if VolMgr.has_update_for_user_home_image():
VolMgr.update_user_home_image(fetch=False)
while True:
self.log_debug("JBox daemon waiting for commands...")
try:
offline, reply_req = JBoxd.QUEUE.poll(self._is_scheduled(JBoxAsyncJob.CMD_REQ_RESP, ()))
except ValueError:
self.log_exception("Exception reading command. Will retry after 10 seconds")
time.sleep(10)
continue
if offline:
try:
self.process_offline()
except:
self.log_exception("Exception scheduling request")
if reply_req:
JBoxd.schedule_thread(JBoxAsyncJob.CMD_REQ_RESP, JBoxd.process_and_respond, ())
示例2: run
# 需要導入模塊: from vol import VolMgr [as 別名]
# 或者: from vol.VolMgr import update_user_home_image [as 別名]
def run(self):
if VolMgr.has_update_for_user_home_image():
VolMgr.update_user_home_image(fetch=False)
while True:
self.log_debug("JBox daemon waiting for commands...")
cmd, data = self.queue.recv()
if cmd == JBoxAsyncJob.CMD_BACKUP_CLEANUP:
args = (data,)
fn = JBoxd.backup_and_cleanup
elif cmd == JBoxAsyncJob.CMD_LAUNCH_SESSION:
args = (data[0], data[1], data[2])
fn = JBoxd.launch_session
elif cmd == JBoxAsyncJob.CMD_AUTO_ACTIVATE:
args = ()
fn = JBoxd.auto_activate
elif cmd == JBoxAsyncJob.CMD_UPDATE_USER_HOME_IMAGE:
args = ()
fn = JBoxd.update_user_home_image
elif cmd == JBoxAsyncJob.CMD_REFRESH_DISKS:
args = ()
fn = JBoxd.refresh_disks
elif cmd == JBoxAsyncJob.CMD_COLLECT_STATS:
args = ()
fn = JBoxd.collect_stats
else:
self.log_error("Unknown command " + str(cmd))
continue
JBoxd.schedule_thread(cmd, fn, args)
示例3: do_update_user_home_image
# 需要導入模塊: from vol import VolMgr [as 別名]
# 或者: from vol.VolMgr import update_user_home_image [as 別名]
def do_update_user_home_image():
if VolMgr.has_update_for_user_home_image():
if not VolMgr.update_user_home_image(fetch=False):
JBoxContainer.async_update_user_home_image()
示例4: update_user_home_image
# 需要導入模塊: from vol import VolMgr [as 別名]
# 或者: from vol.VolMgr import update_user_home_image [as 別名]
def update_user_home_image():
VolMgr.update_user_home_image(fetch=True)
VolMgr.refresh_user_home_image()
示例5: update_user_home_image
# 需要導入模塊: from vol import VolMgr [as 別名]
# 或者: from vol.VolMgr import update_user_home_image [as 別名]
def update_user_home_image():
try:
VolMgr.update_user_home_image(fetch=True)
JBoxLoopbackVol.refresh_all_disks()
finally:
JBoxd.finish_thread()