sassoftware / pyviyatools

Python command-line tools that call the SAS Viya REST APIs - for SAS administrators.
Apache License 2.0
39 stars 31 forks source link

New Tool: ValidateViya #111

Open gerrynelson63 opened 2 years ago

gerrynelson63 commented 2 years ago

Add a tool that will do an initial validation of a Viya environment. Tool Suggested tests:

Need to decide the format of the output.

Can we build it so that additional tests can be added?

gerrynelson63 commented 2 years ago

@mjerick25

Added what we talked about Friday for doc purposes:

Create an option --generate-tests

The option generates a JSON file, which includes the default tests, but allows the user to edit the file and change the tests.

Potential changes that could be made with the JSON:

  1. List folders, specify a folder to start the list.
  2. List cas servers, specify multiple CAS servers
  3. List caslib contents, specify multiple caslibs

Add an option that allows the tool to run the tests in the test file --test-file

Possible format of JSON file to include tests:

{ "tests" : [ { "id": "01", "name" : "CAS Servers", "parameters" : ["cas-shared-default","cas-gelcorp"] }, {"id" :"02", "name" : "Cas libraries", "parameters" : ["systemdata","sales","public"] }, {"id" :"03", "name" : "Folders", "parameters" : ["/Public","/gelcontent/gelcorp"] } ] }

gerrynelson63 commented 1 year ago

@mjerick25 one small issue with validateviya. It errors out if the output directory does not exist:

Problem creating report Traceback (most recent call last): File "./validateviya.py", line 450, in htmlFile.close() NameError: name 'htmlFile' is not defined

Would you mind having it create the directory if it doesn't exist. This would be consistent with some of the other tools:

create directory if it doesn't exist if not os.path.exists(path): os.makedirs(path)

Thanks, contact me on teams if you have any questions.