From a4bedb01f60346b9abde13552bfdaef5fbbc4638 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 8 Dec 2019 13:00:42 +0100 Subject: [PATCH] [api] begin to move to configparser --- ucloud/api/create_image_store.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ucloud/api/create_image_store.py b/ucloud/api/create_image_store.py index 17fa63c..259b9c8 100755 --- a/ucloud/api/create_image_store.py +++ b/ucloud/api/create_image_store.py @@ -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))