foreman_openscap 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/api/v2/compliance/arf_reports_controller.rb +1 -1
  3. data/app/controllers/api/v2/compliance/policies_controller.rb +2 -2
  4. data/app/controllers/api/v2/compliance/scap_contents_controller.rb +1 -1
  5. data/app/controllers/api/v2/compliance/tailoring_files_controller.rb +1 -1
  6. data/app/controllers/arf_reports_controller.rb +9 -9
  7. data/app/controllers/concerns/foreman/controller/parameters/policy.rb +1 -1
  8. data/app/controllers/openscap_proxies_controller.rb +5 -5
  9. data/app/controllers/policies_controller.rb +16 -17
  10. data/app/controllers/policy_dashboard_controller.rb +2 -1
  11. data/app/controllers/scap_contents_controller.rb +2 -2
  12. data/app/controllers/tailoring_files_controller.rb +4 -4
  13. data/app/helpers/arf_report_dashboard_helper.rb +2 -3
  14. data/app/helpers/arf_reports_helper.rb +1 -1
  15. data/app/helpers/compliance_hosts_helper.rb +1 -2
  16. data/app/helpers/policies_helper.rb +4 -4
  17. data/app/helpers/policy_dashboard_helper.rb +2 -3
  18. data/app/lib/proxy_api/available_proxy.rb +2 -2
  19. data/app/lib/proxy_api/openscap.rb +1 -1
  20. data/app/mailers/foreman_openscap/policy_mailer.rb +1 -1
  21. data/app/models/concerns/foreman_openscap/compliance_status_scoped_search.rb +7 -8
  22. data/app/models/concerns/foreman_openscap/host_extensions.rb +44 -25
  23. data/app/models/concerns/foreman_openscap/log_extensions.rb +1 -1
  24. data/app/models/concerns/foreman_openscap/openscap_proxy_core_extensions.rb +3 -3
  25. data/app/models/foreman_openscap/arf_report.rb +34 -12
  26. data/app/models/foreman_openscap/policy.rb +19 -17
  27. data/app/models/foreman_openscap/scap_content.rb +4 -2
  28. data/app/services/foreman_openscap/arf_report_status_calculator.rb +1 -1
  29. data/app/services/foreman_openscap/host_report_dashboard/data.rb +2 -2
  30. data/app/services/foreman_openscap/policy_dashboard/data.rb +4 -3
  31. data/app/validators/foreman_openscap/data_stream_validator.rb +2 -2
  32. data/app/views/policy_dashboard/_policy_status_widget.html.erb +5 -5
  33. data/config/routes.rb +6 -6
  34. data/db/migrate/20141015115511_add_arf_report_unique_constraint.rb +1 -1
  35. data/db/migrate/20141113221054_create_scaptimony_scap_content_profiles.rb +1 -1
  36. data/db/migrate/20141116170632_remove_xccdf_profile_from_scaptimony_policies.rb +1 -1
  37. data/db/migrate/20141121120326_create_scaptimony_arf_report_breakdowns.rb +15 -15
  38. data/db/migrate/20141121164042_replace_arf_report_breakdown_view.rb +15 -15
  39. data/db/migrate/20141206211151_create_scaptimony_assets_policies.rb +1 -1
  40. data/db/migrate/20150115155947_add_scaptimony_scap_content_digest.rb +1 -1
  41. data/db/migrate/20150821100137_migrate_from_scaptimony.rb +1 -1
  42. data/db/migrate/20160830113437_remove_deleted_policy.rb +1 -1
  43. data/db/migrate/20160925213031_change_scap_widget_names.rb +8 -8
  44. data/db/migrate/20161223153249_add_permissions_to_arf_report.rb +4 -4
  45. data/db/seeds.d/75-job_templates.rb +6 -1
  46. data/db/seeds.d/openscap_feature.rb +1 -1
  47. data/lib/foreman_openscap/data_migration.rb +1 -2
  48. data/lib/foreman_openscap/engine.rb +33 -34
  49. data/lib/foreman_openscap/helper.rb +5 -7
  50. data/lib/foreman_openscap/message_cleaner.rb +32 -0
  51. data/lib/foreman_openscap/version.rb +1 -1
  52. data/lib/tasks/foreman_openscap_tasks.rake +12 -0
  53. data/locale/de/foreman_openscap.po +205 -43
  54. data/locale/en_GB/foreman_openscap.po +205 -43
  55. data/locale/es/foreman_openscap.po +205 -43
  56. data/locale/foreman_openscap.pot +418 -185
  57. data/locale/fr/foreman_openscap.po +205 -43
  58. data/locale/gl/foreman_openscap.po +205 -43
  59. data/locale/it/foreman_openscap.po +205 -43
  60. data/locale/ja/foreman_openscap.po +205 -43
  61. data/locale/ko/foreman_openscap.po +205 -43
  62. data/locale/pt_BR/foreman_openscap.po +205 -43
  63. data/locale/ru/foreman_openscap.po +205 -43
  64. data/locale/sv_SE/foreman_openscap.po +205 -43
  65. data/locale/zh_CN/foreman_openscap.po +205 -43
  66. data/locale/zh_TW/foreman_openscap.po +205 -43
  67. data/test/factories/arf_report_factory.rb +2 -2
  68. data/test/factories/asset_factory.rb +5 -0
  69. data/test/factories/compliance_host_factory.rb +4 -4
  70. data/test/factories/compliance_log_factory.rb +9 -4
  71. data/test/files/arf_report/arf_report.json +1 -0
  72. data/test/files/arf_report/arf_report_msg_desc_changed.json +1 -0
  73. data/test/files/arf_report/arf_report_msg_value_changed.json +1 -0
  74. data/test/functional/api/v2/compliance/arf_reports_controller_test.rb +111 -1
  75. data/test/functional/api/v2/compliance/policies_controller_test.rb +1 -1
  76. data/test/functional/api/v2/compliance/tailoring_files_controller_test.rb +4 -4
  77. data/test/test_plugin_helper.rb +4 -4
  78. data/test/unit/arf_report_test.rb +5 -5
  79. data/test/unit/concerns/host_extensions_test.rb +64 -4
  80. data/test/unit/message_cleaner_test.rb +31 -0
  81. data/test/unit/policy_mailer_test.rb +1 -2
  82. data/test/unit/scap_content_test.rb +3 -5
  83. data/test/unit/services/report_dashboard/data_test.rb +1 -1
  84. data/test/unit/services/tailoring_files_proxy_check_test.rb +4 -4
  85. metadata +12 -6
