def get_instance_type_by_name(name, ctxt=None):
 if (name is None):
  return get_default_instance_type()
 if (ctxt is None):
  ctxt = context.get_admin_context()
 return db.instance_type_get_by_name(ctxt, name)

def get_instance_type_by_name ( name , ctxt = None ) : if ( name is None ) : return get_default_instance_type ( ) if ( ctxt is None ) : ctxt = context . get_admin_context ( ) return db . instance_type_get_by_name ( ctxt , name )
retrieves single instance type by name .