Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
Remove redact command as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
chambridge committed Aug 30, 2017
1 parent 04517b5 commit bce4d7a
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 187 deletions.
3 changes: 1 addition & 2 deletions README.rst
Expand Up @@ -174,9 +174,8 @@ There are four rho commands:
* ``show`` - to display a specific entry
* ``list`` - to display one or more entries

``fact`` has four subcommands:
``fact`` has two subcommands:
* ``list`` - to display the list of facts that can be scanned
* ``redact`` - to remove sensitive facts from a scanned report
* ``hash`` - to hash sensitive facts within report

The complete list of options for each command and subcommand are listed in the
Expand Down
3 changes: 1 addition & 2 deletions doc/command_syntax_usage.rst
Expand Up @@ -18,9 +18,8 @@ There are four rho commands:
* ``show`` - to display a specific entry
* ``list`` - to display one or more entries

``fact`` has three subcommands:
``fact`` has two subcommands:
* ``list`` - to display the list of facts that can be scanned
* ``redact`` - to remove sensitive facts from a scanned report
* ``hash`` - to hash sensitive facts within report

The complete list of options for each command and subcommand are listed in the
Expand Down
23 changes: 0 additions & 23 deletions doc/rho.1
Expand Up @@ -327,29 +327,6 @@ A list of facts that can be gathered during the scanning process can be obtained
Optionally, provide a filter view of the list of facts with a regular expression -- e.g 'uname.*'.
.PP
.B
Redacting Facts
.PP
Sensitive facts can be removed from a report CSV file using the 'redact' command. The facts that are removed with this command are:
.I connection.host, connection.port, uname.all,
and
.I uname.hostname.
.PP
.B rho fact redact
.B --reportfile=
.I file
.B [--outputfile=
.I path
.B ]
.PP
.TP
--reportfile=file
The path and filename of the comma-separated values (CSV) file to read from.
.PP
.TP
--outputfile=path
The path and filename of the comma-separated values (CSV) file to be written.
.PP
.B
Hashing Facts
.PP
Sensitive facts can be encrypted within a report CSV file using the 'hash' command. The facts that are hashed with this command are:
Expand Down
1 change: 0 additions & 1 deletion rho/cli.py
Expand Up @@ -28,7 +28,6 @@
from rho.authlistcommand import AuthListCommand # noqa
from rho.authshowcommand import AuthShowCommand # noqa
from rho.factlistcommand import FactListCommand # noqa
from rho.factredactcommand import FactRedactCommand # noqa
from rho.facthashcommand import FactHashCommand # noqa
from rho.profileaddcommand import ProfileAddCommand # noqa
from rho.profileclearcommand import ProfileClearCommand # noqa
Expand Down
123 changes: 0 additions & 123 deletions rho/factredactcommand.py

This file was deleted.

36 changes: 0 additions & 36 deletions test/test_clicommand.py
Expand Up @@ -30,7 +30,6 @@
from rho.authshowcommand import AuthShowCommand
from rho.clicommand import CliCommand
from rho.factlistcommand import FactListCommand
from rho.factredactcommand import FactRedactCommand
from rho.facthashcommand import FactHashCommand
from rho.profileaddcommand import ProfileAddCommand
from rho.profileclearcommand import ProfileClearCommand
Expand Down Expand Up @@ -370,41 +369,6 @@ def test_fact_list_filter(self):
sys.argv = ['/bin/rho', 'fact', 'list', '--filter', 'uname.*']
FactListCommand().main()

def test_redact_no_report_specified(self):
"""Test that the 'fact redact' command fails as expected
if the reportfile is missing"""

with self.assertRaises(SystemExit):
sys.argv = ['/bin/rho', 'fact', 'redact']
FactRedactCommand().main()

def test_redact_no_report_found(self):
"""Test that the 'fact redact' command fails as expected
if the reportfile is doesn't exist"""

with self.assertRaises(SystemExit):
sys.argv = ['/bin/rho', 'fact', 'redact',
'--reportfile', 'no_report.csv']
FactRedactCommand().main()

def test_fact_redact(self):
"""Test that the 'fact redact' command runs successfully"""

sys.argv = ['/bin/rho', 'fact', 'redact',
'--reportfile', TMP_TEST_REPORT_SENSITIVE]
FactRedactCommand().main()

def test_fact_redact_bad_facts(self):
"""Test that the 'fact redact' command fails as expected
if the facts to redact are invalid
"""

with self.assertRaises(SystemExit):
sys.argv = ['/bin/rho', 'fact', 'redact',
'--reportfile', TMP_TEST_REPORT_SENSITIVE,
'--facts', 'foo']
FactRedactCommand().main()

def test_hash_no_report(self):
"""Test that the 'fact hash' command fails as expected
if the reportfile is missing"""
Expand Down

0 comments on commit bce4d7a

Please sign in to comment.