@@ -40,9 +40,6 @@ msgstr ""
40
40
  msgid "<b>Foreman</b> OpenSCAP summary"
41
41
  msgstr ""
42
42
 
43
- msgid "A compliance policy is defined by security professionals who specify desired settings (often in the form of a checklist) that are to be used in the computing environment. Compliance audit is a process of figuring out whether a given object follows all the rules written out in a compliance policy."
44
- msgstr ""
45
-
46
43
  msgid "A summary of reports for OpenSCAP policies"
47
44
  msgstr ""
48
45
 
@@ -73,6 +70,12 @@ msgstr ""
73
70
  msgid "Changed?"
74
71
  msgstr ""
75
72
 
73
+ msgid "Choose Tailoring File"
74
+ msgstr ""
75
+
76
+ msgid "Choose day in month"
77
+ msgstr ""
78
+
76
79
  msgid "Choose existing SCAP Content"
77
80
  msgstr ""
78
81
 
@@ -91,10 +94,10 @@ msgstr ""
91
94
  msgid "Compliance Reports"
92
95
  msgstr ""
93
96
 
94
- msgid "Compliance Status"
97
+ msgid "Compliance Reports Breakdown"
95
98
  msgstr ""
96
99
 
97
- msgid "Compliance policy configuration"
100
+ msgid "Compliance Status"
98
101
  msgstr ""
99
102
 
100
103
  msgid "Compliance policy: %s"
@@ -112,13 +115,22 @@ msgstr ""
112
115
  msgid "Compliant with the policy"
113
116
  msgstr ""
114
117
 
