+def reboot_instances():
+ print("========== reboot instances ==========")
+ nova = _get_nova_client()
+ print("nova servers list:")
+ print(nova.servers.list())
+ for instance in nova.servers.list():
+ name = getattr(instance, 'name')
+ if name.find("rubbos") >= 0:
+ print("reboot %s" % name)
+ instance.reboot()
+ print("Finish reboot all rubbos servers.")
+