Sha256: 35e8914510e836049327eeae7ec8437f9c2fbf51bfe095bfa0e19e9d971f5365

Contents?: true

Size: 1.01 KB

Versions: 43

Compression:

Stored size: 1.01 KB

Contents

module Fog
  module Vcloud
    class Compute
      module Shared
        private

        def generate_configure_node_request(node_data)
          builder = Builder::XmlMarkup.new
          builder.NodeService(:"xmlns:i" => "http://www.w3.org/2001/XMLSchema-instance",
                                  :xmlns => "urn:tmrk:eCloudExtensions-2.0") {
            builder.Name(node_data[:name])
            builder.Enabled(node_data[:enabled].to_s)
            builder.Description(node_data[:description])
          }
        end
      end

      class Real
        include Shared

        def configure_node(node_uri, node_data)
          validate_node_data(node_data, true)

          request(
            :body     => generate_configure_node_request(node_data),
            :expects  => 200,
            :headers  => {'Content-Type' => 'application/vnd.vmware.vcloud.nodeService+xml'},
            :method   => 'PUT',
            :uri      => node_uri,
            :parse    => true
          )
        end
      end
    end
  end
end

Version data entries

43 entries across 41 versions & 6 rubygems

Version Path
fog-2.3.0 lib/fog/vcloud/requests/compute/configure_node.rb
fog-ifeel-2.2.0 lib/fog/vcloud/requests/compute/configure_node.rb
fog-2.2.0 lib/fog/vcloud/requests/compute/configure_node.rb
fog-2.1.0 lib/fog/vcloud/requests/compute/configure_node.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-1.42.1/lib/fog/vcloud/requests/compute/configure_node.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-1.42.1/lib/fog/vcloud/requests/compute/configure_node.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-1.42.1/lib/fog/vcloud/requests/compute/configure_node.rb
fog-1.42.1 lib/fog/vcloud/requests/compute/configure_node.rb
fog-2.0.0 lib/fog/vcloud/requests/compute/configure_node.rb
fog-1.42.0 lib/fog/vcloud/requests/compute/configure_node.rb
fog-1.41.0 lib/fog/vcloud/requests/compute/configure_node.rb
fog-1.40.0 lib/fog/vcloud/requests/compute/configure_node.rb
fog-1.39.0 lib/fog/vcloud/requests/compute/configure_node.rb
fog-1.38.0 lib/fog/vcloud/requests/compute/configure_node.rb
fog-1.37.0 lib/fog/vcloud/requests/compute/configure_node.rb
fog-1.36.0 lib/fog/vcloud/requests/compute/configure_node.rb
fog-1.35.0 lib/fog/vcloud/requests/compute/configure_node.rb
fog-2.0.0.pre.0 lib/fog/vcloud/requests/compute/configure_node.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/lib/fog/vcloud/requests/compute/configure_node.rb
fog-1.34.0 lib/fog/vcloud/requests/compute/configure_node.rb