118
+ msgid "Content"
119
+ msgstr ""
120
+
121
+ msgid "Could not validate %s. Please make sure you have appropriate proxy version to use this functionality"
122
+ msgstr ""
123
+
115
124
  msgid "Create SCAP content"
116
125
  msgstr ""
117
126
 
118
- msgid "Create a policy"
127
+ msgid "Create a Policy"
128
+ msgstr ""
129
+
130
+ msgid "Create a Tailoring file"
119
131
  msgstr ""
120
132
 
121
- msgid "Cron line does not consist of 5 parts separated by space"
133
+ msgid "Created"
122
134
  msgstr ""
123
135
 
124
136
  msgid "Date"
@@ -130,6 +142,12 @@ msgstr ""
130
142
  msgid "Delete"
131
143
  msgstr ""
132
144
 
145
+ msgid "Delete a Policy"
146
+ msgstr ""
147
+
148
+ msgid "Delete an ARF Report"
149
+ msgstr ""
150
+
133
151
  msgid "Delete compliance policy %s with all the reports?"
134
152
  msgstr ""
135
153
 
@@ -139,10 +157,10 @@ msgstr ""
139
157
  msgid "Delete reports"
140
158
  msgstr ""
141
159
 
142
- msgid "Deletes a policy"
160
+ msgid "Delete tailoring file %s?"
143
161
  msgstr ""
144
162
 
145
- msgid "Deletes an ARF Report"
163
+ msgid "Deletes a Tailoring file"
146
164
  msgstr ""
147
165
 
148
166
  msgid "Deletes an SCAP content"
@@ -154,9 +172,18 @@ msgstr ""
154
172
  msgid "Download"
155
173
  msgstr ""
156
174
 
175
+ msgid "Download ARF report in HTML"
176
+ msgstr ""
177
+
178
+ msgid "Download HTML"
179
+ msgstr ""
180
+
157
181
  msgid "Download XML in bzip"
158
182
  msgstr ""
159
183
 
184
+ msgid "Download bzipped ARF report"
185
+ msgstr ""
186
+
160
187
  msgid "Edit"
161
188
  msgstr ""
162
189
 
@@ -166,6 +193,12 @@ msgstr ""
166
193
  msgid "Edit SCAP Content"
167
194
  msgstr ""
168
195
 
196
+ msgid "Edit Tailoring File"
197
+ msgstr ""
198
+
199
+ msgid "Effective Profile"
200
+ msgstr ""
201
+
169
202
  msgid "Failed"
170
203
  msgstr ""
171
204
 
@@ -184,12 +217,22 @@ msgstr ""
184
217
  msgid "Failed to downloaded ARF report as bzip: %s"
185
218
  msgstr ""
186
219
 
220
+ msgid "Failed to downloaded ARF report in HTML: %s"
221
+ msgstr ""
222
+
223
+ #. TRANSLATORS: initial character of Failed
187
224
  msgid "Failed|F"
188
225
  msgstr ""
189
226
 
190
227
  msgid "File Upload"
191
228
  msgstr ""
192
229
 
230
+ msgid "Filename"
231
+ msgstr ""
232
+
233
+ msgid "Full Report"
234
+ msgstr ""
235
+
193
236
  msgid "General"
194
237
  msgstr ""
195
238
 
@@ -223,12 +266,17 @@ msgstr ""
223
266
  msgid "Hosts Breakdown"
224
267
  msgstr ""
225
268
 
226
- msgid "In Foreman, a compliance policy checklist is defined via %s, once SCAP content is present, you can create a policy, assign select host groups and schedule to run."
269
+ msgid "In Foreman, a compliance policy checklist is defined via %s."
227
270
  msgstr ""
228
271
 
229
272
  msgid ""
230
273
  "In Foreman, scap_contents represent the SCAP security guides on your hosts, and create SCAP profiles for you to assign to hosts / host groups\n"
231
- " via %s"
274
+ " via %s"
275
+ msgstr ""
276
+
277
+ msgid ""
278
+ "In Foreman, tailoring_files represent the custom modifications to default XCCDF profiles and they can be applied to hosts\n"
279
+ " via %s"
232
280
  msgstr ""
