emasser 3.10.0 → 3.22.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.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.env-example +18 -12
  3. data/.github/workflows/anchore-syft.yml +38 -0
  4. data/.github/workflows/codeql-analysis.yml +4 -4
  5. data/.github/workflows/gh-pages.yml +1 -1
  6. data/.github/workflows/push-to-docker-mail.yml +6 -7
  7. data/.github/workflows/push-to-docker.yml +6 -6
  8. data/.github/workflows/release.yml +1 -1
  9. data/.github/workflows/rubocop.yml +2 -2
  10. data/.github/workflows/test-cli.yml +5 -5
  11. data/.mergify.yml +11 -11
  12. data/.rubocop.yml +1 -1
  13. data/CHANGELOG.md +58 -2
  14. data/Dockerfile +6 -4
  15. data/Gemfile.lock +108 -64
  16. data/README.md +23 -22
  17. data/docs/features.md +682 -539
  18. data/emasser.gemspec +19 -13
  19. data/images/emasser_architecture.png +0 -0
  20. data/lib/emasser/configuration.rb +136 -35
  21. data/lib/emasser/constants.rb +4 -4
  22. data/lib/emasser/delete.rb +145 -15
  23. data/lib/emasser/errors.rb +9 -0
  24. data/lib/emasser/get.rb +891 -251
  25. data/lib/emasser/help/approvalCac_post_mapper.md +6 -5
  26. data/lib/emasser/help/approvalPac_post_mapper.md +1 -5
  27. data/lib/emasser/help/artifacts_del_mapper.md +2 -2
  28. data/lib/emasser/help/artifacts_post_mapper.md +23 -34
  29. data/lib/emasser/help/artifacts_put_mapper.md +28 -9
  30. data/lib/emasser/help/cloudresource_post_mapper.md +4 -3
  31. data/lib/emasser/help/controls_put_mapper.md +24 -16
  32. data/lib/emasser/help/hardware_post_mapper.md +41 -0
  33. data/lib/emasser/help/hardware_put_mapper.md +42 -0
  34. data/lib/emasser/help/milestone_del_mapper.md +1 -1
  35. data/lib/emasser/help/milestone_post_mapper.md +3 -1
  36. data/lib/emasser/help/milestone_put_mapper.md +1 -8
  37. data/lib/emasser/help/poam_del_mapper.md +1 -1
  38. data/lib/emasser/help/poam_post_mapper.md +40 -14
  39. data/lib/emasser/help/poam_put_mapper.md +43 -18
  40. data/lib/emasser/help/software_post_mapper.md +59 -0
  41. data/lib/emasser/help/software_put_mapper.md +60 -0
  42. data/lib/emasser/help/staticcode_post_mapper.md +0 -4
  43. data/lib/emasser/help/testresults_post_mapper.md +8 -11
  44. data/lib/emasser/output_converters.rb +64 -46
  45. data/lib/emasser/post.rb +603 -231
  46. data/lib/emasser/put.rb +453 -193
  47. data/lib/emasser/version.rb +1 -1
  48. metadata +51 -33
  49. data/images/emasser_architecture.jpg +0 -0
  50. data/images/emasser_diagram-Page-3.jpg +0 -0
data/lib/emasser/get.rb CHANGED
@@ -31,7 +31,7 @@ module Emasser
31
31
  # connection to the web service.
32
32
  #
33
33
  # Endpoint:
34
- # /api - Test connection to the API
34
+ # /api - Test connection to the API
35
35
  class Test < SubCommandBase
36
36
  def self.exit_on_failure?
37
37
  true
@@ -44,7 +44,7 @@ module Emasser
44
44
  puts to_output_hash(result).green
45
45
  rescue EmassClient::ApiError => e
46
46
  puts 'Exception when calling TestApi->test_connection'.red
47
- puts to_output_hash(e).yellow
47
+ puts to_output_hash(e).split('\n').join('. ')
48
48
  end
49
49
  end
50
50
 
@@ -52,18 +52,19 @@ module Emasser
52
52
  #
53
53
  # Endpoint:
54
54
  # /api/systems - Get system information
55
- # /api/systems/{systemId} - Get system information for a specific system
55
+ # /api/systems/{systemId} - Get system information for a specific system
56
56
  class System < SubCommandBase
57
57
  def self.exit_on_failure?
58
58
  true
59
59
  end
60
60
 
61
- desc 'id [--system_name [SYSTEM_NAME]] [--system_owner [SYSTEM_OWNER]]',
61
+ desc 'id [--system-name [SYSTEM_NAME]] [--system-owner [SYSTEM_OWNER]]',
62
62
  'Attempts to provide system ID of a system with name [NAME] and owner [SYSTEM_OWNER]'
63
+ # desc 'id', 'Get a system ID given "name" or "owner"'
63
64
 
64
65
  # Required parameters/fields
65
- option :system_name
66
- option :system_owner
66
+ option :system_name, aliases: '-n'
67
+ option :system_owner, aliases: '-o'
67
68
 
68
69
  def id
69
70
  if options[:system_name].nil? && options[:system_owner].nil?
@@ -72,35 +73,44 @@ module Emasser
72
73
  end
73
74
 
74
75
  begin
75
- results = EmassClient::SystemsApi.new.get_systems
76
- results = filter_systems(results, options[:system_name], options[:system_owner])
77
- results.each { |result| puts "#{result[:systemId]} - #{result[:systemOwner]} - #{result[:name]}" }
76
+ results = EmassClient::SystemsApi.new.get_systems.data
77
+ # Convert the Ruby Object (results) to a Hash (hash) and save each hash to an Array (hash_array)
78
+ hash_array = []
79
+ results.each do |element|
80
+ hash = {}
81
+ # instance_variables returns an array of object’s instance variables
82
+ # instance_variable_get returns the value of the instance variable, given the variable name
83
+ element.instance_variables.each do |v|
84
+ hash[v.to_s.delete('@')] = element.instance_variable_get(v)
85
+ end
86
+ hash_array.push(hash)
87
+ end
88
+ # Filter the hash array based on provided options
89
+ results = filter_systems(hash_array, options[:system_name], options[:system_owner])
90
+ # Output the filtered results
91
+ results.each { |result| puts "#{result['system_id']} - #{result['owning_organization']} - #{result['name']}" }
78
92
  rescue EmassClient::ApiError => e
79
93
  puts 'Exception when calling SystemsApi->get_systems'
80
- puts to_output_hash(e).yellow
94
+ puts to_output_hash(e)
81
95
  end
82
96
  end
83
97
 
84
- # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
85
98
  no_commands do
86
99
  def filter_systems(results, system_name = nil, system_owner = nil)
87
- results = results.to_body if results.respond_to?(:to_body)
88
100
  if system_owner.nil?
89
- results[:data].filter { |result| result[:name].eql?(system_name) }
101
+ results.filter { |result| result['name'].eql?(system_name) }
90
102
  elsif system_name.nil?
91
- results[:data].filter { |result| result[:systemOwner].eql?(system_owner) }
103
+ results.filter { |result| result['owning_organization'].eql?(system_owner) }
92
104
  else
93
- results[:data].filter { |result| result[:name].eql?(system_name) && result[:systemOwner].eql?(system_owner) }
105
+ results.filter { |result| result['name'].eql?(system_name) && result['owning_organization'].eql?(system_owner) }
94
106
  end
95
107
  end
96
108
  end
97
- # rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
98
109
 
99
110
  desc 'byId [options]', 'Retrieve a system - filtered by [options] params'
100
- option :systemId, type: :numeric, required: true,
111
+ option :systemId, aliases: '-s', type: :numeric, required: true,
101
112
  desc: 'A numeric value representing the system identification'
102
- option :includePackage, type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
103
- option :policy, type: :string, required: false, enum: %w[diacap rmf reporting]
113
+ option :policy, aliases: '-p', type: :string, required: false, enum: %w[diacap rmf reporting]
104
114
 
105
115
  def byId
106
116
  optional_options_keys = optional_options(@_initializer).keys
@@ -112,8 +122,8 @@ module Emasser
112
122
  result = EmassClient::SystemsApi.new.get_system(options[:systemId], optional_options)
113
123
  puts to_output_hash(result).green
114
124
  rescue EmassClient::ApiError => e
115
- puts 'Exception when calling SystemsApi->get_system'.red
116
- puts to_output_hash(e).yellow
125
+ puts 'Exception when calling SystemsApi->get_systems'.red
126
+ puts to_output_hash(e).split('\n').join('. ')
117
127
  end
118
128
  end
119
129
  end
@@ -125,19 +135,17 @@ module Emasser
125
135
 
126
136
  desc 'all [options]', 'Retrieves all available system(s) - filtered by [options] params'
127
137
  # Optional parameters/fields
128
- option :registrationType,
138
+ option :registrationType, aliases: '-r',
129
139
  type: :string, required: false,
130
140
  enum: %w[assessAndAuthorize assessOnly guest regular functional cloudServiceProvider commonControlProvider]
131
- option :ditprId, type: :string, required: false,
141
+ option :ditprId, aliases: '-t', type: :string, required: false,
132
142
  desc: 'DoD Information Technology (IT) Portfolio Repository (DITPR) string Id'
133
- option :coamsId, type: :string, required: false,
143
+ option :coamsId, aliases: '-c', type: :string, required: false,
134
144
  desc: 'Cyber Operational Attributes Management System (COAMS) string Id'
135
- option :policy, type: :string, required: false, enum: %w[diacap rmf reporting]
136
-
137
- option :includePackage, type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
138
- option :includeDitprMetrics, type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
139
- option :includeDecommissioned, type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
140
- option :reportsForScorecard, type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
145
+ option :policy, aliases: '-p', type: :string, required: false, enum: %w[diacap rmf reporting]
146
+ option :includeDitprMetrics, aliases: '-M', type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
147
+ option :includeDecommissioned, aliases: '-D', type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
148
+ option :reportsForScorecard, aliases: '-S', type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
141
149
 
142
150
  def all
143
151
  optional_options_keys = optional_options(@_initializer).keys
@@ -150,7 +158,7 @@ module Emasser
150
158
  puts to_output_hash(result).green
151
159
  rescue EmassClient::ApiError => e
152
160
  puts 'Exception when calling SystemsApi->get_systems'.red
153
- puts to_output_hash(e).yellow
161
+ puts to_output_hash(e)
154
162
  end
155
163
  end
156
164
  end
@@ -163,7 +171,7 @@ module Emasser
163
171
  #
164
172
  # Endpoint:
165
173
  # /api/system-roles - Get all available roles
166
- # /api/system-roles/{roleCategory} - Get system roles for provided role catgory
174
+ # /api/system-roles/{roleCategory} - Get system roles for provided role catgory
167
175
  class Roles < SubCommandBase
168
176
  def self.exit_on_failure?
169
177
  true
@@ -176,18 +184,17 @@ module Emasser
176
184
  puts to_output_hash(result).green
177
185
  rescue EmassClient::ApiError => e
178
186
  puts 'Exception when calling SystemRolesApi->get_system_roles'.red
179
- puts to_output_hash(e).yellow
187
+ puts to_output_hash(e)
180
188
  end
181
189
 
182
190
  desc 'byCategory [options]', 'Retrieves role(s) - filtered by [options] params'
183
191
  # Required parameters/fields
184
- option :roleCategory, type: :string, required: true, enum: %w[PAC CAC Other]
185
- option :role, type: :string, required: true,
186
- enum: ['AO', 'Auditor', 'Artifact Manager', 'C&A Team', 'IAO',
187
- 'ISSO', 'PM/IAM', 'SCA', 'User Rep', 'Validator']
192
+ option :roleCategory, aliases: '-c', type: :string, required: true, enum: %w[PAC CAC Other]
193
+ option :role, aliases: '-r', type: :string, required: true,
194
+ desc: 'Accepts single value from options available at base system-roles endpoint e.g., SCA.'
195
+
188
196
  # Optional parameters/fields
189
- option :policy, type: :string, required: false, default: 'rmf', enum: %w[diacap rmf reporting]
190
- option :includeDecommissioned, type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
197
+ option :policy, aliases: '-p', type: :string, required: false, enum: %w[diacap rmf reporting]
191
198
 
192
199
  def byCategory
193
200
  optional_options_keys = optional_options(@_initializer).keys
@@ -199,7 +206,7 @@ module Emasser
199
206
  puts to_output_hash(result).green
200
207
  rescue EmassClient::ApiError => e
201
208
  puts 'Exception when calling SystemRolesApi->get_system_by_role_category_id'.red
202
- puts to_output_hash(e).yellow
209
+ puts to_output_hash(e)
203
210
  end
204
211
  end
205
212
  end
@@ -216,11 +223,11 @@ module Emasser
216
223
 
217
224
  desc 'forSystem', 'Get control information in a system for one or many controls (acronym)'
218
225
  # Required parameters/fields
219
- option :systemId, type: :numeric, required: true,
226
+ option :systemId, aliases: '-s', type: :numeric, required: true,
220
227
  desc: 'A numeric value representing the system identification'
221
228
  # Optional parameters/fields
