foreman_m2 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -1
- data/app/controllers/foreman_m2/hosts_controller.rb +1 -1
- data/app/models/foreman_m2/m2.rb +1 -2
- data/app/overrides/remove_vm_tab.rb +4 -0
- data/lib/foreman_m2/version.rb +1 -1
- data/test/factories/compute_resources.rb +10 -0
- data/test/unit/foreman_m2_test.rb +7 -2
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7eda017018d40b73148d7b05aaee1dc6c25eddd0
|
4
|
+
data.tar.gz: 5b7ba80ac06e7e0105031645a0991bc4d9c255b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5000806742bad5274e479a175e8d653f9228cc1009ec57c8ba6b99b05f5275f7523e0ea59fbe9090696bac621c5c0eb80176897635294fcf6cb5dc6b8b344d8
|
7
|
+
data.tar.gz: ebf511961c43ff7603e4f0b55fc51bdecf2cf9536e0f508ebce488a5b9dc18ef8d65958ee11fc6cc2c39d821daa971a9f25f4d66a472863c28b468b558850a0b
|
data/README.md
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
# Foreman M2
|
2
2
|
|
3
|
-
The Foreman M2 plugin introduces M2 functionality into Foreman. This is currently in-progress. Related: https://github.com/
|
3
|
+
The Foreman M2 plugin introduces M2 functionality into Foreman. This is currently in-progress. Related: https://github.com/ianballou/smart_proxy_m2
|
4
4
|
|
5
5
|
## Pre-requirements
|
6
6
|
|
7
7
|
- TFTP & DHCP servers
|
8
8
|
- Smart-Proxy plugin that has M2 among its capabilities (see link above)
|
9
|
+
- Note: In 0.0.1, ensure that the M2 smart proxy is called "proxy_m2". This will be addressed in the next release.
|
9
10
|
- Working M2 installation with images imported to the M2 project in use
|
10
11
|
|
11
12
|
## Installation
|
@@ -22,9 +23,15 @@ for how to install Foreman plugins
|
|
22
23
|
|
23
24
|
## TODO
|
24
25
|
|
26
|
+
- Query for M2 smart proxy by some method other than its name
|
27
|
+
- Fix will be out in next release
|
25
28
|
- Testing
|
26
29
|
- Disk management interface in Foreman
|
27
30
|
|
31
|
+
## Known issues
|
32
|
+
- SSH orchestration attempts after host creation sometimes delay the generation of PXE boot files if there aren't enough server workers
|
33
|
+
- Try 5 workers
|
34
|
+
|
28
35
|
## Contributing
|
29
36
|
|
30
37
|
Fork and send a Pull Request. Thanks!
|
@@ -10,7 +10,7 @@ module ForemanM2
|
|
10
10
|
def new_action
|
11
11
|
# automatically renders view/foreman_m2/hosts/new_action
|
12
12
|
|
13
|
-
proxy =
|
13
|
+
proxy = ::ProxyAPI::M2.new(url: SmartProxy.with_features('M2').first.url)
|
14
14
|
proxyAPI = ::ProxyAPI::M2.new(url: proxy.url)
|
15
15
|
@response = proxyAPI.get_images(:project => 'ian')
|
16
16
|
@snaps = proxyAPI.get_snapshots(:project => 'ian')
|
data/app/models/foreman_m2/m2.rb
CHANGED
@@ -9,9 +9,8 @@ module ForemanM2
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def available_images
|
12
|
-
proxy = SmartProxy.find_by
|
12
|
+
proxy = SmartProxy.find_by url: self.url
|
13
13
|
proxyAPI = ::ProxyAPI::M2.new(url: proxy.url)
|
14
|
-
# proxy = ::ProxyAPI::M2.new(url: url)
|
15
14
|
proxyAPI.get_images([])
|
16
15
|
end
|
17
16
|
|
data/lib/foreman_m2/version.rb
CHANGED
@@ -5,7 +5,12 @@ class ForemanM2Test < ActiveSupport::TestCase
|
|
5
5
|
User.current = User.find_by login: 'admin'
|
6
6
|
end
|
7
7
|
|
8
|
-
test '
|
9
|
-
|
8
|
+
test 'truth' do
|
9
|
+
assert_kind_of Module, ForemanM2
|
10
|
+
end
|
11
|
+
|
12
|
+
test 'proxy url saved in CR' do
|
13
|
+
m2 = FactoryBot.create(:compute_resource, :m2)
|
14
|
+
assert m2.url == 'http://127.0.0.1:1234'
|
10
15
|
end
|
11
16
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_m2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian Ballou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|
@@ -74,6 +74,7 @@ files:
|
|
74
74
|
- app/models/foreman_m2/m2.rb
|
75
75
|
- app/overrides/give_ids.rb
|
76
76
|
- app/overrides/hybrid_js.rb
|
77
|
+
- app/overrides/remove_vm_tab.rb
|
77
78
|
- app/overrides/update_media_selection.rb
|
78
79
|
- app/views/compute_resources/edit/_m2.html.erb
|
79
80
|
- app/views/compute_resources/form/_m2.html.erb
|
@@ -103,6 +104,7 @@ files:
|
|
103
104
|
- locale/en/foreman_m2.po
|
104
105
|
- locale/foreman_m2.pot
|
105
106
|
- locale/gemspec.rb
|
107
|
+
- test/factories/compute_resources.rb
|
106
108
|
- test/factories/foreman_m2_factories.rb
|
107
109
|
- test/test_plugin_helper.rb
|
108
110
|
- test/unit/foreman_m2_test.rb
|
@@ -134,3 +136,4 @@ test_files:
|
|
134
136
|
- test/test_plugin_helper.rb
|
135
137
|
- test/unit/foreman_m2_test.rb
|
136
138
|
- test/factories/foreman_m2_factories.rb
|
139
|
+
- test/factories/compute_resources.rb
|