Refactoring, Removal of most global vars, config default path is ~/ucloud/
This commit is contained in:
parent
bc58a6ed9c
commit
04993e4106
23 changed files with 673 additions and 726 deletions
|
|
@ -3,7 +3,8 @@ import os
|
|||
|
||||
from uuid import uuid4
|
||||
|
||||
from ucloud.config import etcd_client, config
|
||||
from ucloud.shared import shared
|
||||
from ucloud.settings import settings
|
||||
|
||||
data = {
|
||||
"is_public": True,
|
||||
|
|
@ -13,4 +14,4 @@ data = {
|
|||
"attributes": {"list": [], "key": [], "pool": "images"},
|
||||
}
|
||||
|
||||
etcd_client.put(os.path.join(config['etcd']['image_store_prefix'], uuid4().hex), json.dumps(data))
|
||||
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