forked from uncloud/uncloud
find ucloud -name \*.py -exec sed -i "s/ucloud/uncloud/g" {} \;
This commit is contained in:
parent
70c8da544e
commit
7b6c02b3ab
68 changed files with 0 additions and 0 deletions
20
uncloud/api/create_image_store.py
Executable file
20
uncloud/api/create_image_store.py
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
import json
|
||||
import os
|
||||
|
||||
from uuid import uuid4
|
||||
|
||||
from ucloud.shared import shared
|
||||
from ucloud.settings import settings
|
||||
|
||||
data = {
|
||||
"is_public": True,
|
||||
"type": "ceph",
|
||||
"name": "images",
|
||||
"description": "first ever public image-store",
|
||||
"attributes": {"list": [], "key": [], "pool": "images"},
|
||||
}
|
||||
|
||||
shared.etcd_client.put(
|
||||
os.path.join(settings["etcd"]["image_store_prefix"], uuid4().hex),
|
||||
json.dumps(data),
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue