2019-08-01 15:04:40 +05:00
|
|
|
import json
|
|
|
|
from uuid import uuid4
|
2019-09-03 18:01:40 +02:00
|
|
|
from config import etcd_client as client
|
2019-08-01 15:04:40 +05:00
|
|
|
|
|
|
|
|
|
|
|
data = {
|
|
|
|
"is_public": True,
|
|
|
|
"type": "ceph",
|
|
|
|
"name": "images",
|
|
|
|
"description": "first ever public image-store",
|
|
|
|
"attributes": {
|
|
|
|
"list": [],
|
|
|
|
"key": [],
|
|
|
|
"pool": "images",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
client.put(
|
|
|
|
f"/v1/image_store/{uuid4().hex}",
|
|
|
|
json.dumps(data),
|
|
|
|
)
|