meow
6fa77bce4d
Remove individual config.py used by every component and put them into single config.py ucloud/config.py Use /etc/ucloud/ucloud.conf for Environment Variables Refactoring and a lot of it Make ucloud repo a package and different components of ucloud a subpackage for avoiding code duplication. Improved logging.
15 lines
375 B
Python
Executable file
15 lines
375 B
Python
Executable file
import json
|
|
import os
|
|
from uuid import uuid4
|
|
|
|
from 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))
|