foreman_spacewalk 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/app/helpers/concerns/foreman_spacewalk/hosts_helper_ext.rb +12 -10
- data/app/models/concerns/foreman_spacewalk/host_extensions.rb +14 -14
- data/db/migrate/20180104155010_add_spacewalk_proxy_id_to_host_and_hostgroup.rb +1 -1
- data/lib/foreman_spacewalk/engine.rb +1 -1
- data/lib/foreman_spacewalk/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e64ef92f1ce27ee28db10bc71bb45d15b7f3bd37faffefc5c01e96897fc37758
|
4
|
+
data.tar.gz: 3fe0f445b7754b4e31e5964d224e7451c948655a872847cac2902eaa3b53e0a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5588ae30efdb48c895cf9813b2b6347db9d5616c93edd62fd0298e3a6d96cc71b105253b35724268d261cbf72460a64c8da024266e3e671aaa76cceef7acb066
|
7
|
+
data.tar.gz: b2fabe71d8446fedc9d78f8b946a0378299177d015e65d746a7bee6d7cbd40132555f006ebb25767a147c5ca8061a0ee6898b1e76d0429776d8a4768f985a9b6
|
data/README.md
CHANGED
@@ -2,18 +2,20 @@ module ForemanSpacewalk
|
|
2
2
|
module HostsHelperExt
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
module Overrides
|
6
|
+
def multiple_actions
|
7
|
+
spacewalk_multiple_actions = []
|
8
|
+
if authorized_for(controller: :hosts, action: :select_multiple_downtime)
|
9
|
+
spacewalk_multiple_actions << [
|
10
|
+
_('Change Spacewalk Proxy'), select_multiple_spacewalk_proxy_hosts_path
|
11
|
+
]
|
12
|
+
end
|
13
|
+
super + spacewalk_multiple_actions
|
14
|
+
end
|
7
15
|
end
|
8
16
|
|
9
|
-
|
10
|
-
|
11
|
-
if authorized_for(controller: :hosts, action: :select_multiple_downtime)
|
12
|
-
spacewalk_multiple_actions << [
|
13
|
-
_('Change Spacewalk Proxy'), select_multiple_spacewalk_proxy_hosts_path
|
14
|
-
]
|
15
|
-
end
|
16
|
-
multiple_actions_without_spacewalk + spacewalk_multiple_actions
|
17
|
+
included do
|
18
|
+
prepend Overrides
|
17
19
|
end
|
18
20
|
end
|
19
21
|
end
|
@@ -2,23 +2,23 @@ module ForemanSpacewalk
|
|
2
2
|
module HostExtensions
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
alias_method_chain :hostgroup_inherited_attributes, :spacewalk
|
10
|
-
end
|
5
|
+
module Overrides
|
6
|
+
def hostgroup_inherited_attributes
|
7
|
+
super + ['spacewalk_proxy_id']
|
8
|
+
end
|
11
9
|
|
12
|
-
|
13
|
-
|
10
|
+
def smart_proxy_ids
|
11
|
+
ids = super
|
12
|
+
[spacewalk_proxy, hostgroup.try(:spacewalk_proxy)].compact.each do |proxy|
|
13
|
+
ids << proxy.id
|
14
|
+
end
|
15
|
+
ids
|
16
|
+
end
|
14
17
|
end
|
15
18
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
ids << proxy.id
|
20
|
-
end
|
21
|
-
ids
|
19
|
+
included do
|
20
|
+
include Orchestration::Spacewalk
|
21
|
+
prepend Overrides
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class AddSpacewalkProxyIdToHostAndHostgroup < ActiveRecord::Migration
|
1
|
+
class AddSpacewalkProxyIdToHostAndHostgroup < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
add_column :hosts, :spacewalk_proxy_id, :integer, index: true
|
4
4
|
add_column :hostgroups, :spacewalk_proxy_id, :integer, index: true
|
@@ -15,7 +15,7 @@ module ForemanSpacewalk
|
|
15
15
|
|
16
16
|
initializer 'foreman_spacewalk.register_plugin', before: :finisher_hook do |_app|
|
17
17
|
Foreman::Plugin.register :foreman_spacewalk do
|
18
|
-
requires_foreman '>= 1.
|
18
|
+
requires_foreman '>= 1.17'
|
19
19
|
|
20
20
|
spacewalk_proxy_options = {
|
21
21
|
feature: 'Spacewalk',
|