本文整理汇总了Python中Cobalt.Proxy.ComponentProxy.verify_locations方法的典型用法代码示例。如果您正苦于以下问题:Python ComponentProxy.verify_locations方法的具体用法?Python ComponentProxy.verify_locations怎么用?Python ComponentProxy.verify_locations使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cobalt.Proxy.ComponentProxy
的用法示例。
在下文中一共展示了ComponentProxy.verify_locations方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ComponentProxy
# 需要导入模块: from Cobalt.Proxy import ComponentProxy [as 别名]
# 或者: from Cobalt.Proxy.ComponentProxy import verify_locations [as 别名]
except xmlrpclib.Fault, flt:
print flt.faultString
raise SystemExit, 1
if only_id_change:
raise SystemExit, 0
if '-f' not in sys.argv:
# we best check that the partitions are valid
try:
system = ComponentProxy("system", defer=False)
except ComponentLookupError:
print "Failed to contact system component for partition check"
raise SystemExit, 1
for p in partitions:
test_parts = system.verify_locations(partitions)
if len(test_parts) != len(partitions):
missing = [p for p in partitions if p not in test_parts]
print "Missing partitions: %s" % (" ".join(missing))
raise SystemExit, 1
try:
[start] = [opt[1] for opt in opts if opt[0] == '-s']
except ValueError:
if '-m' in sys.argv[1:]:
start = None
else:
print "Must supply a start time for the reservation with -s"
raise SystemExit, 1
try:
[duration] = [opt[1] for opt in opts if opt[0] == '-d']