本文整理汇总了Python中Cobalt.Proxy.ComponentProxy.set_cleaning方法的典型用法代码示例。如果您正苦于以下问题:Python ComponentProxy.set_cleaning方法的具体用法?Python ComponentProxy.set_cleaning怎么用?Python ComponentProxy.set_cleaning使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cobalt.Proxy.ComponentProxy
的用法示例。
在下文中一共展示了ComponentProxy.set_cleaning方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ComponentProxy
# 需要导入模块: from Cobalt.Proxy import ComponentProxy [as 别名]
# 或者: from Cobalt.Proxy.ComponentProxy import set_cleaning [as 别名]
'size':'*','draining':'*','backfill_time':'*'}
for part in parts]))
sys.exit(0)
if opts.clean_block:
if sys_type == 'bgp':
print "Force clenaing not available for BG/P systems"
sys.exit(0)
sched_enabled = ComponentProxy('scheduler',defer=False).sched_status()
boot_disabled = system.booting_status()
#if sched_enabled or not boot_disabled:
# print "scheduling and booting must be disabled prior to force-cleaning blocks."
# print "No blocks were marked for cleaning."
# sys.exit(1)
for part in parts:
system.set_cleaning(part, None, whoami)
print "Initiating cleanup on block %s" % part
sys.exit(0)
if opts.list_blocks:
# need to cascade up busy and non-functional flags
# print "buildRackTopology sees : " + repr(parts)
#
# partinfo = Cobalt.Util.buildRackTopology(parts)
try:
scheduler = ComponentProxy("scheduler", defer=False)
if sys_type == 'bgq':
reservations = scheduler.get_reservations([{'queue':"*",
'partitions':"*", 'active':True, 'block_passthrough':'*'}])
elif sys_type == 'bgp':