18 lines
393 B
Python
18 lines
393 B
Python
|
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))
|