PEL: Usability fixes to msg registry validator

This commit makes some usability improvements to the script that
validates the PEL message registry.

1) Renames the script from process_registry.py to validate_registry.py
   to more accurately reflect what it does.
2) Removes the '-v' option that was required to make it do any
   validation and just run it by default.  (At one point in the past it
   was going to do more than just validation.)

An internal improvement was made to just use argparse's ability to
check for required parameters instead of checking manually.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I30c4ba5c693388048095b385d5cae1993e906975
diff --git a/extensions/openpower-pels/registry/README.md b/extensions/openpower-pels/registry/README.md
index d637b75..154622e 100644
--- a/extensions/openpower-pels/registry/README.md
+++ b/extensions/openpower-pels/registry/README.md
@@ -524,13 +524,13 @@
 2. If a new component ID is used (usually the first byte of the SRC reason
    code), document it in O_component_ids.json.
 3. Validate the file. It must be valid JSON and obey the schema. The
-   `process_registry.py` script in `extensions/openpower-pels/registry/tools`
+   `validate_registry.py` script in `extensions/openpower-pels/registry/tools`
    will validate both, though it requires the python-jsonschema package to do
    the schema validation. This script is also run to validate the message
    registry as part of CI testing.
 
    ```sh
-   ./tools/process_registry.py -v -s schema/schema.json -r message_registry.json
+   ./tools/validate_registry.py -s schema/schema.json -r message_registry.json
    ```
 
 4. One can test what PELs are generated from these new entries without writing
diff --git a/extensions/openpower-pels/registry/run-ci.sh b/extensions/openpower-pels/registry/run-ci.sh
index 277b12e..023d22c 100755
--- a/extensions/openpower-pels/registry/run-ci.sh
+++ b/extensions/openpower-pels/registry/run-ci.sh
@@ -1,4 +1,4 @@
 #!/bin/sh
-/usr/bin/env python3 extensions/openpower-pels/registry/tools/process_registry.py \
-    -v -s extensions/openpower-pels/registry/schema/schema.json \
+/usr/bin/env python3 extensions/openpower-pels/registry/tools/validate_registry.py \
+    -s extensions/openpower-pels/registry/schema/schema.json \
     -r extensions/openpower-pels/registry/message_registry.json
diff --git a/extensions/openpower-pels/registry/tools/process_registry.py b/extensions/openpower-pels/registry/tools/validate_registry.py
similarity index 89%
rename from extensions/openpower-pels/registry/tools/process_registry.py
rename to extensions/openpower-pels/registry/tools/validate_registry.py
index c6a86f8..285b3b4 100755
--- a/extensions/openpower-pels/registry/tools/process_registry.py
+++ b/extensions/openpower-pels/registry/tools/validate_registry.py
@@ -145,15 +145,7 @@
 
 if __name__ == "__main__":
     parser = argparse.ArgumentParser(
-        description="PEL message registry processor"
-    )
-
-    parser.add_argument(
-        "-v",
-        "--validate",
-        action="store_true",
-        dest="validate",
-        help="Validate the JSON using the schema",
+        description="PEL message registry validator"
     )
 
     parser.add_argument(
@@ -161,6 +153,7 @@
         "--schema-file",
         dest="schema_file",
         help="The message registry JSON schema file",
+        required=True,
     )
 
     parser.add_argument(
@@ -168,7 +161,9 @@
         "--registry-file",
         dest="registry_file",
         help="The message registry JSON file",
+        required=True,
     )
+
     parser.add_argument(
         "-k",
         "--skip-schema-validation",
@@ -179,15 +174,8 @@
 
     args = parser.parse_args()
 
-    if args.validate:
-        if not args.schema_file:
-            sys.exit("Schema file required")
+    schema = args.schema_file
+    if args.skip_schema:
+        schema = None
 
-        if not args.registry_file:
-            sys.exit("Registry file required")
-
-        schema = args.schema_file
-        if args.skip_schema:
-            schema = None
-
-        validate_schema(args.registry_file, schema)
+    validate_schema(args.registry_file, schema)