233
281
 
234
282
  msgid "Incompliant"
@@ -243,7 +291,13 @@ msgstr ""
243
291
  msgid "Inconclusive results"
244
292
  msgstr ""
245
293
 
246
- msgid "Latest compliance reports"
294
+ msgid "It may sometimes be required to adjust the security policy to your specific needs. "
295
+ msgstr ""
296
+
297
+ msgid "Last spool error"
298
+ msgstr ""
299
+
300
+ msgid "Latest Compliance Reports"
247
301
  msgstr ""
248
302
 
249
303
  msgid "Latest reports for policy: %s"
@@ -252,9 +306,15 @@ msgstr ""
252
306
  msgid "List ARF reports"
253
307
  msgstr ""
254
308
 
309
+ msgid "List Policies"
310
+ msgstr ""
311
+
255
312
  msgid "List SCAP contents"
256
313
  msgstr ""
257
314
 
315
+ msgid "List Tailoring files"
316
+ msgstr ""
317
+
258
318
  msgid "Loading..."
259
319
  msgstr ""
260
320
 
@@ -267,16 +327,22 @@ msgstr ""
267
327
  msgid "More details"
268
328
  msgstr ""
269
329
 
330
+ msgid "Name"
331
+ msgstr ""
332
+
270
333
  msgid "Never audited"
271
334
  msgstr ""
272
335
 
273
336
  msgid "New Compliance Policy"
274
337
  msgstr ""
275
338
 
276
- msgid "New Compliance policy"
339
+ msgid "New Policy"
340
+ msgstr ""
341
+
342
+ msgid "New SCAP Content"
277
343
  msgstr ""
278
344
 
279
- msgid "New SCAP content"
345
+ msgid "New Tailoring File"
280
346
  msgstr ""
281
347
 
282
348
  msgid "Next"
@@ -288,13 +354,10 @@ msgstr ""
288
354
  msgid "No ARF reports for this policy"
289
355
  msgstr ""
290
356
 
291
- msgid "No Available Proxy to validate SCAP content"
357
+ msgid "No OpenSCAP proxy found for %{class} with %{id}"
292
358
  msgstr ""
293
359
 
294
- msgid "No OpenSCAP proxy found for %s"
295
- msgstr ""
296
-
297
- msgid "No Proxy with OpenSCAP features"
360
+ msgid "No available proxy to validate SCAP data stream file"
298
361
  msgstr ""
299
362
 
300
363
  msgid "No available proxy to validate. Returned with error: %s"
@@ -315,6 +378,9 @@ msgstr ""
315
378
  msgid "No hosts were found."
316
379
  msgstr ""
317
380
 
381
+ msgid "No proxy with OpenSCAP features"
382
+ msgstr ""
383
+
318
384
  msgid "No report for this policy"
319
385
  msgstr ""
320
386
 
@@ -327,6 +393,12 @@ msgstr ""
327
393
  msgid "No valid policy ID provided"
328
394
  msgstr ""
329
395
 
396
+ msgid "None"
397
+ msgstr ""
398
+
399
+ msgid "None found"
400
+ msgstr ""
401
+
330
402
  msgid "None!"
331
403
  msgstr ""
332
404
 
@@ -345,30 +417,35 @@ msgstr ""
345
417
  msgid "Number of a day in month, note that not all months have same count of days"
346
418
  msgstr ""
347
419
 
348
- msgid "OpenSCAP Host reports widget"
420
+ msgid "Once SCAP content is present, you can create a policy, assign select host groups and schedule to run."
349
421
  msgstr ""
350
422
 
351
- msgid "OpenSCAP Proxy"
423
+ msgid "Openscap Proxy"
352
424
  msgstr ""
353
425
 
354
- msgid "OpenSCAP Reports breakdown widget"
426
+ msgid "Openscap policy summary"
355
427
  msgstr ""
356
428
 
357
429
  msgid "Organizations"
358
430
  msgstr ""
359
431
 
432
+ msgid "Original file name of the XML file"
433
+ msgstr ""
434
+
360
435
  msgid "Other"
361
436
  msgstr ""
362
437
 
