methods/ai_questions.rb
# Populate array of structs containing AI manifest questions
Populate array of structs containing AI manifest questions
Populate array of structs containing AI manifest questions
def populate_ai_manifest_questions(options)
  qs = Struct.new(:question, :ask, :value, :valid, :eval)
  name = "auto_reboot"
  config = qs.new(
    question  = "Reboot after installation",
    ask       = "yes",
    value     = "true",
    valid     = "true,false",
    eval      = "no"
    )
  options['q_struct'][name] = config
  options['q_order'].push(name)
  name = "headless_mode"
  config = qs.new(
    question  = "Headless mode",
    ask       = "yes",
    value     = options['headless'].to_s.downcase,
    valid     = "",
    eval      = "no"
    )
  options['q_struct'][name] = config
  options['q_order'].push(name)
  name    = "ai_publisherurl"
  options = get_ai_publisherurl(options)
  config = qs.new(
    question  = "Publisher URL",
    ask       = "yes",
    value     = options['publisherurl'],
    valid     = "",
    eval      = "no"
    )
  options['q_struct'][name] = config
  options['q_order'].push(name)
  name = "server_install"
  config = qs.new(
    question  = "Server install",
    ask       = "yes",
    value     = "pkg:/group/system/solaris-"+options['size']+"-server",
    valid     = "pkg:/group/system/solaris-large-server,pkg:/group/system/solaris-small-server",
    eval      = "no"
    )
  options['q_struct'][name] = config
  options['q_order'].push(name)
  name = "repo_url"
  repo_url = get_ai_repo_url(options)
  config = qs.new(
    question  = "Solaris repository version",
    ask       = "yes",
    value     = repo_url,
    valid     = "",
    eval      = "no"
    )
  options['q_struct'][name] = config
  options['q_order'].push(name)
  return options
end
def populate_ai_manifest_questions ( options ) qs = Struct . new ( :question , :ask , :value , :valid , :eval ) name = "auto_reboot" config = qs . new ( question = "Reboot after installation" , ask = "yes" , value = "true" , valid = "true,false" , eval = "no" ) options [ 'q_struct' ] [ name ] = config options [ 'q_order' ] . push ( name ) name = "headless_mode" config = qs . new ( question = "Headless mode" , ask = "yes" , value = options [ 'headless' ] . to_s . downcase , valid = "" , eval = "no" ) options [ 'q_struct' ] [ name ] = config options [ 'q_order' ] . push ( name ) name = "ai_publisherurl" options = get_ai_publisherurl ( options ) config = qs . new ( question = "Publisher URL" , ask = "yes" , value = options [ 'publisherurl' ] , valid = "" , eval = "no" ) options [ 'q_struct' ] [ name ] = config options [ 'q_order' ] . push ( name ) name = "server_install" config = qs . new ( question = "Server install" , ask = "yes" , value = "pkg:/group/system/solaris-" + options [ 'size' ] + "-server" , valid = "pkg:/group/system/solaris-large-server,pkg:/group/system/solaris-small-server" , eval = "no" ) options [ 'q_struct' ] [ name ] = config options [ 'q_order' ] . push ( name ) name = "repo_url" repo_url = get_ai_repo_url ( options ) config = qs . new ( question = "Solaris repository version" , ask = "yes" , value = repo_url , valid = "" , eval = "no" ) options [ 'q_struct' ] [ name ] = config options [ 'q_order' ] . push ( name ) return options end
Populate array of structs containing AI manifest questions
Populate array of structs containing AI manifest questions
options
<not_specific>