222
- option :acronyms, type: :string, required: false,
223
- desc: 'The system acronym(s) e.g "AC-1, AC-2" - if not provided all controls for systemId are returned'
229
+ option :acronyms, aliases: '-a', type: :string, required: false,
230
+ desc: 'The system acronym(s) e.g "AC-1, AC-2" - if not provided all controls for systemId are returned'
224
231
 
225
232
  def forSystem
226
233
  optional_options_keys = optional_options(@_initializer).keys
@@ -231,7 +238,7 @@ module Emasser
231
238
  puts to_output_hash(result).green
232
239
  rescue EmassClient::ApiError => e
233
240
  puts 'Exception when calling ControlsApi->get_system_controls'.red
234
- puts to_output_hash(e).yellow
241
+ puts to_output_hash(e)
235
242
  end
236
243
  end
237
244
  end
@@ -248,12 +255,14 @@ module Emasser
248
255
 
249
256
  desc 'forSystem', 'Get one or many test results in a system'
250
257
  # Required parameters/fields
251
- option :systemId, type: :numeric, required: true,
258
+ option :systemId, aliases: '-s', type: :numeric, required: true,
252
259
  desc: 'A numeric value representing the system identification'
253
260
  # Optional parameters/fields
254
- option :controlAcronyms, type: :string, required: false, desc: 'The system acronym(s) e.g "AC-1, AC-2"'
255
- option :ccis, type: :string, required: false, desc: 'The system CCIS string numerical value'
256
- option :latestOnly, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
261
+ option :controlAcronyms, aliases: '-a', type: :string, required: false, desc: 'The system acronym(s) e.g "AC-1, AC-2"'
262
+ option :assessmentProcedures, aliases: '-p', type: :string, required: false,
263
+ desc: 'The system Security Control Assessment Procedure e.g "AC-1.1,AC-1.2"'
264
+ option :ccis, aliases: '-c', type: :string, required: false, desc: 'The system CCIS string numerical value'
265
+ option :latestOnly, aliases: '-L', type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
257
266
 
258
267
  def forSystem
259
268
  optional_options_keys = optional_options(@_initializer).keys
@@ -264,7 +273,7 @@ module Emasser
264
273
  puts to_output_hash(result).green
265
274
  rescue EmassClient::ApiError => e
266
275
  puts 'Exception when calling TestResultsApi->get_system_test_results'.red
267
- puts to_output_hash(e).yellow
276
+ puts to_output_hash(e)
268
277
  end
269
278
  end
270
279
  end
@@ -283,16 +292,18 @@ module Emasser
283
292
  # BY SYSTEM ID ------------------------------------------------------------------
284
293
  desc 'forSystem', 'Get one or many POA&M items in a system'
285
294
  # Required parameters/fields
286
- option :systemId, type: :numeric, required: true,
295
+ option :systemId, aliases: '-s', type: :numeric, required: true,
287
296
  desc: 'A numeric value representing the system identification'
288
297
  # Optional parameters/fields
289
- option :scheduledCompletionDateStart, type: :numeric, required: false,
298
+ option :scheduledCompletionDateStart, aliases: '-d', type: :numeric, required: false,
290
299
  desc: 'The schedule completion start date - Unix time format.'
291
- option :scheduledCompletionDateEnd, type: :numeric, required: false,
300
+ option :scheduledCompletionDateEnd, aliases: '-e', type: :numeric, required: false,
292
301
  desc: 'The scheduled completion end date - Unix time format.'
293
- option :controlAcronyms, type: :string, required: false, desc: 'The system acronym(s) e.g "AC-1" or "AC-1, AC-2"'
294
- option :ccis, type: :string, required: false, desc: 'The system CCIS string numerical value e.g "000123" or "000123,000069"'
295
- option :systemOnly, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
302
+ option :controlAcronyms, aliases: '-a', type: :string, required: false, desc: 'The system acronym(s) e.g "AC-1, AC-2"'
303
+ option :assessmentProcedures, aliases: '-p', type: :string, required: false,
304
+ desc: 'The system Security Control Assessment Procedure e.g "AC-1.1,AC-1.2"'
305
+ option :ccis, aliases: '-c', type: :string, required: false, desc: 'The system CCIS string numerical value'
306
+ option :systemOnly, aliases: '-Y', type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
296
307
 
297
308
  def forSystem
298
309
  optional_options_keys = optional_options(@_initializer).keys
@@ -303,16 +314,16 @@ module Emasser
303
314
  puts to_output_hash(result).green
304
315
  rescue EmassClient::ApiError => e
305
316
  puts 'Exception when calling POAMApi->get_system_poams'.red
306
- puts to_output_hash(e).yellow
317
+ puts to_output_hash(e)
307
318
  end
308
319
  end
309
320
 
310
321
  # BY POAM ID --------------------------------------------------------------
311
322
  desc 'byPoamId', 'Get POA&M item for given systemId and poamId'
312
323
  # Required parameters/fields
313
- option :systemId, type: :numeric, required: true,
324
+ option :systemId, aliases: '-s', type: :numeric, required: true,
314
325
  desc: 'A numeric value representing the system identification'
315
- option :poamId, type: :numeric, required: true,
326
+ option :poamId, aliases: '-p', type: :numeric, required: true,
316
327
  desc: 'A numeric value representing the poam identification'
317
328
 
318
329
  def byPoamId
@@ -320,7 +331,7 @@ module Emasser
320
331
  puts to_output_hash(result).green
321
332
  rescue EmassClient::ApiError => e
322
333
  puts 'Exception when calling POAMApi->get_system_poams_by_poam_id'.red
323
- puts to_output_hash(e).yellow
334
+ puts to_output_hash(e)
324
335
  end
325
336
  end
326
337
 
@@ -336,14 +347,14 @@ module Emasser
336
347
  # MILSTONES by SYSTEM and POAM ID -----------------------------------------
337
348
  desc 'byPoamId', 'Get milestone(s) for given specified system and poam'
338
349
  # Required parameters/fields
339
- option :systemId, type: :numeric, required: true,
350
+ option :systemId, aliases: '-s', type: :numeric, required: true,
340
351
  desc: 'A numeric value representing the system identification'
341
- option :poamId, type: :numeric, required: true,
352
+ option :poamId, aliases: '-p', type: :numeric, required: true,
342
353
  desc: 'A numeric value representing the poam identification'
343
354
  # Optional parameters/fields
344
- option :scheduledCompletionDateStart, type: :numeric, required: false,
355
+ option :scheduledCompletionDateStart, aliases: '-d', type: :numeric, required: false,
345
356
  desc: 'The schedule completion start date - Unix time format.'
346
- option :scheduledCompletionDateEnd, type: :numeric, required: false,
357
+ option :scheduledCompletionDateEnd, aliases: '-e', type: :numeric, required: false,
347
358
  desc: 'The scheduled completion end date - Unix time format.'
348
359
 
349
360
  def byPoamId
@@ -357,18 +368,18 @@ module Emasser
357
368
  puts to_output_hash(result).green
358
369
  rescue EmassClient::ApiError => e
359
370
  puts 'Exception when calling MilestonesApi->get_system_milestones_by_poam_id'.red
360
- puts to_output_hash(e).yellow
371
+ puts to_output_hash(e)
361
372
  end
362
373
  end
363
374
 
364
375
  # MILSTONES by SYSTEM, POAM, and MILESTONE ID -----------------------------------------
365
376
  desc 'byMilestoneId', 'Get milestone(s) for given specified system, poam, and milestone Id'
366
377
  # Required parameters/fields
367
- option :systemId, type: :numeric, required: true,
378
+ option :systemId, aliases: '-s', type: :numeric, required: true,
368
379
  desc: 'A numeric value representing the system identification'
369
- option :poamId, type: :numeric, required: true,
380
+ option :poamId, aliases: '-p', type: :numeric, required: true,
370
381
  desc: 'A numeric value representing the poam identification'
371
- option :milestoneId, type: :numeric, required: true,
382
+ option :milestoneId, aliases: '-m', type: :numeric, required: true,
372
383
  desc: 'A numeric value representing the milestone identification'
373
384
 
374
385
  def byMilestoneId
@@ -378,13 +389,13 @@ module Emasser
378
389
  puts to_output_hash(result).green
379
390
  rescue EmassClient::ApiError => e
380
391
  puts 'Exception when calling MilestonesApi->get_system_milestones_by_poam_id_and_milestone_id'.red
381
- puts to_output_hash(e).yellow
392
+ puts to_output_hash(e)
382
393
  end
383
394
  end
384
395
 
385
- # The Artifact endpoints provide the ability to add new Artifacts
396
+ # The Artifact endpoints provide the ability to view Artifacts
386
397
  # (supporting documentation/evidence for Security Control Assessments
387
- # and system Authorization activities) to a system.
398
+ # and system Authorization activities) for a system.
388
399
  #
389
400
  # Endpoints:
390
401
  # /api/systems/{systemId}/artifacts - Get one or many artifacts in a system
@@ -396,13 +407,15 @@ module Emasser
396
407
 
397
408
  desc 'forSystem', 'Get all system artifacts for a system Id'
398
409
  # Required parameters/fields
399
- option :systemId, type: :numeric, required: true,
410
+ option :systemId, aliases: '-s', type: :numeric, required: true,
400
411
  desc: 'A numeric value representing the system identification'
401
412
  # Optional parameters/fields
402
- option :filename, type: :string, required: false, desc: 'The artifact file name'
403
- option :controlAcronyms, type: :string, required: false, desc: 'The system acronym(s) e.g "AC-1, AC-2"'
404
- option :ccis, type: :string, required: false, desc: 'The system CCIS string numerical value'
405
- option :systemOnly, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
413
+ option :filename, aliases: '-f', type: :string, required: false, desc: 'The artifact file name'
414
+ option :controlAcronyms, aliases: '-a', type: :string, required: false, desc: 'The system acronym(s) e.g "AC-1, AC-2"'
415
+ option :assessmentProcedures, aliases: '-p', type: :string, required: false,
416
+ desc: 'The system Security Control Assessment Procedure e.g "AC-1.1,AC-1.2"'
417
+ option :ccis, aliases: '-c', type: :string, required: false, desc: 'The system CCIS string numerical value'
418
+ option :systemOnly, aliases: '-Y', type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
406
419
 
407
420
  def forSystem
408
421
  optional_options_keys = optional_options(@_initializer).keys
@@ -415,42 +428,67 @@ module Emasser
415
428
  puts to_output_hash(result).green
416
429
  rescue EmassClient::ApiError => e
417
430
  puts 'Exception when calling ArtifactsApi->get_system_artifacts'.red
418
- puts to_output_hash(e).yellow
431
+ puts to_output_hash(e)
419
432
  end
420
433
  end
421
434
 
422
435
  desc 'export', 'Get artifact binary file associated with given filename'
423
436
  # Required parameters/fields
424
- option :systemId, type: :numeric, required: true,
437
+ option :systemId, aliases: '-s', type: :numeric, required: true,
425
438
  desc: 'A numeric value representing the system identification'
426
- option :filename, type: :string, required: true, desc: 'The artifact file name'
427
- option :compress, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
439
+ option :filename, aliases: '-f', type: :string, required: true, desc: 'The artifact file name'
440
+ option :compress, aliases: '-C', type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
441
+ option :printToStdout, aliases: '-o', required: false, desc: 'Output file content to terminal - not valid for zip files'
428
442
  # NOTE: compress is a required parameter, however Thor does not allow a boolean type to be required because it
429
443
  # automatically creates a --no-compress option, which is confusing in the help output:
430
444
  # [--compress], [--no-compress] # BOOLEAN - true or false.
431
445
 
446
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
432
447
  def export
433
448
  optional_options_keys = optional_options(@_initializer).keys
434
449
  optional_options = to_input_hash(optional_options_keys, options)
435
- optional_options.merge!(Emasser::GET_ARTIFACTS_RETURN_TYPE)
450
+
451
+ if options[:printToStdout]
452
+ optional_options.merge!(Emasser::GET_ARTIFACTS_RETURN_TYPE)
453
+ if options[:compress]
454
+ puts 'Output to stdout - compress'.yellow
455
+ else
456
+ puts 'Output to stdout - plain text'.yellow
457
+ end
458
+ else
459
+ # The api method get_system_artifacts_export default return type is
460
+ # file, and it will output the file to the configured EMASSER_DOWNLOAD_DIR
461
+ # or to the default output folder 'eMASSerDownloads'
462
+ export_dir = ENV.fetch('EMASSER_DOWNLOAD_DIR', '')
463
+ export_dir = 'eMASSerDownloads' if export_dir.empty?
464
+ puts "Output to #{export_dir} directory".yellow
465
+ end
436
466
 
437
467
  result = EmassClient::ArtifactsExportApi.new.get_system_artifacts_export(
438
468
  options[:systemId], options[:filename], optional_options
439
469
  )
440
- if options[:compress]
441
- pp result
442
- else
443
- begin
444
- puts JSON.pretty_generate(JSON.parse(result)).green
445
- rescue StandardError
446
- puts result.red
470
+
471
+ unless File.extname(options[:filename]).eql? '.zip'
472
+ # rubocop:disable Style/SoleNestedConditional, Metrics/BlockNesting
473
+ if options[:printToStdout]
474
+ if options[:compress]
475
+ puts result.green
476
+ else
477
+ begin
478
+ puts JSON.pretty_generate(JSON.parse(result)).green
479
+ rescue StandardError
480
+ puts result.red
481
+ end
482
+ end
447
483
  end
