예제 #1
0
파일: pump.py 프로젝트: UshF/pumphouse
def migrate_images(ctx, flow, ids):
    for image in ctx.src_cloud.glance.images.list():
        if image.id in ids:
            image_flow = image_tasks.migrate_image(
                ctx, image.id)
            flow.add(image_flow)
    return flow
예제 #2
0
def migrate_project_images(context, flow, tenant_id):
    images = context.src_cloud.glance.images.list(
        filters={"owner": tenant_id})
    for image in list(images):
        image_binding = "image-{}".format(image.id)
        if image_binding not in context.store:
            image_flow = image_tasks.migrate_image(context, image.id)
            flow.add(image_flow)
예제 #3
0
파일: server.py 프로젝트: rmoe/pumphouse
def rebuild_by_image(context, server):
    image_id = server.image["id"]
    image_binding = "image-{}".format(image_id)
    image_ensure = "image-{}-ensure".format(image_id)

    pre_suspend = []
    if image_binding not in context.store:
        image_flow = image_tasks.migrate_image(context, image_id)
        pre_suspend.append(image_flow)

    return pre_suspend, [image_ensure], [], image_ensure