Sha256: 190aef2fce1328997e8cf2cfbe919b29e05effec51efc52698f67cb2d9fcd871

Contents?: true

Size: 1.14 KB

Versions: 74

Compression:

Stored size: 1.14 KB

Contents

module Fog
  module Vcloud
    class Compute
      class Real
        def undeploy(vapp_uri, save_state = false)
          # builder = Builder::XmlMarkup.new
          # builder.UndeployVAppParams(:xmlns => 'http://www.vmware.com/vcloud/v1',
          #                            :saveState => save_state) {}
          builder = if version =='1.0' 
                        "<UndeployVAppParams saveState=\"#{save_state.to_s}\" xmlns=\"http://www.vmware.com/vcloud/v1\"/>"
                    else
                       <<EOF 
                        <UndeployVAppParams xmlns="http://www.vmware.com/vcloud/v1.5">
                        <UndeployPowerAction>shutdown</UndeployPowerAction>
                        </UndeployVAppParams>

EOF
                    end
          request(
                  :body     => builder,
                  :expects  => 202,
                  :headers  => {'Content-Type' => 'application/vnd.vmware.vcloud.undeployVAppParams+xml' },
                  :method   => 'POST',
                  :uri      => vapp_uri + '/action/undeploy',
                  :parse    => true
                  )
        end
      end
    end
  end
end

Version data entries

74 entries across 74 versions & 11 rubygems

Version Path
fog-test-again-1.6.0 lib/fog/vcloud/requests/compute/undeploy.rb
fog-test-me-1.10.0 lib/fog/vcloud/requests/compute/undeploy.rb
fog-parser-fix-1.6.0 lib/fog/vcloud/requests/compute/undeploy.rb
fog-1.10.0 lib/fog/vcloud/requests/compute/undeploy.rb
fog-1.9.0 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.8.0.20130114204828 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.8.0.20130111070250 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.8.0.20130109172219 lib/fog/vcloud/requests/compute/undeploy.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/vcloud/requests/compute/undeploy.rb
fog-sgonyea-1.8.1 lib/fog/vcloud/requests/compute/undeploy.rb
fog-1.8.0 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.7.0.20121114190951 lib/fog/vcloud/requests/compute/undeploy.rb
fog-1.7.0 lib/fog/vcloud/requests/compute/undeploy.rb
fog-1.6.0 lib/fog/vcloud/requests/compute/undeploy.rb