448
484
  end
485
+ # rubocop:enable Style/SoleNestedConditional, Metrics/BlockNesting
449
486
  rescue EmassClient::ApiError => e
450
487
  puts 'Exception when calling ArtifactsApi->get_system_artifacts_export'.red
451
- puts to_output_hash(e).yellow
488
+ puts to_output_hash(e)
452
489
  end
453
490
  end
491
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
454
492
 
455
493
  # The Control Approval Chain (CAC) endpoints provide the ability to view the status of
456
494
  # Security Controls and submit them to the second stage in the Control Approval Chain
@@ -467,11 +505,11 @@ module Emasser
467
505
 
468
506
  desc 'controls', 'Get location of one or many controls in CAC'
469
507
  # Required parameters/fields
470
- option :systemId, type: :numeric, required: true,
508
+ option :systemId, aliases: '-s', type: :numeric, required: true,
471
509
  desc: 'A numeric value representing the system identification'
472
510
  # Optional parameters/fields
473
- option :controlAcronyms, type: :string, required: false,
474
- desc: 'The system acronym(s) e.g "AC-1, AC-2" - if not provided all CACs for systemId are returned'
511
+ option :controlAcronyms, aliases: '-a', type: :string, required: false,
512
+ desc: 'The system acronym(s) e.g "AC-1, AC-2" - if not provided all CACs for systemId are returned'
475
513
 
476
514
  def controls
477
515
  optional_options_keys = optional_options(@_initializer).keys
@@ -482,13 +520,13 @@ module Emasser
482
520
  result = EmassClient::CACApi.new.get_system_cac(options[:systemId], optional_options)
483
521
  puts to_output_hash(result).green
484
522
  rescue EmassClient::ApiError => e
485
- puts 'Exception when calling ApprovalChainApi->get_system_cac'.red
486
- puts to_output_hash(e).yellow
523
+ puts 'Exception when calling CACApi->get_system_cac'.red
524
+ puts to_output_hash(e)
487
525
  end
488
526
  end
489
527
  end
490
528
 
491
- # The Package Approval Chain (PAC) endpoints provide the ability to view the
529
+ # The Package Approval Chain (PAC) endpoints provides the ability to view the
492
530
  # status of existing workflows and initiate new workflows for a system.
493
531
  #
494
532
  # Notes:
@@ -505,7 +543,7 @@ module Emasser
505
543
 
506
544
  desc 'package', 'Get location of system package in PAC'
507
545
  # Required parameters/fields
508
- option :systemId, type: :numeric, required: true,
546
+ option :systemId, aliases: '-s', type: :numeric, required: true,
509
547
  desc: 'A numeric value representing the system identification'
510
548
 
511
549
  def package
@@ -513,33 +551,76 @@ module Emasser
513
551
  result = EmassClient::PACApi.new.get_system_pac(options[:systemId])
514
552
  puts to_output_hash(result).green
515
553
  rescue EmassClient::ApiError => e
516
- puts 'Exception when calling ApprovalChainApi->get_system_'.red
517
- puts to_output_hash(e).yellow
554
+ puts 'Exception when calling PACApi->get_system_pac'.red
555
+ puts to_output_hash(e)
518
556
  end
519
557
  end
520
558
 
521
- # The Cybersecurity Maturity Model Certification (CMMC) Assessments endpoint provides
522
- # the ability to view CMMC assessment information. It is available to CMMC eMASS only.
559
+ # The Hardware Baseline endpoints provides the ability to view the
560
+ # hardware assets for a system.
523
561
  #
524
562
  # Endpoints:
525
- # /api/cmmc-assessments - Get CMMC assessment information
526
- class CMMC < SubCommandBase
563
+ # /api/systems/{systemId}/hw-baseline - Get one or many hardware assets in a system
564
+ class Hardware < SubCommandBase
527
565
  def self.exit_on_failure?
528
566
  true
529
567
  end
530
568
 
531
- desc 'assessments', 'Get CMMC assessment information'
532
- long_desc Help.text(:cmmc_get_mapper)
569
+ desc 'assets', 'Get one or many hardware assets in a system'
570
+ # Required parameters/fields
571
+ option :systemId, aliases: '-s', type: :numeric, required: true,
572
+ desc: 'A numeric value representing the system identification'
573
+
574
+ # Optional parameters/fields
575
+ option :pageIndex, aliases: '-i', type: :numeric, required: false, desc: 'The page number to be returned, if not specified starts at page 0'
576
+ option :pageSize, aliases: '-s', type: :numeric, required: false, desc: 'The total entries per page, default is 20,000'
577
+
578
+ def assets
579
+ optional_options_keys = optional_options(@_initializer).keys
580
+ optional_options = to_input_hash(optional_options_keys, options)
581
+
582
+ begin
583
+ # Get hardware assets form provided system
584
+ result = EmassClient::HardwareBaselineApi.new.get_system_hw_baseline(options[:systemId], optional_options)
585
+ puts to_output_hash(result).green
586
+ rescue EmassClient::ApiError => e
587
+ puts 'Exception when calling HardwareBaselineApi->get_system_hw_baseline'.red
588
+ puts to_output_hash(e)
589
+ end
590
+ end
591
+ end
592
+
593
+ # The Software Baseline endpoints provides the ability to view the
594
+ # software assets for a system.
595
+ #
596
+ # Endpoints:
597
+ # /api/systems/{systemId}/sw-baseline - Get one or many software assets in a system
598
+ class Software < SubCommandBase
599
+ def self.exit_on_failure?
600
+ true
601
+ end
533
602
 
603
+ desc 'assets', 'Get one or many software assets in a system'
534
604
  # Required parameters/fields
535
- option :sinceDate, type: :string, required: true, desc: 'The CMMC date. Unix date format'
605
+ option :systemId, aliases: '-s', type: :numeric, required: true,
606
+ desc: 'A numeric value representing the system identification'
536
607
 
537
- def assessments
538
- result = EmassClient::CMMCAssessmentsApi.new.get_cmmc_assessments(options[:sinceDate])
539
- puts to_output_hash(result).green
540
- rescue EmassClient::ApiError => e
541
- puts 'Exception when calling ApprovalChainApi->get_cmmc_assessments'.red
542
- puts to_output_hash(e).yellow
608
+ # Optional parameters/fields
609
+ option :pageIndex, aliases: '-i', type: :numeric, required: false, desc: 'The page number to be returned, if not specified starts at page 0'
610
+ option :pageSize, aliases: '-s', type: :numeric, required: false, desc: 'The total entries per page, default is 20,000'
611
+
612
+ def assets
613
+ optional_options_keys = optional_options(@_initializer).keys
614
+ optional_options = to_input_hash(optional_options_keys, options)
615
+
616
+ begin
617
+ # Get software assets for given system
618
+ result = EmassClient::SoftwareBaselineApi.new.get_system_sw_baseline(options[:systemId], optional_options)
619
+ puts to_output_hash(result).green
620
+ rescue EmassClient::ApiError => e
621
+ puts 'Exception when calling SoftwareBaselineApi->get_system_sw_baseline'.red
622
+ puts to_output_hash(e)
623
+ end
543
624
  end
544
625
  end
545
626
 
@@ -556,10 +637,10 @@ module Emasser
556
637
  desc 'forSite', 'Get location of system package in PAC'
557
638
 
558
639
  # Optional parameters/fields
559
- option :includeInactive, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
560
- option :registrationType,
640
+ option :includeInactive, aliases: '-I', type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
641
+ option :registrationType, aliases: '-r',
561
642
  type: :string, required: false,
562
- enum: %w[assessAndAuthorize assessOnly guest regular functional cloudServiceProvider commonControlProvider]
643
+ enum: %w[assessAndAuthorize assessOnly guest regular functional cloudServiceProvider commonControlProvider authorityToUse reciprocityAcceptance]
563
644
 
564
645
  def forSite
565
646
  optional_options_keys = optional_options(@_initializer).keys
@@ -569,7 +650,7 @@ module Emasser
569
650
  puts to_output_hash(result).green
570
651
  rescue EmassClient::ApiError => e
571
652
  puts 'Exception when calling ApprovalChainApi->get_workflow_definitions'.red
572
- puts to_output_hash(e).yellow
653
+ puts to_output_hash(e)
573
654
  end
574
655
  end
575
656
 
@@ -577,20 +658,20 @@ module Emasser
577
658
  # active and historical workflows for a system.
578
659
  #
579
660
  # Endpoints:
580
- # /api/workflows/instances - Get workflow instances in a site
581
- # /api/workflows/instances/{workflowInstanceId} - Get workflow instance by ID
661
+ # /api/systems/{systemId}/workflow-instances - Get workflow instances in a system
662
+ # /api/systems/{systemId}/workflow-instances/{workflowInstanceId} - Get workflow instance by ID in a system
582
663
  class WorkflowInstances < SubCommandBase
583
664
  def self.exit_on_failure?
584
665
  true
585
666
  end
586
667
 
587
- desc 'all', 'Get workflow instances in a site'
588
-
668
+ desc 'all', 'Get detailed information for all active and historical workflows'
589
669
  # Optional parameters/fields
590
- option :includeComments, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
591
- option :pageIndex, type: :numeric, required: false, desc: 'The page number to be returned'
592
- option :sinceDate, type: :string, required: false, desc: 'The workflow instance date. Unix date format'
593
- option :status, type: :string, required: false, enum: %w[active inactive all]
670
+ option :includeComments, aliases: '-C', type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
671
+ option :includeDecommissionSystems, aliases: '-D', type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
672
+ option :pageIndex, aliases: '-p', type: :numeric, required: false, desc: 'The page number to be returned'
673
+ option :sinceDate, aliases: '-d', type: :string, required: false, desc: 'The workflow instance date. Unix date format'
674
+ option :status, aliases: '-s', type: :string, required: false, enum: %w[active inactive all]
594
675
 
595
676
  def all
596
677
  optional_options_keys = optional_options(@_initializer).keys
@@ -600,62 +681,174 @@ module Emasser
600
681
  puts to_output_hash(result).green
601
682
  rescue EmassClient::ApiError => e
602
683
  puts 'Exception when calling ApprovalChainApi->get_system_workflow_instances'.red
603
- puts to_output_hash(e).yellow
684
+ puts to_output_hash(e)
604
685
  end
605
686
 
606
687
  # Workflow by workflowInstanceId ---------------------------------------------------------
607
- desc 'byInstanceId', 'Get workflow instance by ID'
688
+ desc 'byInstanceId', 'Get workflow instance by ID in a system'
608
689
 
609
690
  # Required parameters/fields
610
- option :workflowInstanceId, type: :numeric, required: true,
691
+ option :workflowInstanceId, aliases: '-w', type: :numeric, required: true,
611
692
  desc: 'A numeric value representing the workflowInstance identification'
612
693
 
613
694
  def byInstanceId
614
- opts = Emasser::GET_WORKFLOWINSTANCES_RETURN_TYPE
615
- result = EmassClient::WorkflowInstancesApi.new
616
- .get_system_workflow_instances_by_workflow_instance_id(options[:workflowInstanceId], opts)
695
+ # opts = Emasser::GET_WORKFLOWINSTANCES_RETURN_TYPE
696
+
697
+ result = EmassClient::WorkflowInstancesApi
698
+ .new.get_system_workflow_instances_by_workflow_instance_id(options[:workflowInstanceId])
617
699
  puts to_output_hash(result).green
618
700
  rescue EmassClient::ApiError => e
619
701
  puts 'Exception when calling ApprovalChainApi->get_system_workflow_instances_by_workflow_instance_id'.red
620
- puts to_output_hash(e).yellow
702
+ puts to_output_hash(e)
703
+ end
704
+ end
705
+
706
+ # The Cybersecurity Maturity Model Certification (CMMC) Assessments endpoint provides
707
+ # the ability to view CMMC assessment information. It is available to CMMC eMASS only.
708
+ #
709
+ # Endpoints:
710
+ # /api/cmmc-assessments - Get CMMC assessment information
711
+ class CMMC < SubCommandBase
712
+ def self.exit_on_failure?
713
+ true
714
+ end
715
+
716
+ desc 'assessments', 'Get CMMC assessment information'
717
+ long_desc Help.text(:cmmc_get_mapper)
718
+
719
+ # Required parameters/fields
720
+ option :sinceDate, aliases: '-d', type: :string, required: true, desc: 'The CMMC date. Unix date format'
721
+
722
+ def assessments
723
+ result = EmassClient::CMMCAssessmentsApi.new.get_cmmc_assessments(options[:sinceDate])
724
+ puts to_output_hash(result).green
725
+ rescue EmassClient::ApiError => e
726
+ puts 'Exception when calling ApprovalChainApi->get_cmmc_assessments'.red
727
+ puts to_output_hash(e)
621
728
  end
622
729
  end
623
730
 