363
438
  msgid "Othered"
364
439
  msgstr ""
365
440
 
441
+ #. TRANSLATORS: initial character of Othered which is an SCAP term
366
442
  msgid "Othered|O"
367
443
  msgstr ""
368
444
 
369
445
  msgid "Passed"
370
446
  msgstr ""
371
447
 
448
+ #. TRANSLATORS: initial character of Passed
372
449
  msgid "Passed|P"
373
450
  msgstr ""
374
451
 
@@ -381,9 +458,6 @@ msgstr ""
381
458
  msgid "Policies with hosts:"
382
459
  msgstr ""
383
460
 
384
- msgid "Policy"
385
- msgstr ""
386
-
387
461
  msgid "Policy %s"
388
462
  msgstr ""
389
463
 
@@ -396,19 +470,34 @@ msgstr ""
396
470
  msgid "Policy description"
397
471
  msgstr ""
398
472
 
473
+ msgid "Policy is missing"
474
+ msgstr ""
475
+
399
476
  msgid "Policy name"
400
477
  msgstr ""
401
478
 
402
- msgid "Policy schedule period"
479
+ msgid "Policy schedule cron line (only if period == \"custom\")"
480
+ msgstr ""
481
+
482
+ msgid "Policy schedule day of month (only if period == \"monthly\")"
403
483
  msgstr ""
404
484
 
405
- msgid "Policy schedule weekday"
485
+ msgid "Policy schedule period (weekly, monthly, custom)"
486
+ msgstr ""
487
+
488
+ msgid "Policy schedule weekday (only if period == \"weekly\")"
489
+ msgstr ""
490
+
491
+ msgid "Profile"
492
+ msgstr ""
493
+
494
+ msgid "Proxy failed to send a report from spool to Foreman. This indicates a corrupted report format. Report has been moved to directory for storing corrupted files on proxy for later inspection."
406
495
  msgstr ""
407
496
 
408
497
  msgid "Puppet class %{class} does not have %{parameter} class parameter."
409
498
  msgstr ""
410
499
 
411
- msgid "Puppet class 'foreman_scap_client' not found, make sure it is imported form Puppet master"
500
+ msgid "Puppet class 'foreman_scap_client' not found, make sure it is imported from Puppet master"
412
501
  msgstr ""
413
502
 
414
503
  msgid "Rationale"
@@ -432,6 +521,9 @@ msgstr ""
432
521
  msgid "Reports"
433
522
  msgstr ""
434
523
 
524
+ msgid "Request timed out. Please try increasing Settings -> proxy_request_timeout"
525
+ msgstr ""
526
+
435
527
  msgid "Required Puppet class %{class} is not found, please ensure it imported first."
436
528
  msgstr ""
437
529
 
@@ -441,6 +533,9 @@ msgstr ""
441
533
  msgid "Result"
442
534
  msgstr ""
443
535
 
536
+ msgid "Run OpenSCAP scan"
537
+ msgstr ""
538
+
444
539
  msgid "SCAP Content"
445
540
  msgstr ""
446
541
 
@@ -450,9 +545,6 @@ msgstr ""
450
545
  msgid "SCAP content"
451
546
  msgstr ""
452
547
 
453
- msgid "SCAP content configuration"
454
- msgstr ""
455
-
456
548
  msgid "SCAP content name"
457
549
  msgstr ""
458
550
 
@@ -480,15 +572,30 @@ msgstr ""
480
572
  msgid "Show Guide"
481
573
  msgstr ""
482
574
 
575
+ msgid "Show a Policy"
576
+ msgstr ""
577
+
578
+ msgid "Show a Tailoring file"
579
+ msgstr ""
580
+
581
+ msgid "Show a Tailoring file as XML"
582
+ msgstr ""
583
+
483
584
  msgid "Show a policy's SCAP content"
484
585
  msgstr ""
485
586
 
587
+ msgid "Show a policy's Tailoring file"
588
+ msgstr ""
589
+
486
590
  msgid "Show an ARF report"
487
591
  msgstr ""
488
592
 
489
593
  msgid "Show an SCAP content"
490
594
  msgstr ""
