'List images on Abiquo Repositories
:keyword location: The location to list images for.
:type    location: :class:`NodeLocation`
:return:           list of node image objects
:rtype:            ``list`` of :class:`NodeImage`'

def list_images(self, location=None):

    enterprise_id = self._get_enterprise_id()
    uri = ('/admin/enterprises/%s/datacenterrepositories/' % enterprise_id)
    repos_hdr = {'Accept': self.DCRS_MIME_TYPE}
    repos = self.connection.request(uri, headers=repos_hdr).object
    images = []
    for repo in repos.findall('datacenterRepository'):
        for vdc in self._get_locations(location):
            link_vdc = self.connection.cache['locations'][vdc]
            hdr_vdc = {'Accept': self.VDC_MIME_TYPE}
            e_vdc = self.connection.request(link_vdc, headers=hdr_vdc).object
            dc_link_vdc = get_href(e_vdc, 'location')
            dc_link_repo = get_href(repo, 'datacenter')
            if (dc_link_vdc.split('/')[(-1)] == dc_link_repo.split('/')[(-1)]):
                url_templates = get_href(repo, 'virtualmachinetemplates')
                hypervisor_type = e_vdc.findtext('hypervisorType')
                params = {'hypervisorTypeName': hypervisor_type}
                headers = {'Accept': self.VMTPLS_MIME_TYPE}
                templates = self.connection.request(url_templates, params, headers=headers).object
                for templ in templates.findall('virtualMachineTemplate'):
                    id_template = templ.findtext('id')
                    ids = [image.id for image in images]
                    if (id_template not in ids):
                        images.append(self._to_nodeimage(templ, self, get_href(repo, 'edit')))
    return images
