emasser 3.10.0 → 3.12.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.
data/lib/emasser/get.rb CHANGED
@@ -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)
48
48
  end
49
49
  end
50
50
 
@@ -58,12 +58,13 @@ module Emasser
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,45 @@ 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 :includePackage, aliases: '-I', type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
114
+ option :policy, aliases: '-p', type: :string, required: false, enum: %w[diacap rmf reporting]
104
115
 
105
116
  def byId
106
117
  optional_options_keys = optional_options(@_initializer).keys
@@ -112,8 +123,8 @@ module Emasser
112
123
  result = EmassClient::SystemsApi.new.get_system(options[:systemId], optional_options)
113
124
  puts to_output_hash(result).green
114
125
  rescue EmassClient::ApiError => e
115
- puts 'Exception when calling SystemsApi->get_system'.red
116
- puts to_output_hash(e).yellow
126
+ puts 'Exception when calling SystemsApi->get_systems'.red
127
+ puts to_output_hash(e)
117
128
  end
118
129
  end
119
130
  end
@@ -125,19 +136,19 @@ module Emasser
125
136
 
126
137
  desc 'all [options]', 'Retrieves all available system(s) - filtered by [options] params'
127
138
  # Optional parameters/fields
128
- option :registrationType,
139
+ option :registrationType, aliases: '-r',
129
140
  type: :string, required: false,
130
141
  enum: %w[assessAndAuthorize assessOnly guest regular functional cloudServiceProvider commonControlProvider]
131
- option :ditprId, type: :string, required: false,
142
+ option :ditprId, aliases: '-t', type: :string, required: false,
132
143
  desc: 'DoD Information Technology (IT) Portfolio Repository (DITPR) string Id'
133
- option :coamsId, type: :string, required: false,
144
+ option :coamsId, aliases: '-c', type: :string, required: false,
134
145
  desc: 'Cyber Operational Attributes Management System (COAMS) string Id'
135
- option :policy, type: :string, required: false, enum: %w[diacap rmf reporting]
146
+ option :policy, aliases: '-p', type: :string, required: false, enum: %w[diacap rmf reporting]
136
147
 
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.'
148
+ option :includePackage, aliases: '-I', type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
149
+ option :includeDitprMetrics, aliases: '-M', type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
150
+ option :includeDecommissioned, aliases: '-D', type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
151
+ option :reportsForScorecard, aliases: '-S', type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
141
152
 
142
153
  def all
143
154
  optional_options_keys = optional_options(@_initializer).keys
@@ -150,7 +161,7 @@ module Emasser
150
161
  puts to_output_hash(result).green
151
162
  rescue EmassClient::ApiError => e
152
163
  puts 'Exception when calling SystemsApi->get_systems'.red
153
- puts to_output_hash(e).yellow
164
+ puts to_output_hash(e)
154
165
  end
155
166
  end
156
167
  end
@@ -176,18 +187,17 @@ module Emasser
176
187
  puts to_output_hash(result).green
177
188
  rescue EmassClient::ApiError => e
178
189
  puts 'Exception when calling SystemRolesApi->get_system_roles'.red
179
- puts to_output_hash(e).yellow
190
+ puts to_output_hash(e)
180
191
  end
181
192
 
182
193
  desc 'byCategory [options]', 'Retrieves role(s) - filtered by [options] params'
183
194
  # 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']
195
+ option :roleCategory, aliases: '-c', type: :string, required: true, enum: %w[PAC CAC Other]
196
+ option :role, aliases: '-r', type: :string, required: true,
197
+ desc: 'Accepts single value from options available at base system-roles endpoint e.g., SCA.'
198
+
188
199
  # 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.'
200
+ option :policy, aliases: '-p', type: :string, required: false, enum: %w[diacap rmf reporting]
191
201
 
192
202
  def byCategory
193
203
  optional_options_keys = optional_options(@_initializer).keys
@@ -199,7 +209,7 @@ module Emasser
199
209
  puts to_output_hash(result).green
200
210
  rescue EmassClient::ApiError => e
201
211
  puts 'Exception when calling SystemRolesApi->get_system_by_role_category_id'.red
202
- puts to_output_hash(e).yellow
212
+ puts to_output_hash(e)
203
213
  end
204
214
  end
205
215
  end
@@ -216,11 +226,11 @@ module Emasser
216
226
 
217
227
  desc 'forSystem', 'Get control information in a system for one or many controls (acronym)'
218
228
  # Required parameters/fields
219
- option :systemId, type: :numeric, required: true,
229
+ option :systemId, aliases: '-s', type: :numeric, required: true,
220
230
  desc: 'A numeric value representing the system identification'
221
231
  # 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'
232
+ option :acronyms, aliases: '-a', type: :string, required: false,
233
+ desc: 'The system acronym(s) e.g "AC-1, AC-2" - if not provided all controls for systemId are returned'
224
234
 
225
235
  def forSystem
226
236
  optional_options_keys = optional_options(@_initializer).keys
@@ -231,7 +241,7 @@ module Emasser
231
241
  puts to_output_hash(result).green
232
242
  rescue EmassClient::ApiError => e
233
243
  puts 'Exception when calling ControlsApi->get_system_controls'.red
234
- puts to_output_hash(e).yellow
244
+ puts to_output_hash(e)
235
245
  end
236
246
  end
237
247
  end
@@ -248,12 +258,14 @@ module Emasser
248
258
 
249
259
  desc 'forSystem', 'Get one or many test results in a system'
250
260
  # Required parameters/fields
251
- option :systemId, type: :numeric, required: true,
261
+ option :systemId, aliases: '-s', type: :numeric, required: true,
252
262
  desc: 'A numeric value representing the system identification'
253
263
  # 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.'
264
+ option :controlAcronyms, aliases: '-a', type: :string, required: false, desc: 'The system acronym(s) e.g "AC-1, AC-2"'
265
+ option :assessmentProcedures, aliases: '-p', type: :string, required: false,
266
+ desc: 'The system Security Control Assessment Procedure e.g "AC-1.1,AC-1.2"'
267
+ option :ccis, aliases: '-c', type: :string, required: false, desc: 'The system CCIS string numerical value'
268
+ option :latestOnly, aliases: '-L', type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
257
269
 
258
270
  def forSystem
259
271
  optional_options_keys = optional_options(@_initializer).keys
@@ -264,7 +276,7 @@ module Emasser
264
276
  puts to_output_hash(result).green
265
277
  rescue EmassClient::ApiError => e
266
278
  puts 'Exception when calling TestResultsApi->get_system_test_results'.red
267
- puts to_output_hash(e).yellow
279
+ puts to_output_hash(e)
268
280
  end
269
281
  end
270
282
  end
@@ -283,16 +295,18 @@ module Emasser
283
295
  # BY SYSTEM ID ------------------------------------------------------------------
284
296
  desc 'forSystem', 'Get one or many POA&M items in a system'
285
297
  # Required parameters/fields
286
- option :systemId, type: :numeric, required: true,
298
+ option :systemId, aliases: '-s', type: :numeric, required: true,
287
299
  desc: 'A numeric value representing the system identification'
288
300
  # Optional parameters/fields
289
- option :scheduledCompletionDateStart, type: :numeric, required: false,
301
+ option :scheduledCompletionDateStart, aliases: '-d', type: :numeric, required: false,
290
302
  desc: 'The schedule completion start date - Unix time format.'
291
- option :scheduledCompletionDateEnd, type: :numeric, required: false,
303
+ option :scheduledCompletionDateEnd, aliases: '-e', type: :numeric, required: false,
292
304
  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.'
305
+ option :controlAcronyms, aliases: '-a', type: :string, required: false, desc: 'The system acronym(s) e.g "AC-1, AC-2"'
306
+ option :assessmentProcedures, aliases: '-p', type: :string, required: false,
307
+ desc: 'The system Security Control Assessment Procedure e.g "AC-1.1,AC-1.2"'
308
+ option :ccis, aliases: '-c', type: :string, required: false, desc: 'The system CCIS string numerical value'
309
+ option :systemOnly, aliases: '-Y', type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
296
310
 