491
595
 
596
+ msgid "Show an SCAP content as XML"
597
+ msgstr ""
598
+
492
599
  msgid "Show log messages:"
493
600
  msgstr ""
494
601
 
@@ -498,9 +605,6 @@ msgstr ""
498
605
  msgid "Something went wrong while selecting hosts - %s"
499
606
  msgstr ""
500
607
 
501
- msgid "Source: Wikipedia %s"
502
- msgstr ""
503
-
504
608
  msgid "Status chart"
505
609
  msgstr ""
506
610
 
@@ -522,11 +626,36 @@ msgstr ""
522
626
  msgid "Summary report from Foreman server at %{foreman_url}"
523
627
  msgstr ""
524
628
 
629
+ msgid "Tailoring File"
630
+ msgstr ""
631
+
632
+ msgid "Tailoring Files"
633
+ msgstr ""
634
+
635
+ msgid "Tailoring file ID"
636
+ msgstr ""
637
+
638
+ msgid "Tailoring file name"
639
+ msgstr ""
640
+
641
+ msgid "Tailoring file profile ID"
642
+ msgstr ""
643
+
525
644
  msgid ""
526
645
  "The Security Content Automation Protocol (SCAP), combines a number of open standards that are used to enumerate software flaws and\n"
527
- " configuration issues related to security. They measure systems to find vulnerabilities and offer methods to score those findings in order\n"
528
- " to evaluate the possible impact. It is a method for using those open standards for automated vulnerability management, measurement,\n"
529
- " and policy compliance evaluation. "
646
+ " configuration issues related to security. "
647
+ msgstr ""
648
+
649
+ msgid "The following Smart Proxies need to be updated to unlock the feature: %s. "
650
+ msgstr ""
651
+
652
+ msgid "The following proxies could not be reached: %s. Please make sure they are available so Foreman can check their versions."
653
+ msgstr ""
654
+
655
+ msgid "This feature is temporarily disabled. "
656
+ msgstr ""
657
+
658
+ msgid "This profile will be used to override the one from scap content"
530
659
  msgstr ""
531
660
 
532
661
  msgid "Total"
@@ -555,7 +684,10 @@ msgstr ""
555
684
  msgid "Unsupported report status format"
556
685
  msgstr ""
557
686
 
558
- msgid "Update a policy"
687
+ msgid "Update a Policy"
688
+ msgstr ""
689
+
690
+ msgid "Update a Tailoring file"
559
691
  msgstr ""
560
692
 
561
693
  msgid "Update an SCAP content"
@@ -567,9 +699,15 @@ msgstr ""
567
699
  msgid "Updated hosts: Unassigned from compliance policy '%s'"
568
700
  msgstr ""
569
701
 
702
+ msgid "Upload DataStream Tailoring file"
703
+ msgstr ""
704
+
570
705
  msgid "Upload New SCAP Content"
571
706
  msgstr ""
572
707
 
708
+ msgid "Upload New Tailoring file"
709
+ msgstr ""
710
+
573
711
  msgid "Upload SCAP DataStream file"
574
712
  msgstr ""
575
713
 
@@ -579,6 +717,9 @@ msgstr ""
579
717
  msgid "Upload new SCAP content file"
580
718
  msgstr ""
581
719
 
720
+ msgid "Upload new Tailoring File"
721
+ msgstr ""
722
+
582
723
  msgid "View Report"
583
724
  msgstr ""
584
725
 
@@ -588,28 +729,49 @@ msgstr ""
588
729
  msgid "XCCDF Profile"
589
730
  msgstr ""
590
731
 
732
+ msgid "XCCDF Profile in Tailoring File"
733
+ msgstr ""
734
+
735
+ msgid "XML containing SCAP content"
736
+ msgstr ""
737
+
738
+ msgid "XML containing tailoring file"
739
+ msgstr ""
740
+
591
741
  msgid "Yes"
592
742
  msgstr ""
593
743
 
594
744
  msgid "You can specify custom cron line, e.g. \"0 3 * * *\", separate each of 5 values by space"
595
745
  msgstr ""
596
746
 
