hammer_cli_foreman_openscap 0.1.9 → 0.1.13

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
  SHA256:
3
- metadata.gz: 678b37b57981936274fec62371d7f0b29e087bd4675e78f2ac80673e4291efb1
4
- data.tar.gz: 7951dae03743b2ca635500e61fe7d6197995050f06085ea993cc41c0959e4c8a
3
+ metadata.gz: 5b9fb22de3dcf5c153f3db8f0b43a85ec8b0774418d50bb6fedc48fcc6b93f85
4
+ data.tar.gz: 05fbc7be1a7036bea0b65eb9e87c79edff1b59bc5eedd91f90da412363431d37
5
5
  SHA512:
6
- metadata.gz: 605ff8f09fee4a99649fc1ab3354c1827697334b9bb5b3f80c9fbc491974b0e1be0672f85ae746db0ec5d9fe5e68bd543c5446ef8903c39f872b87d7a9e9ad8c
7
- data.tar.gz: d2c0b22b4e4f79d229afaee49f30d0378f9ca71169a3414472da1d7db1a23cc36371dee3c073567e1b44ec640ba9a5603995ab624d43e16bcd58ad8e93ff83f1
6
+ metadata.gz: 8da633b58422dd9b00a48e701df9b28b821ac3d73f64e8f6c48b1b67a01cdfb5ab07f94905dfc5cbadd2982e8dc302c7b789ff7bcdd63a9342970bac2c8f5ae9
7
+ data.tar.gz: e3598b27e8748998ffe668011ad814f36bbd9016e4d0cace44e2c93e0fc210950854273ab8ae801854c08d10fa90d8ab2e3f78d61cc1163c46a454fd4b98e523
data/README.md CHANGED
@@ -17,13 +17,13 @@ all depending on your setup.
17
17
  * rvm
18
18
  * foreman
19
19
 
20
- ###Steps
20
+ ### Steps
21
21
 
22
22
  First, cd into the directory where your projects will live. Then clone everything.
23
23
 
24
24
  ```bash
25
25
  git clone https://github.com/theforeman/hammer-cli-foreman.git
26
- git clone https://github.com/xprazak2/hammer_cli_foreman_openscap.git
26
+ git clone https://github.com/theforeman/hammer_cli_foreman_openscap.git
27
27
  ```
28
28
 
29
29
  Before we bundle, we need to setup our local Gemfile. Edit `Gemfile.local.rb` in your hammer_cli_foreman_openscap directory to point to the local projects instead of using the gems. Enter the following:
@@ -7,6 +7,7 @@ require 'hammer_cli_foreman_openscap/error'
7
7
  require 'hammer_cli_foreman_openscap/exception_handler'
8
8
  require 'hammer_cli_foreman_openscap/hostgroup'
9
9
  require 'hammer_cli_foreman_openscap/host'
10
+ require 'hammer_cli_foreman_openscap/scap_content_profile'
10
11
 
11
12
  module HammerCLIForemanOpenscap
12
13
  require 'hammer_cli_foreman_openscap/version'
@@ -31,6 +32,10 @@ module HammerCLIForemanOpenscap
31
32
  "HammerCLIForemanOpenscap::TailoringFile",
32
33
  "hammer_cli_foreman_openscap/tailoring_file")
33
34
 
35
+ HammerCLI::MainCommand.lazy_subcommand("scap-content-profile", _("Manipulate Scap Content Profiles"),
36
+ "HammerCLIForemanOpenscap::ScapContentProfile",
37
+ "hammer_cli_foreman_openscap/scap_content_profile")
38
+
34
39
  HammerCLIForeman::Host.lazy_subcommand(Host::PoliciesEnc.command_name, _('View policies ENC for host'),
35
40
  "HammerCLIForemanOpenscap::Host::PoliciesEnc",
36
41
  "hammer_cli_foreman_openscap/host")
@@ -88,7 +88,7 @@ module HammerCLIForemanOpenscap
88
88
  return
89
89
  end
90
90
  # get file name from header, remove leading and trailing quotes
91
- filename = response.headers[:content_disposition].match(/filename=(.*)/)[1].chop.reverse.chop.reverse
91
+ filename = response.headers[:content_disposition].match(/filename=(.*);/)[1].chop.reverse.chop.reverse
92
92
  path = option_path.dup
93
93
  path << '/' unless path.end_with? '/'
94
94
  raise HammerCLIForemanOpenscap::DownloadError.new "Cannot save file: #{path} does not exist" unless File.directory?(path)
@@ -7,6 +7,7 @@ module HammerCLIForemanOpenscap
7
7
  output do
8
8
  field :id, _("Id")
9
9
  field :title, _("Title")
10
+ field :digest, _("Digest")
10
11
  end
11
12
  build_options
12
13
  end
@@ -20,6 +21,25 @@ module HammerCLIForemanOpenscap
20
21
  build_options
21
22
  end
22
23
 
24
+ class BulkUpload < HammerCLIForemanOpenscap::CreateCommand
25
+ command_name "bulk-upload"
26
+ action :bulk_upload
27
+
28
+ success_message _('Scap Contents uploaded.')
29
+ failure_message _('Could not upload Scap Contents')
30
+
31
+ output do
32
+ field :errors, _('Errors'), Fields::List, :on_new_line => true, :separator => "\n"
33
+ collection :results, _('Uploaded Scap Contents') do
34
+ field :id, _("Id")
35
+ field :title, _("Title")
36
+ field :original_filename, _("Original Filename")
37
+ end
38
+ end
39
+
40
+ build_options
41
+ end
42
+
23
43
  class DeleteCommand < HammerCLIForemanOpenscap::DeleteCommand
24
44
  success_message _("SCAP content deleted")
25
45
  failure_message _("Could not delete SCAP content")
@@ -0,0 +1,29 @@
1
+ module HammerCLIForemanOpenscap
2
+ class ScapContentProfile < HammerCLIForeman::Command
3
+ resource :scap_content_profiles
4
+
5
+ class ListCommand < HammerCLIForeman::ListCommand
6
+ output do
7
+ field :id, _("Id")
8
+ field :title, _("Title")
9
+ field :profile_id, _("Profile Id")
10
+ from :scap_content do
11
+ field :id, _("Scap Content Id")
12
+ field :title, _("Scap Content Title")
13
+ end
14
+ from :tailoring_file do
15
+ field :id, _("Tailoring File Id")
16
+ field :name, _("Tailoring File Name")
17
+ end
18
+ end
19
+
20
+ def adapter
21
+ @context[:adapter] || :base
22
+ end
23
+
24
+ build_options
25
+ end
26
+
27
+ autoload_subcommands
28
+ end
29
+ end
@@ -1,5 +1,5 @@
1
1
  module HammerCLIForemanOpenscap
2
2
  def self.version
3
- @version ||= Gem::Version.new '0.1.9'
3
+ @version ||= Gem::Version.new '0.1.13'
4
4
  end
5
5
  end
@@ -3,10 +3,9 @@
3
3
  # This file is distributed under the same license as the hammer_cli_foreman_openscap package.
4
4
  # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
5
  #
6
- #, fuzzy
7
6
  msgid ""
8
7
  msgstr ""
9
- "Project-Id-Version: hammer_cli_foreman_openscap 0.1.4\n"
8
+ "Project-Id-Version: hammer_cli_foreman_openscap 0.1.10\n"
10
9
  "Report-Msgid-Bugs-To: \n"
11
10
  "PO-Revision-Date: 2017-09-08 16:19-0400\n"
12
11
  "Last-Translator: Bryan Kearney <bryan.kearney@gmail.com>, 2017\n"
@@ -29,13 +28,26 @@ msgstr ""
29
28
  msgid "Manipulate Tailoring files"
30
29
  msgstr ""
31
30
 
31
+ msgid "Manipulate Scap Content Profiles"
32
+ msgstr ""
33
+
34
+ msgid "View policies ENC for host"
35
+ msgstr ""
36
+
32
37
  msgid "Id"
33
38
  msgstr ""
34
39
 
35
- msgid "Host"
40
+ msgid "Reported at"
41
+ msgstr ""
42
+
43
+ #, fuzzy
44
+ msgid "Host name"
36
45
  msgstr "Hostitel"
37
46
 
38
- msgid "Reported at"
47
+ msgid "OpenSCAP proxy name"
48
+ msgstr ""
49
+
50
+ msgid "Policy name"
39
51
  msgstr ""
40
52
 
41
53
  msgid "Passed"
@@ -53,7 +65,7 @@ msgstr ""
53
65
  msgid "OpenSCAP proxy Id"
54
66
  msgstr ""
55
67
 
56
- msgid "OpenSCAP proxy name"
68
+ msgid "Policy Id"
57
69
  msgstr ""
58
70
 
59
71
  msgid "ARF report deleted"
@@ -77,10 +89,37 @@ msgstr ""
77
89
  msgid "Path to directory where downloaded file will be saved"
78
90
  msgstr ""
79
91
 
80
- msgid "SCAP content title"
92
+ msgid "Profile Id"
81
93
  msgstr ""
82
94
 
83
- msgid "Policy name"
95
+ msgid "Content path"
96
+ msgstr ""
97
+
98
+ msgid "Content download path"
99
+ msgstr ""
100
+
101
+ msgid "Tailoring path"
102
+ msgstr ""
103
+
104
+ msgid "Tailoring download path"
105
+ msgstr ""
106
+
107
+ msgid "Day of month"
108
+ msgstr ""
109
+
110
+ msgid "Hour"
111
+ msgstr ""
112
+
113
+ msgid "Month"
114
+ msgstr ""
115
+
116
+ msgid "Week"
117
+ msgstr ""
118
+
119
+ msgid "OpenSCAP Proxy"
120
+ msgstr ""
121
+
122
+ msgid "SCAP content title"
84
123
  msgstr ""
85
124
 
86
125
  msgid "Name to search by"
@@ -98,9 +137,6 @@ msgstr ""
98
137
  msgid "Weekday"
99
138
  msgstr ""
100
139
 
101
- msgid "Day of month"
102
- msgstr ""
103
-
104
140
  msgid "Cron line"
105
141
  msgstr ""
106
142
 
@@ -116,6 +152,9 @@ msgstr ""
116
152
  msgid "Tailoring file profile Id"
117
153
  msgstr ""
118
154
 
155
+ msgid "Deployment option"
156
+ msgstr ""
157
+
119
158
  msgid "Policy has been deleted"
120
159
  msgstr ""
121
160
 
@@ -173,6 +212,18 @@ msgstr ""
173
212
  msgid "Could not download the SCAP content file"
174
213
  msgstr ""
175
214
 
215
+ msgid "Scap Content Id"
216
+ msgstr ""
217
+
218
+ msgid "Scap Content Title"
219
+ msgstr ""
220
+
221
+ msgid "Tailoring File Id"
222
+ msgstr ""
223
+
224
+ msgid "Tailoring File Name"
225
+ msgstr ""
226
+
176
227
  msgid "Tailoring file successfully created"
177
228
  msgstr ""
178
229
 
@@ -3,10 +3,9 @@
3
3
  # This file is distributed under the same license as the hammer_cli_foreman_openscap package.
4
4
  # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
5
  #
6
- #, fuzzy
7
6
  msgid ""
8
7
  msgstr ""
9
- "Project-Id-Version: hammer_cli_foreman_openscap 0.1.4\n"
8
+ "Project-Id-Version: hammer_cli_foreman_openscap 0.1.10\n"
10
9
  "Report-Msgid-Bugs-To: \n"
11
10
  "PO-Revision-Date: 2017-09-08 16:19-0400\n"
12
11
  "Last-Translator: Dominic Cleal <dominic@cleal.org>, 2017\n"
