foreman_proxmox 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fb9e841a3063650f7affb771c7e3fdeb03736e9f
4
- data.tar.gz: 64fccc10a886c59d366110a1c075e4232bb8ad08
3
+ metadata.gz: 966d8087cff8194102e82edff4584786d20cbea7
4
+ data.tar.gz: 30d399b4293d50134ee95a8b3c556c3370c2136a
5
5
  SHA512:
6
- metadata.gz: 0a48abff0896ab252abda0496cc833bc70e9822671f3acd70fd3334c1a4de4308c99cb058fe7cf45392a116bdcaf45d431dc045fa2bb036a71f8d9a584d00e27
7
- data.tar.gz: 8fa4fb1a4cd8d21790a05a78dcf56dec4377090539646bcb3d40390fd973ddc01a32b00b0fb8fdcd5dcb7a55869a762e2994890e9526629534dfa8bff2191cf5
6
+ metadata.gz: f89758efb04b0f6e3e2471464ee7b065d15d02f06535e29f1cf518eb9e0d91b2d71baa126b24006a7f7e33d1fbe90a875d9b89e383c65e630742819dbb9d4f8a
7
+ data.tar.gz: baf2b6b2e1c4bd2907451b9cb5fa0b2882016397d5dbbccc16916f4159552ee828fe85f985b17fa21b7a21e66e8fa0f75b49c8881a45491e3714b5dcc78e6c2c
@@ -1,3 +1,4 @@
1
+ require 'rest-client'
1
2
  module ForemanProxmox
2
3
  # Example: Plugin's HostsController inherits from Foreman's HostsController
3
4
  class HostsController < ::HostsController
@@ -7,5 +8,12 @@ module ForemanProxmox
7
8
  def new_action
8
9
  # automatically renders view/foreman_proxmox/hosts/new_action
9
10
  end
10
- end
11
+
12
+ def intializeProxmox
13
+ @response = 'not yet authenticated'
14
+ @proxmoxip = params[:proxmoxip]
15
+ @proxmoxuser = params[:proxmoxuser]
16
+ @proxmoxpassword = params[:proxmoxpassword]
17
+ @response = RestClient.post 'http://'+@proxmoxip+':8006/api2/json/access/ticket', {:params => {:username => @proxmoxuser, :password => @proxmoxpassword}}
18
+ end
11
19
  end
@@ -1 +1,14 @@
1
1
  Welcome to <b>ForemanProxmox</b>
2
+ Connect to your Proxmox-server here.
3
+ <%= form_tag("/intializeProxmox", method: "get") do %>
4
+ <%= label_tag(:proxmoxip, "Proxmox-server IP:") %>
5
+ <%= text_field_tag(:proxmoxip) %>
6
+ <%= label_tag(:proxmoxuser, "Proxmox-username:") %>
7
+ <%= text_field_tag(:proxmoxuser) %>
8
+ <%= label_tag(:proxmoxpassword, "Proxmox-password:") %>
9
+ <%= password_field_tag(:proxmoxpassword) %>
10
+ <%= submit_tag("Connect") %>
11
+ <% end %>
12
+ <%= label_tag(:response, @response)
13
+
14
+
@@ -77,3 +77,4 @@ module ForemanProxmox
77
77
  end
78
78
  end
79
79
  end
80
+ end
@@ -1,3 +1,3 @@
1
1
  module ForemanProxmox
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_proxmox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Isensee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-28 00:00:00.000000000 Z
11
+ date: 2015-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rest-client
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rubocop
29
43
  requirement: !ruby/object:Gem::Requirement