'List available images (templates).'

@wrap_non_libcloud_exceptions
def list_images(self):

    server = self.connection.client
    names = ['name', 'config.uuid', 'config.template']
    properties = server._retrieve_properties_traversal(property_names=names, from_node=None, obj_type=MORTypes.VirtualMachine)
    images = []
    for prop in properties:
        id = None
        name = None
        is_template = False
        for item in prop.PropSet:
            if (item.Name == 'config.uuid'):
                id = item.Val
            if (item.Name == 'name'):
                name = item.Val
            elif (item.Name == 'config.template'):
                is_template = item.Val
        if is_template:
            image = NodeImage(id=id, name=name, driver=self)
            images.append(image)
        return images
