original_docstring: Add nova 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 nova config to context.
docstring_tokens: Add nova config to context .
code: def add_nova_config(ctxt, keystone_session):
      """Add nova 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
      """
      nova_client = openstack_utils.get_nova_session_client(
          keystone_session)
      for flavor in nova_client.flavors.list():
          if flavor.name == TEMPEST_FLAVOR_NAME:
              ctxt['flavor_ref'] = flavor.id
          if flavor.name == TEMPEST_ALT_FLAVOR_NAME:
              ctxt['flavor_ref_alt'] = flavor.id
code_tokens: def add_nova_config ( ctxt , keystone_session ) : nova_client = openstack_utils . get_nova_session_client ( keystone_session ) for flavor in nova_client . flavors . list ( ) : if flavor . name == TEMPEST_FLAVOR_NAME : ctxt [ 'flavor_ref' ] = flavor . id if flavor . name == TEMPEST_ALT_FLAVOR_NAME : ctxt [ 'flavor_ref_alt' ] = flavor . id
short_docstring: Add nova config to context.
short_docstring_tokens: Add nova config to context .
comment: """Add nova 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
      """