foreman_openscap 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/foreman_openscap/policy.rb +3 -3
- data/app/views/job_templates/run_openscap_scans.erb +3 -1
- data/lib/foreman_openscap/version.rb +1 -1
- data/locale/de/foreman_openscap.edit.po +1 -1
- data/locale/de/foreman_openscap.po +2 -2
- data/locale/en_GB/foreman_openscap.edit.po +1 -1
- data/locale/en_GB/foreman_openscap.po +2 -2
- data/locale/es/foreman_openscap.edit.po +1 -1
- data/locale/es/foreman_openscap.po +2 -2
- data/locale/foreman_openscap.pot +5 -3
- data/locale/fr/foreman_openscap.edit.po +1 -1
- data/locale/fr/foreman_openscap.po +2 -2
- data/locale/gl/foreman_openscap.edit.po +1 -1
- data/locale/gl/foreman_openscap.po +2 -2
- data/locale/it/foreman_openscap.edit.po +1 -1
- data/locale/it/foreman_openscap.po +2 -2
- data/locale/ja/foreman_openscap.edit.po +1 -1
- data/locale/ja/foreman_openscap.po +2 -2
- data/locale/ko/foreman_openscap.edit.po +1 -1
- data/locale/ko/foreman_openscap.po +2 -2
- data/locale/pt_BR/foreman_openscap.edit.po +1 -1
- data/locale/pt_BR/foreman_openscap.po +2 -2
- data/locale/ru/foreman_openscap.edit.po +1 -1
- data/locale/ru/foreman_openscap.po +2 -2
- data/locale/sv_SE/foreman_openscap.edit.po +1 -1
- data/locale/sv_SE/foreman_openscap.po +2 -2
- data/locale/zh_CN/foreman_openscap.edit.po +1 -1
- data/locale/zh_CN/foreman_openscap.po +2 -2
- data/locale/zh_TW/foreman_openscap.edit.po +1 -1
- data/locale/zh_TW/foreman_openscap.po +2 -2
- data/test/factories/compliance_host_factory.rb +1 -1
- data/test/unit/policy_test.rb +28 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0895db81e437924a55b31bb9abe2f1a4f217d6e6108b1324fc52af3950aacd33'
|
4
|
+
data.tar.gz: 5031307c30cddd992d58e0cd4b855b3cdc7e43dfe766947df66adf8154d8a048
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa6478fc462f96ca1ba815c8369476e58e253bb1ed01307e81895c28ed6e7684602029949233a7e7d89ba8cba6f73d197f5fef76746273120f94ab26aa3acec8
|
7
|
+
data.tar.gz: 0a97a049d86e101f303316b4b49d0b21864c207884fd1ca45b19456735159f8cb1e2b4d762057d078668dcfe7c729b50665d3f7290dab2c20e2b3995ee15128f
|
@@ -305,15 +305,15 @@ module ForemanOpenscap
|
|
305
305
|
memo << assets.where(:assetable_type => class_name, :assetable_id => id).first_or_initialize
|
306
306
|
end
|
307
307
|
complimentary_class_name = class_name == 'Host::Base' ? 'Hostgroup' : 'Host::Base'
|
308
|
-
existing_assets = self.assets.
|
308
|
+
existing_assets = self.assets.select { |assigned_asset| assigned_asset.assetable_type == complimentary_class_name }
|
309
309
|
self.assets = existing_assets + new_assets
|
310
310
|
end
|
311
311
|
|
312
312
|
def no_mixed_deployments
|
313
313
|
assets.each do |asset|
|
314
314
|
assetable = asset.assetable
|
315
|
-
unless assetable.policies.pluck(:deploy_by).all? { |deployed_by| deployed_by == deploy_by }
|
316
|
-
errors.add(:base, _("cannot assign to %s, all assigned policies must be deployed in the same way") % assetable.name)
|
315
|
+
unless assetable.policies.where.not(:id => id).pluck(:deploy_by).all? { |deployed_by| deployed_by == deploy_by }
|
316
|
+
errors.add(:base, _("cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy") % assetable.name)
|
317
317
|
end
|
318
318
|
end
|
319
319
|
end
|
@@ -15,7 +15,9 @@ template_inputs:
|
|
15
15
|
provider_type: SSH
|
16
16
|
kind: job_template
|
17
17
|
%>
|
18
|
-
<% raise
|
18
|
+
<% raise 'Cannot detect values for policies input, please make sure your host is properly configured for openscap' unless input('policies').respond_to?(:map) %>
|
19
|
+
|
20
|
+
<% raise "Create and assign a policy to this host before proceeding" if input('policies').respond_to?(:empty?) && input('policies').empty? %>
|
19
21
|
|
20
22
|
<% input('policies').map { |policy_config| policy_config['id'] }.each do |id| -%>
|
21
23
|
/usr/bin/foreman_scap_client <%= id %>
|
@@ -597,7 +597,7 @@ msgid "does not have the selected SCAP content profile"
|
|
597
597
|
msgstr ""
|
598
598
|
|
599
599
|
#: ../app/models/foreman_openscap/policy.rb:316
|
600
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
600
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
601
601
|
msgstr ""
|
602
602
|
|
603
603
|
#: ../app/services/foreman_openscap/arf_report_status_calculator.rb:30
|
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_openscap 0.
|
8
|
+
"Project-Id-Version: foreman_openscap 1.0.4\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
10
|
"PO-Revision-Date: 2016-02-09 16:41-0500\n"
|
11
11
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
@@ -888,7 +888,7 @@ msgstr ""
|
|
888
888
|
msgid "You don't seem to have any ARF report. ARF report is a summary of a single scan occurrence on a particular host for a given Compliance Policy."
|
889
889
|
msgstr ""
|
890
890
|
|
891
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
891
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
892
892
|
msgstr ""
|
893
893
|
|
894
894
|
msgid "documentation"
|
@@ -597,7 +597,7 @@ msgid "does not have the selected SCAP content profile"
|
|
597
597
|
msgstr ""
|
598
598
|
|
599
599
|
#: ../app/models/foreman_openscap/policy.rb:316
|
600
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
600
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
601
601
|
msgstr ""
|
602
602
|
|
603
603
|
#: ../app/services/foreman_openscap/arf_report_status_calculator.rb:30
|
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_openscap 0.
|
8
|
+
"Project-Id-Version: foreman_openscap 1.0.4\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
10
|
"PO-Revision-Date: 2016-02-09 16:41-0500\n"
|
11
11
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
@@ -888,7 +888,7 @@ msgstr ""
|
|
888
888
|
msgid "You don't seem to have any ARF report. ARF report is a summary of a single scan occurrence on a particular host for a given Compliance Policy."
|
889
889
|
msgstr ""
|
890
890
|
|
891
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
891
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
892
892
|
msgstr ""
|
893
893
|
|
894
894
|
msgid "documentation"
|
@@ -597,7 +597,7 @@ msgid "does not have the selected SCAP content profile"
|
|
597
597
|
msgstr ""
|
598
598
|
|
599
599
|
#: ../app/models/foreman_openscap/policy.rb:316
|
600
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
600
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
601
601
|
msgstr ""
|
602
602
|
|
603
603
|
#: ../app/services/foreman_openscap/arf_report_status_calculator.rb:30
|
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_openscap 0.
|
8
|
+
"Project-Id-Version: foreman_openscap 1.0.4\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
10
|
"PO-Revision-Date: 2016-02-09 16:41-0500\n"
|
11
11
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
@@ -888,7 +888,7 @@ msgstr ""
|
|
888
888
|
msgid "You don't seem to have any ARF report. ARF report is a summary of a single scan occurrence on a particular host for a given Compliance Policy."
|
889
889
|
msgstr ""
|
890
890
|
|
891
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
891
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
892
892
|
msgstr ""
|
893
893
|
|
894
894
|
msgid "documentation"
|
data/locale/foreman_openscap.pot
CHANGED
@@ -8,8 +8,8 @@ msgid ""
|
|
8
8
|
msgstr ""
|
9
9
|
"Project-Id-Version: foreman_openscap 1.0.0\n"
|
10
10
|
"Report-Msgid-Bugs-To: \n"
|
11
|
-
"POT-Creation-Date: 2019-
|
12
|
-
"PO-Revision-Date: 2019-
|
11
|
+
"POT-Creation-Date: 2019-09-05 16:51+0200\n"
|
12
|
+
"PO-Revision-Date: 2019-09-05 16:51+0200\n"
|
13
13
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14
14
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15
15
|
"Language: \n"
|
@@ -649,7 +649,9 @@ msgid "does not have the selected SCAP content profile"
|
|
649
649
|
msgstr ""
|
650
650
|
|
651
651
|
#: ../app/models/foreman_openscap/policy.rb:316
|
652
|
-
msgid "
|
652
|
+
msgid ""
|
653
|
+
"cannot assign to %s, all assigned policies must be deployed in the same way, c"
|
654
|
+
"heck 'deploy by' for each assigned policy"
|
653
655
|
msgstr ""
|
654
656
|
|
655
657
|
#: ../app/services/foreman_openscap/arf_report_status_calculator.rb:30
|
@@ -597,7 +597,7 @@ msgid "does not have the selected SCAP content profile"
|
|
597
597
|
msgstr ""
|
598
598
|
|
599
599
|
#: ../app/models/foreman_openscap/policy.rb:316
|
600
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
600
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
601
601
|
msgstr ""
|
602
602
|
|
603
603
|
#: ../app/services/foreman_openscap/arf_report_status_calculator.rb:30
|
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_openscap 0.
|
8
|
+
"Project-Id-Version: foreman_openscap 1.0.4\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
10
|
"PO-Revision-Date: 2016-02-09 16:41-0500\n"
|
11
11
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
@@ -888,7 +888,7 @@ msgstr ""
|
|
888
888
|
msgid "You don't seem to have any ARF report. ARF report is a summary of a single scan occurrence on a particular host for a given Compliance Policy."
|
889
889
|
msgstr ""
|
890
890
|
|
891
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
891
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
892
892
|
msgstr ""
|
893
893
|
|
894
894
|
msgid "documentation"
|
@@ -597,7 +597,7 @@ msgid "does not have the selected SCAP content profile"
|
|
597
597
|
msgstr ""
|
598
598
|
|
599
599
|
#: ../app/models/foreman_openscap/policy.rb:316
|
600
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
600
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
601
601
|
msgstr ""
|
602
602
|
|
603
603
|
#: ../app/services/foreman_openscap/arf_report_status_calculator.rb:30
|
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_openscap 0.
|
8
|
+
"Project-Id-Version: foreman_openscap 1.0.4\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
10
|
"PO-Revision-Date: 2016-02-09 16:41-0500\n"
|
11
11
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
@@ -888,7 +888,7 @@ msgstr ""
|
|
888
888
|
msgid "You don't seem to have any ARF report. ARF report is a summary of a single scan occurrence on a particular host for a given Compliance Policy."
|
889
889
|
msgstr ""
|
890
890
|
|
891
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
891
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
892
892
|
msgstr ""
|
893
893
|
|
894
894
|
msgid "documentation"
|
@@ -597,7 +597,7 @@ msgid "does not have the selected SCAP content profile"
|
|
597
597
|
msgstr ""
|
598
598
|
|
599
599
|
#: ../app/models/foreman_openscap/policy.rb:316
|
600
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
600
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
601
601
|
msgstr ""
|
602
602
|
|
603
603
|
#: ../app/services/foreman_openscap/arf_report_status_calculator.rb:30
|
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_openscap 0.
|
8
|
+
"Project-Id-Version: foreman_openscap 1.0.4\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
10
|
"PO-Revision-Date: 2016-02-09 16:41-0500\n"
|
11
11
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
@@ -888,7 +888,7 @@ msgstr ""
|
|
888
888
|
msgid "You don't seem to have any ARF report. ARF report is a summary of a single scan occurrence on a particular host for a given Compliance Policy."
|
889
889
|
msgstr ""
|
890
890
|
|
891
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
891
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
892
892
|
msgstr ""
|
893
893
|
|
894
894
|
msgid "documentation"
|
@@ -597,7 +597,7 @@ msgid "does not have the selected SCAP content profile"
|
|
597
597
|
msgstr ""
|
598
598
|
|
599
599
|
#: ../app/models/foreman_openscap/policy.rb:316
|
600
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
600
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
601
601
|
msgstr ""
|
602
602
|
|
603
603
|
#: ../app/services/foreman_openscap/arf_report_status_calculator.rb:30
|
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_openscap 0.
|
8
|
+
"Project-Id-Version: foreman_openscap 1.0.4\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
10
|
"PO-Revision-Date: 2016-02-09 16:41-0500\n"
|
11
11
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
@@ -888,7 +888,7 @@ msgstr ""
|
|
888
888
|
msgid "You don't seem to have any ARF report. ARF report is a summary of a single scan occurrence on a particular host for a given Compliance Policy."
|
889
889
|
msgstr ""
|
890
890
|
|
891
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
891
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
892
892
|
msgstr ""
|
893
893
|
|
894
894
|
msgid "documentation"
|
@@ -597,7 +597,7 @@ msgid "does not have the selected SCAP content profile"
|
|
597
597
|
msgstr ""
|
598
598
|
|
599
599
|
#: ../app/models/foreman_openscap/policy.rb:316
|
600
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
600
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
601
601
|
msgstr ""
|
602
602
|
|
603
603
|
#: ../app/services/foreman_openscap/arf_report_status_calculator.rb:30
|
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_openscap 0.
|
8
|
+
"Project-Id-Version: foreman_openscap 1.0.4\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
10
|
"PO-Revision-Date: 2016-02-09 16:41-0500\n"
|
11
11
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
@@ -888,7 +888,7 @@ msgstr ""
|
|
888
888
|
msgid "You don't seem to have any ARF report. ARF report is a summary of a single scan occurrence on a particular host for a given Compliance Policy."
|
889
889
|
msgstr ""
|
890
890
|
|
891
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
891
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
892
892
|
msgstr ""
|
893
893
|
|
894
894
|
msgid "documentation"
|
@@ -597,7 +597,7 @@ msgid "does not have the selected SCAP content profile"
|
|
597
597
|
msgstr ""
|
598
598
|
|
599
599
|
#: ../app/models/foreman_openscap/policy.rb:316
|
600
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
600
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
601
601
|
msgstr ""
|
602
602
|
|
603
603
|
#: ../app/services/foreman_openscap/arf_report_status_calculator.rb:30
|
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_openscap 0.
|
8
|
+
"Project-Id-Version: foreman_openscap 1.0.4\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
10
|
"PO-Revision-Date: 2016-02-09 16:41-0500\n"
|
11
11
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
@@ -888,7 +888,7 @@ msgstr ""
|
|
888
888
|
msgid "You don't seem to have any ARF report. ARF report is a summary of a single scan occurrence on a particular host for a given Compliance Policy."
|
889
889
|
msgstr ""
|
890
890
|
|
891
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
891
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
892
892
|
msgstr ""
|
893
893
|
|
894
894
|
msgid "documentation"
|
@@ -598,7 +598,7 @@ msgid "does not have the selected SCAP content profile"
|
|
598
598
|
msgstr ""
|
599
599
|
|
600
600
|
#: ../app/models/foreman_openscap/policy.rb:316
|
601
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
601
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
602
602
|
msgstr ""
|
603
603
|
|
604
604
|
#: ../app/services/foreman_openscap/arf_report_status_calculator.rb:30
|
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_openscap 0.
|
8
|
+
"Project-Id-Version: foreman_openscap 1.0.4\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
10
|
"PO-Revision-Date: 2016-02-09 16:41-0500\n"
|
11
11
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
@@ -889,7 +889,7 @@ msgstr ""
|
|
889
889
|
msgid "You don't seem to have any ARF report. ARF report is a summary of a single scan occurrence on a particular host for a given Compliance Policy."
|
890
890
|
msgstr ""
|
891
891
|
|
892
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
892
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
893
893
|
msgstr ""
|
894
894
|
|
895
895
|
msgid "documentation"
|
@@ -597,7 +597,7 @@ msgid "does not have the selected SCAP content profile"
|
|
597
597
|
msgstr ""
|
598
598
|
|
599
599
|
#: ../app/models/foreman_openscap/policy.rb:316
|
600
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
600
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
601
601
|
msgstr ""
|
602
602
|
|
603
603
|
#: ../app/services/foreman_openscap/arf_report_status_calculator.rb:30
|
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_openscap 0.
|
8
|
+
"Project-Id-Version: foreman_openscap 1.0.4\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
10
|
"PO-Revision-Date: 2016-02-09 16:41-0500\n"
|
11
11
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
@@ -888,7 +888,7 @@ msgstr ""
|
|
888
888
|
msgid "You don't seem to have any ARF report. ARF report is a summary of a single scan occurrence on a particular host for a given Compliance Policy."
|
889
889
|
msgstr ""
|
890
890
|
|
891
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
891
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
892
892
|
msgstr ""
|
893
893
|
|
894
894
|
msgid "documentation"
|
@@ -597,7 +597,7 @@ msgid "does not have the selected SCAP content profile"
|
|
597
597
|
msgstr ""
|
598
598
|
|
599
599
|
#: ../app/models/foreman_openscap/policy.rb:316
|
600
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
600
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
601
601
|
msgstr ""
|
602
602
|
|
603
603
|
#: ../app/services/foreman_openscap/arf_report_status_calculator.rb:30
|
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_openscap 0.
|
8
|
+
"Project-Id-Version: foreman_openscap 1.0.4\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
10
|
"PO-Revision-Date: 2016-02-09 16:41-0500\n"
|
11
11
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
@@ -888,7 +888,7 @@ msgstr ""
|
|
888
888
|
msgid "You don't seem to have any ARF report. ARF report is a summary of a single scan occurrence on a particular host for a given Compliance Policy."
|
889
889
|
msgstr ""
|
890
890
|
|
891
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
891
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
892
892
|
msgstr ""
|
893
893
|
|
894
894
|
msgid "documentation"
|
@@ -597,7 +597,7 @@ msgid "does not have the selected SCAP content profile"
|
|
597
597
|
msgstr ""
|
598
598
|
|
599
599
|
#: ../app/models/foreman_openscap/policy.rb:316
|
600
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
600
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
601
601
|
msgstr ""
|
602
602
|
|
603
603
|
#: ../app/services/foreman_openscap/arf_report_status_calculator.rb:30
|
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_openscap 0.
|
8
|
+
"Project-Id-Version: foreman_openscap 1.0.4\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
10
|
"PO-Revision-Date: 2016-02-09 16:41-0500\n"
|
11
11
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
@@ -888,7 +888,7 @@ msgstr ""
|
|
888
888
|
msgid "You don't seem to have any ARF report. ARF report is a summary of a single scan occurrence on a particular host for a given Compliance Policy."
|
889
889
|
msgstr ""
|
890
890
|
|
891
|
-
msgid "cannot assign to %s, all assigned policies must be deployed in the same way"
|
891
|
+
msgid "cannot assign to %s, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy"
|
892
892
|
msgstr ""
|
893
893
|
|
894
894
|
msgid "documentation"
|
@@ -6,7 +6,7 @@ FactoryBot.define do
|
|
6
6
|
factory :openscap_proxy, :class => SmartProxy do
|
7
7
|
sequence(:name) { |n| "openscap_proxy#{n}" }
|
8
8
|
sequence(:url) { |n| "https://anywhere#{n}.net:8443" }
|
9
|
-
features {
|
9
|
+
features { [Feature.find_by(:name => 'Openscap') || FactoryBot.create(:openscap_feature)] }
|
10
10
|
end
|
11
11
|
|
12
12
|
factory :compliance_host, :class => Host::Managed do
|
data/test/unit/policy_test.rb
CHANGED
@@ -250,6 +250,33 @@ class PolicyTest < ActiveSupport::TestCase
|
|
250
250
|
puppet_policy = FactoryBot.create(:policy, :deploy_by => 'puppet')
|
251
251
|
puppet_policy.host_ids = [host.id]
|
252
252
|
refute puppet_policy.save
|
253
|
-
assert_equal "cannot assign to #{host.name}, all assigned policies must be deployed in the same way", puppet_policy.errors[:base].first
|
253
|
+
assert_equal "cannot assign to #{host.name}, all assigned policies must be deployed in the same way, check 'deploy by' for each assigned policy", puppet_policy.errors[:base].first
|
254
|
+
end
|
255
|
+
|
256
|
+
test "should change deployment option when there is 1 policy assigned to hostgroup" do
|
257
|
+
hg = FactoryBot.create(:hostgroup)
|
258
|
+
asset = FactoryBot.create(:asset, :assetable_type => 'Hostgroup', :assetable_id => hg.id)
|
259
|
+
policy = FactoryBot.create(:policy, :assets => [asset], :deploy_by => 'manual')
|
260
|
+
policy.stubs(:assign_policy_to_hostgroups).returns(:true)
|
261
|
+
policy.deploy_by = 'puppet'
|
262
|
+
assert policy.save
|
263
|
+
end
|
264
|
+
|
265
|
+
test "should assign host and hostgroup at the same time" do
|
266
|
+
hostgroup = FactoryBot.create(:hostgroup)
|
267
|
+
host = FactoryBot.create(:host)
|
268
|
+
policy = ForemanOpenscap::Policy.create(
|
269
|
+
:name => 'random',
|
270
|
+
:scap_content_id => @scap_content.id,
|
271
|
+
:scap_content_profile_id => @scap_profile.id,
|
272
|
+
:period => 'custom',
|
273
|
+
:cron_line => '10 * * * *',
|
274
|
+
:deploy_by => 'manual',
|
275
|
+
:hostgroup_ids => [hostgroup.id],
|
276
|
+
:host_ids => [host.id]
|
277
|
+
)
|
278
|
+
assert policy.save
|
279
|
+
refute policy.hostgroups.empty?
|
280
|
+
refute policy.hosts.empty?
|
254
281
|
end
|
255
282
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_openscap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- slukasik@redhat.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deface
|