597
- msgid "You must fill cron line"
747
+ msgid "does not come from selected tailoring file"
598
748
  msgstr ""
599
749
 
600
- msgid "You must fill day of month"
750
+ msgid "does not consist of 5 parts separated by space"
601
751
  msgstr ""
602
752
 
603
- msgid "You must fill weekday"
753
+ msgid "invalid type %s"
604
754
  msgstr ""
605
755
 
606
- msgid "invalid type %s"
756
+ msgid "is not a valid value"
757
+ msgstr ""
758
+
759
+ msgid "is not included in SCAP_RESULT"
607
760
  msgstr ""
608
761
 
609
762
  msgid "items selected. Uncheck to Clear"
610
763
  msgstr ""
611
764
 
612
- msgid "read more"
765
+ msgid "must be between 1 and 31"
766
+ msgstr ""
767
+
768
+ msgid "must be present when tailoring file present"
769
+ msgstr ""
770
+
771
+ msgid "must be present when tailoring file profile present"
772
+ msgstr ""
773
+
774
+ msgid "must have Openscap feature"
613
775
  msgstr ""
614
776
 
615
777
  msgid "these Complianace reports"
@@ -3,8 +3,8 @@ FactoryGirl.define do
3
3
  host_id 1
4
4
  policy nil
5
5
  policy_arf_report nil
6
- sequence(:reported_at) { |n| Time.new(1490 + n, 01, 13, 15, 24, 00) }
7
- sequence(:created_at) { |n| Time.new(1490 + n, 01, 13, 15, 24, 00) }
6
+ sequence(:reported_at) { |n| Time.new(1490 + n, 0o1, 13, 15, 24, 0o0) }
7
+ sequence(:created_at) { |n| Time.new(1490 + n, 0o1, 13, 15, 24, 0o0) }
8
8
  logs []
9
9
  status 0
10
10
  metrics {}
@@ -3,4 +3,9 @@ FactoryGirl.define do
3
3
  f.assetable_id { FactoryGirl.create(:host).id }
4
4
  f.assetable_type 'Host::Base'
5
5
  end
6
+
7
+ factory :asset_policy, :class => ForemanOpenscap::AssetPolicy do |f|
8
+ f.asset_id nil
9
+ f.policy_id nil
10
+ end
6
11
  end
@@ -4,16 +4,16 @@ FactoryGirl.define do
4
4
  end
5
5
 
6
6
  factory :openscap_proxy, :class => SmartProxy do
7
- sequence(:name) {|n| "proxy#{n}" }
8
- sequence(:url) {|n| "https://somewhere#{n}.net:8443" }
9
- features [FactoryGirl.create(:openscap_feature)]
7
+ sequence(:name) { |n| "openscap_proxy#{n}" }
8
+ sequence(:url) { |n| "https://anywhere#{n}.net:8443" }
9
+ features { |sp| [sp.association(:openscap_feature)] }
10
10
  end
11
11
 
12
12
  factory :compliance_host, :class => Host::Managed do
13
13
  sequence(:name) { |n| "host#{n}" }
14
14
  sequence(:hostname) { |n| "hostname#{n}" }
15
15
  root_pass 'xybxa6JUkz63w'
16
- openscap_proxy FactoryGirl.create(:openscap_proxy)
16
+ openscap_proxy { SmartProxy.unscoped.with_features('Openscap').first || FactoryGirl.create(:openscap_proxy) }
17
17
  policies []
18
18
  end
19
19
  end
@@ -1,11 +1,16 @@
1
1
  FactoryGirl.define do
2
2
  factory :compliance_log, :class => :log do
3
3
  result "fail"
4
- report
4
+ association :report
5
5
  level_id 1
6
- source nil
7
- after(:build) do |log|
8
- log.message = FactoryGirl.create(:message)
6
+ association :source
7
+ association :message
8
+ end
9
+
10
+ factory :compliance_message, :class => :message do
11
+ sequence(:value) { |n| "message#{n}" }
12
+ after(:build) do |msg|
13
+ msg.digest = Digest::SHA1.hexdigest(msg.value)
9
14
  end
10
15
  end
11
16
  end