class OpStack::Commands::Env

Public Instance Methods

export(environment) click to toggle source
# File lib/opstack/commands.rb, line 7
def export(environment)
  data = OpStack::Environment::Chef.new.export(environment)
  if data
    OpStack::Exporter.new.run(OpStack.config[:export_prefix],data)
  else
    raise Thor::Error, "Could not export Environment"
  end
end
import(environment, file) click to toggle source
# File lib/opstack/commands.rb, line 17
def import(environment, file)
  if OpStack::Environment::Chef.new.import(environment, file)
    say("#{environment} Imported.")
  else
    raise Thor::Error, "Could not import #{environment} from #{file}"
  end
end