sassoftware / pyviyatools

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

rule application fixes (#174) #180

Closed tomstarr closed 1 year ago

tomstarr commented 1 year ago

Workarounds implemented to: applyviyarules.py toggleviyarules.py

Change made to listrules.py in 'patches (#174)' commit, which was then rolled back in 'rule application fixes (#174)' commit.

TLDR: Changes should remedy issues where Viya CLI is stops applying rules when it encounters a rule that's either identical or only has a distinct condition.

Description: Update to applyviyarules.py which now sees the script extract a list of existing rules from Viya and compare (using grep) the extracted rules vs the rules being applied. If the rule already exists it is discarded, if it new it is then automatically created.

If it is a new rule but contains a condition, then it is sent to an alternative csv to be manually created in the Viya env, as currently, creation of conditional rules using the CLI encounters a bug.