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-maestrodev-1.20.0.20140305101839 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/vcloud/requests/compute/undeploy.rb
fog-1.20.0 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/vcloud/requests/compute/undeploy.rb
fog-1.19.0 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.18.0.20131209090811 lib/fog/vcloud/requests/compute/undeploy.rb
fog-maestrodev-1.18.0.20131206115947 lib/fog/vcloud/requests/compute/undeploy.rb