Revision bcebdfef kamaki/clients/image.py
b/kamaki/clients/image.py | ||
---|---|---|
101 | 101 |
r = self.post(path, success=200) |
102 | 102 |
r.release() |
103 | 103 |
|
104 |
def reregister(self, location, name=None, params={}, properties={}): |
|
105 |
path = path4url('images', 'detail') |
|
106 |
r = self.get(path, success=200) |
|
107 |
imgs = [img for img in r.json if img['location'] == location] |
|
108 |
for img in imgs: |
|
109 |
img_name = name if name else img['name'] |
|
110 |
img_properties = img['properties'] |
|
111 |
for k, v in properties.items(): |
|
112 |
img_properties[k] = v |
|
113 |
self.register(img_name, location, params, img_properties) |
|
114 |
|
|
104 | 115 |
def list_members(self, image_id): |
105 | 116 |
path = path4url('images', image_id, 'members') |
106 | 117 |
r = self.get(path, success=200) |
Also available in: Unified diff