Skip to content

Commit

Permalink
Merge pull request #5 from adriagalin/master
Browse files Browse the repository at this point in the history
Add ssl options in rest connection. Thanks for this PR & sorry about time take to make merge :/
  • Loading branch information
nledez committed Nov 28, 2015
2 parents f926d5e + 1fe0d3c commit 5253732
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions lib/proxmox.rb
Expand Up @@ -16,20 +16,21 @@ class Proxmox
# Create a object to manage a Proxmox server through API
#
# :call-seq:
# new(pve_cluster, node, username, password, realm) -> Proxmox
# new(pve_cluster, node, username, password, realm, ssl_options) -> Proxmox
#
# Example:
#
# Proxmox::Proxmox.new('https://the-proxmox-server:8006/api2/json/', 'node', 'root', 'secret', 'pam')
# Proxmox::Proxmox.new('https://the-proxmox-server:8006/api2/json/', 'node', 'root', 'secret', 'pam', {verify_ssl: false})
#
def initialize(pve_cluster, node, username, password, realm)
def initialize(pve_cluster, node, username, password, realm, ssl_options = {})
@pve_cluster = pve_cluster
@node = node
@username = username
@password = password
@realm = realm
@ssl_options = ssl_options
@connection_status = 'error'
@site = RestClient::Resource.new(@pve_cluster)
@site = RestClient::Resource.new(@pve_cluster, @ssl_options)
@auth_params = create_ticket
end

Expand Down
2 changes: 1 addition & 1 deletion lib/proxmox/version.rb
@@ -1,5 +1,5 @@
# encoding: utf-8

module Proxmox
VERSION = '0.0.3'
VERSION = '0.0.4'
end

0 comments on commit 5253732

Please sign in to comment.