original_docstring: Add glance config to context.
  
      :param ctxt: Context dictionary
      :type ctxt: dict
      :param keystone_session: keystoneauth1.session.Session object
      :type: keystoneauth1.session.Session
      :returns: None
      :rtype: None
      
docstring: Add glance config to context.
docstring_tokens: Add glance config to context .
code: def add_glance_config(ctxt, keystone_session):
      """Add glance config to context.
  
      :param ctxt: Context dictionary
      :type ctxt: dict
      :param keystone_session: keystoneauth1.session.Session object
      :type: keystoneauth1.session.Session
      :returns: None
      :rtype: None
      """
      glance_client = openstack_utils.get_glance_session_client(
          keystone_session)
      image = openstack_utils.get_images_by_name(
          glance_client, glance_setup.CIRROS_IMAGE_NAME)
      image_alt = openstack_utils.get_images_by_name(
          glance_client, glance_setup.CIRROS_ALT_IMAGE_NAME)
      if image:
          ctxt['image_id'] = image[0].id
      if image_alt:
          ctxt['image_alt_id'] = image_alt[0].id
code_tokens: def add_glance_config ( ctxt , keystone_session ) : glance_client = openstack_utils . get_glance_session_client ( keystone_session ) image = openstack_utils . get_images_by_name ( glance_client , glance_setup . CIRROS_IMAGE_NAME ) image_alt = openstack_utils . get_images_by_name ( glance_client , glance_setup . CIRROS_ALT_IMAGE_NAME ) if image : ctxt [ 'image_id' ] = image [ 0 ] . id if image_alt : ctxt [ 'image_alt_id' ] = image_alt [ 0 ] . id
short_docstring: Add glance config to context.
short_docstring_tokens: Add glance config to context .
comment: """Add glance config to context.
  
      :param ctxt: Context dictionary
      :type ctxt: dict
      :param keystone_session: keystoneauth1.session.Session object
      :type: keystoneauth1.session.Session
      :returns: None
      :rtype: None
      """