Sha256: c75b729e7e92d56b845afdbfb15bf362ebf659ab6b411a9304af4edefb6183f9

Contents?: true

Size: 1.05 KB

Versions: 9

Compression:

Stored size: 1.05 KB

Contents

module Fog
  module Compute
    class Cloudstack
      class Real

        # Creates and automatically starts a virtual machine based on a service offering, disk offering, and template.
        #
        # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/deployVirtualMachine.html]
        def deploy_virtual_machine(options={})
          options.merge!(
            'command' => 'deployVirtualMachine'
          )

          if ( securitygroupids = options.delete('securitygroupids') ).is_a?(Array)
            options.merge!('securitygroupids' => securitygroupids.join(','))
          end
          
          if ( securitygroupnames = options.delete('securitygroupnames') ).is_a?(Array)
            options.merge!('securitygroupnames' => securitygroupnames.join(','))
          end
          
          if ( networkids = options.delete('networkids') ).is_a?(Array)
            options.merge!('networkids' => networkids.join(','))
          end
          
          
          request(options)
        end

      end
    end
  end
end

Version data entries

9 entries across 9 versions & 5 rubygems

Version Path
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/lib/fog/cloudstack/requests/compute/deploy_virtual_machine.rb
michiels-fog-1.3.1 lib/fog/cloudstack/requests/compute/deploy_virtual_machine.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/cloudstack/requests/compute/deploy_virtual_machine.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/cloudstack/requests/compute/deploy_virtual_machine.rb
fog-1.3.1 lib/fog/cloudstack/requests/compute/deploy_virtual_machine.rb
fog-1.3.0 lib/fog/cloudstack/requests/compute/deploy_virtual_machine.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/cloudstack/requests/compute/deploy_virtual_machine.rb
fog-1.2.0 lib/fog/cloudstack/requests/compute/deploy_virtual_machine.rb
ktheory-fog-1.1.2 lib/fog/cloudstack/requests/compute/deploy_virtual_machine.rb