297
311
  def forSystem
298
312
  optional_options_keys = optional_options(@_initializer).keys
@@ -303,16 +317,16 @@ module Emasser
303
317
  puts to_output_hash(result).green
304
318
  rescue EmassClient::ApiError => e
305
319
  puts 'Exception when calling POAMApi->get_system_poams'.red
306
- puts to_output_hash(e).yellow
320
+ puts to_output_hash(e)
307
321
  end
308
322
  end
309
323
 
310
324
  # BY POAM ID --------------------------------------------------------------
311
325
  desc 'byPoamId', 'Get POA&M item for given systemId and poamId'
312
326
  # Required parameters/fields
313
- option :systemId, type: :numeric, required: true,
327
+ option :systemId, aliases: '-s', type: :numeric, required: true,
314
328
  desc: 'A numeric value representing the system identification'
315
- option :poamId, type: :numeric, required: true,
329
+ option :poamId, aliases: '-p', type: :numeric, required: true,
316
330
  desc: 'A numeric value representing the poam identification'
317
331
 
318
332
  def byPoamId
@@ -320,7 +334,7 @@ module Emasser
320
334
  puts to_output_hash(result).green
321
335
  rescue EmassClient::ApiError => e
322
336
  puts 'Exception when calling POAMApi->get_system_poams_by_poam_id'.red
323
- puts to_output_hash(e).yellow
337
+ puts to_output_hash(e)
324
338
  end
325
339
  end
326
340
 
@@ -336,14 +350,14 @@ module Emasser
336
350
  # MILSTONES by SYSTEM and POAM ID -----------------------------------------
337
351
  desc 'byPoamId', 'Get milestone(s) for given specified system and poam'
338
352
  # Required parameters/fields
339
- option :systemId, type: :numeric, required: true,
353
+ option :systemId, aliases: '-s', type: :numeric, required: true,
340
354
  desc: 'A numeric value representing the system identification'
341
- option :poamId, type: :numeric, required: true,
355
+ option :poamId, aliases: '-p', type: :numeric, required: true,
342
356
  desc: 'A numeric value representing the poam identification'
343
357
  # Optional parameters/fields
344
- option :scheduledCompletionDateStart, type: :numeric, required: false,
358
+ option :scheduledCompletionDateStart, aliases: '-d', type: :numeric, required: false,
345
359
  desc: 'The schedule completion start date - Unix time format.'
346
- option :scheduledCompletionDateEnd, type: :numeric, required: false,
360
+ option :scheduledCompletionDateEnd, aliases: '-e', type: :numeric, required: false,
347
361
  desc: 'The scheduled completion end date - Unix time format.'
348
362
 
349
363
  def byPoamId
@@ -357,18 +371,18 @@ module Emasser
357
371
  puts to_output_hash(result).green
358
372
  rescue EmassClient::ApiError => e
359
373
  puts 'Exception when calling MilestonesApi->get_system_milestones_by_poam_id'.red
360
- puts to_output_hash(e).yellow
374
+ puts to_output_hash(e)
361
375
  end
362
376
  end
363
377
 
364
378
  # MILSTONES by SYSTEM, POAM, and MILESTONE ID -----------------------------------------
365
379
  desc 'byMilestoneId', 'Get milestone(s) for given specified system, poam, and milestone Id'
366
380
  # Required parameters/fields
367
- option :systemId, type: :numeric, required: true,
381
+ option :systemId, aliases: '-s', type: :numeric, required: true,
368
382
  desc: 'A numeric value representing the system identification'
369
- option :poamId, type: :numeric, required: true,
383
+ option :poamId, aliases: '-p', type: :numeric, required: true,
370
384
  desc: 'A numeric value representing the poam identification'
371
- option :milestoneId, type: :numeric, required: true,
385
+ option :milestoneId, aliases: '-m', type: :numeric, required: true,
372
386
  desc: 'A numeric value representing the milestone identification'
373
387
 
374
388
  def byMilestoneId
@@ -378,7 +392,7 @@ module Emasser
378
392
  puts to_output_hash(result).green
379
393
  rescue EmassClient::ApiError => e
380
394
  puts 'Exception when calling MilestonesApi->get_system_milestones_by_poam_id_and_milestone_id'.red
381
- puts to_output_hash(e).yellow
395
+ puts to_output_hash(e)
382
396
  end
383
397
  end
384
398
 
@@ -396,13 +410,15 @@ module Emasser
396
410
 
397
411
  desc 'forSystem', 'Get all system artifacts for a system Id'
398
412
  # Required parameters/fields
399
- option :systemId, type: :numeric, required: true,
413
+ option :systemId, aliases: '-s', type: :numeric, required: true,
400
414
  desc: 'A numeric value representing the system identification'
401
415
  # 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.'
416
+ option :filename, aliases: '-f', type: :string, required: false, desc: 'The artifact file name'
417
+ option :controlAcronyms, aliases: '-a', type: :string, required: false, desc: 'The system acronym(s) e.g "AC-1, AC-2"'
418
+ option :assessmentProcedures, aliases: '-p', type: :string, required: false,
419
+ desc: 'The system Security Control Assessment Procedure e.g "AC-1.1,AC-1.2"'
420
+ option :ccis, aliases: '-c', type: :string, required: false, desc: 'The system CCIS string numerical value'
421
+ option :systemOnly, aliases: '-Y', type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
406
422
 
407
423
  def forSystem
408
424
  optional_options_keys = optional_options(@_initializer).keys
@@ -415,42 +431,61 @@ module Emasser
415
431
  puts to_output_hash(result).green
416
432
  rescue EmassClient::ApiError => e
417
433
  puts 'Exception when calling ArtifactsApi->get_system_artifacts'.red
418
- puts to_output_hash(e).yellow
434
+ puts to_output_hash(e)
419
435
  end
420
436
  end
421
437
 
422
438
  desc 'export', 'Get artifact binary file associated with given filename'
423
439
  # Required parameters/fields
424
- option :systemId, type: :numeric, required: true,
440
+ option :systemId, aliases: '-s', type: :numeric, required: true,
425
441
  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.'
442
+ option :filename, aliases: '-f', type: :string, required: true, desc: 'The artifact file name'
443
+ option :compress, aliases: '-C', type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
444
+ option :printToStdout, aliases: '-o', required: false, desc: 'Output file content to terminal - not valid for zip files'
428
445
  # NOTE: compress is a required parameter, however Thor does not allow a boolean type to be required because it
429
446
  # automatically creates a --no-compress option, which is confusing in the help output:
430
447
  # [--compress], [--no-compress] # BOOLEAN - true or false.
431
448
 
449
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
432
450
  def export
433
451
  optional_options_keys = optional_options(@_initializer).keys
434
452
  optional_options = to_input_hash(optional_options_keys, options)
435
- optional_options.merge!(Emasser::GET_ARTIFACTS_RETURN_TYPE)
453
+ if options[:printToStdout]
454
+ optional_options.merge!(Emasser::GET_ARTIFACTS_RETURN_TYPE)
455
+ if options[:compress]
456
+ puts 'Output to stdout - compress'.yellow
457
+ else
458
+ puts 'Output to stdout - plain text'.yellow
459
+ end
460
+ else
461
+ puts 'Output to temp directory'.yellow
462
+ end
436
463
 
437
464
  result = EmassClient::ArtifactsExportApi.new.get_system_artifacts_export(
438
465
  options[:systemId], options[:filename], optional_options
439
466
  )
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
467
+
468
+ unless File.extname(options[:filename]).eql? '.zip'
469
+ # rubocop:disable Style/SoleNestedConditional, Metrics/BlockNesting
470
+ if options[:printToStdout]
471
+ if options[:compress]
472
+ puts result.green
473
+ else
474
+ begin
475
+ puts JSON.pretty_generate(JSON.parse(result)).green
476
+ rescue StandardError
477
+ puts result.red
478
+ end
479
+ end
447
480
  end
