Skip to content

Commit

Permalink
Merge pull request #1 from adriagalin/add_ssl_options
Browse files Browse the repository at this point in the history
Add ssl options for rest connection
  • Loading branch information
adriagalin committed Sep 15, 2014
2 parents ee716e6 + af240fa commit 562b63a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/proxmox.rb
Original file line number Diff line number Diff line change
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

0 comments on commit 562b63a

Please sign in to comment.