@@ -29,15 +28,28 @@ msgstr ""
29
28
  msgid "Manipulate Tailoring files"
30
29
  msgstr ""
31
30
 
31
+ msgid "Manipulate Scap Content Profiles"
32
+ msgstr ""
33
+
34
+ msgid "View policies ENC for host"
35
+ msgstr ""
36
+
32
37
  msgid "Id"
33
38
  msgstr "ID"
34
39
 
35
- msgid "Host"
36
- msgstr "Host"
37
-
38
40
  msgid "Reported at"
39
41
  msgstr "Berichtet am"
40
42
 
43
+ #, fuzzy
44
+ msgid "Host name"
45
+ msgstr "Host"
46
+
47
+ msgid "OpenSCAP proxy name"
48
+ msgstr ""
49
+
50
+ msgid "Policy name"
51
+ msgstr "Name der Richtlinie"
52
+
41
53
  msgid "Passed"
42
54
  msgstr "Erfolgreich"
43
55
 
@@ -53,8 +65,9 @@ msgstr ""
53
65
  msgid "OpenSCAP proxy Id"
54
66
  msgstr ""
55
67
 
56
- msgid "OpenSCAP proxy name"
57
- msgstr ""
68
+ #, fuzzy
69
+ msgid "Policy Id"
70
+ msgstr "Name der Richtlinie"
58
71
 
59
72
  msgid "ARF report deleted"
60
73
  msgstr ""
@@ -77,11 +90,39 @@ msgstr ""
77
90
  msgid "Path to directory where downloaded file will be saved"
78
91
  msgstr ""
79
92
 
80
- msgid "SCAP content title"
93
+ #, fuzzy
94
+ msgid "Profile Id"
95
+ msgstr "ID"
96
+
97
+ msgid "Content path"
81
98
  msgstr ""
82
99
 
83
- msgid "Policy name"
84
- msgstr "Name der Richtlinie"
100
+ msgid "Content download path"
101
+ msgstr ""
102
+
103
+ msgid "Tailoring path"
104
+ msgstr ""
105
+
106
+ msgid "Tailoring download path"
107
+ msgstr ""
108
+
109
+ msgid "Day of month"
110
+ msgstr ""
111
+
112
+ msgid "Hour"
113
+ msgstr ""
114
+
115
+ msgid "Month"
116
+ msgstr ""
117
+
118
+ msgid "Week"
119
+ msgstr ""
120
+
121
+ msgid "OpenSCAP Proxy"
122
+ msgstr ""
123
+
124
+ msgid "SCAP content title"
125
+ msgstr ""
85
126
 
86
127
  msgid "Name to search by"
87
128
  msgstr "Zu suchender Name"
@@ -98,9 +139,6 @@ msgstr ""
98
139
  msgid "Weekday"
99
140
  msgstr ""
100
141
 
101
- msgid "Day of month"
102
- msgstr ""
103
-
104
142
  msgid "Cron line"
105
143
  msgstr "Cron-Zeile"
106
144
 
@@ -116,6 +154,9 @@ msgstr ""
116
154
  msgid "Tailoring file profile Id"
117
155
  msgstr ""
118
156
 
157
+ msgid "Deployment option"
158
+ msgstr ""
159
+
119
160
  msgid "Policy has been deleted"
120
161
  msgstr ""
121
162
 
@@ -173,6 +214,22 @@ msgstr ""
173
214
  msgid "Could not download the SCAP content file"
174
215
  msgstr ""
175
216
 
217
+ #, fuzzy
218
+ msgid "Scap Content Id"
219
+ msgstr "ID"
220
+
221
+ #, fuzzy
222
+ msgid "Scap Content Title"
223
+ msgstr "Titel"
224
+
225
+ #, fuzzy
226
+ msgid "Tailoring File Id"
227
+ msgstr "ID"
228
+
229
+ #, fuzzy
230
+ msgid "Tailoring File Name"
231
+ msgstr "Name"
232
+
176
233
  msgid "Tailoring file successfully created"