448
481
  end
482
+ # rubocop:enable Style/SoleNestedConditional, Metrics/BlockNesting
449
483
  rescue EmassClient::ApiError => e
450
484
  puts 'Exception when calling ArtifactsApi->get_system_artifacts_export'.red
451
- puts to_output_hash(e).yellow
485
+ puts to_output_hash(e)
452
486
  end
453
487
  end
488
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
454
489
 
455
490
  # The Control Approval Chain (CAC) endpoints provide the ability to view the status of
456
491
  # Security Controls and submit them to the second stage in the Control Approval Chain
@@ -467,11 +502,11 @@ module Emasser
467
502
 
468
503
  desc 'controls', 'Get location of one or many controls in CAC'
469
504
  # Required parameters/fields
470
- option :systemId, type: :numeric, required: true,
505
+ option :systemId, aliases: '-s', type: :numeric, required: true,
471
506
  desc: 'A numeric value representing the system identification'
472
507
  # 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'
508
+ option :controlAcronyms, aliases: '-a', type: :string, required: false,
509
+ desc: 'The system acronym(s) e.g "AC-1, AC-2" - if not provided all CACs for systemId are returned'
475
510
 
476
511
  def controls
477
512
  optional_options_keys = optional_options(@_initializer).keys
@@ -483,7 +518,7 @@ module Emasser
483
518
  puts to_output_hash(result).green
484
519
  rescue EmassClient::ApiError => e
485
520
  puts 'Exception when calling ApprovalChainApi->get_system_cac'.red
486
- puts to_output_hash(e).yellow
521
+ puts to_output_hash(e)
487
522
  end
488
523
  end
489
524
  end
@@ -505,7 +540,7 @@ module Emasser
505
540
 
506
541
  desc 'package', 'Get location of system package in PAC'
507
542
  # Required parameters/fields
508
- option :systemId, type: :numeric, required: true,
543
+ option :systemId, aliases: '-s', type: :numeric, required: true,
509
544
  desc: 'A numeric value representing the system identification'
510
545
 
511
546
  def package
@@ -514,7 +549,7 @@ module Emasser
514
549
  puts to_output_hash(result).green
515
550
  rescue EmassClient::ApiError => e
516
551
  puts 'Exception when calling ApprovalChainApi->get_system_'.red
517
- puts to_output_hash(e).yellow
552
+ puts to_output_hash(e)
518
553
  end
519
554
  end
520
555
 
@@ -532,14 +567,14 @@ module Emasser
532
567
  long_desc Help.text(:cmmc_get_mapper)
533
568
 
534
569
  # Required parameters/fields
535
- option :sinceDate, type: :string, required: true, desc: 'The CMMC date. Unix date format'
570
+ option :sinceDate, aliases: '-d', type: :string, required: true, desc: 'The CMMC date. Unix date format'
536
571
 
537
572
  def assessments
538
573
  result = EmassClient::CMMCAssessmentsApi.new.get_cmmc_assessments(options[:sinceDate])
539
574
  puts to_output_hash(result).green
540
575
  rescue EmassClient::ApiError => e
541
576
  puts 'Exception when calling ApprovalChainApi->get_cmmc_assessments'.red
542
- puts to_output_hash(e).yellow
577
+ puts to_output_hash(e)
543
578
  end
544
579
  end
545
580
 
@@ -556,8 +591,8 @@ module Emasser
556
591
  desc 'forSite', 'Get location of system package in PAC'
557
592
 
558
593
  # Optional parameters/fields
559
- option :includeInactive, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
560
- option :registrationType,
594
+ option :includeInactive, aliases: '-I', type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
595
+ option :registrationType, aliases: '-r',
561
596
  type: :string, required: false,
562
597
  enum: %w[assessAndAuthorize assessOnly guest regular functional cloudServiceProvider commonControlProvider]
563
598
 
@@ -569,7 +604,7 @@ module Emasser
569
604
  puts to_output_hash(result).green
570
605
  rescue EmassClient::ApiError => e
571
606
  puts 'Exception when calling ApprovalChainApi->get_workflow_definitions'.red
572
- puts to_output_hash(e).yellow
607
+ puts to_output_hash(e)
573
608
  end
574
609
  end
575
610
 
@@ -577,20 +612,20 @@ module Emasser
577
612
  # active and historical workflows for a system.
578
613
  #
579
614
  # Endpoints:
580
- # /api/workflows/instances - Get workflow instances in a site
581
- # /api/workflows/instances/{workflowInstanceId} - Get workflow instance by ID
615
+ # /api/systems/{systemId}/workflow-instances - Get workflow instances in a system
616
+ # /api/systems/{systemId}/workflow-instances/{workflowInstanceId} - Get workflow instance by ID in a system
582
617
  class WorkflowInstances < SubCommandBase
583
618
  def self.exit_on_failure?
584
619
  true
585
620
  end
586
621
 
587
- desc 'all', 'Get workflow instances in a site'
588
-
622
+ desc 'all', 'Get detailed information for all active and historical workflows'
589
623
  # 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]
624
+ option :includeComments, aliases: '-C', type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
625
+ option :includeDecommissionSystems, aliases: '-D', type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
626
+ option :pageIndex, aliases: '-p', type: :numeric, required: false, desc: 'The page number to be returned'
627
+ option :sinceDate, aliases: '-d', type: :string, required: false, desc: 'The workflow instance date. Unix date format'
628
+ option :status, aliases: '-s', type: :string, required: false, enum: %w[active inactive all]
594
629
 
595
630
  def all
596
631
  optional_options_keys = optional_options(@_initializer).keys
@@ -600,24 +635,25 @@ module Emasser
600
635
  puts to_output_hash(result).green
601
636
  rescue EmassClient::ApiError => e
602
637
  puts 'Exception when calling ApprovalChainApi->get_system_workflow_instances'.red
603
- puts to_output_hash(e).yellow
638
+ puts to_output_hash(e)
604
639
  end
605
640
 
606
641
  # Workflow by workflowInstanceId ---------------------------------------------------------
607
- desc 'byInstanceId', 'Get workflow instance by ID'
642
+ desc 'byInstanceId', 'Get workflow instance by ID in a system'
608
643
 
609
644
  # Required parameters/fields
610
- option :workflowInstanceId, type: :numeric, required: true,
645
+ option :workflowInstanceId, aliases: '-w', type: :numeric, required: true,
611
646
  desc: 'A numeric value representing the workflowInstance identification'
612
647
 
613
648
  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)
649
+ # opts = Emasser::GET_WORKFLOWINSTANCES_RETURN_TYPE
650
+
651
+ result = EmassClient::WorkflowInstancesApi
652
+ .new.get_system_workflow_instances_by_workflow_instance_id(options[:workflowInstanceId])
617
653
  puts to_output_hash(result).green
618
654
  rescue EmassClient::ApiError => e
619
655
  puts 'Exception when calling ApprovalChainApi->get_system_workflow_instances_by_workflow_instance_id'.red
620
- puts to_output_hash(e).yellow
656
+ puts to_output_hash(e)
621
657
  end
622
658
  end
623
659
 
@@ -626,36 +662,84 @@ module Emasser
626
662
  # Each dashboard dataset available from the API is automatically updated with the current
627
663
  # configuration of the dashboard and the instance of eMASS as the dashboard changes.
