cloudigrade / houndigrade

Tool for inspecting mounted volumes for presence of Red Hat software
GNU General Public License v3.0
1 stars 2 forks source link

Modify json structure for persisting results #10

Closed abaiken closed 6 years ago

abaiken commented 6 years ago

Here is a sample of the json that is produced:

{
  "cloud": "aws",
  "results": {
    "ami-redhatami": {
      "/dev/loop7": {
        "/dev/loop7p1": {
          "rhel_found": true,
          "evidence": [{
            "release_file": "/mnt/inspect/etc/os-release",
            "release_file_contents": "NAME=\"Red Hat Enterprise Linux Server\"\nVERSION=\"7.4 (Maipo)\"\nID=\"rhel\"\nID_LIKE=\"fedora\"\nVARIANT=\"Server\"\nVARIANT_ID=\"server\"\nVERSION_ID=\"7.4\"\nPRETTY_NAME=\"Red Hat Enterprise Linux\"\nANSI_COLOR=\"0;31\"\nCPE_NAME=\"cpe:/o:redhat:enterprise_linux:7.4:GA:server\"\nHOME_URL=\"https://www.redhat.com/\"\nBUG_REPORT_URL=\"https://bugzilla.redhat.com/\"\n\nREDHAT_BUGZILLA_PRODUCT=\"Red Hat Enterprise Linux 7\"\nREDHAT_BUGZILLA_PRODUCT_VERSION=7.4\nREDHAT_SUPPORT_PRODUCT=\"Red Hat Enterprise Linux\"\nREDHAT_SUPPORT_PRODUCT_VERSION=\"7.4\"\n\n",
            "rhel_found": true
          }, {
            "release_file": "/mnt/inspect/etc/redhat-release",
            "release_file_contents": "Red Hat Enterprise Linux Server release 7.4 (Maipo)\n\n",
            "rhel_found": true
          }]
        }
      }
    },
    "ami-centosami": {
      "/dev/loop8": {
        "/dev/loop8p1": {
          "rhel_found": false,
          "evidence": [{
            "release_file": "/mnt/inspect/etc/os-release",
            "release_file_contents": "NAME=\"CentOS Linux\"\nVERSION=\"7 (Core)\"\nID=\"centos\"\nID_LIKE=\"rhel fedora\"\nVERSION_ID=\"7\"\nPRETTY_NAME=\"CentOS Linux 7 (Core)\"\nANSI_COLOR=\"0;31\"\nCPE_NAME=\"cpe:/o:centos:centos:7\"\nHOME_URL=\"https://www.centos.org/\"\nBUG_REPORT_URL=\"https://bugs.centos.org/\"\n\nCENTOS_MANTISBT_PROJECT=\"CentOS-7\"\nCENTOS_MANTISBT_PROJECT_VERSION=\"7\"\nREDHAT_SUPPORT_PRODUCT=\"centos\"\nREDHAT_SUPPORT_PRODUCT_VERSION=\"7\"\n\n",
            "rhel_found": false
          }, {
            "release_file": "/mnt/inspect/etc/centos-release",
            "release_file_contents": "CentOS Linux release 7.4.1708 (Core)\n\n",
            "rhel_found": false
          }, {
            "release_file": "/mnt/inspect/etc/redhat-release",
            "release_file_contents": "CentOS Linux release 7.4.1708 (Core)\n\n",
            "rhel_found": false
          }]
        }
      }
    }
  }
}
codecov[bot] commented 6 years ago

Codecov Report

Merging #10 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #10   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           2      2           
  Lines         193    204   +11     
  Branches       10     10           
=====================================
+ Hits          193    204   +11
Impacted Files Coverage Δ
houndigrade/cli.py 100% <100%> (ø) :arrow_up:
houndigrade/test_cli.py 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 467a947...1e6d76a. Read the comment docs.

ghost commented 6 years ago

Thanks for adding few more of those asserts!