Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Tool: ValidateViya #111

Open
gerrynelson63 opened this issue Aug 31, 2022 · 2 comments
Open

New Tool: ValidateViya #111

gerrynelson63 opened this issue Aug 31, 2022 · 2 comments
Assignees

Comments

@gerrynelson63
Copy link
Member

gerrynelson63 commented Aug 31, 2022

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

  • Print identity information of the authenticated user
  • List users
  • List base Viya folders
  • List CAS Servers
  • List default CAS Server details
  • List contents of SystemData caslib
  • Run a test SAS program.

Need to decide the format of the output.

  • initially use the existing output from printresult function
  • maybe add some output that a downstream process could interrogate for a PASS/FAIL
  • Possibly add an HTML report.

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

@gerrynelson63
Copy link
Member Author

gerrynelson63 commented Sep 18, 2022

@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
Copy link
Member Author

gerrynelson63 commented Dec 2, 2022

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants