Esempio n. 1
0
def from_map(map_key):
    'use resolved map as image'
    image_id = subprocess.check_output(['plash-map',
                                        map_key]).decode().strip('\n')
    if not image_id:
        raise MapDoesNotExist('map {} not found'.format(repr(map_key)))
    return hint('image', image_id)
Esempio n. 2
0
 def wrapper(*args):
     cache_key = cache_key_templ.format(':'.join(args)).replace(
         '/', '%')
     container_id = utils.plash_map(cache_key)
     if not container_id:
         container_id = func(*args)
         utils.plash_map(cache_key, container_id)
     return hint('image', container_id)
Esempio n. 3
0
 def wrapper(*args):
     cache_key = cache_key_templ.format(":".join(args)).replace(
         "/", "%")
     container_id = utils.plash_call("map", cache_key)
     if not container_id:
         container_id = func(*args)
         utils.plash_call("map", cache_key, container_id)
     return hint("image", container_id)
Esempio n. 4
0
def from_map(map_key):
    'use resolved map as image'
    image_id = utils.plash_call('map', map_key)
    if not image_id:
        raise MapDoesNotExist('map {} not found'.format(repr(map_key)))
    return hint('image', image_id)
Esempio n. 5
0
def from_id(image):
    'specify the image from an image id'
    return hint('image', image)
Esempio n. 6
0
def entrypoint(exec_path):
    "hint default command for this build"
    return hint("exec", exec_path)
Esempio n. 7
0
def entrypoint(exec_path):
    'hint default command for this build'
    return hint('exec', exec_path)
Esempio n. 8
0
def from_map(map_key):
    "use resolved map as image"
    image_id = utils.plash_call("map", map_key)
    if not image_id:
        raise MapDoesNotExist("map {} not found".format(repr(map_key)))
    return hint("image", image_id)
Esempio n. 9
0
def from_id(image):
    "specify the image from an image id"
    return hint("image", image)