177
234
  msgstr ""
178
235
 
@@ -5,7 +5,7 @@
5
5
  #
6
6
  msgid ""
7
7
  msgstr ""
8
- "Project-Id-Version: hammer_cli_foreman_openscap 0.1.4\n"
8
+ "Project-Id-Version: hammer_cli_foreman_openscap 0.1.10\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
10
  "PO-Revision-Date: 2017-09-08 15:57-0400\n"
11
11
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
@@ -29,15 +29,27 @@ msgstr ""
29
29
  msgid "Manipulate Tailoring files"
30
30
  msgstr ""
31
31
 
32
- msgid "Id"
32
+ msgid "Manipulate Scap Content Profiles"
33
+ msgstr ""
34
+
35
+ msgid "View policies ENC for host"
33
36
  msgstr ""
34
37
 
35
- msgid "Host"
38
+ msgid "Id"
36
39
  msgstr ""
37
40
 
38
41
  msgid "Reported at"
39
42
  msgstr ""
40
43
 
44
+ msgid "Host name"
45
+ msgstr ""
46
+
47
+ msgid "OpenSCAP proxy name"
48
+ msgstr ""
49
+
50
+ msgid "Policy name"
51
+ msgstr ""
52
+
41
53
  msgid "Passed"
42
54
  msgstr ""
43
55
 
@@ -53,7 +65,7 @@ msgstr ""
53
65
  msgid "OpenSCAP proxy Id"
54
66
  msgstr ""
55
67
 
56
- msgid "OpenSCAP proxy name"
68
+ msgid "Policy Id"
57
69
  msgstr ""
58
70
 
59
71
  msgid "ARF report deleted"
@@ -77,10 +89,37 @@ msgstr ""
77
89
  msgid "Path to directory where downloaded file will be saved"
78
90
  msgstr ""
79
91
 
80
- msgid "SCAP content title"
92
+ msgid "Profile Id"
81
93
  msgstr ""
82
94
 
83
- msgid "Policy name"
95
+ msgid "Content path"
96
+ msgstr ""
97
+
98
+ msgid "Content download path"
99
+ msgstr ""
100
+
101
+ msgid "Tailoring path"
102
+ msgstr ""
103
+
104
+ msgid "Tailoring download path"
105
+ msgstr ""
106
+
107
+ msgid "Day of month"
108
+ msgstr ""
109
+
110
+ msgid "Hour"
111
+ msgstr ""
112
+
113
+ msgid "Month"
114
+ msgstr ""
115
+
116
+ msgid "Week"
117
+ msgstr ""
118
+
119
+ msgid "OpenSCAP Proxy"
120
+ msgstr ""
121
+
122
+ msgid "SCAP content title"
84
123
  msgstr ""
85
124
 
86
125
  msgid "Name to search by"
@@ -98,9 +137,6 @@ msgstr ""
98
137
  msgid "Weekday"
99
138
  msgstr ""
100
139
 
101
- msgid "Day of month"
102
- msgstr ""
103
-
104
140
  msgid "Cron line"
105
141
  msgstr ""
106
142
 
@@ -116,6 +152,9 @@ msgstr ""
116
152
  msgid "Tailoring file profile Id"
117
153
  msgstr ""
118
154
 
155
+ msgid "Deployment option"
156
+ msgstr ""
157
+
119
158
  msgid "Policy has been deleted"
120
159
  msgstr ""
121
160
 
@@ -173,6 +212,18 @@ msgstr ""
173
212
  msgid "Could not download the SCAP content file"
174
213
  msgstr ""
175
214
 
215
+ msgid "Scap Content Id"
216
+ msgstr ""
217
+
218
+ msgid "Scap Content Title"
219
+ msgstr ""
220
+
221
+ msgid "Tailoring File Id"
222
+ msgstr ""
223
+
224
+ msgid "Tailoring File Name"
225
+ msgstr ""
226
+
176
227
  msgid "Tailoring file successfully created"
177
228
  msgstr ""
178
229