Class: UuAppstudio::Cmd::OperatingEnvironmentCreateController

Inherits:
UU::OS::CMD::AsyncCommandController
  • Object
show all
Defined in:
app/controllers/operating_environment/create.rb

Constant Summary

CONTROLLER_URL_PATH =
'OperatingEnvironment/create'

Instance Method Summary collapse

Instance Method Details

#on_exec(ctx) ⇒ Object

Parameters:

  • ctx (UU::OS::CMD::CommandContext)


13
14
15
16
17
18
19
20
21
# File 'app/controllers/operating_environment/create.rb', line 13

def on_exec(ctx)
  UuAppstudio::Cmd::InputMethods.cmd(ctx) do
    # territory_uri = prepare_data(ctx)
    # validate parameters
    # UuAppstudio::Model::OperatingEnvironment.create(territory_uri, {:dryRun => true}.merge(ctx.parameters))
    # get queue_uri from configuration
    return ctx.invoke_async(UuAppstudio::Cmd::Helpers.message_bus_uri)
  end
end

#on_exec_async(ctx) ⇒ Object

Parameters:

  • ctx (UU::OS::CMD::CommandContext)


24
25
26
27
28
29
# File 'app/controllers/operating_environment/create.rb', line 24

def on_exec_async(ctx)
  UuAppstudio::Cmd::InputMethods.cmd(ctx) do
    terr_uri = prepare_data(ctx)
    return UuAppstudio::Model::OperatingEnvironment.create(terr_uri, ctx.parameters)
  end
end