ucloud-{api,scheduler,host,filescanner,imagescanner,metadata} combined

This commit is contained in:
ahmadbilalkhalid 2019-10-25 11:42:40 +05:00
commit da77ac65eb
29 changed files with 3941 additions and 0 deletions

17
api/create_image_store.py Executable file
View file

@ -0,0 +1,17 @@
import json
import os
from uuid import uuid4
from config import etcd_client as client
from config import IMAGE_STORE_PREFIX
data = {
"is_public": True,
"type": "ceph",
"name": "images",
"description": "first ever public image-store",
"attributes": {"list": [], "key": [], "pool": "images"},
}
client.put(os.path.join(IMAGE_STORE_PREFIX, uuid4().hex), json.dumps(data))