forked from uncloud/uncloud
16 lines
383 B
Python
Executable file
16 lines
383 B
Python
Executable file
import json
|
|
import os
|
|
|
|
from uuid import uuid4
|
|
|
|
from ucloud.config import etcd_client, env_vars
|
|
|
|
data = {
|
|
"is_public": True,
|
|
"type": "ceph",
|
|
"name": "images",
|
|
"description": "first ever public image-store",
|
|
"attributes": {"list": [], "key": [], "pool": "images"},
|
|
}
|
|
|
|
etcd_client.put(os.path.join(env_vars.get('IMAGE_STORE_PREFIX'), uuid4().hex), json.dumps(data))
|