summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1662236)
environments with many registered Docker images.
Change-Id: I27880b3530da088ab83a5bb5eb8d2946639d7ee0
Signed-off-by: peusterm <manuel.peuster@uni-paderborn.de>
for image in self.dcli.images.list():
if len(image.tags) > 0:
for t in image.tags:
for image in self.dcli.images.list():
if len(image.tags) > 0:
for t in image.tags:
- # only use short tag names for OSM compatibility
- t = t.replace(":latest", "")
if t not in self._images:
self._images[t] = Image(t)
return self._images
if t not in self._images:
self._images[t] = Image(t)
return self._images
def get(self):
LOG.debug("API CALL: %s GET" % str(self.__class__.__name__))
try:
def get(self):
LOG.debug("API CALL: %s GET" % str(self.__class__.__name__))
try:
+ img_list = self.api.compute.images.values()
+ LOG.debug("Found {} Docker images: {}".format(
+ len(img_list), [i.name for i in img_list]))
resp = dict()
# resp['next'] = None
resp['first'] = "/v2/images"
resp['schema'] = "/v2/schemas/images"
resp['images'] = list()
resp = dict()
# resp['next'] = None
resp['first'] = "/v2/images"
resp['schema'] = "/v2/schemas/images"
resp['images'] = list()
- limit = 18
- c = 0
- for image in self.api.compute.images.values():
f = dict()
f['id'] = image.id
f['name'] = str(image.name).replace(":latest", "")
f = dict()
f['id'] = image.id
f['name'] = str(image.name).replace(":latest", "")
f['virtual_size'] = 1
f['marker'] = None
resp['images'].append(f)
f['virtual_size'] = 1
f['marker'] = None
resp['images'].append(f)
- c += 1
- if c > limit: # ugly hack to stop buggy glance client to do infinite requests
- break
if "marker" in request.args: # ugly hack to fix pageination of openstack client
resp['images'] = None
return Response(json.dumps(resp), status=200,
if "marker" in request.args: # ugly hack to fix pageination of openstack client
resp['images'] = None
return Response(json.dumps(resp), status=200,