emasser 1.0.0 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.dockerignore +5 -8
- data/.env-example +3 -1
- data/.github/release-drafter.yml +2 -2
- data/.github/workflows/gh-pages.yml +4 -5
- data/.github/workflows/push-to-docker-mail.yml +28 -0
- data/.github/workflows/push-to-docker.yml +35 -0
- data/.github/workflows/release.yml +7 -3
- data/.github/workflows/test-cli.yml +4 -5
- data/.gitignore +3 -1
- data/Dockerfile +37 -3
- data/Gemfile +1 -1
- data/Gemfile.lock +37 -43
- data/README.md +131 -61
- data/docs/features.md +345 -207
- data/docs/images/emasser_architecture.jpg +0 -0
- data/emasser.gemspec +16 -12
- data/exe/emasser +0 -0
- data/images/emasser_architecture.jpg +0 -0
- data/images/emasser_diagram-Page-3.jpg +0 -0
- data/lib/emasser/cli.rb +12 -0
- data/lib/emasser/configuration.rb +22 -7
- data/lib/emasser/constants.rb +11 -3
- data/lib/emasser/delete.rb +14 -12
- data/lib/emasser/get.rb +83 -88
- data/lib/emasser/help/cloudresource_post_mapper.md +62 -0
- data/lib/emasser/help/container_post_mapper.md +44 -0
- data/lib/emasser/output_converters.rb +101 -4
- data/lib/emasser/post.rb +248 -55
- data/lib/emasser/put.rb +29 -22
- data/lib/emasser/version.rb +1 -1
- data/lib/emasser.rb +1 -1
- metadata +64 -447
- data/.github/workflows/generate_docs.yml +0 -33
- data/TAGS +0 -2393
- data/docs/developers.md +0 -115
- data/docs/swagger/dist/favicon-16x16.png +0 -0
- data/docs/swagger/dist/favicon-32x32.png +0 -0
- data/docs/swagger/dist/oauth2-redirect.html +0 -75
- data/docs/swagger/dist/swagger-ui-bundle.js +0 -3
- data/docs/swagger/dist/swagger-ui-bundle.js.map +0 -1
- data/docs/swagger/dist/swagger-ui-es-bundle-core.js +0 -3
- data/docs/swagger/dist/swagger-ui-es-bundle-core.js.map +0 -1
- data/docs/swagger/dist/swagger-ui-es-bundle.js +0 -3
- data/docs/swagger/dist/swagger-ui-es-bundle.js.map +0 -1
- data/docs/swagger/dist/swagger-ui-standalone-preset.js +0 -3
- data/docs/swagger/dist/swagger-ui-standalone-preset.js.map +0 -1
- data/docs/swagger/dist/swagger-ui.css +0 -4
- data/docs/swagger/dist/swagger-ui.css.map +0 -1
- data/docs/swagger/dist/swagger-ui.js +0 -3
- data/docs/swagger/dist/swagger-ui.js.map +0 -1
- data/docs/swagger/index.html +0 -60
- data/emass_client/eMASSRestOpenApi.yaml +0 -5698
- data/emass_client/ruby_client/.gitignore +0 -39
- data/emass_client/ruby_client/.rspec +0 -2
- data/emass_client/ruby_client/.rubocop.yml +0 -154
- data/emass_client/ruby_client/.swagger-codegen/VERSION +0 -1
- data/emass_client/ruby_client/.swagger-codegen-ignore +0 -23
- data/emass_client/ruby_client/Gemfile +0 -9
- data/emass_client/ruby_client/README.md +0 -1284
- data/emass_client/ruby_client/Rakefile +0 -8
- data/emass_client/ruby_client/docs/ArtifactsApi.md +0 -284
- data/emass_client/ruby_client/docs/ArtifactsDelete.md +0 -6
- data/emass_client/ruby_client/docs/ArtifactsDeleteInner.md +0 -7
- data/emass_client/ruby_client/docs/ArtifactsExportApi.md +0 -76
- data/emass_client/ruby_client/docs/ArtifactsGet.md +0 -20
- data/emass_client/ruby_client/docs/ArtifactsRequestPutBody.md +0 -16
- data/emass_client/ruby_client/docs/ArtifactsResponseDel.md +0 -8
- data/emass_client/ruby_client/docs/ArtifactsResponseDelData.md +0 -9
- data/emass_client/ruby_client/docs/ArtifactsResponseGet.md +0 -8
- data/emass_client/ruby_client/docs/ArtifactsResponsePutPost.md +0 -8
- data/emass_client/ruby_client/docs/CACApi.md +0 -140
- data/emass_client/ruby_client/docs/CMMCAssessmentsApi.md +0 -71
- data/emass_client/ruby_client/docs/CacGet.md +0 -13
- data/emass_client/ruby_client/docs/CacRequestPostBody.md +0 -8
- data/emass_client/ruby_client/docs/CacResponseGet.md +0 -8
- data/emass_client/ruby_client/docs/CacResponsePost.md +0 -8
- data/emass_client/ruby_client/docs/CacResponsePostData.md +0 -9
- data/emass_client/ruby_client/docs/CmmcGet.md +0 -19
- data/emass_client/ruby_client/docs/CmmcResponseGet.md +0 -8
- data/emass_client/ruby_client/docs/ConnectivityCcsd.md +0 -8
- data/emass_client/ruby_client/docs/ControlsApi.md +0 -140
- data/emass_client/ruby_client/docs/ControlsGet.md +0 -36
- data/emass_client/ruby_client/docs/ControlsPut.md +0 -9
- data/emass_client/ruby_client/docs/ControlsRequestPutBody.md +0 -29
- data/emass_client/ruby_client/docs/ControlsResponseGet.md +0 -8
- data/emass_client/ruby_client/docs/ControlsResponsePut.md +0 -8
- data/emass_client/ruby_client/docs/DefinitionTransitions.md +0 -9
- data/emass_client/ruby_client/docs/DeleteMilestone.md +0 -7
- data/emass_client/ruby_client/docs/DeletePoam.md +0 -7
- data/emass_client/ruby_client/docs/Empty200Response.md +0 -6
- data/emass_client/ruby_client/docs/Error.md +0 -8
- data/emass_client/ruby_client/docs/InstancesTransitions.md +0 -12
- data/emass_client/ruby_client/docs/MilestoneResponseGet.md +0 -8
- data/emass_client/ruby_client/docs/MilestoneResponsePost.md +0 -8
- data/emass_client/ruby_client/docs/MilestoneResponsePut.md +0 -8
- data/emass_client/ruby_client/docs/MilestonesApi.md +0 -350
- data/emass_client/ruby_client/docs/MilestonesDelete.md +0 -6
- data/emass_client/ruby_client/docs/MilestonesGet.md +0 -12
- data/emass_client/ruby_client/docs/MilestonesPost.md +0 -6
- data/emass_client/ruby_client/docs/MilestonesPut.md +0 -6
- data/emass_client/ruby_client/docs/MilestonesPutPostDelete.md +0 -11
- data/emass_client/ruby_client/docs/MilestonesRequestPostBody.md +0 -9
- data/emass_client/ruby_client/docs/MilestonesRequestPutBody.md +0 -9
- data/emass_client/ruby_client/docs/MilestonesRequiredPost.md +0 -8
- data/emass_client/ruby_client/docs/MilestonesRequiredPut.md +0 -9
- data/emass_client/ruby_client/docs/Model200.md +0 -7
- data/emass_client/ruby_client/docs/Model201.md +0 -7
- data/emass_client/ruby_client/docs/Model201Meta.md +0 -8
- data/emass_client/ruby_client/docs/Model400.md +0 -7
- data/emass_client/ruby_client/docs/Model400Meta.md +0 -8
- data/emass_client/ruby_client/docs/Model400Response.md +0 -7
- data/emass_client/ruby_client/docs/Model401.md +0 -7
- data/emass_client/ruby_client/docs/Model401Meta.md +0 -8
- data/emass_client/ruby_client/docs/Model403.md +0 -7
- data/emass_client/ruby_client/docs/Model403Meta.md +0 -8
- data/emass_client/ruby_client/docs/Model404.md +0 -8
- data/emass_client/ruby_client/docs/Model404Response.md +0 -7
- data/emass_client/ruby_client/docs/Model405.md +0 -7
- data/emass_client/ruby_client/docs/Model405Meta.md +0 -8
- data/emass_client/ruby_client/docs/Model411.md +0 -7
- data/emass_client/ruby_client/docs/Model411Meta.md +0 -8
- data/emass_client/ruby_client/docs/Model490.md +0 -7
- data/emass_client/ruby_client/docs/Model490Meta.md +0 -8
- data/emass_client/ruby_client/docs/Model500.md +0 -7
- data/emass_client/ruby_client/docs/Model500Meta.md +0 -8
- data/emass_client/ruby_client/docs/PACApi.md +0 -137
- data/emass_client/ruby_client/docs/POAMApi.md +0 -346
- data/emass_client/ruby_client/docs/PacGet.md +0 -14
- data/emass_client/ruby_client/docs/PacPost.md +0 -9
- data/emass_client/ruby_client/docs/PacRequestPostBody.md +0 -9
- data/emass_client/ruby_client/docs/PacResponseGet.md +0 -8
- data/emass_client/ruby_client/docs/PacResponsePost.md +0 -8
- data/emass_client/ruby_client/docs/PoamDelete.md +0 -6
- data/emass_client/ruby_client/docs/PoamGet.md +0 -39
- data/emass_client/ruby_client/docs/PoamPost.md +0 -6
- data/emass_client/ruby_client/docs/PoamPostPutDel.md +0 -10
- data/emass_client/ruby_client/docs/PoamPut.md +0 -6
- data/emass_client/ruby_client/docs/PoamRequestPostBody.md +0 -6
- data/emass_client/ruby_client/docs/PoamRequestPutBody.md +0 -6
- data/emass_client/ruby_client/docs/PoamRequiredPost.md +0 -32
- data/emass_client/ruby_client/docs/PoamRequiredPut.md +0 -35
- data/emass_client/ruby_client/docs/PoamResponseDelete.md +0 -8
- data/emass_client/ruby_client/docs/PoamResponseGet.md +0 -8
- data/emass_client/ruby_client/docs/PoamResponsePost.md +0 -8
- data/emass_client/ruby_client/docs/PoamResponsePut.md +0 -8
- data/emass_client/ruby_client/docs/Register.md +0 -8
- data/emass_client/ruby_client/docs/RegisterData.md +0 -7
- data/emass_client/ruby_client/docs/RegisterUserRequestPostBody.md +0 -7
- data/emass_client/ruby_client/docs/RegistrationApi.md +0 -71
- data/emass_client/ruby_client/docs/RoleCategory.md +0 -10
- data/emass_client/ruby_client/docs/Roles.md +0 -9
- data/emass_client/ruby_client/docs/Ssps.md +0 -9
- data/emass_client/ruby_client/docs/Stage.md +0 -8
- data/emass_client/ruby_client/docs/StaticCodeApplication.md +0 -12
- data/emass_client/ruby_client/docs/StaticCodeRequestPostBody.md +0 -6
- data/emass_client/ruby_client/docs/StaticCodeRequiredPost.md +0 -8
- data/emass_client/ruby_client/docs/StaticCodeRequiredPostApplication.md +0 -8
- data/emass_client/ruby_client/docs/StaticCodeScansApi.md +0 -73
- data/emass_client/ruby_client/docs/Success200Response.md +0 -8
- data/emass_client/ruby_client/docs/SystemIdArtifactsBody.md +0 -10
- data/emass_client/ruby_client/docs/SystemResponse.md +0 -8
- data/emass_client/ruby_client/docs/SystemRolesApi.md +0 -137
- data/emass_client/ruby_client/docs/SystemRolesCategoryResponse.md +0 -8
- data/emass_client/ruby_client/docs/SystemRolesResponse.md +0 -8
- data/emass_client/ruby_client/docs/SystemRolesResponseData.md +0 -8
- data/emass_client/ruby_client/docs/Systems.md +0 -70
- data/emass_client/ruby_client/docs/SystemsApi.md +0 -155
- data/emass_client/ruby_client/docs/Test.md +0 -8
- data/emass_client/ruby_client/docs/TestApi.md +0 -66
- data/emass_client/ruby_client/docs/TestData.md +0 -7
- data/emass_client/ruby_client/docs/TestResultsApi.md +0 -144
- data/emass_client/ruby_client/docs/TestResultsGet.md +0 -15
- data/emass_client/ruby_client/docs/TestResultsPost.md +0 -9
- data/emass_client/ruby_client/docs/TestResultsRequestPostBody.md +0 -11
- data/emass_client/ruby_client/docs/TestResultsResponseGet.md +0 -8
- data/emass_client/ruby_client/docs/TestResultsResponsePost.md +0 -8
- data/emass_client/ruby_client/docs/Users.md +0 -9
- data/emass_client/ruby_client/docs/WorkflowDefinitionGet.md +0 -11
- data/emass_client/ruby_client/docs/WorkflowDefinitionResponseGet.md +0 -8
- data/emass_client/ruby_client/docs/WorkflowDefinitionsApi.md +0 -74
- data/emass_client/ruby_client/docs/WorkflowInstancesApi.md +0 -146
- data/emass_client/ruby_client/docs/WorkflowInstancesGet.md +0 -16
- data/emass_client/ruby_client/docs/WorkflowInstancesResponseGet.md +0 -8
- data/emass_client/ruby_client/git_push.sh +0 -55
- data/emass_client/ruby_client/lib/swagger_client/api/artifacts_api.rb +0 -310
- data/emass_client/ruby_client/lib/swagger_client/api/artifacts_export_api.rb +0 -86
- data/emass_client/ruby_client/lib/swagger_client/api/cac_api.rb +0 -143
- data/emass_client/ruby_client/lib/swagger_client/api/cmmc_assessments_api.rb +0 -77
- data/emass_client/ruby_client/lib/swagger_client/api/controls_api.rb +0 -143
- data/emass_client/ruby_client/lib/swagger_client/api/milestones_api.rb +0 -366
- data/emass_client/ruby_client/lib/swagger_client/api/pac_api.rb +0 -140
- data/emass_client/ruby_client/lib/swagger_client/api/poam_api.rb +0 -345
- data/emass_client/ruby_client/lib/swagger_client/api/registration_api.rb +0 -78
- data/emass_client/ruby_client/lib/swagger_client/api/static_code_scans_api.rb +0 -84
- data/emass_client/ruby_client/lib/swagger_client/api/system_roles_api.rb +0 -150
- data/emass_client/ruby_client/lib/swagger_client/api/systems_api.rb +0 -162
- data/emass_client/ruby_client/lib/swagger_client/api/test_api.rb +0 -70
- data/emass_client/ruby_client/lib/swagger_client/api/test_results_api.rb +0 -149
- data/emass_client/ruby_client/lib/swagger_client/api/workflow_definitions_api.rb +0 -76
- data/emass_client/ruby_client/lib/swagger_client/api/workflow_instances_api.rb +0 -153
- data/emass_client/ruby_client/lib/swagger_client/api_client.rb +0 -389
- data/emass_client/ruby_client/lib/swagger_client/api_error.rb +0 -57
- data/emass_client/ruby_client/lib/swagger_client/configuration.rb +0 -224
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_delete.rb +0 -201
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_delete_inner.rb +0 -207
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_get.rb +0 -383
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_request_put_body.rb +0 -363
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_response_del.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_response_del_data.rb +0 -225
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_response_get.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_response_put_post.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/cac_get.rb +0 -301
- data/emass_client/ruby_client/lib/swagger_client/models/cac_request_post_body.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/cac_response_get.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/cac_response_post.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/cac_response_post_data.rb +0 -225
- data/emass_client/ruby_client/lib/swagger_client/models/cmmc_get.rb +0 -398
- data/emass_client/ruby_client/lib/swagger_client/models/cmmc_response_get.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/connectivity_ccsd.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/controls_get.rb +0 -663
- data/emass_client/ruby_client/lib/swagger_client/models/controls_put.rb +0 -227
- data/emass_client/ruby_client/lib/swagger_client/models/controls_request_put_body.rb +0 -606
- data/emass_client/ruby_client/lib/swagger_client/models/controls_response_get.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/controls_response_put.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/definition_transitions.rb +0 -274
- data/emass_client/ruby_client/lib/swagger_client/models/delete_milestone.rb +0 -212
- data/emass_client/ruby_client/lib/swagger_client/models/delete_poam.rb +0 -212
- data/emass_client/ruby_client/lib/swagger_client/models/empty200_response.rb +0 -197
- data/emass_client/ruby_client/lib/swagger_client/models/error.rb +0 -225
- data/emass_client/ruby_client/lib/swagger_client/models/instances_transitions.rb +0 -327
- data/emass_client/ruby_client/lib/swagger_client/models/milestone_response_get.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/milestone_response_post.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/milestone_response_put.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_delete.rb +0 -197
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_get.rb +0 -291
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_post.rb +0 -197
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_put.rb +0 -197
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_put_post_delete.rb +0 -247
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_request_post_body.rb +0 -242
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_request_put_body.rb +0 -242
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_required_post.rb +0 -227
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_required_put.rb +0 -242
- data/emass_client/ruby_client/lib/swagger_client/models/model_200.rb +0 -208
- data/emass_client/ruby_client/lib/swagger_client/models/model_201.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/model_201_meta.rb +0 -219
- data/emass_client/ruby_client/lib/swagger_client/models/model_400.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/model_400_meta.rb +0 -219
- data/emass_client/ruby_client/lib/swagger_client/models/model_400_response.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/model_401.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/model_401_meta.rb +0 -219
- data/emass_client/ruby_client/lib/swagger_client/models/model_403.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/model_403_meta.rb +0 -219
- data/emass_client/ruby_client/lib/swagger_client/models/model_404.rb +0 -219
- data/emass_client/ruby_client/lib/swagger_client/models/model_404_response.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/model_405.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/model_405_meta.rb +0 -219
- data/emass_client/ruby_client/lib/swagger_client/models/model_411.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/model_411_meta.rb +0 -219
- data/emass_client/ruby_client/lib/swagger_client/models/model_490.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/model_490_meta.rb +0 -219
- data/emass_client/ruby_client/lib/swagger_client/models/model_500.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/model_500_meta.rb +0 -219
- data/emass_client/ruby_client/lib/swagger_client/models/pac_get.rb +0 -311
- data/emass_client/ruby_client/lib/swagger_client/models/pac_post.rb +0 -259
- data/emass_client/ruby_client/lib/swagger_client/models/pac_request_post_body.rb +0 -261
- data/emass_client/ruby_client/lib/swagger_client/models/pac_response_get.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/pac_response_post.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/poam_delete.rb +0 -197
- data/emass_client/ruby_client/lib/swagger_client/models/poam_get.rb +0 -646
- data/emass_client/ruby_client/lib/swagger_client/models/poam_post.rb +0 -197
- data/emass_client/ruby_client/lib/swagger_client/models/poam_post_put_del.rb +0 -237
- data/emass_client/ruby_client/lib/swagger_client/models/poam_put.rb +0 -197
- data/emass_client/ruby_client/lib/swagger_client/models/poam_request_post_body.rb +0 -197
- data/emass_client/ruby_client/lib/swagger_client/models/poam_request_put_body.rb +0 -197
- data/emass_client/ruby_client/lib/swagger_client/models/poam_required_post.rb +0 -564
- data/emass_client/ruby_client/lib/swagger_client/models/poam_required_put.rb +0 -594
- data/emass_client/ruby_client/lib/swagger_client/models/poam_response_delete.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/poam_response_get.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/poam_response_post.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/poam_response_put.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/register.rb +0 -215
- data/emass_client/ruby_client/lib/swagger_client/models/register_data.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/register_user_request_post_body.rb +0 -211
- data/emass_client/ruby_client/lib/swagger_client/models/role_category.rb +0 -272
- data/emass_client/ruby_client/lib/swagger_client/models/roles.rb +0 -274
- data/emass_client/ruby_client/lib/swagger_client/models/ssps.rb +0 -227
- data/emass_client/ruby_client/lib/swagger_client/models/stage.rb +0 -252
- data/emass_client/ruby_client/lib/swagger_client/models/static_code_application.rb +0 -303
- data/emass_client/ruby_client/lib/swagger_client/models/static_code_request_post_body.rb +0 -197
- data/emass_client/ruby_client/lib/swagger_client/models/static_code_required_post.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/static_code_required_post_application.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/success200_response.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/system_id_artifacts_body.rb +0 -284
- data/emass_client/ruby_client/lib/swagger_client/models/system_response.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/system_roles_category_response.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/system_roles_response.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/system_roles_response_data.rb +0 -219
- data/emass_client/ruby_client/lib/swagger_client/models/systems.rb +0 -1137
- data/emass_client/ruby_client/lib/swagger_client/models/test.rb +0 -215
- data/emass_client/ruby_client/lib/swagger_client/models/test_data.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/test_results_get.rb +0 -333
- data/emass_client/ruby_client/lib/swagger_client/models/test_results_post.rb +0 -227
- data/emass_client/ruby_client/lib/swagger_client/models/test_results_request_post_body.rb +0 -306
- data/emass_client/ruby_client/lib/swagger_client/models/test_results_response_get.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/test_results_response_post.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/users.rb +0 -224
- data/emass_client/ruby_client/lib/swagger_client/models/workflow_definition_get.rb +0 -282
- data/emass_client/ruby_client/lib/swagger_client/models/workflow_definition_response_get.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/workflow_instances_get.rb +0 -368
- data/emass_client/ruby_client/lib/swagger_client/models/workflow_instances_response_get.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/version.rb +0 -14
- data/emass_client/ruby_client/lib/swagger_client.rb +0 -161
- data/emass_client/ruby_client/spec/api/artifacts_api_spec.rb +0 -92
- data/emass_client/ruby_client/spec/api/artifacts_export_api_spec.rb +0 -48
- data/emass_client/ruby_client/spec/api/cac_api_spec.rb +0 -60
- data/emass_client/ruby_client/spec/api/cmmc_assessments_api_spec.rb +0 -46
- data/emass_client/ruby_client/spec/api/controls_api_spec.rb +0 -60
- data/emass_client/ruby_client/spec/api/milestones_api_spec.rb +0 -105
- data/emass_client/ruby_client/spec/api/pac_api_spec.rb +0 -59
- data/emass_client/ruby_client/spec/api/poam_api_spec.rb +0 -103
- data/emass_client/ruby_client/spec/api/registration_api_spec.rb +0 -46
- data/emass_client/ruby_client/spec/api/static_code_scans_api_spec.rb +0 -47
- data/emass_client/ruby_client/spec/api/system_roles_api_spec.rb +0 -60
- data/emass_client/ruby_client/spec/api/systems_api_spec.rb +0 -67
- data/emass_client/ruby_client/spec/api/test_api_spec.rb +0 -45
- data/emass_client/ruby_client/spec/api/test_results_api_spec.rb +0 -62
- data/emass_client/ruby_client/spec/api/workflow_definitions_api_spec.rb +0 -47
- data/emass_client/ruby_client/spec/api/workflow_instances_api_spec.rb +0 -63
- data/emass_client/ruby_client/spec/api_client_spec.rb +0 -225
- data/emass_client/ruby_client/spec/base_object_spec.rb +0 -109
- data/emass_client/ruby_client/spec/configuration_spec.rb +0 -41
- data/emass_client/ruby_client/spec/models/artifacts_delete_inner_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/artifacts_delete_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/artifacts_get_spec.rb +0 -126
- data/emass_client/ruby_client/spec/models/artifacts_request_put_body_spec.rb +0 -102
- data/emass_client/ruby_client/spec/models/artifacts_response_del_data_spec.rb +0 -52
- data/emass_client/ruby_client/spec/models/artifacts_response_del_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/artifacts_response_get_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/artifacts_response_put_post_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/cac_get_spec.rb +0 -80
- data/emass_client/ruby_client/spec/models/cac_request_post_body_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/cac_response_get_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/cac_response_post_data_spec.rb +0 -52
- data/emass_client/ruby_client/spec/models/cac_response_post_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/cmmc_get_spec.rb +0 -128
- data/emass_client/ruby_client/spec/models/cmmc_response_get_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/connectivity_ccsd_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/controls_get_spec.rb +0 -262
- data/emass_client/ruby_client/spec/models/controls_put_spec.rb +0 -52
- data/emass_client/ruby_client/spec/models/controls_request_put_body_spec.rb +0 -216
- data/emass_client/ruby_client/spec/models/controls_response_get_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/controls_response_put_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/definition_transitions_spec.rb +0 -64
- data/emass_client/ruby_client/spec/models/delete_milestone_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/delete_poam_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/empty200_response_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/error_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/instances_transitions_spec.rb +0 -86
- data/emass_client/ruby_client/spec/models/milestone_response_get_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/milestone_response_post_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/milestone_response_put_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/milestones_delete_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/milestones_get_spec.rb +0 -74
- data/emass_client/ruby_client/spec/models/milestones_post_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/milestones_put_post_delete_spec.rb +0 -64
- data/emass_client/ruby_client/spec/models/milestones_put_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/milestones_request_post_body_spec.rb +0 -52
- data/emass_client/ruby_client/spec/models/milestones_request_put_body_spec.rb +0 -52
- data/emass_client/ruby_client/spec/models/milestones_required_post_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/milestones_required_put_spec.rb +0 -52
- data/emass_client/ruby_client/spec/models/model_200_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/model_201_meta_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/model_201_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/model_400_meta_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/model_400_response_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/model_400_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/model_401_meta_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/model_401_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/model_403_meta_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/model_403_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/model_404_response_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/model_404_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/model_405_meta_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/model_405_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/model_411_meta_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/model_411_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/model_490_meta_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/model_490_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/model_500_meta_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/model_500_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/pac_get_spec.rb +0 -86
- data/emass_client/ruby_client/spec/models/pac_post_spec.rb +0 -56
- data/emass_client/ruby_client/spec/models/pac_request_post_body_spec.rb +0 -56
- data/emass_client/ruby_client/spec/models/pac_response_get_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/pac_response_post_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/poam_delete_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/poam_get_spec.rb +0 -264
- data/emass_client/ruby_client/spec/models/poam_post_put_del_spec.rb +0 -58
- data/emass_client/ruby_client/spec/models/poam_post_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/poam_put_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/poam_request_post_body_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/poam_request_put_body_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/poam_required_post_spec.rb +0 -218
- data/emass_client/ruby_client/spec/models/poam_required_put_spec.rb +0 -236
- data/emass_client/ruby_client/spec/models/poam_response_delete_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/poam_response_get_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/poam_response_post_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/poam_response_put_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/register_data_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/register_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/register_user_request_post_body_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/role_category_spec.rb +0 -62
- data/emass_client/ruby_client/spec/models/roles_spec.rb +0 -60
- data/emass_client/ruby_client/spec/models/ssps_spec.rb +0 -52
- data/emass_client/ruby_client/spec/models/stage_spec.rb +0 -50
- data/emass_client/ruby_client/spec/models/static_code_application_spec.rb +0 -78
- data/emass_client/ruby_client/spec/models/static_code_request_post_body_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/static_code_required_post_application_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/static_code_required_post_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/success200_response_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/system_id_artifacts_body_spec.rb +0 -66
- data/emass_client/ruby_client/spec/models/system_response_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/system_roles_category_response_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/system_roles_response_data_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/system_roles_response_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/systems_spec.rb +0 -510
- data/emass_client/ruby_client/spec/models/test_data_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/test_results_get_spec.rb +0 -96
- data/emass_client/ruby_client/spec/models/test_results_post_spec.rb +0 -52
- data/emass_client/ruby_client/spec/models/test_results_request_post_body_spec.rb +0 -68
- data/emass_client/ruby_client/spec/models/test_results_response_get_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/test_results_response_post_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/test_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/users_spec.rb +0 -52
- data/emass_client/ruby_client/spec/models/workflow_definition_get_spec.rb +0 -68
- data/emass_client/ruby_client/spec/models/workflow_definition_response_get_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/workflow_instances_get_spec.rb +0 -110
- data/emass_client/ruby_client/spec/models/workflow_instances_response_get_spec.rb +0 -46
- data/emass_client/ruby_client/spec/spec_helper.rb +0 -110
- data/emass_client/ruby_client/swagger_client.gemspec +0 -38
- data/emass_client/swagger-codegen/ruby_template/api_client.mustache +0 -384
- data/emass_client/swagger-codegen/ruby_template/api_info.mustache +0 -12
- data/emass_client/swagger-codegen/ruby_template/configuration.mustache +0 -234
- data/emass_client/swagger-codegen/ruby_template/gemspec.mustache +0 -37
data/lib/emasser/post.rb
CHANGED
@@ -37,7 +37,8 @@ class Thor
|
|
37
37
|
end
|
38
38
|
|
39
39
|
module Emasser
|
40
|
-
POAMS_POST_HELP_MESSAGE = "\nInvoke \"
|
40
|
+
POAMS_POST_HELP_MESSAGE = "\nInvoke \"emasser post poams help add\" for additional help"
|
41
|
+
SCAN_POST_HELP_MESSAGE = "\nInvoke \"emasser post scan_findings help clear\" for additional help"
|
41
42
|
# The Test Results endpoints provide the ability to add test results for a
|
42
43
|
# system's Assessment Procedures (CCIs) which determine Security Control compliance.
|
43
44
|
#
|
@@ -61,7 +62,7 @@ module Emasser
|
|
61
62
|
option :complianceStatus, type: :string, required: true, enum: ['Compliant', 'Non-Compliant', 'Not Applicable']
|
62
63
|
|
63
64
|
def add
|
64
|
-
body =
|
65
|
+
body = EmassClient::TestResultsGet.new
|
65
66
|
body.cci = options[:cci]
|
66
67
|
body.tested_by = options[:testedBy]
|
67
68
|
body.test_date = options[:testDate]
|
@@ -71,10 +72,10 @@ module Emasser
|
|
71
72
|
body_array = Array.new(1, body)
|
72
73
|
|
73
74
|
begin
|
74
|
-
result =
|
75
|
-
.new.add_test_results_by_system_id(
|
75
|
+
result = EmassClient::TestResultsApi
|
76
|
+
.new.add_test_results_by_system_id(options[:systemId], body_array)
|
76
77
|
puts to_output_hash(result).green
|
77
|
-
rescue
|
78
|
+
rescue EmassClient::ApiError => e
|
78
79
|
puts 'Exception when calling TestResultsApi->add_test_results_by_system_id'.red
|
79
80
|
puts to_output_hash(e)
|
80
81
|
end
|
@@ -153,7 +154,7 @@ module Emasser
|
|
153
154
|
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
154
155
|
def add
|
155
156
|
# Required fields
|
156
|
-
body =
|
157
|
+
body = EmassClient::PoamGet.new
|
157
158
|
body.status = options[:status]
|
158
159
|
body.vulnerability_description = options[:vulnerabilityDescription]
|
159
160
|
body.source_ident_vuln = options[:sourceIdentVuln]
|
@@ -186,16 +187,16 @@ module Emasser
|
|
186
187
|
body_array = Array.new(1, body)
|
187
188
|
|
188
189
|
begin
|
189
|
-
result =
|
190
|
+
result = EmassClient::POAMApi.new.add_poam_by_system_id(options[:systemId], body_array)
|
190
191
|
puts to_output_hash(result).green
|
191
|
-
rescue
|
192
|
+
rescue EmassClient::ApiError => e
|
192
193
|
puts 'Exception when calling POAMApi->add_poam_by_system_id'.red
|
193
194
|
puts to_output_hash(e)
|
194
195
|
end
|
195
196
|
end
|
196
197
|
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
197
198
|
|
198
|
-
# rubocop:disable Metrics/BlockLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
199
|
+
# rubocop:disable Metrics/BlockLength, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
199
200
|
no_commands do
|
200
201
|
def process_business_logic(body)
|
201
202
|
#-----------------------------------------------------------------------------
|
@@ -213,13 +214,18 @@ module Emasser
|
|
213
214
|
puts ' comments'.red
|
214
215
|
puts POAMS_POST_HELP_MESSAGE.yellow
|
215
216
|
exit
|
217
|
+
elsif !(options[:scheduledCompletionDate].nil? && options[:milestone].nil?)
|
218
|
+
puts 'When status = "Risk Accepted" POA&M Item CAN NOT be saved with the following parameters/fields:'.red
|
219
|
+
puts ' scheduledCompletionDate, or milestone'.red
|
220
|
+
puts POAMS_PUT_HELP_MESSAGE.yellow
|
221
|
+
exit
|
216
222
|
else
|
217
223
|
body.comments = options[:comments]
|
218
224
|
end
|
219
225
|
elsif options[:status] == "Ongoing"
|
220
226
|
if options[:scheduledCompletionDate].nil? || options[:milestone].nil?
|
221
227
|
puts 'When status = "Ongoing" the following parameters/fields are required:'.red
|
222
|
-
puts ' scheduledCompletionDate,
|
228
|
+
puts ' scheduledCompletionDate, milestone'.red
|
223
229
|
print_milestone_help
|
224
230
|
puts POAMS_POST_HELP_MESSAGE.yellow
|
225
231
|
exit
|
@@ -230,7 +236,7 @@ module Emasser
|
|
230
236
|
else
|
231
237
|
body.scheduled_completion_date = options[:scheduledCompletionDate]
|
232
238
|
|
233
|
-
milestone =
|
239
|
+
milestone = EmassClient::MilestonesRequiredPost.new
|
234
240
|
milestone.description = options[:milestone]["description"]
|
235
241
|
milestone.scheduled_completion_date = options[:milestone]["scheduledCompletionDate"]
|
236
242
|
milestone_array = Array.new(1, milestone)
|
@@ -249,7 +255,7 @@ module Emasser
|
|
249
255
|
body.comments = options[:comments]
|
250
256
|
body.completion_date = options[:completionDate]
|
251
257
|
|
252
|
-
milestone =
|
258
|
+
milestone = EmassClient::MilestonesRequiredPost.new
|
253
259
|
milestone.description = options[:milestone]["description"]
|
254
260
|
milestone.scheduled_completion_date = options[:milestone]["scheduledCompletionDate"]
|
255
261
|
milestone_array = Array.new(1, milestone)
|
@@ -295,7 +301,7 @@ module Emasser
|
|
295
301
|
puts ' --milestone description:"[value]" scheduledCompletionDate:"[value]"'.yellow
|
296
302
|
end
|
297
303
|
end
|
298
|
-
# rubocop:enable Metrics/BlockLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
304
|
+
# rubocop:enable Metrics/BlockLength, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
299
305
|
end
|
300
306
|
|
301
307
|
# The Milestones endpoints provide the ability add milestones that are associated with
|
@@ -316,20 +322,19 @@ module Emasser
|
|
316
322
|
option :poamId, type: :numeric, required: true, desc: 'A numeric value representing the poam identification'
|
317
323
|
option :description, type: :string, required: true, desc: 'The milestone description'
|
318
324
|
option :scheduledCompletionDate,
|
319
|
-
type: :numeric, required:
|
325
|
+
type: :numeric, required: true, desc: 'The scheduled completion date - Unix time format'
|
320
326
|
|
321
327
|
def add
|
322
|
-
body =
|
323
|
-
body.poam_id = options[:poamId]
|
328
|
+
body = EmassClient::MilestonesGet.new
|
324
329
|
body.description = options[:description]
|
325
330
|
body.scheduled_completion_date = options[:scheduledCompletionDate]
|
326
331
|
body_array = Array.new(1, body)
|
327
332
|
|
328
333
|
begin
|
329
|
-
result =
|
330
|
-
.new.add_milestone_by_system_id_and_poam_id(
|
334
|
+
result = EmassClient::MilestonesApi
|
335
|
+
.new.add_milestone_by_system_id_and_poam_id(options[:systemId], options[:poamId], body_array)
|
331
336
|
puts to_output_hash(result).green
|
332
|
-
rescue
|
337
|
+
rescue EmassClient::ApiError => e
|
333
338
|
puts 'Exception when calling MilestonesApi->add_milestone_by_system_id_and_poam_id'.red
|
334
339
|
puts to_output_hash(e)
|
335
340
|
end
|
@@ -357,8 +362,6 @@ module Emasser
|
|
357
362
|
'Image', 'Other', 'Scan Result', 'Auditor Report']
|
358
363
|
option :category, type: :string, required: true, enum: ['Implementation Guidance', 'Evidence']
|
359
364
|
option :isTemplate, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
|
360
|
-
# NOTE: compress is a required parameter, however Thor does not allow a boolean type to be required because it
|
361
|
-
# automatically creates a --no-isTemplate option for isTemplate=false
|
362
365
|
|
363
366
|
# Optional parameters/fields
|
364
367
|
option :description, type: :string, required: false, desc: 'Artifact description'
|
@@ -379,6 +382,9 @@ module Emasser
|
|
379
382
|
optional_options.delete(:is_template)
|
380
383
|
|
381
384
|
opts = {}
|
385
|
+
opts[:type] = options[:type]
|
386
|
+
opts[:category] = options[:category]
|
387
|
+
opts[:is_template] = options[:is_template]
|
382
388
|
opts[:form_params] = optional_options
|
383
389
|
|
384
390
|
tempfile = Tempfile.create(['artifacts', '.zip'])
|
@@ -393,12 +399,11 @@ module Emasser
|
|
393
399
|
end
|
394
400
|
|
395
401
|
begin
|
396
|
-
result =
|
402
|
+
result = EmassClient::ArtifactsApi
|
397
403
|
.new
|
398
|
-
.add_artifacts_by_system_id(options[:
|
399
|
-
options[:category], tempfile, options[:systemId], opts)
|
404
|
+
.add_artifacts_by_system_id(options[:systemId], tempfile, opts)
|
400
405
|
puts to_output_hash(result).green
|
401
|
-
rescue
|
406
|
+
rescue EmassClient::ApiError => e
|
402
407
|
puts 'Exception when calling ArtifactsApi->add_artifacts_by_system_id'.red
|
403
408
|
puts to_output_hash(e)
|
404
409
|
ensure
|
@@ -431,7 +436,7 @@ module Emasser
|
|
431
436
|
option :comments, type: :string, required: false, desc: 'The control approval chain comments'
|
432
437
|
|
433
438
|
def add
|
434
|
-
body =
|
439
|
+
body = EmassClient::CacGet.new
|
435
440
|
body.control_acronym = options[:controlAcronym]
|
436
441
|
body.comments = options[:comments]
|
437
442
|
|
@@ -439,10 +444,10 @@ module Emasser
|
|
439
444
|
|
440
445
|
begin
|
441
446
|
# Get location of one or many controls in CAC
|
442
|
-
result =
|
447
|
+
result = EmassClient::CACApi.new.add_system_cac(options[:systemId], body_array)
|
443
448
|
puts to_output_hash(result).green
|
444
|
-
rescue
|
445
|
-
puts 'Exception when calling ApprovalChainApi->
|
449
|
+
rescue EmassClient::ApiError => e
|
450
|
+
puts 'Exception when calling ApprovalChainApi->add_system_cac'.red
|
446
451
|
puts to_output_hash(e)
|
447
452
|
end
|
448
453
|
end
|
@@ -470,22 +475,22 @@ module Emasser
|
|
470
475
|
desc: 'Comments submitted upon initiation of the indicated workflow'
|
471
476
|
|
472
477
|
def add
|
473
|
-
body =
|
478
|
+
body = EmassClient::PacGet.new
|
474
479
|
body.name = options[:name]
|
475
|
-
body.
|
480
|
+
body.workflow = options[:workflow]
|
476
481
|
body.comments = options[:comments]
|
477
482
|
|
478
483
|
body_array = Array.new(1, body)
|
479
484
|
|
480
|
-
result =
|
485
|
+
result = EmassClient::PACApi.new.add_system_pac(options[:systemId], body_array)
|
481
486
|
puts to_output_hash(result).green
|
482
|
-
rescue
|
483
|
-
puts 'Exception when calling ApprovalChainApi->
|
487
|
+
rescue EmassClient::ApiError => e
|
488
|
+
puts 'Exception when calling ApprovalChainApi->add_system_pac'.red
|
484
489
|
puts to_output_hash(e)
|
485
490
|
end
|
486
491
|
end
|
487
492
|
|
488
|
-
#
|
493
|
+
# The Static Code Scans endpoint provides the ability to upload application
|
489
494
|
# scan findings into a system's assets module.
|
490
495
|
#
|
491
496
|
# Application findings can also be cleared from the system.
|
@@ -505,37 +510,37 @@ module Emasser
|
|
505
510
|
option :applicationName, type: :string, required: true, desc: 'Name of the software application that was assessed'
|
506
511
|
option :version, type: :string, required: true, desc: 'The version of the application'
|
507
512
|
option :codeCheckName, type: :string, required: true, desc: 'Name of the software vulnerability or weakness'
|
508
|
-
option :scanDate, type: :numeric, required:
|
513
|
+
option :scanDate, type: :numeric, required: true, desc: 'The findings scan date - Unix time format'
|
509
514
|
option :cweId, type: :string, required: true, desc: 'The Common Weakness Enumerator (CWE) identifier'
|
510
|
-
|
515
|
+
option :count, type: :numeric, required: true, desc: 'Number of instances observed for a specified finding'
|
511
516
|
# Optional parameter/fields
|
512
517
|
option :rawSeverity, type: :string, required: false, enum: %w[Low Medium Moderate High Critical]
|
513
|
-
option :count, type: :numeric, required: false, desc: 'Number of instances observed for a specified finding'
|
514
518
|
|
515
519
|
def add
|
516
|
-
application =
|
520
|
+
application = EmassClient::StaticCodeRequestPostBodyApplication.new
|
517
521
|
application.application_name = options[:applicationName]
|
518
522
|
application.version = options[:version]
|
519
523
|
|
520
|
-
application_findings =
|
524
|
+
application_findings = EmassClient::StaticCodeApplication.new
|
521
525
|
application_findings.code_check_name = options[:codeCheckName]
|
522
526
|
application_findings.scan_date = options[:scanDate]
|
523
527
|
application_findings.cwe_id = options[:cweId]
|
524
|
-
|
528
|
+
application_findings.count = options[:count]
|
525
529
|
application_findings.raw_severity = options[:rawSeverity] if options[:rawSeverity]
|
526
|
-
application_findings.count = options[:count] if options[:count]
|
527
530
|
|
528
|
-
|
531
|
+
app_findings_array = Array.new(1, application_findings)
|
532
|
+
|
533
|
+
body = EmassClient::StaticCodeRequestPostBody.new
|
529
534
|
body.application = application
|
530
|
-
body.application_findings =
|
535
|
+
body.application_findings = app_findings_array
|
531
536
|
|
532
537
|
body_array = Array.new(1, body)
|
533
538
|
|
534
539
|
begin
|
535
|
-
result =
|
536
|
-
.new.add_static_code_scans_by_system_id(
|
540
|
+
result = EmassClient::StaticCodeScansApi
|
541
|
+
.new.add_static_code_scans_by_system_id(options[:systemId], body_array)
|
537
542
|
puts to_output_hash(result).green
|
538
|
-
rescue
|
543
|
+
rescue EmassClient::ApiError => e
|
539
544
|
puts 'Exception when calling StaticCodeScansApi->add_static_code_scans_by_system_id'.red
|
540
545
|
puts to_output_hash(e)
|
541
546
|
end
|
@@ -556,34 +561,216 @@ module Emasser
|
|
556
561
|
def clear
|
557
562
|
unless options[:clearFindings]
|
558
563
|
puts 'To clear an application findings, the field clearFindings (--clearFindings) is required'.red
|
559
|
-
puts
|
564
|
+
puts SCAN_POST_HELP_MESSAGE.yellow
|
560
565
|
exit
|
561
566
|
end
|
562
567
|
|
563
|
-
application =
|
568
|
+
application = EmassClient::StaticCodeRequestPostBodyApplication.new
|
564
569
|
application.application_name = options[:applicationName]
|
565
570
|
application.version = options[:version]
|
566
571
|
|
567
|
-
application_findings =
|
572
|
+
application_findings = EmassClient::StaticCodeApplication.new
|
568
573
|
application_findings.clear_findings = options[:clearFindings]
|
569
574
|
|
570
|
-
|
575
|
+
app_findings_array = Array.new(1, application_findings)
|
576
|
+
|
577
|
+
body = EmassClient::StaticCodeRequestPostBody.new
|
571
578
|
body.application = application
|
572
|
-
body.application_findings =
|
579
|
+
body.application_findings = app_findings_array
|
573
580
|
|
574
581
|
body_array = Array.new(1, body)
|
575
582
|
|
576
583
|
begin
|
577
|
-
result =
|
578
|
-
.new.add_static_code_scans_by_system_id(
|
584
|
+
result = EmassClient::StaticCodeScansApi
|
585
|
+
.new.add_static_code_scans_by_system_id(options[:systemId], body_array)
|
579
586
|
puts to_output_hash(result).green
|
580
|
-
rescue
|
587
|
+
rescue EmassClient::ApiError => e
|
581
588
|
puts 'Exception when calling StaticCodeScansApi->add_static_code_scans_by_system_id'.red
|
582
589
|
puts to_output_hash(e)
|
583
590
|
end
|
584
591
|
end
|
585
592
|
end
|
586
593
|
|
594
|
+
# The Cloud Resources endpoint provides the ability to upload (add)
|
595
|
+
# cloud resources and their scan results in the assets module for a system.
|
596
|
+
#
|
597
|
+
#
|
598
|
+
# Endpoint:
|
599
|
+
# /api/systems/{systemId}/cloud-resources-results - Upload cloud resources and their scan results
|
600
|
+
class CloudResource < SubCommandBase
|
601
|
+
def self.exit_on_failure?
|
602
|
+
true
|
603
|
+
end
|
604
|
+
|
605
|
+
desc 'add', 'Upload cloud resources and their scan results'
|
606
|
+
long_desc Help.text(:cloudresource_post_mapper)
|
607
|
+
|
608
|
+
# Required parameters/fields
|
609
|
+
option :systemId, type: :numeric, required: true, desc: 'A numeric value representing the system identification'
|
610
|
+
option :provider, type: :string, required: true, desc: 'Cloud service provider name'
|
611
|
+
option :resourceId, type: :string, required: true, desc: 'Unique identifier/resource namespace for policy compliance result'
|
612
|
+
option :resourceName, type: :string, required: true, desc: 'Friendly name of Cloud resource'
|
613
|
+
option :resourceType, type: :string, required: true, desc: 'Type of Cloud resource'
|
614
|
+
# ComplianceResults Array Objects
|
615
|
+
option :cspPolicyDefinitionId, type: :string, required: true, desc: 'Unique identifier/compliance namespace for CSP/Resource\'s policy definition/compliance check'
|
616
|
+
option :isCompliant, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false'
|
617
|
+
option :policyDefinitionTitle, type: :string, required: true, desc: 'Friendly policy/compliance check title. Recommend short title'
|
618
|
+
|
619
|
+
# Optional parameter/fields
|
620
|
+
option :initiatedBy, type: :string, required: false, desc: 'Email of POC'
|
621
|
+
option :cspAccountId, type: :string, required: false, desc: 'System/owner\'s CSP account ID/number'
|
622
|
+
option :cspRegion, type: :string, required: false, desc: 'CSP region of system'
|
623
|
+
option :isBaseline, type: :boolean, required: false, default: true, desc: 'BOOLEAN - true or false'
|
624
|
+
# Tags Object
|
625
|
+
option :test, type: :string, required: false, desc: 'The test tag'
|
626
|
+
# ComplianceResults Array Objects
|
627
|
+
option :assessmentProcedure, type: :string, required: false, desc: 'Comma separated correlation to Assessment Procedure (i.e. CCI number for DoD Control Set)'
|
628
|
+
option :complianceCheckTimestamp, type: :numeric, required: false, desc: 'The compliance timestamp Unix date format.'
|
629
|
+
option :complianceReason, type: :string, required: false, desc: 'Reason/comments for compliance result'
|
630
|
+
option :control, type: :string, required: false, desc: 'Comma separated correlation to Security Control (e.g. exact NIST Control acronym)'
|
631
|
+
option :policyDeploymentName, type: :string, required: false, desc: 'Name of policy deployment'
|
632
|
+
option :policyDeploymentVersion, type: :string, required: false, desc: 'policyDeploymentVersion'
|
633
|
+
option :severity, type: :string, required: false, enum: %w[Low Medium Moderate High Critical]
|
634
|
+
|
635
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
636
|
+
def add
|
637
|
+
# Required and Optional main fields
|
638
|
+
body = {}
|
639
|
+
body[:provider] = options[:provider]
|
640
|
+
body[:resourceId] = options[:resourceId]
|
641
|
+
body[:resourceName] = options[:resourceName]
|
642
|
+
body[:resourceType] = options[:resourceType]
|
643
|
+
|
644
|
+
body[:initiatedBy] = options[:initiatedBy] if options[:initiatedBy]
|
645
|
+
body[:cspAccountId] = options[:cspAccountId] if options[:cspAccountId]
|
646
|
+
body[:cspRegion] = options[:cspRegion] if options[:cspRegion]
|
647
|
+
body[:isBaseline] = options[:isBaseline] if options[:isBaseline]
|
648
|
+
|
649
|
+
# Optional tags field
|
650
|
+
tags = {}
|
651
|
+
tags[:test] = options[:test] if options[:test]
|
652
|
+
|
653
|
+
# Required and Optional compliances results fields
|
654
|
+
compliance_results = {}
|
655
|
+
compliance_results[:cspPolicyDefinitionId] = options[:cspPolicyDefinitionId]
|
656
|
+
compliance_results[:isCompliant] = options[:isCompliant]
|
657
|
+
compliance_results[:policyDefinitionTitle] = options[:policyDefinitionTitle]
|
658
|
+
# Optional fields
|
659
|
+
compliance_results[:assessmentProcedure] = options[:assessmentProcedure] if options[:assessmentProcedure]
|
660
|
+
compliance_results[:complianceCheckTimestamp] = options[:complianceCheckTimestamp] if options[:complianceCheckTimestamp]
|
661
|
+
compliance_results[:complianceReason] = options[:complianceReason] if options[:complianceReason]
|
662
|
+
compliance_results[:control] = options[:control] if options[:control]
|
663
|
+
compliance_results[:policyDeploymentName] = options[:policyDeploymentName] if options[:policyDeploymentName]
|
664
|
+
compliance_results[:policyDeploymentVersion] = options[:policyDeploymentVersion] if options[:policyDeploymentVersion]
|
665
|
+
compliance_results[:severity] = options[:severity] if options[:severity]
|
666
|
+
|
667
|
+
compliance_results_array = Array.new(1, compliance_results)
|
668
|
+
|
669
|
+
body[:tags] = tags
|
670
|
+
body[:complianceResults] = compliance_results_array
|
671
|
+
|
672
|
+
body_array = Array.new(1, body)
|
673
|
+
|
674
|
+
begin
|
675
|
+
result = EmassClient::CloudResourcesApi
|
676
|
+
.new.add_cloud_resources_by_system_id(options[:systemId], body_array)
|
677
|
+
puts to_output_hash(result).green
|
678
|
+
rescue EmassClient::ApiError => e
|
679
|
+
puts 'Exception when calling StaticCodeScansApi->add_cloud_resources_by_system_id'.red
|
680
|
+
puts to_output_hash(e)
|
681
|
+
end
|
682
|
+
end
|
683
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
684
|
+
end
|
685
|
+
|
686
|
+
# The Containers endpoint provides the ability to upload (add)
|
687
|
+
# containers and their scan results in the assets module for a system.
|
688
|
+
#
|
689
|
+
#
|
690
|
+
# Endpoint:
|
691
|
+
# /api/systems/{systemId}/container-scan-results - Upload containers and their scan results
|
692
|
+
class Container < SubCommandBase
|
693
|
+
def self.exit_on_failure?
|
694
|
+
true
|
695
|
+
end
|
696
|
+
|
697
|
+
desc 'add', 'Upload containers and their scan results'
|
698
|
+
long_desc Help.text(:container_post_mapper)
|
699
|
+
|
700
|
+
# Required parameters/fields
|
701
|
+
option :systemId, type: :numeric, required: true, desc: 'A numeric value representing the system identification'
|
702
|
+
option :containerId, type: :string, required: true, desc: 'Unique identifier of the container'
|
703
|
+
option :containerName, type: :string, required: true, desc: 'Friendly name of the container'
|
704
|
+
option :time, type: :numeric, required: true, desc: 'Datetime of scan/result. Unix date format'
|
705
|
+
# Benchmarks Array Objects
|
706
|
+
option :benchmark, type: :string, required: true, desc: 'Identifier of the benchmark/grouping of compliance results'
|
707
|
+
# Benchmarks.Results Array Objects
|
708
|
+
option :lastSeen, type: :numeric, required: true, desc: 'Date last seen, Unix date format'
|
709
|
+
option :ruleId, type: :string, required: true, desc: 'Identifier for the compliance result, vulnerability, etc. the result is for'
|
710
|
+
option :status, type: :string, required: true, enum: ['Pass', 'Fail', 'Other', 'Not Reviewed', 'Not Checked', 'Not Applicable']
|
711
|
+
|
712
|
+
# Optional parameter/fields
|
713
|
+
option :namespace, type: :string, required: false, desc: 'Namespace of container in container orchestration'
|
714
|
+
option :podIp, type: :string, required: false, desc: 'IP address of the pod'
|
715
|
+
option :podName, type: :string, required: false, desc: 'Name of pod (e.g. Kubernetes pod)'
|
716
|
+
# Tags Object
|
717
|
+
option :test, type: :string, required: false, desc: 'The test tag'
|
718
|
+
# Benchmarks Array Objects
|
719
|
+
option :isBaseline, type: :boolean, required: false, default: true, desc: 'BOOLEAN - true or false'
|
720
|
+
# Benchmarks.Results Array Objects
|
721
|
+
option :message, type: :string, required: false, desc: 'Benchmark result comments'
|
722
|
+
|
723
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
724
|
+
def add
|
725
|
+
# Required and Optional main fields
|
726
|
+
body = {}
|
727
|
+
body[:containerId] = options[:containerId]
|
728
|
+
body[:containerName] = options[:containerName]
|
729
|
+
body[:time] = options[:time]
|
730
|
+
body[:namespace] = options[:namespace] if options[:namespace]
|
731
|
+
body[:podIp] = options[:podIp] if options[:podIp]
|
732
|
+
body[:podName] = options[:podName] if options[:podName]
|
733
|
+
|
734
|
+
# Optional tags field
|
735
|
+
tags = {}
|
736
|
+
tags[:test] = options[:test] if options[:test]
|
737
|
+
|
738
|
+
# Required and Optional Benchmarks fields
|
739
|
+
benchmarks = {}
|
740
|
+
benchmarks[:benchmark] = options[:benchmark]
|
741
|
+
# Optional fields
|
742
|
+
benchmarks[:isBaseline] = options[:isBaseline] if options[:isBaseline]
|
743
|
+
|
744
|
+
# Required and Optional Benchmarks.Results
|
745
|
+
benchmarks_results = {}
|
746
|
+
benchmarks_results[:lastSeen] = options[:lastSeen]
|
747
|
+
benchmarks_results[:ruleId] = options[:ruleId]
|
748
|
+
benchmarks_results[:status] = options[:status]
|
749
|
+
benchmarks_results[:message] = options[:message] if options[:message]
|
750
|
+
|
751
|
+
# Add Benchmark results to an array and add array to benchmarks object
|
752
|
+
benchmarks_results_array = Array.new(1, benchmarks_results)
|
753
|
+
benchmarks[:results] = benchmarks_results_array # = Array.new(1, benchmarks_results)
|
754
|
+
# Add benchmarks object to an array
|
755
|
+
benchmarks_array = Array.new(1, benchmarks)
|
756
|
+
# Add tags and benchmark ojects to body object
|
757
|
+
body[:tags] = tags
|
758
|
+
body[:benchmarks] = benchmarks_array
|
759
|
+
|
760
|
+
body_array = Array.new(1, body)
|
761
|
+
|
762
|
+
begin
|
763
|
+
result = EmassClient::ContainersApi
|
764
|
+
.new.add_container_sans_by_system_id(options[:systemId], body_array)
|
765
|
+
puts to_output_hash(result).green
|
766
|
+
rescue EmassClient::ApiError => e
|
767
|
+
puts 'Exception when calling StaticCodeScansApi->add_container_sans_by_system_id'.red
|
768
|
+
puts to_output_hash(e)
|
769
|
+
end
|
770
|
+
end
|
771
|
+
# rubocop:enable Metrics/CyclomaticComplexity
|
772
|
+
end
|
773
|
+
|
587
774
|
class Post < SubCommandBase
|
588
775
|
desc 'test_results', 'Add system Test Results'
|
589
776
|
subcommand 'test_results', TestResults
|
@@ -605,5 +792,11 @@ module Emasser
|
|
605
792
|
|
606
793
|
desc 'scan_findings', 'Upload static code scans'
|
607
794
|
subcommand 'scan_findings', ScanFindings
|
795
|
+
|
796
|
+
desc 'cloud_resource', 'Upload cloud resource and their scan results'
|
797
|
+
subcommand 'cloud_resource', CloudResource
|
798
|
+
|
799
|
+
desc 'container', 'Upload container and their scan results'
|
800
|
+
subcommand 'container', Container
|
608
801
|
end
|
609
802
|
end
|
data/lib/emasser/put.rb
CHANGED
@@ -129,7 +129,7 @@ module Emasser
|
|
129
129
|
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
130
130
|
def update
|
131
131
|
# Required fields
|
132
|
-
body =
|
132
|
+
body = EmassClient::ControlsGet.new
|
133
133
|
body.acronym = options[:acronym]
|
134
134
|
body.responsible_entities = options[:responsibleEntities]
|
135
135
|
body.control_designation = options[:controlDesignation]
|
@@ -147,13 +147,14 @@ module Emasser
|
|
147
147
|
body.impact = options[:impact] if options[:impact]
|
148
148
|
body.impact_description = options[:impactDescription] if options[:impactDescription]
|
149
149
|
body.residual_risk_level = options[:residualRiskLevel] if options[:residualRiskLevel]
|
150
|
+
body.test_method = options[:testMethod] if options[:testMethod]
|
150
151
|
|
151
152
|
body_array = Array.new(1, body)
|
152
153
|
|
153
154
|
begin
|
154
|
-
result =
|
155
|
+
result = EmassClient::ControlsApi.new.update_control_by_system_id(options[:systemId], body_array)
|
155
156
|
puts to_output_hash(result).green
|
156
|
-
rescue
|
157
|
+
rescue EmassClient::ApiError => e
|
157
158
|
puts 'Exception when calling ControlsApi->update_control_by_system_id'.red
|
158
159
|
puts to_output_hash(e)
|
159
160
|
end
|
@@ -268,9 +269,9 @@ module Emasser
|
|
268
269
|
# Required parameters/fields
|
269
270
|
option :systemId, type: :numeric, required: true, desc: 'A numeric value representing the system identification'
|
270
271
|
option :poamId, type: :numeric, required: true, desc: 'A numeric value representing the poam identification'
|
271
|
-
option :displayPoamId,
|
272
|
-
|
273
|
-
|
272
|
+
# option :displayPoamId,
|
273
|
+
# type: :numeric, required: true,
|
274
|
+
# desc: 'Globally unique identifier for individual POA&M Items, seen on the front-end as "ID"'
|
274
275
|
option :status, type: :string, required: true, enum: ['Ongoing', 'Risk Accepted', 'Completed', 'Not Applicable']
|
275
276
|
option :vulnerabilityDescription, type: :string, required: true, desc: 'POA&M vulnerability description'
|
276
277
|
option :sourceIdentVuln,
|
@@ -312,12 +313,13 @@ module Emasser
|
|
312
313
|
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
313
314
|
def update
|
314
315
|
# Required fields
|
315
|
-
body =
|
316
|
+
body = EmassClient::PoamGet.new
|
316
317
|
body.poam_id = options[:poamId]
|
317
318
|
body.status = options[:status]
|
318
319
|
body.vulnerability_description = options[:vulnerabilityDescription]
|
319
320
|
body.source_ident_vuln = options[:sourceIdentVuln]
|
320
321
|
body.poc_organization = options[:pocOrganization]
|
322
|
+
body.resources = options[:resources]
|
321
323
|
|
322
324
|
process_business_logic(body)
|
323
325
|
|
@@ -345,16 +347,16 @@ module Emasser
|
|
345
347
|
body_array = Array.new(1, body)
|
346
348
|
|
347
349
|
begin
|
348
|
-
result =
|
350
|
+
result = EmassClient::POAMApi.new.update_poam_by_system_id(options[:systemId], body_array)
|
349
351
|
puts to_output_hash(result).green
|
350
|
-
rescue
|
352
|
+
rescue EmassClient::ApiError => e
|
351
353
|
puts 'Exception when calling POAMApi->update_poam_by_system_id'.red
|
352
354
|
puts to_output_hash(e)
|
353
355
|
end
|
354
356
|
end
|
355
357
|
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
356
358
|
|
357
|
-
# rubocop:disable Metrics/BlockLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
359
|
+
# rubocop:disable Metrics/AbcSize, Metrics/BlockLength, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
358
360
|
no_commands do
|
359
361
|
def process_business_logic(body)
|
360
362
|
#-----------------------------------------------------------------------------
|
@@ -372,13 +374,18 @@ module Emasser
|
|
372
374
|
puts ' comments'.red
|
373
375
|
puts POAMS_PUT_HELP_MESSAGE.yellow
|
374
376
|
exit
|
377
|
+
elsif !(options[:scheduledCompletionDate].nil? && options[:milestone].nil?)
|
378
|
+
puts 'When status = "Risk Accepted" POA&M Item CAN NOT be saved with the following parameters/fields:'.red
|
379
|
+
puts ' scheduledCompletionDate, or milestone'.red
|
380
|
+
puts POAMS_PUT_HELP_MESSAGE.yellow
|
381
|
+
exit
|
375
382
|
else
|
376
383
|
body.comments = options[:comments]
|
377
384
|
end
|
378
385
|
elsif options[:status] == "Ongoing"
|
379
386
|
if options[:scheduledCompletionDate].nil? || options[:milestone].nil?
|
380
387
|
puts 'When status = "Ongoing" the following parameters/fields are required:'.red
|
381
|
-
puts ' scheduledCompletionDate,
|
388
|
+
puts ' scheduledCompletionDate, milestone'.red
|
382
389
|
print_milestone_help
|
383
390
|
puts POAMS_PUT_HELP_MESSAGE.yellow
|
384
391
|
exit
|
@@ -389,7 +396,7 @@ module Emasser
|
|
389
396
|
else
|
390
397
|
body.scheduled_completion_date = options[:scheduledCompletionDate]
|
391
398
|
|
392
|
-
milestone =
|
399
|
+
milestone = EmassClient::MilestonesRequiredPut.new
|
393
400
|
milestone.milestone_id = options[:milestone]["milestoneId"] if options[:milestone]["milestoneId"]
|
394
401
|
milestone.description = options[:milestone]["description"]
|
395
402
|
milestone.scheduled_completion_date = options[:milestone]["scheduledCompletionDate"]
|
@@ -409,7 +416,7 @@ module Emasser
|
|
409
416
|
body.comments = options[:comments]
|
410
417
|
body.completion_date = options[:completionDate]
|
411
418
|
|
412
|
-
milestone =
|
419
|
+
milestone = EmassClient::MilestonesRequiredPut.new
|
413
420
|
milestone.milestone_id = options[:milestone]["milestoneId"] if options[:milestone]["milestoneId"]
|
414
421
|
milestone.description = options[:milestone]["description"]
|
415
422
|
milestone.scheduled_completion_date = options[:milestone]["scheduledCompletionDate"]
|
@@ -457,7 +464,7 @@ module Emasser
|
|
457
464
|
puts 'The milestoneId:[value] is optional, if not provided a new milestone is created'.yellow
|
458
465
|
end
|
459
466
|
end
|
460
|
-
# rubocop:enable Metrics/BlockLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
467
|
+
# rubocop:enable Metrics/AbcSize, Metrics/BlockLength, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
461
468
|
end
|
462
469
|
|
463
470
|
# Update Milestones items to a system.
|
@@ -482,7 +489,7 @@ module Emasser
|
|
482
489
|
type: :numeric, required: false, desc: 'The scheduled completion date - Unix time format'
|
483
490
|
|
484
491
|
def update
|
485
|
-
body =
|
492
|
+
body = EmassClient::MilestonesGet.new
|
486
493
|
body.milestone_id = options[:milestoneId]
|
487
494
|
body.description = options[:description]
|
488
495
|
body.scheduled_completion_date = options[:scheduledCompletionDate]
|
@@ -490,12 +497,12 @@ module Emasser
|
|
490
497
|
|
491
498
|
begin
|
492
499
|
# Get milestones in one or many poa&m items in a system
|
493
|
-
result =
|
500
|
+
result = EmassClient::MilestonesApi
|
494
501
|
.new
|
495
|
-
.update_milestone_by_system_id_and_poam_id(
|
502
|
+
.update_milestone_by_system_id_and_poam_id(options[:systemId], options[:poamId], body_array)
|
496
503
|
puts to_output_hash(result).green
|
497
|
-
rescue
|
498
|
-
puts 'Exception when calling
|
504
|
+
rescue EmassClient::ApiError => e
|
505
|
+
puts 'Exception when calling MilestonesApi->update_milestone_by_system_id_and_poam_id'.red
|
499
506
|
puts to_output_hash(e)
|
500
507
|
end
|
501
508
|
end
|
@@ -539,7 +546,7 @@ module Emasser
|
|
539
546
|
|
540
547
|
# rubocop:disable Metrics/CyclomaticComplexity
|
541
548
|
def update
|
542
|
-
body =
|
549
|
+
body = EmassClient::ArtifactsGet.new
|
543
550
|
body.filename = options[:filename]
|
544
551
|
body.type = options[:type]
|
545
552
|
body.category = options[:category]
|
@@ -555,9 +562,9 @@ module Emasser
|
|
555
562
|
body_array = Array.new(1, body)
|
556
563
|
|
557
564
|
begin
|
558
|
-
result =
|
565
|
+
result = EmassClient::ArtifactsApi.new.update_artifact_by_system_id(options[:systemId], body_array)
|
559
566
|
puts to_output_hash(result).green
|
560
|
-
rescue
|
567
|
+
rescue EmassClient::ApiError => e
|
561
568
|
puts 'Exception when calling ArtifactsApi->update_artifact_by_system_id'.red
|
562
569
|
puts to_output_hash(e)
|
563
570
|
end
|