Efforts to make ucloud a python package
This commit is contained in:
parent
bbe09667a6
commit
1e7300b56e
71 changed files with 241 additions and 1043 deletions
15
ucloud/api/create_image_store.py
Executable file
15
ucloud/api/create_image_store.py
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
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))
|
||||
Loading…
Add table
Add a link
Reference in a new issue