forked from uncloud/uncloud
17 lines
416 B
Python
Executable file
17 lines
416 B
Python
Executable file
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))
|