Revision 1bdcbbab lib/backend.py

b/lib/backend.py
1930 1930
  return payload
1931 1931

  
1932 1932

  
1933
def OSCoreEnv(inst_os, debug=0):
1933
def OSCoreEnv(inst_os, os_params, debug=0):
1934 1934
  """Calculate the basic environment for an os script.
1935 1935

  
1936 1936
  @type inst_os: L{objects.OS}
1937 1937
  @param inst_os: operating system for which the environment is being built
1938
  @type os_params: dict
1939
  @param os_params: the OS parameters
1938 1940
  @type debug: integer
1939 1941
  @param debug: debug level (0 or 1, for OS Api 10)
1940 1942
  @rtype: dict
......
1958 1960
      variant = inst_os.supported_variants[0]
1959 1961
    result['OS_VARIANT'] = variant
1960 1962

  
1963
  # OS params
1964
  for pname, pvalue in os_params.items():
1965
    result['OSP_%s' % pname.upper()] = pvalue
1966

  
1961 1967
  return result
1962 1968

  
1963 1969

  
......
1976 1982
      cannot be found
1977 1983

  
1978 1984
  """
1979
  result = OSCoreEnv(inst_os, debug)
1985
  result = OSCoreEnv(inst_os, instance.osparams, debug=debug)
1980 1986

  
1981 1987
  result['INSTANCE_NAME'] = instance.name
1982 1988
  result['INSTANCE_OS'] = instance.os

Also available in: Unified diff