2019-10-25 11:42:40 +05:00
|
|
|
import json
|
|
|
|
import os
|
2019-12-03 16:49:10 +05:00
|
|
|
|
2019-10-25 11:42:40 +05:00
|
|
|
from uuid import uuid4
|
|
|
|
|
2020-01-09 00:40:05 +05:00
|
|
|
from uncloud.common.shared import shared
|
2019-10-25 11:42:40 +05:00
|
|
|
|
|
|
|
data = {
|
2020-01-05 18:31:48 +05:00
|
|
|
'is_public': True,
|
|
|
|
'type': 'ceph',
|
|
|
|
'name': 'images',
|
|
|
|
'description': 'first ever public image-store',
|
|
|
|
'attributes': {'list': [], 'key': [], 'pool': 'images'},
|
2019-10-25 11:42:40 +05:00
|
|
|
}
|
|
|
|
|
2019-12-30 14:35:07 +05:00
|
|
|
shared.etcd_client.put(
|
2020-01-13 05:57:41 +01:00
|
|
|
os.path.join(shared.settings['etcd']['image_store_prefix'], uuid4().hex),
|
2019-12-30 14:35:07 +05:00
|
|
|
json.dumps(data),
|
|
|
|
)
|