624
731
  # The Dashboards endpoints provide the ability to view data contained in dashboard exports.
625
- # In the eMASS front end, these dashboard exports are generated as Excel exports.
732
+ # In the eMASS frontend, these dashboard exports are generated as Excel exports.
626
733
  # Each dashboard dataset available from the API is automatically updated with the current
627
734
  # configuration of the dashboard and the instance of eMASS as the dashboard changes.
628
735
  #
629
- # Endpoints:
630
- # /api/dashboards/system-status-details - Get systems status detail dashboard information
631
- # /api/dashboards/system-control-compliance-summary - Get systems control compliance summary dashboard information
632
- # /api/dashboards/system-security-controls-details - Get systems security control details dashboard information
633
- # /api/dashboards/system-assessment-procedures-details - Get systems assessement procdures details dashboard information
634
- # /api/dashboards/system-poam-summary - Get systems POA&Ms summary dashboard information
635
- # /api/dashboards/system-poam-details - Get system POA&Ms details dashboard information
636
- # /api/dashboards/system-artifacts-summary - Get system Artifacts summary information.
637
- # /api/dashboards/system-artifacts-details - Get system Artifacts details information.
638
- # /api/dashboards/system-hardware-summary - Get system hardware summary dashboard information
639
- # /api/dashboards/system-hardware-details - Get system hardware details dashboard information
640
- # /api/dashboards/system-sensor-hardware-summary - Get system sensor hardware summary dashboard information
641
- # /api/dashboards/system-sensor-hardware-details - Get system sensor hardware details dashboard information
642
- # /api/dashboards/system-software-summary - Get system software summary dashboard information
643
- # /api/dashboards/system-software-details - Get system ssoftware details dashboard information
644
- # /api/dashboards/system-ports-protocols-summary - Get system ports and protocols summary dashboard information
645
- # /api/dashboards/system-ports-protocols-details - Get system ports and protocols details dashboard information
646
- # /api/dashboards/system-conmon-integration-status-summary - Get system conmon integration status summary dashboard information
647
- # /api/dashboards/system-associations-details - Get system associations details dashboard information
648
- # /api/dashboards/user-system-assignments-details - Get user system assignments details dashboard information
649
- # /api/dashboards/system-privacy-summary - Get user system privacy summary dashboard information
650
- # /api/dashboards/va-omb-fisma-saop-summary - Get VA OMB-FISMA SAOP summary dashboard information
651
- # /api/dashboards/va-system-aa-summary - Get VA system A&A summary dashboard information
652
- # /api/dashboards/va-system-a2-summary - Get VA system A2.0 summary dashboard information
653
- # /api/dashboards/va-system-pl-109-reporting-summary - Get workflow instance by ID in a system
654
- # /api/dashboards/va-system-fisma-inventory-summary - Get VA system FISMA inventory summary dashboard information
655
- # /api/dashboards/va-system-fisma-inventory-crypto-summary - Get VA system FISMA inventory crypto summary dashboard information
656
- # /api/dashboards/va-system-threat-risks-summary - Get VA System Threat Risks Summary dashboard information
657
- # /api/dashboards/va-system-threat-sources-details - Get VA System Threat Sources Details dashboard information
658
- # /api/dashboards/va-system-threat-architecture-details - Get VA System Threat Architecture Details dashboard information
736
+ # Endpoints: (57)
737
+ # ---------------------------------------------------------------------------
738
+ # System Status Dashboard
739
+ # /api/dashboards/system-status-details
740
+ # ---------------------------------------------------------------------------
741
+ # System Terms / Conditions Dashboards
742
+ # /api/dashboards/system-terms-conditions-summary
743
+ # /api/dashboards/system-terms-conditions-details
744
+ # ---------------------------------------------------------------------------
745
+ # System Connectivity/CCSD
746
+ # /api/dashboards/system-connectivity-ccsd-summary
747
+ # /api/dashboards/system-connectivity-ccsd-details
748
+ # ---------------------------------------------------------------------------
749
+ # System ATC/IATC
750
+ # /api/dashboards/system-atc-iatc-details
751
+ # ---------------------------------------------------------------------------
752
+ # System Questionnaire
753
+ # /api/dashboards/system-questionnaire-summary
754
+ # /api/dashboards/system-questionnaire-details
755
+ # ---------------------------------------------------------------------------
756
+ # System Workflows Dashboard
757
+ # /api/dashboards/system-workflows-history-summary
758
+ # /api/dashboards/system-workflows-history-details
759
+ # /api/dashboards/system-workflows-history-stage-details
760
+ # ---------------------------------------------------------------------------
761
+ # System Security Controls Dashboard
762
+ # /api/dashboards/system-control-compliance-summary
763
+ # /api/dashboards/system-security-controls-details
764
+ # /api/dashboards/system-assessment-procedures-details
765
+ # ---------------------------------------------------------------------------
766
+ # System POA&M Dashboards
767
+ # /api/dashboards/system-poam-summary
768
+ # /api/dashboards/system-poam-details
769
+ # ---------------------------------------------------------------------------
770
+ # System Artifacts Dashboards
771
+ # /api/dashboards/system-artifacts-summary
772
+ # /api/dashboards/system-artifacts-details
773
+ # ---------------------------------------------------------------------------
774
+ # System Hardware Dashboards
775
+ # /api/dashboards/system-hardware-summary
776
+ # /api/dashboards/system-hardware-details
777
+ # ---------------------------------------------------------------------------
778
+ # System Sensor Hardware Dashboards
779
+ # /api/dashboards/system-sensor-hardware-summary
780
+ # /api/dashboards/system-sensor-hardware-details
781
+ # ---------------------------------------------------------------------------
782
+ # System Software Dashboards
783
+ # /api/dashboards/system-software-summary
784
+ # /api/dashboards/system-software-details
785
+ # ---------------------------------------------------------------------------
786
+ # System Sensor Software Dashboards
787
+ # /api/dashboards/system-sensor-software-summary
788
+ # /api/dashboards/system-sensor-software-details
789
+ # /api/dashboards/system-sensor-software-counts
790
+ #--------------------------------------------------------------------------
791
+ # System Critical Assets
792
+ # /api/dashboards/system-critical-assets-summary
793
+ #--------------------------------------------------------------------------
794
+ # System Vulnerability Dashboards
795
+ # /api/dashboards/system-vulnerability-summary
796
+ # ---------------------------------------------------------------------------
797
+ # System Device Findings Dashboards
798
+ # /api/dashboards/system-device-findings-summary
799
+ # /api/dashboards/system-device-findings-details
800
+ #--------------------------------------------------------------------------
801
+ # System Applications Findings Dashboards
802
+ # /api/dashboards/system-application-findings-summary
803
+ # /api/dashboards/system-application-findings-details
804
+ # ---------------------------------------------------------------------------
805
+ # Ports and Protocols Dashboards
806
+ # /api/dashboards/system-ports-protocols-summary
807
+ # /api/dashboards/system-ports-protocols-details
808
+ #----------------------------------------------------------------------------
809
+ # System CONMON Integration Status Dashboard
810
+ # /api/dashboards/system-conmon-integration-status-summary
811
+ #----------------------------------------------------------------------------
812
+ # System Associations Dashboard
813
+ # /api/dashboards/system-associations-details
814
+ #----------------------------------------------------------------------------
815
+ # User System Assignments Dashboard
816
+ # /api/dashboards/user-system-assignments-details
817
+ #----------------------------------------------------------------------------
818
+ # Organization Migration Status
819
+ # /api/dashboards/organization-migration-status-summary
820
+ #----------------------------------------------------------------------------
821
+ # System Migration Status
822
+ # /api/dashboards/system-migration-status-summary
823
+ #----------------------------------------------------------------------------
824
+ # System FISMA Metrics
825
+ # /api/dashboards/system-fisma-metrics
826
+ #----------------------------------------------------------------------------
827
+ # Coast Guard System FISMA Metrics
828
+ # /api/dashboards/coastguard-system-fisma-metrics
829
+ #----------------------------------------------------------------------------
830
+ # System Privacy Dashboards
831
+ # /api/dashboards/system-privacy-summary
832
+ #--------------------------------------------------------------------------
833
+ # VA OMB FISMA
834
+ # /api/dashboards/va-omb-fisma-saop-summary
835
+ #----------------------------------------------------------------------------
836
+ # VA Systems Dashboard
837
+ # /api/dashboards/va-system-icamp-tableau-poam-details
838
+ # /api/dashboards/va-system-aa-summary
839
+ # /api/dashboards/va-system-a2-summary
840
+ # /api/dashboards/va-system-pl-109-reporting-summary
841
+ # /api/dashboards/va-system-fisma-inventory-summary
842
+ # /api/dashboards/va-system-fisma-inventory-crypto-summary
843
+ # /api/dashboards/va-system-threat-risks-summary
844
+ # /api/dashboards/va-system-threat-sources-details
845
+ # /api/dashboards/va-system-threat-architecture-details
846
+ #----------------------------------------------------------------------------
847
+ # CMMC Assessment Dashboards
848
+ # /api/dashboards/cmmc-assessment-status-summary
849
+ # /api/dashboards/cmmc-assessment-requirements-compliance-summary
850
+ # /api/dashboards/cmmc-assessment-security-requirements-details
851
+ # /api/dashboards/cmmc-assessment-requirement-objectives-details
659
852
 
660
853
  class Dashboards < SubCommandBase
661
854
  def self.exit_on_failure?
@@ -663,16 +856,13 @@ module Emasser
663
856
  end
664
857
 
665
858
  # Required parameters/fields
666
- class_option :orgId, aliases: '-o', type: :numeric,
859
+ class_option :orgId, aliases: '-o', type: :numeric, required: true,
667
860
  desc: 'A numeric value representing the system identification'
668
861
 
669
862
  # Optional parameters/fields
670
- class_option :excludeinherited, aliases: '-I', type: :boolean, required: false, default: false,
671
- desc: 'BOOLEAN - true or false, default false.'
672
- class_option :pageIndex, aliases: '-i', type: :numeric, required: false,
673
- desc: 'The page number to be returned, if not specified starts at page 0'
674
- class_option :pageSize, aliases: '-s', type: :numeric, required: false,
675
- desc: 'The total entries per page, default is 20,000'
863
+ class_option :excludeinherited, aliases: '-I', type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false, default false.'
864
+ class_option :pageIndex, aliases: '-i', type: :numeric, required: false, desc: 'The page number to be returned, if not specified starts at page 0'
865
+ class_option :pageSize, aliases: '-s', type: :numeric, required: false, desc: 'The total entries per page, default is 20,000'
676
866
 
677
867
  #--------------------------------------------------------------------------
678
868
  # System Status Dashboard
@@ -682,44 +872,204 @@ module Emasser
682
872
  optional_options_keys = optional_options(@_initializer).keys
683
873
  optional_options = to_input_hash(optional_options_keys, options)
684
874
 
