def get_tags(namespace, repository): tags = [] tag_path = store.tag_path(namespace, repository) for tag_file in store.list_directory(tag_path): full_tag_name = tag_file.split("/")[-1] if not full_tag_name.startswith("tag_"): continue tag = {} tag_name = full_tag_name[4:] tag_raw = store.get_content(store.tag_path(namespace, repository, tag_name)) tag_json = json.loads(tag_raw) tag["name"] = tag_name tag["application_id"] = tag_json["application_id"] tags.append(tag) return response(tags)
def get_repository_json(namespace, repository): return response(store.get_content( store.repository_json_path(namespace, repository)), raw=True)
def delete_repository_applications(namespace, repository): return response('', 204)
def get_repository_applications(namespace, repository): return response({})
def put_repository(namespace, repository, applications=False): return response('', 204)
def ping(): return response()
def get_application_json(app_id): return response(store.get_content(store.application_json_path(app_id)), raw=True)
def delete_tag(namespace, repository, tag): return response("", 204)
def put_tag(namespace, repository, tag): return response("", 204)
def get_application_ancestry(app_id): return response(store.get_content(store.application_ancestry_path(app_id)), raw=True)
def get_application_checksum(app_id): return response(store.get_content(store.application_checksum_path(app_id)), raw=True)
def put_application_checksum(app_id): return response('', 204)
def put_application_json(app_id): return response('', 204)
def delete_repository(namespace, repository): return response("", 204)
def root(): cfg = config.load() return response('Peer Registry ({0})'.format(cfg.flavor))
def get_repository_json(namespace, repository): return response(store.get_content(store.repository_json_path(namespace, repository)), raw=True)
def put_application_layer(app_id): return response('', 204)