Module: Fog::Proxmox::Core
- Included in:
- Fog::Proxmox::Compute::Real, Identity::Real, Network::Real
- Defined in:
- lib/fog/proxmox/core.rb
Overview
Core module
Instance Attribute Summary collapse
-
#deadline ⇒ Object
readonly
Returns the value of attribute deadline.
-
#principal ⇒ Object
readonly
Returns the value of attribute principal.
-
#pve_csrftoken ⇒ Object
readonly
Returns the value of attribute pve_csrftoken.
-
#pve_ticket ⇒ Object
Returns the value of attribute pve_ticket.
-
#pve_username ⇒ Object
readonly
Returns the value of attribute pve_username.
Class Method Summary collapse
-
.not_found_class ⇒ Object
fallback.
Instance Method Summary collapse
Instance Attribute Details
#deadline ⇒ Object (readonly)
Returns the value of attribute deadline.
31 32 33 |
# File 'lib/fog/proxmox/core.rb', line 31 def deadline @deadline end |
#principal ⇒ Object (readonly)
Returns the value of attribute principal.
32 33 34 |
# File 'lib/fog/proxmox/core.rb', line 32 def principal @principal end |
#pve_csrftoken ⇒ Object (readonly)
Returns the value of attribute pve_csrftoken.
29 30 31 |
# File 'lib/fog/proxmox/core.rb', line 29 def pve_csrftoken @pve_csrftoken end |
#pve_ticket ⇒ Object
Returns the value of attribute pve_ticket.
28 29 30 |
# File 'lib/fog/proxmox/core.rb', line 28 def pve_ticket @pve_ticket end |
#pve_username ⇒ Object (readonly)
Returns the value of attribute pve_username.
30 31 32 |
# File 'lib/fog/proxmox/core.rb', line 30 def pve_username @pve_username end |
Class Method Details
Instance Method Details
#credentials ⇒ Object
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/fog/proxmox/core.rb', line 54 def credentials = { provider: 'proxmox', pve_url: @pve_uri.to_s, pve_ticket: @pve_ticket, pve_csrftoken: @pve_csrftoken, pve_username: @pve_username } .merge end |
#initialize_identity(options) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/fog/proxmox/core.rb', line 39 def initialize_identity() @principal = nil @pve_ticket = nil Fog::Proxmox::Variables.to_variables(self, , 'pve') @pve_uri = URI.parse(@pve_url) missing_credentials = [] missing_credentials << :pve_username unless @pve_username unless @pve_ticket missing_credentials << :pve_password unless @pve_password end raise ArgumentError, "Missing required arguments: #{missing_credentials.join(', ')}" unless missing_credentials.empty? end |
#reload ⇒ Object
65 66 67 |
# File 'lib/fog/proxmox/core.rb', line 65 def reload @connection.reset end |