685
- result = EmassClient::DashboardsApi.new.get_system_status_details(
875
+ result = EmassClient::SystemStatusDashboardApi.new.get_system_status_details(
876
+ options[:orgId], optional_options
877
+ )
878
+ puts to_output_hash(result).green
879
+ rescue EmassClient::ApiError => e
880
+ puts 'Exception when calling SystemStatusDashboardApi->get_system_status_details'.red
881
+ puts to_output_hash(e)
882
+ end
883
+
884
+ #----------------------------------------------------------------------------
885
+ # System Terms / Conditions Dashboards
886
+ # /api/dashboards/system-terms-conditions-summary
887
+ desc 'terms_conditions_summary', 'Get systems terms conditions summary dashboard information'
888
+ def terms_conditions_summary
889
+ optional_options_keys = optional_options(@_initializer).keys
890
+ optional_options = to_input_hash(optional_options_keys, options)
891
+
892
+ result = EmassClient::SystemTermsConditionsDashboardsApi.new.get_system_terms_conditions_summary(
893
+ options[:orgId], optional_options
894
+ )
895
+ puts to_output_hash(result).green
896
+ rescue EmassClient::ApiError => e
897
+ puts 'Exception when calling SystemTermsConditionsDashboardsApi->get_system_terms_conditions_summary'.red
898
+ puts to_output_hash(e)
899
+ end
900
+
901
+ # /api/dashboards/system-terms-conditions-details
902
+ desc 'terms_conditions_details', 'Get systems terms conditions details dashboard information'
903
+ def terms_conditions_details
904
+ optional_options_keys = optional_options(@_initializer).keys
905
+ optional_options = to_input_hash(optional_options_keys, options)
906
+
907
+ result = EmassClient::SystemTermsConditionsDashboardsApi.new.get_system_terms_conditions_details(
908
+ options[:orgId], optional_options
909
+ )
910
+ puts to_output_hash(result).green
911
+ rescue EmassClient::ApiError => e
912
+ puts 'Exception when calling SystemTermsConditionsDashboardsApi->get_system_terms_conditions_details'.red
913
+ puts to_output_hash(e)
914
+ end
915
+
916
+ # ---------------------------------------------------------------------------
917
+ # System Connectivity/CCSD
918
+ # /api/dashboards/system-connectivity-ccsd-summary
919
+ desc 'connectivity_ccsd_summary', 'Get systems connectivity CCSD summary dashboard information'
920
+ def connectivity_ccsd_summary
921
+ optional_options_keys = optional_options(@_initializer).keys
922
+ optional_options = to_input_hash(optional_options_keys, options)
923
+
924
+ result = EmassClient::SystemConnectivityCCSDDashboardsApi.new.get_system_connectivity_ccsd_summary(
925
+ options[:orgId], optional_options
926
+ )
927
+ puts to_output_hash(result).green
928
+ rescue EmassClient::ApiError => e
929
+ puts 'Exception when calling SystemConnectivityCCSDDashboardsApi->get_system_connectivity_ccsd_summary'.red
930
+ puts to_output_hash(e)
931
+ end
932
+
933
+ # /api/dashboards/system-connectivity-ccsd-details
934
+ desc 'connectivity_ccsd_details', 'Get systems connectivity CCSD details dashboard information'
935
+ def connectivity_ccsd_details
936
+ optional_options_keys = optional_options(@_initializer).keys
937
+ optional_options = to_input_hash(optional_options_keys, options)
938
+
939
+ result = EmassClient::SystemConnectivityCCSDDashboardsApi.new.get_system_connectivity_ccsd_details(
940
+ options[:orgId], optional_options
941
+ )
942
+ puts to_output_hash(result).green
943
+ rescue EmassClient::ApiError => e
944
+ puts 'Exception when calling SystemConnectivityCCSDDashboardsApi->get_system_connectivity_ccsd_details'.red
945
+ puts to_output_hash(e)
946
+ end
947
+
948
+ # ---------------------------------------------------------------------------
949
+ # System ATC/IATC
950
+ # /api/dashboards/system-atc-iatc-details
951
+ desc 'atc_iatc_details', 'Get systems ATC/IATC details dashboard information'
952
+ def atc_iatc_details
953
+ optional_options_keys = optional_options(@_initializer).keys
954
+ optional_options = to_input_hash(optional_options_keys, options)
955
+
956
+ result = EmassClient::SystemATCIATCDashboardApi.new.get_system_atc_iatc_details(
957
+ options[:orgId], optional_options
958
+ )
959
+ puts to_output_hash(result).green
960
+ rescue EmassClient::ApiError => e
961
+ puts 'Exception when calling SystemATCIATCDashboardApi->get_system_atc_iatc_details'.red
962
+ puts to_output_hash(e)
963
+ end
964
+
965
+ # ---------------------------------------------------------------------------
966
+ # System Questionnaire
967
+ # /api/dashboards/system-questionnaire-summary
968
+ desc 'questionnaire_summary', 'Get systems connequestionnaire summary dashboard information'
969
+ def questionnaire_summary
970
+ optional_options_keys = optional_options(@_initializer).keys
971
+ optional_options = to_input_hash(optional_options_keys, options)
972
+
973
+ result = EmassClient::SystemQuestionnaireDashboardsApi.new.get_system_questionnaire_summary(
974
+ options[:orgId], optional_options
975
+ )
976
+ puts to_output_hash(result).green
977
+ rescue EmassClient::ApiError => e
978
+ puts 'Exception when calling SystemQuestionnaireDashboardsApi->get_system_questionnaire_summary'.red
979
+ puts to_output_hash(e)
980
+ end
981
+
982
+ # /api/dashboards/system-questionnaire-details
983
+ desc 'questionnaire_details', 'Get systems connequestionnaire details dashboard information'
984
+ def questionnaire_details
985
+ optional_options_keys = optional_options(@_initializer).keys
986
+ optional_options = to_input_hash(optional_options_keys, options)
987
+
988
+ result = EmassClient::SystemQuestionnaireDashboardsApi.new.get_system_questionnaire_details(
989
+ options[:orgId], optional_options
990
+ )
991
+ puts to_output_hash(result).green
992
+ rescue EmassClient::ApiError => e
993
+ puts 'Exception when calling SystemQuestionnaireDashboardsApi->get_system_questionnaire_details'.red
994
+ puts to_output_hash(e)
995
+ end
996
+
997
+ # ---------------------------------------------------------------------------
998
+ # System Workflows Dashboard
999
+ # /api/dashboards/system-workflows-history-summary
1000
+ desc 'workflows_history_summary', 'Get system workflows history summary dashboard information'
1001
+ def workflows_history_summary
1002
+ optional_options_keys = optional_options(@_initializer).keys
1003
+ optional_options = to_input_hash(optional_options_keys, options)
1004
+
1005
+ result = EmassClient::SystemWorkflowsDashboardsApi.new.get_system_workflows_history_summary(
1006
+ options[:orgId], optional_options
1007
+ )
1008
+ puts to_output_hash(result).green
1009
+ rescue EmassClient::ApiError => e
1010
+ puts 'Exception when calling SystemWorkflowsDashboardsApi->get_system_workflows_history_summary'.red
1011
+ puts to_output_hash(e)
1012
+ end
1013
+ #--------------------------------------------------------------------------
1014
+ # /api/dashboards/system-workflows-history-details
1015
+ desc 'workflows_history_details', 'Get system workflows history details dashboard information'
1016
+ def workflows_history_details
1017
+ optional_options_keys = optional_options(@_initializer).keys
1018
+ optional_options = to_input_hash(optional_options_keys, options)
1019
+
1020
+ result = EmassClient::SystemWorkflowsDashboardsApi.new.get_system_workflows_history_details(
1021
+ options[:orgId], optional_options
1022
+ )
1023
+ puts to_output_hash(result).green
1024
+ rescue EmassClient::ApiError => e
1025
+ puts 'Exception when calling SystemWorkflowsDashboardsApi->get_system_workflows_history_details'.red
1026
+ puts to_output_hash(e)
1027
+ end
1028
+ #--------------------------------------------------------------------------
1029
+ # /api/dashboards/system-workflows-history-stage-details
1030
+ desc 'workflows_history_stage_details', 'Get system workflows history stage detail dashboard information'
1031
+ def workflows_history_stage_details
1032
+ optional_options_keys = optional_options(@_initializer).keys
1033
+ optional_options = to_input_hash(optional_options_keys, options)
1034
+
1035
+ result = EmassClient::SystemWorkflowsDashboardsApi.new.get_system_workflows_history_stage_details(
686
1036
  options[:orgId], optional_options
687
1037
  )
688
1038
  puts to_output_hash(result).green
689
1039
  rescue EmassClient::ApiError => e
690
- puts 'Exception when calling DashboardsApi->get_system_status_details'.red
1040
+ puts 'Exception when calling SystemWorkflowsDashboardsApi->get_system_workflows_history_stage_details'.red
691
1041
  puts to_output_hash(e)
692
1042
  end
693
1043
 
694
1044
  #--------------------------------------------------------------------------
695
- # Enterprise Security Controls Dashboard
1045
+ # Security Controls Dashboards
696
1046
  # /api/dashboards/system-control-compliance-summary
697
1047
  desc 'control_compliance_summary', 'Get systems control compliance summary dashboard information'
698
1048
  def control_compliance_summary
699
1049
  optional_options_keys = optional_options(@_initializer).keys
700
1050
  optional_options = to_input_hash(optional_options_keys, options)
701
1051
 
702
- result = EmassClient::DashboardsApi.new.get_system_control_compliance_summary(
1052
+ result = EmassClient::SystemSecurityControlsDashboardsApi.new.get_system_control_compliance_summary(
703
1053
  options[:orgId], optional_options
704
1054
  )
705
1055
  puts to_output_hash(result).green
706
1056
  rescue EmassClient::ApiError => e
707
- puts 'Exception when calling DashboardsApi->get_system_control_compliance_summary'.red
1057
+ puts 'Exception when calling SystemSecurityControlsDashboardsApi->get_system_control_compliance_summary'.red
708
1058
  puts to_output_hash(e)
709
1059
  end
710
1060
 
711
1061
  # /api/dashboards/system-security-controls-details
712
1062
  desc 'security_control_details', 'Get systems security control details dashboard information'
713
- def security_control_details
1063
+ def security_controls_details
714
1064
  optional_options_keys = optional_options(@_initializer).keys
715
1065
  optional_options = to_input_hash(optional_options_keys, options)
716
1066
 
717
- result = EmassClient::DashboardsApi.new.get_system_security_control_details(
1067
+ result = EmassClient::SystemSecurityControlsDashboardsApi.new.get_system_security_control_details(
718
1068
  options[:orgId], optional_options
719
1069
  )
720
1070
  puts to_output_hash(result).green
721
1071
  rescue EmassClient::ApiError => e
722
- puts 'Exception when calling DashboardsApi->get_system_security_control_details'.red
1072
+ puts 'Exception when calling SystemSecurityControlsDashboardsApi->get_system_security_control_details'.red
723
1073
  puts to_output_hash(e)
724
1074
  end
725
1075
 
@@ -729,29 +1079,29 @@ module Emasser
729
1079
  optional_options_keys = optional_options(@_initializer).keys
730
1080
  optional_options = to_input_hash(optional_options_keys, options)
731
1081
 
732
- result = EmassClient::DashboardsApi.new.get_system_assessment_procedures_details(
1082
+ result = EmassClient::SystemSecurityControlsDashboardsApi.new.get_system_assessment_procedures_details(
733
1083
  options[:orgId], optional_options
734
1084
  )
735
1085
  puts to_output_hash(result).green
736
1086
  rescue EmassClient::ApiError => e
737
- puts 'Exception when calling DashboardsApi->get_system_assessment_procedures_details'.red
1087
+ puts 'Exception when calling SystemSecurityControlsDashboardsApi->get_system_assessment_procedures_details'.red
738
1088
  puts to_output_hash(e)
739
1089
  end
740
1090
 
741
1091
  #--------------------------------------------------------------------------
742
- # Enterprise POA&M Dashboard
1092
+ # Ststem POA&M Dashboard
743
1093
  # /api/dashboards/system-poam-summary
744
1094
  desc 'poam_summary', 'Get systems POA&Ms summary dashboard information'
745
1095
  def poam_summary
746
1096
  optional_options_keys = optional_options(@_initializer).keys
747
1097
  optional_options = to_input_hash(optional_options_keys, options)
748
1098
 
749
- result = EmassClient::DashboardsApi.new.get_system_poam_summary(
1099
+ result = EmassClient::SystemPOAMDashboardsApi.new.get_system_poam_summary(
750
1100
  options[:orgId], optional_options
751
1101
  )
752
1102
  puts to_output_hash(result).green
753
1103
  rescue EmassClient::ApiError => e
754
- puts 'Exception when calling DashboardsApi->get_system_poam_summary'.red
1104
+ puts 'Exception when calling SystemPOAMDashboardsApi->get_system_poam_summary'.red
755
1105
  puts to_output_hash(e)
756
1106
  end
757
1107
 
@@ -761,29 +1111,29 @@ module Emasser
761
1111
  optional_options_keys = optional_options(@_initializer).keys
762
1112
  optional_options = to_input_hash(optional_options_keys, options)
763
1113
 
764
- result = EmassClient::DashboardsApi.new.get_system_poam_details(
1114
+ result = EmassClient::SystemPOAMDashboardsApi.new.get_system_poam_details(
765
1115
  options[:orgId], optional_options
766
1116
  )
767
1117
  puts to_output_hash(result).green
768
1118
  rescue EmassClient::ApiError => e
769
- puts 'Exception when calling DashboardsApi->get_system_poam_details'.red
1119
+ puts 'Exception when calling SystemPOAMDashboardsApi->get_system_poam_details'.red
770
1120
  puts to_output_hash(e)
771
1121
  end
772
1122
 
773
1123
  #--------------------------------------------------------------------------
774
- # Enterprise Artifacts Dashboard
1124
+ # System Artifacts Dashboard
775
1125
  # /api/dashboards/system-artifacts-summary
776
1126
  desc 'artifacts_summary', 'Get systems artifacts summary dashboard information'
777
1127
  def artifacts_summary
778
1128
  optional_options_keys = optional_options(@_initializer).keys
779
1129
  optional_options = to_input_hash(optional_options_keys, options)
780
1130
 
781
- result = EmassClient::DashboardsApi.new.get_system_artifacts_summary(
1131
+ result = EmassClient::SystemArtifactsDashboardsApi.new.get_system_artifacts_summary(
782
1132
  options[:orgId], optional_options
783
1133
  )
784
1134
  puts to_output_hash(result).green
785
1135
  rescue EmassClient::ApiError => e
786
- puts 'Exception when calling DashboardsApi->get_system_artifacts_summary'.red
1136
+ puts 'Exception when calling SystemArtifactsDashboardsApi->get_system_artifacts_summary'.red
787
1137
  puts to_output_hash(e)
788
1138
  end
789
1139
 
@@ -793,29 +1143,29 @@ module Emasser
793
1143
  optional_options_keys = optional_options(@_initializer).keys
794
1144
  optional_options = to_input_hash(optional_options_keys, options)
795
1145
 
796
- result = EmassClient::DashboardsApi.new.get_system_artifacts_details(
1146
+ result = EmassClient::SystemArtifactsDashboardsApi.new.get_system_artifacts_details(
797
1147
  options[:orgId], optional_options
798
1148
  )
799
1149
  puts to_output_hash(result).green
800
1150
  rescue EmassClient::ApiError => e
801
- puts 'Exception when calling DashboardsApi->get_system_artifacts_details'.red
1151
+ puts 'Exception when calling SystemArtifactsDashboardsApi->get_system_artifacts_details'.red
802
1152
  puts to_output_hash(e)
803
1153
  end
804
1154
 
805
1155
  #--------------------------------------------------------------------------
806
- # Hardware Baseline Dashboard
1156
+ # System Hardware Dashboard
807
1157
  # /api/dashboards/system-hardware-summary
808
1158
  desc 'hardware_summary', 'Get system hardware summary dashboard information'
809
1159
  def hardware_summary
810
1160
  optional_options_keys = optional_options(@_initializer).keys
811
1161
  optional_options = to_input_hash(optional_options_keys, options)
812
1162
 
813
- result = EmassClient::DashboardsApi.new.get_system_hardware_summary(
1163
+ result = EmassClient::SystemHardwareDashboardsApi.new.get_system_hardware_summary(
814
1164
  options[:orgId], optional_options
815
1165
  )
816
1166
  puts to_output_hash(result).green
817
1167
  rescue EmassClient::ApiError => e
818
- puts 'Exception when calling DashboardsApi->get_system_hardware_summary'.red
1168
+ puts 'Exception when calling SystemHardwareDashboardsApi->get_system_hardware_summary'.red
819
1169
  puts to_output_hash(e)
820
1170
  end
821
1171
 
@@ -825,29 +1175,29 @@ module Emasser
825
1175
  optional_options_keys = optional_options(@_initializer).keys
826
1176
  optional_options = to_input_hash(optional_options_keys, options)
827
1177
 
828
- result = EmassClient::DashboardsApi.new.get_system_hardware_details(
1178
+ result = EmassClient::SystemHardwareDashboardsApi.new.get_system_hardware_details(
829
1179
  options[:orgId], optional_options
830
1180
  )
831
1181
  puts to_output_hash(result).green
832
1182
  rescue EmassClient::ApiError => e
833
- puts 'Exception when calling DashboardsApi->get_system_hardware_details'.red
1183
+ puts 'Exception when calling SystemHardwareDashboardsApi->get_system_hardware_details'.red
834
1184
  puts to_output_hash(e)
835
1185
  end
836
1186
 
837
1187
  #--------------------------------------------------------------------------
838
- # Enterprise Sensor-based Hardware Resources Dashboard
1188
+ # System Sensor Hardware Dashboard
839
1189
  # /api/dashboards/system-sensor-hardware-summary
840
1190
  desc 'sensor_hardware_summary', 'Get system sensor hardware summary dashboard information'
841
1191
  def sensor_hardware_summary
842
1192
  optional_options_keys = optional_options(@_initializer).keys
843
1193
  optional_options = to_input_hash(optional_options_keys, options)
844
1194
 
845
- result = EmassClient::DashboardsApi.new.get_system_sensor_hardware_summary(
1195
+ result = EmassClient::SystemSensorHardwareDashboardsApi.new.get_system_sensor_hardware_summary(
846
1196
  options[:orgId], optional_options
847
1197
  )
848
1198
  puts to_output_hash(result).green
849
1199
  rescue EmassClient::ApiError => e
850
- puts 'Exception when calling DashboardsApi->get_system_sensor_hardware_summary'.red
1200
+ puts 'Exception when calling SystemSensorHardwareDashboardsApi->get_system_sensor_hardware_summary'.red
851
1201
  puts to_output_hash(e)
852
1202
  end
853
1203
 
@@ -857,29 +1207,29 @@ module Emasser
857
1207
  optional_options_keys = optional_options(@_initializer).keys
858
1208
  optional_options = to_input_hash(optional_options_keys, options)
859
1209
 
860
- result = EmassClient::DashboardsApi.new.get_system_sensor_hardware_details(
1210
+ result = EmassClient::SystemSensorHardwareDashboardsApi.new.get_system_sensor_hardware_details(
861
1211
  options[:orgId], optional_options
862
1212
  )
863
1213
  puts to_output_hash(result).green
864
1214
  rescue EmassClient::ApiError => e
865
- puts 'Exception when calling DashboardsApi->get_system_sensor_hardware_details'.red
1215
+ puts 'Exception when calling SystemSensorHardwareDashboardsApi->get_system_sensor_hardware_details'.red
866
1216
  puts to_output_hash(e)
867
1217
  end
868
1218
 
869
1219
  #--------------------------------------------------------------------------
870
- # Software Baseline Dashboards
1220
+ # System Software Dashboards
871
1221
  # /api/dashboards/system-software-summary
872
1222
  desc 'software_summary', 'Get system software summary dashboard information'
873
1223
  def software_summary
874
1224
  optional_options_keys = optional_options(@_initializer).keys
875
1225
  optional_options = to_input_hash(optional_options_keys, options)
876
1226
 
877
- result = EmassClient::DashboardsApi.new.get_system_software_summary(
1227
+ result = EmassClient::SystemSoftwareDashboardsApi.new.get_system_software_summary(
878
1228
  options[:orgId], optional_options
879
1229
  )
880
1230
  puts to_output_hash(result).green
881
1231
  rescue EmassClient::ApiError => e
882
- puts 'Exception when calling DashboardsApi->get_system_software_summary'.red
1232
+ puts 'Exception when calling SystemSoftwareDashboardsApi->get_system_software_summary'.red
883
1233
  puts to_output_hash(e)
884
1234
  end
885
1235
 
@@ -889,29 +1239,174 @@ module Emasser
889
1239
  optional_options_keys = optional_options(@_initializer).keys
890
1240
  optional_options = to_input_hash(optional_options_keys, options)
891
1241
 
892
- result = EmassClient::DashboardsApi.new.get_system_software_details(
1242
+ result = EmassClient::SystemSoftwareDashboardsApi.new.get_system_software_details(
893
1243
  options[:orgId], optional_options
894
1244
  )
895
1245
  puts to_output_hash(result).green
896
1246
  rescue EmassClient::ApiError => e
897
- puts 'Exception when calling DashboardsApi->get_system_software_details'.red
1247
+ puts 'Exception when calling SystemSoftwareDashboardsApi->get_system_software_details'.red
898
1248
  puts to_output_hash(e)
899
1249
  end
900
1250
 
901
1251
  #--------------------------------------------------------------------------
902
- # Ports and Protocols Dashboard
1252
+ # System Sensor Software Dashboards
1253
+ # /api/dashboards/system-sensor-software-summary
1254
+ desc 'sensor_software_summary', 'Get system sensor software summary dashboard information'
1255
+ def sensor_software_summary
1256
+ optional_options_keys = optional_options(@_initializer).keys
1257
+ optional_options = to_input_hash(optional_options_keys, options)
1258
+
1259
+ result = EmassClient::SystemSensorSoftwareDashboardsApi.new.get_system_sensor_software_summary(
1260
+ options[:orgId], optional_options
1261
+ )
1262
+ puts to_output_hash(result).green
1263
+ rescue EmassClient::ApiError => e
1264
+ puts 'Exception when calling SystemSensorSoftwareDashboardsApi->get_system_sensor_software_summary'.red
1265
+ puts to_output_hash(e)
1266
+ end
1267
+
1268
+ # /api/dashboards/system-sensor-software-details
1269
+ desc 'sensor_software_details', 'Get system sensor software details dashboard information'
1270
+ def sensor_software_details
1271
+ optional_options_keys = optional_options(@_initializer).keys
1272
+ optional_options = to_input_hash(optional_options_keys, options)
1273
+
1274
+ result = EmassClient::SystemSensorSoftwareDashboardsApi.new.get_system_sensor_software_details(
1275
+ options[:orgId], optional_options
1276
+ )
1277
+ puts to_output_hash(result).green
1278
+ rescue EmassClient::ApiError => e
1279
+ puts 'Exception when calling SystemSensorSoftwareDashboardsApi->get_system_sensor_software_details'.red
1280
+ puts to_output_hash(e)
1281
+ end
1282
+
1283
+ # /api/dashboards/system-sensor-software-counts
1284
+ desc 'sensor_software_counts', 'Get system sensor software counts dashboard information'
1285
+ def sensor_software_counts
1286
+ optional_options_keys = optional_options(@_initializer).keys
1287
+ optional_options = to_input_hash(optional_options_keys, options)
1288
+
1289
+ result = EmassClient::SystemSensorSoftwareDashboardsApi.new.get_system_sensor_software_counts(
1290
+ options[:orgId], optional_options
1291
+ )
1292
+ puts to_output_hash(result).green
1293
+ rescue EmassClient::ApiError => e
1294
+ puts 'Exception when calling SystemSensorSoftwareDashboardsApi->get_system_sensor_software_counts'.red
1295
+ puts to_output_hash(e)
1296
+ end
1297
+
1298
+ #--------------------------------------------------------------------------
1299
+ # System Critical Assets
1300
+ # /api/dashboards/system-critical-assets-summary
1301
+ desc 'critical_assets_summary', 'Get system critical assets summary dashboard information'
1302
+ def critical_assets_summary
1303
+ optional_options_keys = optional_options(@_initializer).keys
1304
+ optional_options = to_input_hash(optional_options_keys, options)
1305
+
1306
+ result = EmassClient::SystemCriticalAssetsDashboardApi.new.get_system_critical_assets_summary(
1307
+ options[:orgId], optional_options
1308
+ )
1309
+ puts to_output_hash(result).green
1310
+ rescue EmassClient::ApiError => e
1311
+ puts 'Exception when calling SystemCriticalAssetsDashboardApi->get_system_critical_assets_summary'.red
1312
+ puts to_output_hash(e)
1313
+ end
1314
+
1315
+ #--------------------------------------------------------------------------
1316
+ # System Vulnerability Dashboards
1317
+ # /api/dashboards/system-vulnerability-summary
1318
+ desc 'vulnerability_summary', 'Get system vulnerability summary dashboard information'
1319
+ def vulnerability_summary
1320
+ optional_options_keys = optional_options(@_initializer).keys
1321
+ optional_options = to_input_hash(optional_options_keys, options)
1322
+
1323
+ result = EmassClient::SystemVulnerabilityDashboardApi.new.get_system_vulnerability_summary(
1324
+ options[:orgId], optional_options
1325
+ )
1326
+ puts to_output_hash(result).green
1327
+ rescue EmassClient::ApiError => e
1328
+ puts 'Exception when calling SystemVulnerabilityDashboardApi->get_system_vulnerability_summary'.red
1329
+ puts to_output_hash(e)
1330
+ end
1331
+
1332
+ #--------------------------------------------------------------------------
1333
+ # System Device Findings Dashboards
1334
+ # /api/dashboards/system-device-findings-summary
1335
+ desc 'device_findings_summary', 'Get system device findings summary dashboard information'
1336
+ def device_findings_summary
1337
+ optional_options_keys = optional_options(@_initializer).keys
1338
+ optional_options = to_input_hash(optional_options_keys, options)
1339
+
1340
+ result = EmassClient::SystemDeviceFindingsDashboardsApi.new.get_system_device_findings_summary(
1341
+ options[:orgId], optional_options
1342
+ )
1343
+ puts to_output_hash(result).green
1344
+ rescue EmassClient::ApiError => e
1345
+ puts 'Exception when calling SystemDeviceFindingsDashboardsApi->get_system_device_findings_summary'.red
1346
+ puts to_output_hash(e)
1347
+ end
1348
+
1349
+ # /api/dashboards/system-device-findings-details
1350
+ desc 'device_findings_details', 'Get system device findings details dashboard information'
1351
+ def device_findings_details
1352
+ optional_options_keys = optional_options(@_initializer).keys
1353
+ optional_options = to_input_hash(optional_options_keys, options)
1354
+
1355
+ result = EmassClient::SystemDeviceFindingsDashboardsApi.new.get_system_device_findings_details(
1356
+ options[:orgId], optional_options
1357
+ )
1358
+ puts to_output_hash(result).green
1359
+ rescue EmassClient::ApiError => e
1360
+ puts 'Exception when calling SystemDeviceFindingsDashboardsApi->get_system_device_findings_details'.red
1361
+ puts to_output_hash(e)
1362
+ end
1363
+
1364
+ #--------------------------------------------------------------------------
1365
+ # System Applications Findings Dashboards
1366
+ # /api/dashboards/system-application-findings-summary
1367
+ desc 'application_findings_summary', 'Get system device findings summary dashboard information'
1368
+ def application_findings_summary
1369
+ optional_options_keys = optional_options(@_initializer).keys
1370
+ optional_options = to_input_hash(optional_options_keys, options)
1371
+
1372
+ result = EmassClient::SystemApplicationFindingsDashboardsApi.new.get_system_application_findings_summary(
1373
+ options[:orgId], optional_options
1374
+ )
1375
+ puts to_output_hash(result).green
1376
+ rescue EmassClient::ApiError => e
1377
+ puts 'Exception when calling SystemApplicationFindingsDashboardsApi->get_system_application_findings_summary'.red
1378
+ puts to_output_hash(e)
1379
+ end
1380
+
1381
+ # /api/dashboards/system-application-findings-details
1382
+ desc 'application_findings_details', 'Get system device findings details dashboard information'
1383
+ def application_findings_details
1384
+ optional_options_keys = optional_options(@_initializer).keys
1385
+ optional_options = to_input_hash(optional_options_keys, options)
1386
+
1387
+ result = EmassClient::SystemApplicationFindingsDashboardsApi.new.get_system_application_findings_details(
1388
+ options[:orgId], optional_options
1389
+ )
1390
+ puts to_output_hash(result).green
1391
+ rescue EmassClient::ApiError => e
1392
+ puts 'Exception when calling SystemApplicationFindingsDashboardsApi->get_system_application_findings_details'.red
1393
+ puts to_output_hash(e)
1394
+ end
1395
+
1396
+ #--------------------------------------------------------------------------
1397
+ # System Ports and Protocols Dashboards
903
1398
  # /api/dashboards/system-ports-protocols-summary
904
1399
  desc 'ports_protocols_summary', 'Get system ports & portocols summary dashboard information'
905
1400
  def ports_protocols_summary
906
1401
  optional_options_keys = optional_options(@_initializer).keys
907
1402
  optional_options = to_input_hash(optional_options_keys, options)
908
1403
 
909
- result = EmassClient::DashboardsApi.new.get_system_ports_protocols_summary(
1404
+ result = EmassClient::SystemPortsProtocolsDashboardsApi.new.get_system_ports_protocols_summary(
910
1405
  options[:orgId], optional_options
911
1406
  )
912
1407
  puts to_output_hash(result).green
913
1408
  rescue EmassClient::ApiError => e
914
- puts 'Exception when calling DashboardsApi->get_system_ports_protocols_summary'.red
1409
+ puts 'Exception when calling SystemPortsProtocolsDashboardsApi->get_system_ports_protocols_summary'.red
915
1410
  puts to_output_hash(e)
916
1411
  end
917
1412
 
@@ -921,29 +1416,29 @@ module Emasser
921
1416
  optional_options_keys = optional_options(@_initializer).keys
922
1417
  optional_options = to_input_hash(optional_options_keys, options)
923
1418
 
924
- result = EmassClient::DashboardsApi.new.get_system_ports_protocols_details(
1419
+ result = EmassClient::SystemPortsProtocolsDashboardsApi.new.get_system_ports_protocols_details(
925
1420
  options[:orgId], optional_options
926
1421
  )
927
1422
  puts to_output_hash(result).green
928
1423
  rescue EmassClient::ApiError => e
929
- puts 'Exception when calling DashboardsApi->get_system_ports_protocols_details'.red
1424
+ puts 'Exception when calling SystemPortsProtocolsDashboardsApi->get_system_ports_protocols_details'.red
930
1425
  puts to_output_hash(e)
931
1426
  end
932
1427
 
933
1428
  #--------------------------------------------------------------------------
934
1429
  # System CONMON Integration Status Dashboard
935
1430
  # /api/dashboards/system-conmon-integration-status-summary
936
- desc 'common_integration_status_summary', 'Get system conmon integration status summary dashboard information'
937
- def common_integration_status_summary
1431
+ desc 'integration_status_summary', 'Get system conmon integration status summary dashboard information'
1432
+ def integration_status_summary
938
1433
  optional_options_keys = optional_options(@_initializer).keys
939
1434
  optional_options = to_input_hash(optional_options_keys, options)
940
1435
 
941
- result = EmassClient::DashboardsApi.new.get_system_common_integration_status_summary(
1436
+ result = EmassClient::SystemCONMONIntegrationStatusDashboardApi.new.get_system_common_integration_status_summary(
942
1437
  options[:orgId], optional_options
943
1438
  )
944
1439
  puts to_output_hash(result).green
945
1440
  rescue EmassClient::ApiError => e
946
- puts 'Exception when calling DashboardsApi->get_system_common_integration_status_summary'.red
1441
+ puts 'Exception when calling SystemCONMONIntegrationStatusDashboardApi->get_system_common_integration_status_summary'.red
947
1442
  puts to_output_hash(e)
948
1443
  end
949
1444
 
@@ -955,29 +1450,97 @@ module Emasser
955
1450
  optional_options_keys = optional_options(@_initializer).keys
956
1451
  optional_options = to_input_hash(optional_options_keys, options)
957
1452
 
958
- result = EmassClient::DashboardsApi.new.get_system_associations_details(
1453
+ result = EmassClient::SystemAssociationsDashboardApi.new.get_system_associations_details(
959
1454
  options[:orgId], optional_options
960
1455
  )
961
1456
  puts to_output_hash(result).green
962
1457
  rescue EmassClient::ApiError => e
963
- puts 'Exception when calling DashboardsApi->get_system_associations_details'.red
1458
+ puts 'Exception when calling SystemAssociationsDashboardApi->get_system_associations_details'.red
964
1459
  puts to_output_hash(e)
965
1460
  end
966
1461
 
967
- #--------------------------------------------------------------------------
968
- # Users Dashboard
1462
+ #----------------------------------------------------------------------------
1463
+ # User System Assignments Dashboard
969
1464
  # /api/dashboards/user-system-assignments-details
970
1465
  desc 'assignments_details', 'Get user system assignments details dashboard information'
971
1466
  def assignments_details
972
1467
  optional_options_keys = optional_options(@_initializer).keys
973
1468
  optional_options = to_input_hash(optional_options_keys, options)
974
1469
 
975
- result = EmassClient::DashboardsApi.new.get_user_system_assignments_details(
1470
+ result = EmassClient::UserSystemAssignmentsDashboardApi.new.get_user_system_assignments_details(
1471
+ options[:orgId], optional_options
1472
+ )
1473
+ puts to_output_hash(result).green
1474
+ rescue EmassClient::ApiError => e
1475
+ puts 'Exception when calling UserSystemAssignmentsDashboardApi->get_user_system_assignments_details'.red
1476
+ puts to_output_hash(e)
1477
+ end
1478
+
1479
+ #----------------------------------------------------------------------------
1480
+ # Organization Migration Status
1481
+ # /api/dashboards/organization-migration-status-summary
1482
+ desc 'organization_migration_status_summary', 'Get organization migration status summary dashboard information'
1483
+ def organization_migration_status_summary
1484
+ optional_options_keys = optional_options(@_initializer).keys
1485
+ optional_options = to_input_hash(optional_options_keys, options)
1486
+
1487
+ result = EmassClient::OrganizationMigrationStatusDashboardApi.new.get_organization_migration_status_summary(
1488
+ options[:orgId], optional_options
1489
+ )
1490
+ puts to_output_hash(result).green
1491
+ rescue EmassClient::ApiError => e
1492
+ puts 'Exception when calling OrganizationMigrationStatusDashboardApi->get_organization_migration_status_summary'.red
1493
+ puts to_output_hash(e)
1494
+ end
1495
+
1496
+ #----------------------------------------------------------------------------
1497
+ # System Migration Status
1498
+ # /api/dashboards/system-migration-status-summary
1499
+ desc 'system_migration_status_summary', 'Get system migration status summary dashboard information'
1500
+ def system_migration_status_summary
1501
+ optional_options_keys = optional_options(@_initializer).keys
1502
+ optional_options = to_input_hash(optional_options_keys, options)
1503
+
1504
+ result = EmassClient::SystemMigrationStatusDashboardApi.new.get_system_migration_status_summary(
1505
+ options[:orgId], optional_options
1506
+ )
1507
+ puts to_output_hash(result).green
1508
+ rescue EmassClient::ApiError => e
1509
+ puts 'Exception when calling SystemMigrationStatusDashboardApi->get_system_migration_status_summary'.red
1510
+ puts to_output_hash(e)
1511
+ end
1512
+
1513
+ #----------------------------------------------------------------------------
1514
+ # System FISMA Metrics
1515
+ # /api/dashboards/system-fisma-metrics
1516
+ desc 'fisma_metrics', 'Get FISMA metrics dashboard information'
1517
+ def fisma_metrics
1518
+ optional_options_keys = optional_options(@_initializer).keys
1519
+ optional_options = to_input_hash(optional_options_keys, options)
1520
+
1521
+ result = EmassClient::SystemFISMAMetricsDashboardApi.new.get_system_fisma_metrics(
976
1522
  options[:orgId], optional_options
977
1523
  )
978
1524
  puts to_output_hash(result).green
979
1525
  rescue EmassClient::ApiError => e
980
- puts 'Exception when calling DashboardsApi->get_user_system_assignments_details'.red
1526
+ puts 'Exception when calling SystemFISMAMetricsDashboardApi->get_system_fisma_metrics'.red
1527
+ puts to_output_hash(e)
1528
+ end
1529
+
1530
+ #----------------------------------------------------------------------------
1531
+ # Coast Guard System FISMA Metrics
1532
+ # /api/dashboards/coastguard-system-fisma-metrics
1533
+ desc 'coastguard_fisma_metrics', 'Get coastguard FISMA metrics dashboard information'
1534
+ def coastguard_fisma_metrics
1535
+ optional_options_keys = optional_options(@_initializer).keys
1536
+ optional_options = to_input_hash(optional_options_keys, options)
1537
+
1538
+ result = EmassClient::CoastGuardSystemFISMAMetricsDashboardApi.new.get_coast_guard_system_fisma_metrics(
1539
+ options[:orgId], optional_options
1540
+ )
1541
+ puts to_output_hash(result).green
1542
+ rescue EmassClient::ApiError => e
1543
+ puts 'Exception when calling CoastGuardSystemFISMAMetricsDashboardApi->get_coast_guard_system_fisma_metrics'.red
981
1544
  puts to_output_hash(e)
982
1545
  end
983
1546
 
@@ -989,95 +1552,106 @@ module Emasser
989
1552
  optional_options_keys = optional_options(@_initializer).keys
990
1553
  optional_options = to_input_hash(optional_options_keys, options)
991
1554
 
992
- result = EmassClient::DashboardsApi.new.get_system_privacy_summary(
1555
+ result = EmassClient::SystemPrivacyDashboardApi.new.get_system_privacy_summary(
993
1556
  options[:orgId], optional_options
994
1557
  )
995
1558
  puts to_output_hash(result).green
996
1559
  rescue EmassClient::ApiError => e
997
- puts 'Exception when calling DashboardsApi->get_system_privacy_summary'.red
1560
+ puts 'Exception when calling SystemPrivacyDashboardApi->get_system_privacy_summary'.red
998
1561
  puts to_output_hash(e)
999
1562
  end
1000
1563
 
1564
+ #--------------------------------------------------------------------------
1565
+ # VA OMB FISMA
1001
1566
  # /api/dashboards/va-omb-fisma-saop-summary
1002
1567
  desc 'fisma_saop_summary', 'Get VA OMB-FISMA SAOP summary dashboard information'
1003
1568
  def fisma_saop_summary
1004
1569
  optional_options_keys = optional_options(@_initializer).keys
1005
1570
  optional_options = to_input_hash(optional_options_keys, options)
1006
1571
 
1007
- result = EmassClient::DashboardsApi.new.get_va_omb_fsma_saop_summary(
1572
+ result = EmassClient::VAOMBFISMADashboardApi.new.get_va_omb_fsma_saop_summary(
1008
1573
  options[:orgId], optional_options
1009
1574
  )
1010
1575
  puts to_output_hash(result).green
1011
1576
  rescue EmassClient::ApiError => e
1012
- puts 'Exception when calling DashboardsApi->get_va_omb_fsma_saop_summary'.red
1577
+ puts 'Exception when calling VAOMBFISMADashboardApi->get_va_omb_fsma_saop_summary'.red
1578
+ puts to_output_hash(e).yellow
1579
+ end
1580
+
1581
+ #----------------------------------------------------------------------------
1582
+ # VA Systems Dashboard
1583
+ # /api/dashboards/va-system-icamp-tableau-poam-details
1584
+ desc 'va_icamp_tableau_poam_details', 'Get VA ICAMP Tableau POA&M details dashboard information'
1585
+ def va_icamp_tableau_poam_details
1586
+ optional_options_keys = optional_options(@_initializer).keys
1587
+ optional_options = to_input_hash(optional_options_keys, options)
1588
+
1589
+ result = EmassClient::VASystemDashboardsApi.new.get_va_system_icamp_tableau_poam_details(
1590
+ options[:orgId], optional_options
1591
+ )
1592
+ puts to_output_hash(result).green
1593
+ rescue EmassClient::ApiError => e
1594
+ puts 'Exception when calling VASystemDashboardsApi->get_va_system_icamp_tableau_poam_details'.red
1013
1595
  puts to_output_hash(e).yellow
1014
1596
  end
1015
1597
 
1016
- #--------------------------------------------------------------------------
1017
- # System A&A Summary Dashboard
1018
1598
  # /api/dashboards/va-system-aa-summary
1019
1599
  desc 'va_aa_summary', 'Get VA system A&A summary dashboard information'
1020
1600
  def va_aa_summary
1021
1601
  optional_options_keys = optional_options(@_initializer).keys
1022
1602
  optional_options = to_input_hash(optional_options_keys, options)
1023
1603
 
1024
- result = EmassClient::DashboardsApi.new.get_va_system_aa_summary(
1604
+ result = EmassClient::VASystemDashboardsApi.new.get_va_system_aa_summary(
1025
1605
  options[:orgId], optional_options
1026
1606
  )
1027
1607
  puts to_output_hash(result).green
1028
1608
  rescue EmassClient::ApiError => e
1029
- puts 'Exception when calling DashboardsApi->get_va_system_aa_summary'.red
1609
+ puts 'Exception when calling VASystemDashboardsApi->get_va_system_aa_summary'.red
1030
1610
  puts to_output_hash(e).yellow
1031
1611
  end
1032
1612
 
1033
- #--------------------------------------------------------------------------
1034
- # System A2.0 Summary Dashboard
1035
1613
  # /api/dashboards/va-system-a2-summary
1036
1614
  desc 'va_a2_summary', 'Get VA system A2.0 summary dashboard information'
1037
1615
  def va_a2_summary
1038
1616
  optional_options_keys = optional_options(@_initializer).keys
1039
1617
  optional_options = to_input_hash(optional_options_keys, options)
1040
1618
 
1041
- result = EmassClient::DashboardsApi.new.get_va_system_a2_summary(
1619
+ result = EmassClient::VASystemDashboardsApi.new.get_va_system_a2_summary(
1042
1620
  options[:orgId], optional_options
1043
1621
  )
1044
1622
  puts to_output_hash(result).green
1045
1623
  rescue EmassClient::ApiError => e
1046
- puts 'Exception when calling DashboardsApi->get_va_system_a2_summary'.red
1624
+ puts 'Exception when calling VASystemDashboardsApi->get_va_system_a2_summary'.red
1047
1625
  puts to_output_hash(e).yellow
1048
1626
  end
1049
1627
 
1050
- #--------------------------------------------------------------------------
1051
- # System P.L. 109 Reporting Summary Dashboard
1052
1628
  # /api/dashboards/va-system-pl-109-reporting-summary
1053
1629
  desc 'va_pl_109_summary', 'Get VA System P.L. 109 reporting summary dashboard information'
1054
1630
  def va_pl_109_summary
1055
- optional_options = options.clone
1056
- optional_options.delete('orgId')
1631
+ optional_options_keys = optional_options(@_initializer).keys
1632
+ optional_options = to_input_hash(optional_options_keys, options)
1057
1633
 
1058
- result = EmassClient::DashboardsApi.new.get_va_system_pl109_reporting_summary(
1634
+ result = EmassClient::VASystemDashboardsApi.new.get_va_system_pl109_reporting_summary(
1059
1635
  options[:orgId], optional_options
1060
1636
  )
1061
1637
  puts to_output_hash(result).green
1062
1638
  rescue EmassClient::ApiError => e
1063
- puts 'Exception when calling DashboardsApi->get_va_system_pl109_reporting_summary'.red
1639
+ puts 'Exception when calling VASystemDashboardsApi->get_va_system_pl109_reporting_summary'.red
1064
1640
  puts to_output_hash(e).yellow
1065
1641
  end
1066
1642
 
1067
- #--------------------------------------------------------------------------
1068
- # FISMA Inventory Summary Dashboard
1069
1643
  # /api/dashboards/va-system-fisma-inventory-summary
1070
1644
  desc 'fisma_inventory_summary', 'Get VA system FISMA inventory summary dashboard information'
1071
1645
  def fisma_inventory_summary
1072
1646
  optional_options_keys = optional_options(@_initializer).keys
1073
1647
  optional_options = to_input_hash(optional_options_keys, options)
1074
1648
 
1075
- result = EmassClient::DashboardsApi.new.get_va_system_fisma_invetory_summary(
1649
+ result = EmassClient::VASystemDashboardsApi.new.get_va_system_fisma_invetory_summary(
1076
1650
  options[:orgId], optional_options
1077
1651
  )
1078
1652
  puts to_output_hash(result).green
1079
1653
  rescue EmassClient::ApiError => e
1080
- puts 'Exception when calling DashboardsApi->get_va_system_fisma_invetory_summary'.red
1654
+ puts 'Exception when calling VASystemDashboardsApi->get_va_system_fisma_invetory_summary'.red
1081
1655
  puts to_output_hash(e).yellow
1082
1656
  end
1083
1657
 
@@ -1087,29 +1661,27 @@ module Emasser
1087
1661
  optional_options_keys = optional_options(@_initializer).keys
1088
1662
  optional_options = to_input_hash(optional_options_keys, options)
1089
1663
 
1090
- result = EmassClient::DashboardsApi.new.get_va_system_fisma_invetory_crypto_summary(
1664
+ result = EmassClient::VASystemDashboardsApi.new.get_va_system_fisma_invetory_crypto_summary(
1091
1665
  options[:orgId], optional_options
1092
1666
  )
1093
1667
  puts to_output_hash(result).green
1094
1668
  rescue EmassClient::ApiError => e
1095
- puts 'Exception when calling DashboardsApi->get_va_system_fisma_invetory_crypto_summary'.red
1669
+ puts 'Exception when calling VASystemDashboardsApi->get_va_system_fisma_invetory_crypto_summary'.red
1096
1670
  puts to_output_hash(e).yellow
1097
1671
  end
1098
1672
 
1099
- #--------------------------------------------------------------------------
1100
- # Threat Risks Dashboard
1101
1673
  # /api/dashboards/va-system-threat-risks-summary
1102
1674
  desc 'threat_risk_summary', 'Get VA System Threat Risks Summary dashboard information'
1103
1675
  def threat_risk_summary
1104
1676
  optional_options_keys = optional_options(@_initializer).keys
1105
1677
  optional_options = to_input_hash(optional_options_keys, options)
1106
1678
 
1107
- result = EmassClient::DashboardsApi.new.get_va_system_threat_risk_summary(
1679
+ result = EmassClient::VASystemDashboardsApi.new.get_va_system_threat_risk_summary(
1108
1680
  options[:orgId], optional_options
1109
1681
  )
1110
1682
  puts to_output_hash(result).green
1111
1683
  rescue EmassClient::ApiError => e
1112
- puts 'Exception when calling DashboardsApi->get_va_system_threat_risk_summary'.red
1684
+ puts 'Exception when calling VASystemDashboardsApi->get_va_system_threat_risk_summary'.red
1113
1685
  puts to_output_hash(e).yellow
1114
1686
  end
1115
1687
 
@@ -1119,12 +1691,12 @@ module Emasser
1119
1691
  optional_options_keys = optional_options(@_initializer).keys
1120
1692
  optional_options = to_input_hash(optional_options_keys, options)
1121
1693
 
1122
- result = EmassClient::DashboardsApi.new.get_va_system_threat_source_details(
1694
+ result = EmassClient::VASystemDashboardsApi.new.get_va_system_threat_source_details(
1123
1695
  options[:orgId], optional_options
1124
1696
  )
1125
1697
  puts to_output_hash(result).green
1126
1698
  rescue EmassClient::ApiError => e
1127
- puts 'Exception when calling DashboardsApi->get_va_system_threat_source_details'.red
1699
+ puts 'Exception when calling VASystemDashboardsApi->get_va_system_threat_source_details'.red
1128
1700
  puts to_output_hash(e).yellow
1129
1701
  end
1130
1702
 
@@ -1134,12 +1706,74 @@ module Emasser
1134
1706
  optional_options_keys = optional_options(@_initializer).keys
1135
1707
  optional_options = to_input_hash(optional_options_keys, options)
1136
1708
 
1137
- result = EmassClient::DashboardsApi.new.get_va_system_threat_architecture_details(
1709
+ result = EmassClient::VASystemDashboardsApi.new.get_va_system_threat_architecture_details(
1710
+ options[:orgId], optional_options
1711
+ )
1712
+ puts to_output_hash(result).green
1713
+ rescue EmassClient::ApiError => e
1714
+ puts 'Exception when calling VASystemDashboardsApi->get_va_system_threat_architecture_details'.red
1715
+ puts to_output_hash(e).yellow
1716
+ end
1717
+
1718
+ #----------------------------------------------------------------------------
1719
+ # CMMC Assessment Dashboards
1720
+ # /api/dashboards/cmmc-assessment-status-summary
1721
+ desc 'cmmc_status_summary', 'Get CMMC Assessment status summary dashboard information'
1722
+ def cmmc_status_summary
1723
+ optional_options_keys = optional_options(@_initializer).keys
1724
+ optional_options = to_input_hash(optional_options_keys, options)
1725
+
1726
+ result = EmassClient::CMMCAssessmentDashboardsApi.new.get_cmmc_assessment_status_summary(
1727
+ options[:orgId], optional_options
1728
+ )
1729
+ puts to_output_hash(result).green
1730
+ rescue EmassClient::ApiError => e
1731
+ puts 'Exception when calling CMMCAssessmentDashboardsApi->get_cmmc_assessment_status_summary'.red
1732
+ puts to_output_hash(e).yellow
1733
+ end
1734
+
1735
+ # /api/dashboards/cmmc-assessment-requirements-compliance-summary
1736
+ desc 'cmmc_compliance_summary', 'Get CMMC Assessment Requirements Compliance Summary dashboard information'
1737
+ def cmmc_compliance_summary
1738
+ optional_options_keys = optional_options(@_initializer).keys
1739
+ optional_options = to_input_hash(optional_options_keys, options)
1740
+
1741
+ result = EmassClient::CMMCAssessmentDashboardsApi.new.get_cmmc_assessment_requirements_compliance_summary(
1742
+ options[:orgId], optional_options
1743
+ )
1744
+ puts to_output_hash(result).green
1745
+ rescue EmassClient::ApiError => e
1746
+ puts 'Exception when calling CMMCAssessmentDashboardsApi->get_cmmc_assessment_requirements_compliance_summary'.red
1747
+ puts to_output_hash(e).yellow
1748
+ end
1749
+
1750
+ # /api/dashboards/cmmc-assessment-security-requirements-details
1751
+ desc 'cmmc_security_requirements_details', 'Get CMMC Assessment Security Requirements Details dashboard information'
1752
+ def cmmc_security_requirements_details
1753
+ optional_options_keys = optional_options(@_initializer).keys
1754
+ optional_options = to_input_hash(optional_options_keys, options)
1755
+
1756
+ result = EmassClient::CMMCAssessmentDashboardsApi.new.get_cmmc_assessment_security_requirements_details(
1138
1757
  options[:orgId], optional_options
1139
1758
  )
1140
1759
  puts to_output_hash(result).green
1141
1760
  rescue EmassClient::ApiError => e
1142
- puts 'Exception when calling DashboardsApi->get_va_system_threat_architecture_details'.red
1761
+ puts 'Exception when calling CMMCAssessmentDashboardsApi->get_cmmc_assessment_security_requirements_details'.red
1762
+ puts to_output_hash(e).yellow
1763
+ end
1764
+
1765
+ # /api/dashboards/cmmc-assessment-requirement-objectives-details
1766
+ desc 'cmmc_requirement_objectives_details', 'Get CMMC Assessment Requirement Objectives Details dashboard information'
1767
+ def cmmc_requirement_objectives_details
1768
+ optional_options_keys = optional_options(@_initializer).keys
1769
+ optional_options = to_input_hash(optional_options_keys, options)
1770
+
1771
+ result = EmassClient::CMMCAssessmentDashboardsApi.new.get_cmmc_assessment_requirement_objectives_details(
1772
+ options[:orgId], optional_options
1773
+ )
1774
+ puts to_output_hash(result).green
1775
+ rescue EmassClient::ApiError => e
1776
+ puts 'Exception when calling CMMCAssessmentDashboardsApi->get_cmmc_assessment_requirement_objectives_details'.red
1143
1777
  puts to_output_hash(e).yellow
1144
1778
  end
1145
1779
  end
@@ -1178,8 +1812,11 @@ module Emasser
1178
1812
  desc 'pac', 'Get status of active workflows in a system'
1179
1813
  subcommand 'pac', PAC
1180
1814
 
1181
- desc 'cmmc', 'Get CMMC assessment information'
1182
- subcommand 'cmmc', CMMC
1815
+ desc 'hardware', 'Get one or many hardware assets in a system'
1816
+ subcommand 'hardware', Hardware
1817
+
1818
+ desc 'software', 'Get one or many software assets in a system'
1819
+ subcommand 'software', Software
1183
1820
 
1184
1821
  desc 'workflow_definitions', 'Get workflow definitions in a site'
1185
1822
  subcommand 'workflow_definitions', WorkflowDefinitions
@@ -1187,6 +1824,9 @@ module Emasser
1187
1824
  desc 'workflow_instances', 'Get workflow instance by system and/or ID in a system'
1188
1825
  subcommand 'workflow_instances', WorkflowInstances
1189
1826
 
1827
+ desc 'cmmc', 'Get CMMC assessment information'
1828
+ subcommand 'cmmc', CMMC
1829
+
1190
1830
  desc 'dashboards', 'Get dashboard information'
1191
1831
  subcommand 'dashboards', Dashboards
1192
1832
  end