Example #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)
Example #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)
Example #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)
Example #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)
Example #5
0
def from_id(image):
    'specify the image from an image id'
    return hint('image', image)
Example #6
0
def entrypoint(exec_path):
    "hint default command for this build"
    return hint("exec", exec_path)
Example #7
0
def entrypoint(exec_path):
    'hint default command for this build'
    return hint('exec', exec_path)
Example #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)
Example #9
0
def from_id(image):
    "specify the image from an image id"
    return hint("image", image)