[api] begin to move to configparser

This commit is contained in:
Nico Schottelius 2019-12-08 13:00:42 +01:00
parent 6d0ce65f5c
commit a4bedb01f6

View file

@ -3,7 +3,7 @@ import os
from uuid import uuid4
from ucloud.config import etcd_client, env_vars
from ucloud.config import etcd_client, config
data = {
"is_public": True,
@ -13,4 +13,4 @@ data = {
"attributes": {"list": [], "key": [], "pool": "images"},
}
etcd_client.put(os.path.join(env_vars.get('IMAGE_STORE_PREFIX'), uuid4().hex), json.dumps(data))
etcd_client.put(os.path.join(config['api']['IMAGE_STORE_PREFIX'], uuid4().hex), json.dumps(data))