def image(self,template,target): template_object = Template(template=template) build_adaptor = BuildAdaptor(template_object,target,agent=self.agent) # Needed to allow us to walk all builders during a shutdown BuildDispatcher().job_registry.register(build_adaptor) build_adaptor.build_image() return build_adaptor
def provider_image(self, image_id, provider, credentials): target_image_id = image_id image_metadata = self.warehouse.metadata_for_id_of_type(("template", "target"), target_image_id, "target_image") template_id = image_metadata["template"] target = image_metadata["target"] if (template_id and target): build_adaptor = BuildAdaptor(Template(uuid=template_id),target,agent=self.agent) build_adaptor.push_image(target_image_id, provider, credentials) return build_adaptor else: raise RuntimeError("Could not return build_adaptor!\nimage_metadata: %s\ntemplate_id: %s\ntemplate: %s\n" % (image_metadata, template_id, target))
def provider_image(self, image_id, provider, credentials): target_image_id = image_id image_metadata = self.warehouse.metadata_for_id_of_type(("template", "target"), target_image_id, "target_image") template_id = image_metadata["template"] target = image_metadata["target"] if (template_id and target): build_adaptor = BuildAdaptor(Template(uuid=template_id),target,agent=self.agent) # Needed to allow us to walk all builders during a shutdown BuildDispatcher().job_registry.register(build_adaptor) build_adaptor.push_image(target_image_id, provider, credentials) return build_adaptor else: raise RuntimeError("Could not return build_adaptor!\nimage_metadata: %s\ntemplate_id: %s\ntemplate: %s\n" % (image_metadata, template_id, target))
def image(self,template,target): template_object = Template(template=template) build_adaptor = BuildAdaptor(template_object,target,agent=self.agent) build_adaptor.build_image() return build_adaptor