forked from uncloud/uncloud
renamed argument, and changed destination and make it required (uncloud.cli.image.create_image_from_file)
This commit is contained in:
parent
7fff280c79
commit
6f51ddbb36
2 changed files with 7 additions and 7 deletions
|
@ -7,14 +7,14 @@ from uncloud.shared import shared
|
|||
from uncloud.settings import settings
|
||||
|
||||
data = {
|
||||
"is_public": True,
|
||||
"type": "ceph",
|
||||
"name": "images",
|
||||
"description": "first ever public image-store",
|
||||
"attributes": {"list": [], "key": [], "pool": "images"},
|
||||
'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),
|
||||
os.path.join(settings['etcd']['image_store_prefix'], uuid4().hex),
|
||||
json.dumps(data),
|
||||
)
|
||||
|
|
|
@ -12,7 +12,7 @@ class ImageParser(BaseParser):
|
|||
p = self.subparser.add_parser('create', **kwargs)
|
||||
p.add_argument('--name', required=True)
|
||||
p.add_argument('--uuid', required=True)
|
||||
p.add_argument('--image-store-name', default='image_store')
|
||||
p.add_argument('--image-store', required=True, dest='image_store')
|
||||
|
||||
def list(self, **kwargs):
|
||||
self.subparser.add_parser('list', **kwargs)
|
||||
|
|
Loading…
Reference in a new issue