Sha256: d271aee6def356392ca0de16d4debb90662c479f2119e5ce458e9f6dd04cb0d3

Contents?: true

Size: 1.07 KB

Versions: 6

Compression:

Stored size: 1.07 KB

Contents

module SolusVM
  # SolusVM::General is the class for retrieving general information.
  class General < Base
    # Public: Lists available templates.
    #
    # type - a valid virtualization type; e.g: [openvz|xen|xen hvm|kvm]
    #
    # Returns an Array.
    def templates(type)
      validate_server_type(type) do
        perform_request(action: 'listtemplates', type: type)
        parse_returned_params_as_list('templates')
      end
    end

    # Public: Lists available plans.
    #
    # type - a valid virtualization type; e.g: [openvz|xen|xen hvm|kvm]
    #
    # Returns an Array.
    def plans(type)
      validate_server_type(type) do
        perform_request(action: 'listplans', type: type)
        parse_returned_params_as_list('plans')
      end
    end

    # Public: Lists available ISOS.
    #
    # type - a valid virtualization type; e.g: [openvz|xen|xen hvm|kvm]
    #
    # Returns an Array.
    def isos(type)
      validate_server_type(type) do
        perform_request(action: 'listiso', type: type)
        parse_returned_params_as_list('iso')
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
solusvm-2.0.1.beta6 lib/solusvm/general.rb
solusvm-2.0.0.beta6 lib/solusvm/general.rb
solusvm-2.0.0.beta5 lib/solusvm/general.rb
solusvm-2.0.0.beta4 lib/solusvm/general.rb
solusvm-2.0.0.beta2 lib/solusvm/general.rb
solusvm-2.0.0.beta1 lib/solusvm/general.rb