Revision 07150497 lib/cli.py

b/lib/cli.py
158 158
  "OPT_COMPL_ONE_OS",
159 159
  "cli_option",
160 160
  "SplitNodeOption",
161
  "CalculateOSNames",
161 162
  ]
162 163

  
163 164
NO_PREFIX = "no_"
......
971 972
    return (value, None)
972 973

  
973 974

  
975
def CalculateOSNames(os_name, os_variants):
976
  """Calculates all the names an OS can be called, according to its variants.
977

  
978
  @type os_name: string
979
  @param os_name: base name of the os
980
  @type os_variants: list or None
981
  @param os_variants: list of supported variants
982
  @rtype: list
983
  @return: list of valid names
984

  
985
  """
986
  if os_variants:
987
    return ['%s+%s' % (os_name, v) for v in os_variants]
988
  else:
989
    return [os_name]
990

  
991

  
974 992
def UsesRPC(fn):
975 993
  def wrapper(*args, **kwargs):
976 994
    rpc.Init()

Also available in: Unified diff