Class: Vcloud::CLI::Utils::StartVapp
- Inherits:
-
Object
- Object
- Vcloud::CLI::Utils::StartVapp
- Includes:
- Methadone::CLILogging, Methadone::Main
- Defined in:
- lib/vcloud/cli/utils/start_vapp.rb
Class Method Summary collapse
Class Method Details
.run ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/vcloud/cli/utils/start_vapp.rb', line 13 def self.run main do |identifier| vcloud = ::Fog::Compute::VcloudDirector.new if identifier =~ /^vapp-[-0-9a-f]+/ vapp = Vcloud::Core::Vapp.new(identifier) else vapp = Vcloud::Core::Vapp.get_by_name(identifier) end Fog.mock! if ENV['FOG_MOCK'] task = vcloud.post_deploy_vapp(vapp.id).body vcloud.process_task(task) end arg :identifier description " " go! end |