628
664
  #
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
665
+ # Endpoints: (37)
666
+ # ---------------------------------------------------------------------------
667
+ # System Status Dashboard
668
+ # /api/dashboards/system-status-details - Get systems status detail
669
+ # ---------------------------------------------------------------------------
670
+ # Enterprise Security Controls Dashboard
671
+ # /api/dashboards/system-control-compliance-summary - Get systems control compliance summary
672
+ # /api/dashboards/system-security-controls-details - Get systems security control details
673
+ # /api/dashboards/system-assessment-procedures-details - Get systems assessement procdures details
674
+ # ---------------------------------------------------------------------------
675
+ # Enterprise Terms Conditions Dashboards
676
+ # /api/dashboards/system-terms-conditions-summary - Get systems terms conditions summary
677
+ # /api/dashboards/system-terms-conditions-details - Get systems terms conditions details
678
+ # ---------------------------------------------------------------------------
679
+ # Enterprise POA&M Dashboards
680
+ # /api/dashboards/system-poam-summary - Get systems POA&Ms summary
681
+ # /api/dashboards/system-poam-details - Get system POA&Ms details
682
+ # ---------------------------------------------------------------------------
683
+ # Enterprise Artifacts Dashboards
684
+ # /api/dashboards/system-artifacts-summary - Get system Artifacts summary
685
+ # /api/dashboards/system-artifacts-details - Get system Artifacts details
686
+ # ---------------------------------------------------------------------------
687
+ # Hardware Baseline Dashboards
688
+ # /api/dashboards/system-hardware-summary - Get system hardware summary
689
+ # /api/dashboards/system-hardware-details - Get system hardware details
690
+ # ---------------------------------------------------------------------------
691
+ # Enterprise Sensor-based Hardware Resources Dashboards
692
+ # /api/dashboards/system-sensor-hardware-summary - Get system sensor hardware summary
693
+ # /api/dashboards/system-sensor-hardware-details - Get system sensor hardware details
694
+ # ---------------------------------------------------------------------------
695
+ # Software Baseline Dashboards
696
+ # /api/dashboards/system-software-summary - Get system software summary
697
+ # /api/dashboards/system-software-details - Get system ssoftware details
698
+ # ---------------------------------------------------------------------------
699
+ # Enterprise Sensor-based Software Resources Dashboards
700
+ # /api/dashboards/system-sensor-software-summary - Get system sensor software summary
701
+ # /api/dashboards/system-sensor-software-details - Get system sensor software details
702
+ # /api/dashboards/system-sensor-software-counts - Get system sensor software counts
703
+ # ---------------------------------------------------------------------------
704
+ # Enterprise Vulnerability Dashboards
705
+ # /api/dashboards/system-vulnerability-summary - Get system vulnerability summary
706
+ # /api/dashboards/system-device-findings-summary - Get system device findings summary
707
+ # /api/dashboards/system-device-findings-details - Get system device findings details
708
+ # ---------------------------------------------------------------------------
709
+ # Ports and Protocols Dashboards
710
+ # /api/dashboards/system-ports-protocols-summary - Get system ports and protocols summary
711
+ # /api/dashboards/system-ports-protocols-details - Get system ports and protocols details
712
+ #----------------------------------------------------------------------------
713
+ # System CONMON Integration Status Dashboard
714
+ # /api/dashboards/system-conmon-integration-status-summary - Get system conmon integration status summary
715
+ #----------------------------------------------------------------------------
716
+ # System Associations Dashboard
717
+ # /api/dashboards/system-associations-details - Get system associations details
718
+ #----------------------------------------------------------------------------
719
+ # Users Dashboard
720
+ # /api/dashboards/user-system-assignments-details - Get user system assignments details
721
+ #----------------------------------------------------------------------------
722
+ # Privacy Compliance Dashboards
723
+ # /api/dashboards/system-privacy-summary - Get user system privacy summary
724
+ # /api/dashboards/va-omb-fisma-saop-summary - Get VA OMB-FISMA SAOP summary
725
+ #----------------------------------------------------------------------------
726
+ # System A&A Summary Dashboard
727
+ # /api/dashboards/va-system-aa-summary - Get VA system A&A summary
728
+ #----------------------------------------------------------------------------
729
+ # System A2.0 Summary Dashboard
730
+ # /api/dashboards/va-system-a2-summary - Get VA system A2.0 summary
731
+ #----------------------------------------------------------------------------
732
+ # System P.L. 109 Reporting Summary Dashboard
653
733
  # /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
734
+ #----------------------------------------------------------------------------
735
+ # FISMA Inventory Summary Dashboards
736
+ # /api/dashboards/va-system-fisma-inventory-summary - Get VA system FISMA inventory summary
737
+ # /api/dashboards/va-system-fisma-inventory-crypto-summary - Get VA system FISMA inventory crypto summary
738
+ #----------------------------------------------------------------------------
739
+ # Threat Risks Dashboards
740
+ # /api/dashboards/va-system-threat-risks-summary - Get VA System Threat Risks Summary
741
+ # /api/dashboards/va-system-threat-sources-details - Get VA System Threat Sources Details
742
+ # /api/dashboards/va-system-threat-architecture-details - Get VA System Threat Architecture Details
659
743
 
660
744
  class Dashboards < SubCommandBase
661
745
  def self.exit_on_failure?
@@ -663,16 +747,13 @@ module Emasser
663
747
  end
664
748
 
665
749
  # Required parameters/fields
666
- class_option :orgId, aliases: '-o', type: :numeric,
750
+ class_option :orgId, aliases: '-o', type: :numeric, required: true,
667
751
  desc: 'A numeric value representing the system identification'
668
752
 
669
753
  # 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'
754
+ class_option :excludeinherited, aliases: '-I', type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false, default false.'
755
+ class_option :pageIndex, aliases: '-i', type: :numeric, required: false, desc: 'The page number to be returned, if not specified starts at page 0'
756
+ class_option :pageSize, aliases: '-s', type: :numeric, required: false, desc: 'The total entries per page, default is 20,000'
676
757
 
677
758
  #--------------------------------------------------------------------------
678
759
  # System Status Dashboard
@@ -682,44 +763,76 @@ module Emasser
682
763
  optional_options_keys = optional_options(@_initializer).keys
683
764
  optional_options = to_input_hash(optional_options_keys, options)
684
765
 
