'Creates a test that confirms expected available images.
Returns:
st.OperationContract'

def list_available_images(self):

    logger = logging.getLogger(__name__)
    context = citest.base.ExecutionContext()
    gcp_agent = self.gcp_observer
    JournalLogger.begin_context('Collecting    expected    available    images')
    relation_context = 'ERROR'
    try:
        logger.debug('Looking    up    available    images.')
        json_doc = gcp_agent.list_resource(context, 'images')
        for project in GCP_STANDARD_IMAGES.keys():
            logger.info('Looking    for    images    from    project=%s', project)
            found = gcp_agent.list_resource(context, 'images', project=project)
            for image in found:
                if (not image.get('deprecated', None)):
                    json_doc.append(image)
        spinnaker_account = self.bindings['SPINNAKER_GOOGLE_ACCOUNT']
        logger.debug('Configured    with    Spinnaker    account    "%s"', spinnaker_account)
        expect_images = [{'account': spinnaker_account, 'imageName': image['name']} for image in json_doc]
        expect_images = sorted(expect_images, key=(lambda k: k['imageName']))
        relation_context = 'VALID'
    finally:
        JournalLogger.end_context(relation=relation_context)
    builder = HttpContractBuilder(self.agent)
    builder.new_clause_builder('Has    Expected    Images').get_url_path('/gce/images/find').EXPECT(ov_factory.value_list_matches([jp.DICT_SUBSET(image_entry) for image_entry in expect_images], strict=True, unique=True))
    return st.OperationContract(NoOpOperation('List    Available    Images'), contract=builder.build())
