'List available VM images to boot from.
:param location: The location at which to list images
(if None, use default location specified as \'region\' in __init__)
:type location: :class:`.NodeLocation`
:param ex_publisher: Filter by publisher, or None to list
all publishers.
:type ex_publisher: ``str``
:param ex_offer: Filter by offer, or None to list all offers.
:type ex_offer: ``str``
:param ex_sku: Filter by sku, or None to list all skus.
:type ex_sku: ``str``
:param ex_version: Filter by version, or None to list all versions.
:type ex_version: ``str``
:return: list of node image objects.
:rtype: ``list`` of :class:`.AzureImage`'

def list_images(self, location=None, ex_publisher=None, ex_offer=None, ex_sku=None, ex_version=None):

    images = []
    if (location is None):
        locations = [self.default_location]
    else:
        locations = [location]
    for loc in locations:
        if (not ex_publisher):
            publishers = self.ex_list_publishers(loc)
        else:
            publishers = [(('/subscriptions/%s/providers/Microsoft.Compute/locations/%s/publishers/%s' % (self.subscription_id, loc.id, ex_publisher)), ex_publisher)]
        for pub in publishers:
            if (not ex_offer):
                offers = self.ex_list_offers(pub[0])
            else:
                offers = [(('%s/artifacttypes/vmimage/offers/%s' % (pub[0], ex_offer)), ex_offer)]
            for off in offers:
                if (not ex_sku):
                    skus = self.ex_list_skus(off[0])
                else:
                    skus = [(('%s/skus/%s' % (off[0], ex_sku)), ex_sku)]
                for sku in skus:
                    if (not ex_version):
                        versions = self.ex_list_image_versions(sku[0])
                    else:
                        versions = [(('%s/versions/%s' % (sku[0], ex_version)), ex_version)]
                    for v in versions:
                        images.append(AzureImage(v[1], sku[1], off[1], pub[1], loc.id, self.connection.driver))
    return images
