示例#1
0
 def take_action(self, parsed_args):
     image_uuid, path = bs_image.call_wrapped_method(
         'build', parsed_args.notify_webui, data=vars(parsed_args))
     self.app.stdout.write(
         "Bootstrap image {0} has been built: {1}\n".format(
             image_uuid, path))
     if parsed_args.activate:
         bs_image.import_image(path)
         bs_image.call_wrapped_method('activate',
                                      parsed_args.notify_webui,
                                      image_uuid=image_uuid)
         self.app.stdout.write(
             "Bootstrap image {0} has been activated.\n".format(image_uuid))
示例#2
0
 def take_action(self, parsed_args):
     image_uuid, path = bs_image.call_wrapped_method(
         'build',
         parsed_args.notify_webui,
         data=vars(parsed_args))
     self.app.stdout.write("Bootstrap image {0} has been built: {1}\n"
                           .format(image_uuid, path))
     if parsed_args.activate:
         bs_image.import_image(path)
         bs_image.call_wrapped_method(
             'activate',
             parsed_args.notify_webui,
             image_uuid=image_uuid)
         self.app.stdout.write("Bootstrap image {0} has been activated.\n"
                               .format(image_uuid))
示例#3
0
 def take_action(self, parsed_args):
     # cliff handles errors by itself
     image_uuid = bs_image.call_wrapped_method('activate',
                                               parsed_args.notify_webui,
                                               image_uuid=parsed_args.id)
     self.app.stdout.write(
         "Bootstrap image {0} has been activated.\n".format(image_uuid))
示例#4
0
 def take_action(self, parsed_args):
     # Cliff handles errors by itself
     image_uuid = bs_image.import_image(parsed_args.filename)
     self.app.stdout.write(
         "Bootstrap image {0} has been imported.\n".format(image_uuid))
     if parsed_args.activate:
         image_uuid = bs_image.call_wrapped_method('activate',
                                                   parsed_args.notify_webui,
                                                   image_uuid=image_uuid)
         self.app.stdout.write(
             "Bootstrap image {0} has been activated\n".format(image_uuid))
示例#5
0
 def take_action(self, parsed_args):
     # Cliff handles errors by itself
     image_uuid = bs_image.import_image(parsed_args.filename)
     self.app.stdout.write("Bootstrap image {0} has been imported.\n"
                           .format(image_uuid))
     if parsed_args.activate:
         image_uuid = bs_image.call_wrapped_method(
             'activate',
             parsed_args.notify_webui,
             image_uuid=image_uuid)
         self.app.stdout.write("Bootstrap image {0} has been activated\n"
                               .format(image_uuid))
示例#6
0
 def take_action(self, parsed_args):
     # cliff handles errors by itself
     image_uuid = bs_image.call_wrapped_method("activate", parsed_args.notify_webui, image_uuid=parsed_args.id)
     self.app.stdout.write("Bootstrap image {0} has been activated.\n".format(image_uuid))