685
- result = EmassClient::DashboardsApi.new.get_system_status_details(
766
+ result = EmassClient::SystemStatusDashboardApi.new.get_system_status_details(
686
767
  options[:orgId], optional_options
687
768
  )
688
769
  puts to_output_hash(result).green
689
770
  rescue EmassClient::ApiError => e
690
- puts 'Exception when calling DashboardsApi->get_system_status_details'.red
771
+ puts 'Exception when calling SystemStatusDashboardApi->get_system_status_details'.red
772
+ puts to_output_hash(e)
773
+ end
774
+
775
+ #----------------------------------------------------------------------------
776
+ # Enterprise Terms Conditions Dashboards
777
+ # /api/dashboards/system-terms-conditions-summary
778
+ desc 'terms_conditions_summary', 'Get systems terms conditions summary dashboard information'
779
+ def terms_conditions_summary
780
+ optional_options_keys = optional_options(@_initializer).keys
781
+ optional_options = to_input_hash(optional_options_keys, options)
782
+
783
+ result = EmassClient::EnterpriseTermsConditionsDashboardsApi.new.get_system_terms_conditions_summary(
784
+ options[:orgId], optional_options
785
+ )
786
+ puts to_output_hash(result).green
787
+ rescue EmassClient::ApiError => e
788
+ puts 'Exception when calling EnterpriseTermsConditionsDashboardsApi->get_system_terms_conditions_summary'.red
789
+ puts to_output_hash(e)
790
+ end
791
+
792
+ # /api/dashboards/system-terms-conditions-details
793
+ desc 'terms_conditions_detail', 'Get systems terms conditions details dashboard information'
794
+ def terms_conditions_details
795
+ optional_options_keys = optional_options(@_initializer).keys
796
+ optional_options = to_input_hash(optional_options_keys, options)
797
+
798
+ result = EmassClient::EnterpriseTermsConditionsDashboardsApi.new.get_system_terms_conditions_details(
799
+ options[:orgId], optional_options
800
+ )
801
+ puts to_output_hash(result).green
802
+ rescue EmassClient::ApiError => e
803
+ puts 'Exception when calling EnterpriseTermsConditionsDashboardsApi->get_system_terms_conditions_details'.red
691
804
  puts to_output_hash(e)
692
805
  end
693
806
 
694
807
  #--------------------------------------------------------------------------
695
- # Enterprise Security Controls Dashboard
808
+ # Enterprise Security Controls Dashboards
696
809
  # /api/dashboards/system-control-compliance-summary
697
810
  desc 'control_compliance_summary', 'Get systems control compliance summary dashboard information'
698
811
  def control_compliance_summary
699
812
  optional_options_keys = optional_options(@_initializer).keys
700
813
  optional_options = to_input_hash(optional_options_keys, options)
701
814
 
702
- result = EmassClient::DashboardsApi.new.get_system_control_compliance_summary(
815
+ result = EmassClient::EnterpriseSecurityControlsDashboardsApi.new.get_system_control_compliance_summary(
703
816
  options[:orgId], optional_options
704
817
  )
705
818
  puts to_output_hash(result).green
706
819
  rescue EmassClient::ApiError => e
707
- puts 'Exception when calling DashboardsApi->get_system_control_compliance_summary'.red
820
+ puts 'Exception when calling EnterpriseSecurityControlsDashboardsApi->get_system_control_compliance_summary'.red
708
821
  puts to_output_hash(e)
709
822
  end
710
823
 
711
824
  # /api/dashboards/system-security-controls-details
712
825
  desc 'security_control_details', 'Get systems security control details dashboard information'
713
- def security_control_details
826
+ def security_controls_details
714
827
  optional_options_keys = optional_options(@_initializer).keys
715
828
  optional_options = to_input_hash(optional_options_keys, options)
716
829
 
717
- result = EmassClient::DashboardsApi.new.get_system_security_control_details(
830
+ result = EmassClient::EnterpriseSecurityControlsDashboardsApi.new.get_system_security_control_details(
718
831
  options[:orgId], optional_options
719
832
  )
720
833
  puts to_output_hash(result).green
721
834
  rescue EmassClient::ApiError => e
722
- puts 'Exception when calling DashboardsApi->get_system_security_control_details'.red
835
+ puts 'Exception when calling EnterpriseSecurityControlsDashboardsApi->get_system_security_control_details'.red
723
836
  puts to_output_hash(e)
724
837
  end
725
838
 
@@ -729,12 +842,12 @@ module Emasser
729
842
  optional_options_keys = optional_options(@_initializer).keys
730
843
  optional_options = to_input_hash(optional_options_keys, options)
731
844
 
732
- result = EmassClient::DashboardsApi.new.get_system_assessment_procedures_details(
845
+ result = EmassClient::EnterpriseSecurityControlsDashboardsApi.new.get_system_assessment_procedures_details(
733
846
  options[:orgId], optional_options
734
847
  )
735
848
  puts to_output_hash(result).green
736
849
  rescue EmassClient::ApiError => e
737
- puts 'Exception when calling DashboardsApi->get_system_assessment_procedures_details'.red
850
+ puts 'Exception when calling EnterpriseSecurityControlsDashboardsApi->get_system_assessment_procedures_details'.red
738
851
  puts to_output_hash(e)
739
852
  end
740
853
 
@@ -746,12 +859,12 @@ module Emasser
746
859
  optional_options_keys = optional_options(@_initializer).keys
747
860
  optional_options = to_input_hash(optional_options_keys, options)
748
861
 
749
- result = EmassClient::DashboardsApi.new.get_system_poam_summary(
862
+ result = EmassClient::EnterprisePOAMDashboardsApi.new.get_system_poam_summary(
750
863
  options[:orgId], optional_options
751
864
  )
752
865
  puts to_output_hash(result).green
753
866
  rescue EmassClient::ApiError => e
754
- puts 'Exception when calling DashboardsApi->get_system_poam_summary'.red
867
+ puts 'Exception when calling EnterprisePOAMDashboardsApi->get_system_poam_summary'.red
755
868
  puts to_output_hash(e)
756
869
  end
757
870
 
@@ -761,12 +874,12 @@ module Emasser
761
874
  optional_options_keys = optional_options(@_initializer).keys
762
875
  optional_options = to_input_hash(optional_options_keys, options)
763
876
 
764
- result = EmassClient::DashboardsApi.new.get_system_poam_details(
877
+ result = EmassClient::EnterprisePOAMDashboardsApi.new.get_system_poam_details(
765
878
  options[:orgId], optional_options
766
879
  )
767
880
  puts to_output_hash(result).green
768
881
  rescue EmassClient::ApiError => e
769
- puts 'Exception when calling DashboardsApi->get_system_poam_details'.red
882
+ puts 'Exception when calling EnterprisePOAMDashboardsApi->get_system_poam_details'.red
770
883
  puts to_output_hash(e)
771
884
  end
772
885
 
@@ -778,12 +891,12 @@ module Emasser
778
891
  optional_options_keys = optional_options(@_initializer).keys
779
892
  optional_options = to_input_hash(optional_options_keys, options)
780
893
 
781
- result = EmassClient::DashboardsApi.new.get_system_artifacts_summary(
894
+ result = EmassClient::EnterpriseArtifactsDashboardsApi.new.get_system_artifacts_summary(
782
895
  options[:orgId], optional_options
783
896
  )
784
897
  puts to_output_hash(result).green
785
898
  rescue EmassClient::ApiError => e
786
- puts 'Exception when calling DashboardsApi->get_system_artifacts_summary'.red
899
+ puts 'Exception when calling EnterpriseArtifactsDashboardsApi->get_system_artifacts_summary'.red
787
900
  puts to_output_hash(e)
788
901
  end
789
902
 
@@ -793,12 +906,12 @@ module Emasser
793
906
  optional_options_keys = optional_options(@_initializer).keys
794
907
  optional_options = to_input_hash(optional_options_keys, options)
795
908
 
796
- result = EmassClient::DashboardsApi.new.get_system_artifacts_details(
909
+ result = EmassClient::EnterpriseArtifactsDashboardsApi.new.get_system_artifacts_details(
797
910
  options[:orgId], optional_options
798
911
  )
799
912
  puts to_output_hash(result).green
800
913
  rescue EmassClient::ApiError => e
801
- puts 'Exception when calling DashboardsApi->get_system_artifacts_details'.red
914
+ puts 'Exception when calling EnterpriseArtifactsDashboardsApi->get_system_artifacts_details'.red
802
915
  puts to_output_hash(e)
803
916
  end
804
917
 
@@ -810,12 +923,12 @@ module Emasser
810
923
  optional_options_keys = optional_options(@_initializer).keys
811
924
  optional_options = to_input_hash(optional_options_keys, options)
812
925
 
813
- result = EmassClient::DashboardsApi.new.get_system_hardware_summary(
926
+ result = EmassClient::HardwareBaselineDashboardsApi.new.get_system_hardware_summary(
814
927
  options[:orgId], optional_options
815
928
  )
816
929
  puts to_output_hash(result).green
817
930
  rescue EmassClient::ApiError => e
818
- puts 'Exception when calling DashboardsApi->get_system_hardware_summary'.red
931
+ puts 'Exception when calling HardwareBaselineDashboardsApi->get_system_hardware_summary'.red
819
932
  puts to_output_hash(e)
820
933
  end
821
934
 
@@ -825,12 +938,12 @@ module Emasser
825
938
  optional_options_keys = optional_options(@_initializer).keys
826
939
  optional_options = to_input_hash(optional_options_keys, options)
827
940
 
828
- result = EmassClient::DashboardsApi.new.get_system_hardware_details(
941
+ result = EmassClient::HardwareBaselineDashboardsApi.new.get_system_hardware_details(
829
942
  options[:orgId], optional_options
830
943
  )
831
944
  puts to_output_hash(result).green
832
945
  rescue EmassClient::ApiError => e
833
- puts 'Exception when calling DashboardsApi->get_system_hardware_details'.red
946
+ puts 'Exception when calling HardwareBaselineDashboardsApi->get_system_hardware_details'.red
834
947
  puts to_output_hash(e)
835
948
  end
836
949
 
@@ -842,12 +955,12 @@ module Emasser
842
955
  optional_options_keys = optional_options(@_initializer).keys
843
956
  optional_options = to_input_hash(optional_options_keys, options)
844
957
 
845
- result = EmassClient::DashboardsApi.new.get_system_sensor_hardware_summary(
958
+ result = EmassClient::EnterpriseSensorBasedHardwareResourcesDashboardsApi.new.get_system_sensor_hardware_summary(
846
959
  options[:orgId], optional_options
847
960
  )
848
961
  puts to_output_hash(result).green
849
962
  rescue EmassClient::ApiError => e
850
- puts 'Exception when calling DashboardsApi->get_system_sensor_hardware_summary'.red
963
+ puts 'Exception when calling EnterpriseSensorBasedHardwareResourcesDashboardsApi->get_system_sensor_hardware_summary'.red
851
964
  puts to_output_hash(e)
852
965
  end
853
966
 
@@ -857,12 +970,12 @@ module Emasser
857
970
  optional_options_keys = optional_options(@_initializer).keys
858
971
  optional_options = to_input_hash(optional_options_keys, options)
859
972
 
860
- result = EmassClient::DashboardsApi.new.get_system_sensor_hardware_details(
973
+ result = EmassClient::EnterpriseSensorBasedHardwareResourcesDashboardsApi.new.get_system_sensor_hardware_details(
861
974
  options[:orgId], optional_options
862
975
  )
863
976
  puts to_output_hash(result).green
864
977
  rescue EmassClient::ApiError => e
865
- puts 'Exception when calling DashboardsApi->get_system_sensor_hardware_details'.red
978
+ puts 'Exception when calling EnterpriseSensorBasedHardwareResourcesDashboardsApi->get_system_sensor_hardware_details'.red
866
979
  puts to_output_hash(e)
867
980
  end
868
981
 
@@ -874,12 +987,12 @@ module Emasser
874
987
  optional_options_keys = optional_options(@_initializer).keys
875
988
  optional_options = to_input_hash(optional_options_keys, options)
876
989
 
877
- result = EmassClient::DashboardsApi.new.get_system_software_summary(
990
+ result = EmassClient::SoftwareBaselineDashboardsApi.new.get_system_software_summary(
878
991
  options[:orgId], optional_options
879
992
  )
880
993
  puts to_output_hash(result).green
881
994
  rescue EmassClient::ApiError => e
882
- puts 'Exception when calling DashboardsApi->get_system_software_summary'.red
995
+ puts 'Exception when calling SoftwareBaselineDashboardsApi->get_system_software_summary'.red
883
996
  puts to_output_hash(e)
884
997
  end
885
998
 
@@ -889,29 +1002,123 @@ module Emasser
889
1002
  optional_options_keys = optional_options(@_initializer).keys
890
1003
  optional_options = to_input_hash(optional_options_keys, options)
891
1004
 
892
- result = EmassClient::DashboardsApi.new.get_system_software_details(
1005
+ result = EmassClient::SoftwareBaselineDashboardsApi.new.get_system_software_details(
1006
+ options[:orgId], optional_options
1007
+ )
1008
+ puts to_output_hash(result).green
1009
+ rescue EmassClient::ApiError => e
1010
+ puts 'Exception when calling SoftwareBaselineDashboardsApi->get_system_software_details'.red
1011
+ puts to_output_hash(e)
1012
+ end
1013
+
1014
+ #--------------------------------------------------------------------------
1015
+ # Enterprise Sensor-based Software Resources Dashboards
1016
+ # /api/dashboards/system-sensor-software-summary
1017
+ desc 'sensor_software_summary', 'Get system sensor software summary dashboard information'
1018
+ def sensor_software_summary
1019
+ optional_options_keys = optional_options(@_initializer).keys
1020
+ optional_options = to_input_hash(optional_options_keys, options)
1021
+
1022
+ result = EmassClient::EnterpriseSensorBasedSoftwareResourcesDashboardsApi.new.get_system_sensor_software_summary(
1023
+ options[:orgId], optional_options
1024
+ )
1025
+ puts to_output_hash(result).green
1026
+ rescue EmassClient::ApiError => e
1027
+ puts 'Exception when calling EnterpriseSensorBasedSoftwareResourcesDashboardsApi->get_system_sensor_software_summary'.red
1028
+ puts to_output_hash(e)
1029
+ end
1030
+
1031
+ # /api/dashboards/system-sensor-software-details
1032
+ desc 'sensor_software_details', 'Get system sensor software details dashboard information'
1033
+ def sensor_software_details
1034
+ optional_options_keys = optional_options(@_initializer).keys
1035
+ optional_options = to_input_hash(optional_options_keys, options)
1036
+
1037
+ result = EmassClient::EnterpriseSensorBasedSoftwareResourcesDashboardsApi.new.get_system_sensor_software_details(
893
1038
  options[:orgId], optional_options
894
1039
  )
895
1040
  puts to_output_hash(result).green
896
1041
  rescue EmassClient::ApiError => e
897
- puts 'Exception when calling DashboardsApi->get_system_software_details'.red
1042
+ puts 'Exception when calling EnterpriseSensorBasedSoftwareResourcesDashboardsApi->get_system_sensor_software_details'.red
1043
+ puts to_output_hash(e)
1044
+ end
1045
+
1046
+ # /api/dashboards/system-sensor-software-counts
1047
+ desc 'sensor_software_counts', 'Get system sensor software counts dashboard information'
1048
+ def sensor_software_counts
1049
+ optional_options_keys = optional_options(@_initializer).keys
1050
+ optional_options = to_input_hash(optional_options_keys, options)
1051
+
1052
+ result = EmassClient::EnterpriseSensorBasedSoftwareResourcesDashboardsApi.new.get_system_sensor_software_counts(
1053
+ options[:orgId], optional_options
1054
+ )
1055
+ puts to_output_hash(result).green
1056
+ rescue EmassClient::ApiError => e
1057
+ puts 'Exception when calling EnterpriseSensorBasedSoftwareResourcesDashboardsApi->get_system_sensor_software_counts'.red
898
1058
  puts to_output_hash(e)
899
1059
  end
900
1060
 
901
1061
  #--------------------------------------------------------------------------
902
- # Ports and Protocols Dashboard
1062
+ # Enterprise Vulnerability Dashboards
1063
+ # /api/dashboards/system-vulnerability-summary
1064
+ desc 'vulnerability_summary', 'Get system vulnerability summary dashboard information'
1065
+ def vulnerability_summary
1066
+ optional_options_keys = optional_options(@_initializer).keys
1067
+ optional_options = to_input_hash(optional_options_keys, options)
1068
+
1069
+ result = EmassClient::EnterpriseVulnerabilityDashboardsApi.new.get_system_vulnerability_summary(
1070
+ options[:orgId], optional_options
1071
+ )
1072
+ puts to_output_hash(result).green
1073
+ rescue EmassClient::ApiError => e
1074
+ puts 'Exception when calling EnterpriseVulnerabilityDashboardsApi->get_system_vulnerability_summary'.red
1075
+ puts to_output_hash(e)
1076
+ end
1077
+
1078
+ # /api/dashboards/system-device-findings-summary
1079
+ desc 'device_findings_summary', 'Get system device findings summary dashboard information'
1080
+ def device_findings_summary
1081
+ optional_options_keys = optional_options(@_initializer).keys
1082
+ optional_options = to_input_hash(optional_options_keys, options)
1083
+
1084
+ result = EmassClient::EnterpriseVulnerabilityDashboardsApi.new.get_system_device_findings_summary(
1085
+ options[:orgId], optional_options
1086
+ )
1087
+ puts to_output_hash(result).green
1088
+ rescue EmassClient::ApiError => e
1089
+ puts 'Exception when calling EnterpriseVulnerabilityDashboardsApi->get_system_device_findings_summary'.red
1090
+ puts to_output_hash(e)
1091
+ end
1092
+
1093
+ # /api/dashboards/system-device-findings-details
1094
+ desc 'device_findings_details', 'Get system device findings details dashboard information'
1095
+ def device_findings_details
1096
+ optional_options_keys = optional_options(@_initializer).keys
1097
+ optional_options = to_input_hash(optional_options_keys, options)
1098
+
1099
+ result = EmassClient::EnterpriseVulnerabilityDashboardsApi.new.get_system_device_findings_details(
1100
+ options[:orgId], optional_options
1101
+ )
1102
+ puts to_output_hash(result).green
1103
+ rescue EmassClient::ApiError => e
1104
+ puts 'Exception when calling EnterpriseVulnerabilityDashboardsApi->get_system_device_findings_details'.red
1105
+ puts to_output_hash(e)
1106
+ end
1107
+
1108
+ #--------------------------------------------------------------------------
1109
+ # Ports and Protocols Dashboards
903
1110
  # /api/dashboards/system-ports-protocols-summary
904
1111
  desc 'ports_protocols_summary', 'Get system ports & portocols summary dashboard information'
905
1112
  def ports_protocols_summary
906
1113
  optional_options_keys = optional_options(@_initializer).keys
907
1114
  optional_options = to_input_hash(optional_options_keys, options)
908
1115
 
909
- result = EmassClient::DashboardsApi.new.get_system_ports_protocols_summary(
1116
+ result = EmassClient::PortsAndProtocolsDashboardsApi.new.get_system_ports_protocols_summary(
910
1117
  options[:orgId], optional_options
911
1118
  )
912
1119
  puts to_output_hash(result).green
913
1120
  rescue EmassClient::ApiError => e
914
- puts 'Exception when calling DashboardsApi->get_system_ports_protocols_summary'.red
1121
+ puts 'Exception when calling PortsAndProtocolsDashboardsApi->get_system_ports_protocols_summary'.red
915
1122
  puts to_output_hash(e)
916
1123
  end
917
1124
 
@@ -921,29 +1128,29 @@ module Emasser
921
1128
  optional_options_keys = optional_options(@_initializer).keys
922
1129
  optional_options = to_input_hash(optional_options_keys, options)
923
1130
 
924
- result = EmassClient::DashboardsApi.new.get_system_ports_protocols_details(
1131
+ result = EmassClient::PortsAndProtocolsDashboardsApi.new.get_system_ports_protocols_details(
925
1132
  options[:orgId], optional_options
926
1133
  )
927
1134
  puts to_output_hash(result).green
928
1135
  rescue EmassClient::ApiError => e
929
- puts 'Exception when calling DashboardsApi->get_system_ports_protocols_details'.red
1136
+ puts 'Exception when calling PortsAndProtocolsDashboardsApi->get_system_ports_protocols_details'.red
930
1137
  puts to_output_hash(e)
931
1138
  end
932
1139
 
933
1140
  #--------------------------------------------------------------------------
934
1141
  # System CONMON Integration Status Dashboard
935
1142
  # /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
1143
+ desc 'integration_status_summary', 'Get system conmon integration status summary dashboard information'
1144
+ def integration_status_summary
938
1145
  optional_options_keys = optional_options(@_initializer).keys
939
1146
  optional_options = to_input_hash(optional_options_keys, options)
940
1147
 
941
- result = EmassClient::DashboardsApi.new.get_system_common_integration_status_summary(
1148
+ result = EmassClient::SystemCONMONIntegrationStatusDashboardApi.new.get_system_common_integration_status_summary(
942
1149
  options[:orgId], optional_options
943
1150
  )
944
1151
  puts to_output_hash(result).green
945
1152
  rescue EmassClient::ApiError => e
946
- puts 'Exception when calling DashboardsApi->get_system_common_integration_status_summary'.red
1153
+ puts 'Exception when calling SystemCONMONIntegrationStatusDashboardApi->get_system_common_integration_status_summary'.red
947
1154
  puts to_output_hash(e)
948
1155
  end
949
1156
 
@@ -955,12 +1162,12 @@ module Emasser
955
1162
  optional_options_keys = optional_options(@_initializer).keys
956
1163
  optional_options = to_input_hash(optional_options_keys, options)
957
1164
 
958
- result = EmassClient::DashboardsApi.new.get_system_associations_details(
1165
+ result = EmassClient::SystemAssociationsDashboardApi.new.get_system_associations_details(
959
1166
  options[:orgId], optional_options
960
1167
  )
961
1168
  puts to_output_hash(result).green
962
1169
  rescue EmassClient::ApiError => e
963
- puts 'Exception when calling DashboardsApi->get_system_associations_details'.red
1170
+ puts 'Exception when calling SystemAssociationsDashboardApi->get_system_associations_details'.red
964
1171
  puts to_output_hash(e)
965
1172
  end
966
1173
 
@@ -972,12 +1179,12 @@ module Emasser
972
1179
  optional_options_keys = optional_options(@_initializer).keys
973
1180
  optional_options = to_input_hash(optional_options_keys, options)
974
1181
 
975
- result = EmassClient::DashboardsApi.new.get_user_system_assignments_details(
1182
+ result = EmassClient::UsersDashboardApi.new.get_user_system_assignments_details(
976
1183
  options[:orgId], optional_options
977
1184
  )
978
1185
  puts to_output_hash(result).green
979
1186
  rescue EmassClient::ApiError => e
980
- puts 'Exception when calling DashboardsApi->get_user_system_assignments_details'.red
1187
+ puts 'Exception when calling UsersDashboardApi->get_user_system_assignments_details'.red
981
1188
  puts to_output_hash(e)
982
1189
  end
983
1190
 
@@ -989,12 +1196,12 @@ module Emasser
989
1196
  optional_options_keys = optional_options(@_initializer).keys
990
1197
  optional_options = to_input_hash(optional_options_keys, options)
991
1198
 
992
- result = EmassClient::DashboardsApi.new.get_system_privacy_summary(
1199
+ result = EmassClient::PrivacyComplianceDashboardsApi.new.get_system_privacy_summary(
993
1200
  options[:orgId], optional_options
994
1201
  )
995
1202
  puts to_output_hash(result).green
996
1203
  rescue EmassClient::ApiError => e
997
- puts 'Exception when calling DashboardsApi->get_system_privacy_summary'.red
1204
+ puts 'Exception when calling PrivacyComplianceDashboardsApi->get_system_privacy_summary'.red
998
1205
  puts to_output_hash(e)
999
1206
  end
1000
1207
 
@@ -1004,12 +1211,12 @@ module Emasser
1004
1211
  optional_options_keys = optional_options(@_initializer).keys
1005
1212
  optional_options = to_input_hash(optional_options_keys, options)
1006
1213
 
1007
- result = EmassClient::DashboardsApi.new.get_va_omb_fsma_saop_summary(
1214
+ result = EmassClient::PrivacyComplianceDashboardsApi.new.get_va_omb_fsma_saop_summary(
1008
1215
  options[:orgId], optional_options
1009
1216
  )
1010
1217
  puts to_output_hash(result).green
1011
1218
  rescue EmassClient::ApiError => e
1012
- puts 'Exception when calling DashboardsApi->get_va_omb_fsma_saop_summary'.red
1219
+ puts 'Exception when calling PrivacyComplianceDashboardsApi->get_va_omb_fsma_saop_summary'.red
1013
1220
  puts to_output_hash(e).yellow
1014
1221
  end
1015
1222
 
@@ -1021,12 +1228,12 @@ module Emasser
1021
1228
  optional_options_keys = optional_options(@_initializer).keys
1022
1229
  optional_options = to_input_hash(optional_options_keys, options)
1023
1230
 
1024
- result = EmassClient::DashboardsApi.new.get_va_system_aa_summary(
1231
+ result = EmassClient::SystemAASummaryDashboardApi.new.get_va_system_aa_summary(
1025
1232
  options[:orgId], optional_options
1026
1233
  )
1027
1234
  puts to_output_hash(result).green
1028
1235
  rescue EmassClient::ApiError => e
1029
- puts 'Exception when calling DashboardsApi->get_va_system_aa_summary'.red
1236
+ puts 'Exception when calling SystemAASummaryDashboardApi->get_va_system_aa_summary'.red
1030
1237
  puts to_output_hash(e).yellow
1031
1238
  end
1032
1239
 
@@ -1038,12 +1245,12 @@ module Emasser
1038
1245
  optional_options_keys = optional_options(@_initializer).keys
1039
1246
  optional_options = to_input_hash(optional_options_keys, options)
1040
1247
 
1041
- result = EmassClient::DashboardsApi.new.get_va_system_a2_summary(
1248
+ result = EmassClient::SystemA20SummaryDashboardApi.new.get_va_system_a2_summary(
1042
1249
  options[:orgId], optional_options
1043
1250
  )
1044
1251
  puts to_output_hash(result).green
1045
1252
  rescue EmassClient::ApiError => e
1046
- puts 'Exception when calling DashboardsApi->get_va_system_a2_summary'.red
1253
+ puts 'Exception when calling SystemA20SummaryDashboardApi->get_va_system_a2_summary'.red
1047
1254
  puts to_output_hash(e).yellow
1048
1255
  end
1049
1256
 
@@ -1052,15 +1259,15 @@ module Emasser
1052
1259
  # /api/dashboards/va-system-pl-109-reporting-summary
1053
1260
  desc 'va_pl_109_summary', 'Get VA System P.L. 109 reporting summary dashboard information'
1054
1261
  def va_pl_109_summary
1055
- optional_options = options.clone
1056
- optional_options.delete('orgId')
1262
+ optional_options_keys = optional_options(@_initializer).keys
1263
+ optional_options = to_input_hash(optional_options_keys, options)
1057
1264
 
1058
- result = EmassClient::DashboardsApi.new.get_va_system_pl109_reporting_summary(
1265
+ result = EmassClient::SystemPL109ReportingSummaryDashboardApi.new.get_va_system_pl109_reporting_summary(
1059
1266
  options[:orgId], optional_options
1060
1267
  )
1061
1268
  puts to_output_hash(result).green
1062
1269
  rescue EmassClient::ApiError => e
1063
- puts 'Exception when calling DashboardsApi->get_va_system_pl109_reporting_summary'.red
1270
+ puts 'Exception when calling SystemPL109ReportingSummaryDashboardApi->get_va_system_pl109_reporting_summary'.red
1064
1271
  puts to_output_hash(e).yellow
1065
1272
  end
1066
1273
 
@@ -1072,12 +1279,12 @@ module Emasser
1072
1279
  optional_options_keys = optional_options(@_initializer).keys
1073
1280
  optional_options = to_input_hash(optional_options_keys, options)
1074
1281
 
1075
- result = EmassClient::DashboardsApi.new.get_va_system_fisma_invetory_summary(
1282
+ result = EmassClient::FISMAInventorySummaryDashboardsApi.new.get_va_system_fisma_invetory_summary(
1076
1283
  options[:orgId], optional_options
1077
1284
  )
1078
1285
  puts to_output_hash(result).green
1079
1286
  rescue EmassClient::ApiError => e
1080
- puts 'Exception when calling DashboardsApi->get_va_system_fisma_invetory_summary'.red
1287
+ puts 'Exception when calling FISMAInventorySummaryDashboardsApi->get_va_system_fisma_invetory_summary'.red
1081
1288
  puts to_output_hash(e).yellow
1082
1289
  end
1083
1290
 
@@ -1087,12 +1294,12 @@ module Emasser
1087
1294
  optional_options_keys = optional_options(@_initializer).keys
1088
1295
  optional_options = to_input_hash(optional_options_keys, options)
1089
1296
 
1090
- result = EmassClient::DashboardsApi.new.get_va_system_fisma_invetory_crypto_summary(
1297
+ result = EmassClient::FISMAInventorySummaryDashboardsApi.new.get_va_system_fisma_invetory_crypto_summary(
1091
1298
  options[:orgId], optional_options
1092
1299
  )
1093
1300
  puts to_output_hash(result).green
1094
1301
  rescue EmassClient::ApiError => e
1095
- puts 'Exception when calling DashboardsApi->get_va_system_fisma_invetory_crypto_summary'.red
1302
+ puts 'Exception when calling FISMAInventorySummaryDashboardsApi->get_va_system_fisma_invetory_crypto_summary'.red
1096
1303
  puts to_output_hash(e).yellow
1097
1304
  end
1098
1305
 
@@ -1104,12 +1311,12 @@ module Emasser
1104
1311
  optional_options_keys = optional_options(@_initializer).keys
1105
1312
  optional_options = to_input_hash(optional_options_keys, options)
1106
1313
 
1107
- result = EmassClient::DashboardsApi.new.get_va_system_threat_risk_summary(
1314
+ result = EmassClient::ThreatRisksDashboardsApi.new.get_va_system_threat_risk_summary(
1108
1315
  options[:orgId], optional_options
1109
1316
  )
1110
1317
  puts to_output_hash(result).green
1111
1318
  rescue EmassClient::ApiError => e
1112
- puts 'Exception when calling DashboardsApi->get_va_system_threat_risk_summary'.red
1319
+ puts 'Exception when calling ThreatRisksDashboardsApi->get_va_system_threat_risk_summary'.red
1113
1320
  puts to_output_hash(e).yellow
1114
1321
  end
1115
1322
 
@@ -1119,12 +1326,12 @@ module Emasser
1119
1326
  optional_options_keys = optional_options(@_initializer).keys
1120
1327
  optional_options = to_input_hash(optional_options_keys, options)
1121
1328
 
1122
- result = EmassClient::DashboardsApi.new.get_va_system_threat_source_details(
1329
+ result = EmassClient::ThreatRisksDashboardsApi.new.get_va_system_threat_source_details(
1123
1330
  options[:orgId], optional_options
1124
1331
  )
1125
1332
  puts to_output_hash(result).green
1126
1333
  rescue EmassClient::ApiError => e
1127
- puts 'Exception when calling DashboardsApi->get_va_system_threat_source_details'.red
1334
+ puts 'Exception when calling ThreatRisksDashboardsApi->get_va_system_threat_source_details'.red
1128
1335
  puts to_output_hash(e).yellow
1129
1336
  end
1130
1337
 
@@ -1134,12 +1341,12 @@ module Emasser
1134
1341
  optional_options_keys = optional_options(@_initializer).keys
1135
1342
  optional_options = to_input_hash(optional_options_keys, options)
1136
1343
 
1137
- result = EmassClient::DashboardsApi.new.get_va_system_threat_architecture_details(
1344
+ result = EmassClient::ThreatRisksDashboardsApi.new.get_va_system_threat_architecture_details(
1138
1345
  options[:orgId], optional_options
1139
1346
  )
1140
1347
  puts to_output_hash(result).green
1141
1348
  rescue EmassClient::ApiError => e
1142
- puts 'Exception when calling DashboardsApi->get_va_system_threat_architecture_details'.red
1349
+ puts 'Exception when calling ThreatRisksDashboardsApi->get_va_system_threat_architecture_details'.red
1143
1350
  puts to_output_hash(e).yellow
1144
1351
  end
1145
1352
  end