def do_list(self, args):
        try:
            #call UForge API
            #get images
            printer.out("Getting all images and publications for ["+self.login+"] ...")
            images = self.api.Users(self.login).Images.Get()
            images = images.images.image
            #get publications
            pimages = self.api.Users(self.login).Pimages.Get()
            pimages = pimages.publishImages.publishImage
            if images is None or len(images) == 0:
                printer.out("No images available")
            else:
                printer.out("Images:")
                table = Texttable(800)
                table.set_cols_dtype(["t","t","t","t","t","t","t","c","t"])
                table.header(["Id", "Name", "Version", "Rev.", "Format", "Created", "Size", "Compressed", "Generation Status"])
                images = generics_utils.order_list_object_by(images, "name")
                for image in images:
                    imgStatus=self.get_image_status(image.status)
                    table.add_row([image.dbId, image.name, image.version, image.revision, image.targetFormat.name, image.created.strftime("%Y-%m-%d %H:%M:%S"), size(image.size), "X" if image.compress else "", imgStatus])
                print table.draw() + "\n"
                printer.out("Found "+str(len(images))+" images")

            if pimages is None or not hasattr(pimages, 'get_publishImage'):
                printer.out("No publication available")
            else:
                printer.out("Publications:")
                table = Texttable(800)
                table.set_cols_dtype(["t","t","t","t","t","t"])
                table.header(["Template name", "Image ID","Account name", "Format", "Cloud ID", "Status"])
                pimages = generics_utils.order_list_object_by(pimages.get_publishImage(), "name")
                for pimage in pimages:
                    pubStatus=self.get_publish_status(pimage.status)
                    table.add_row([pimage.name, generics_utils.extract_id(pimage.imageUri), pimage.credAccount.name if pimage.credAccount is not None else "-", generate_utils.map_format(pimage.format.name), pimage.cloudId if pimage.cloudId is not None else "-", pubStatus])
                print table.draw() + "\n"
                printer.out("Found "+str(len(pimages))+" publications")

            return 0
        except ArgumentParserError as e:
            printer.out("ERROR: In Arguments: "+str(e), printer.ERROR)
            self.help_list()
        except Exception as e:
            return handle_uforge_exception(e)
dataset/ETHPy150Open usharesoft/hammr/src/hammr/commands/image/image.py/Image.do_list/original