Sha256: ee6698eb04254db6fc84f43495efd50486ec43a70f07d877487f99bca54af4f6

Contents?: true

Size: 1.02 KB

Versions: 2

Compression:

Stored size: 1.02 KB

Contents

module Solusvm
  # Solusvm::General is the class for retrieving general information.
  class General < Base
    
    # Lists available templates.
    #
    # Parameters:
    #
    # * +type+ - a valid virtualization type; e.g: [openvz|xen|xen hvm|kvm]
    def templates(type)
      validate_server_type!(type)
      perform_request(:action => 'listtemplates', :type => type)
      returned_parameters['templates'].split(',')
    end

    # Lists available plans.
    #
    # Parameters:
    #
    # * +type+ - a valid virtualization type; e.g: [openvz|xen|xen hvm|kvm]
    def plans(type)
      validate_server_type!(type)
      perform_request(:action => 'listplans', :type => type)
      returned_parameters['plans'].split(',')
    end

    # Lists available isos.
    #
    # Parameters:
    #
    # * +type+ - a valid virtualization type; e.g: [openvz|xen|xen hvm|kvm]
    def isos(type)
      validate_server_type!(type)
      perform_request(:action => 'listiso', :type => type)
      returned_parameters['iso'].split(',')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
solusvm-1.0.0.beta2 lib/solusvm/general.rb
solusvm-1.0.0.beta lib/solusvm/general.rb