-
Notifications
You must be signed in to change notification settings - Fork 12
Integration: Sticky Standards
The Sticky Standards project allows you to enable and manage applying standards in a "sticky" manner. This means that, once you select a standard to be sticky, it is applied whenever a new component is added to the diagram.
- Determine standards to include (optional)
- Run script(s) to enable sticky standards against a tenant
- This can include all standards or the subset determined in the first step
- Custom fields (UDTs) are created at the project level for each standard
- Finally, a library containing custom-created rules is uploaded to the instance
- Configure which standards are to be "sticky" by selecting them in a project's architecture questionnaire
There are three scripts included in this project:
- enable_sticky_standards.py -- primary script for enabling sticky standards
- output__standards.py -- script for making
- delete_udts.py
They all share dependencies and are similar in how they are called, though each script has its own parameters and actions. The requirements to run them are found in the file requirements.txt. Install the requirements as follows:
python3 -m venv .venv # OPTIONAL: create a virtual Python environment
source ./.venv/bin/activate # OPTIONAL: activate the Python environment
python3 -m pip install -r requirements.txt
You can see the available options for each script by invoking help on them:
python3 output_standards.py --help
python3 delete_udts.py --help
python3 enable_sticky_standards.py --help
Two parameters are always necessary: the key parameter and either the subdomain or the
domain parameter. The former is the API key that grants you access to the IriusRisk instance
on which you wish to enable sticky standards. The subdomain parameter indicates the subdomain
of a SaaS instance of IriusRisk. So for instance, if the instance's URL is acmecorp.iriusrisk.com
,
you could use --subdomain acmecorp
to access it. Use the domain parameter for non-SaaS instances,
for instance --domain acmecorp.example.com
.
It is also possible to store these parameters in configuration files in order to maintain the values between calls. View the help file to learn more about this.
By default, all standards contained in a tenant will be included in the enablement. There can be 60 or more standards in a tenant, potentially making sticky standard selection difficult. If you know that certain standard aren't used in your tenant, or simply want to make a subset of standards available to be marked as sticky, then perform the following steps:
Output the standards to a file
API_KEY=a123-b456-c789-d0ab # replace with actual key
SAAS_SUBDOMAIN=acmecorp. # replace with actual subdomain
python3 output-standards.py --key $API_KEY --subdomain $SAAS_SUBDOMAIN --output standards.csv
This outputs all the standards from the IriusRisk instance to the file standards.csv in CSV (tab delimited) format. You then need to delete those rows (lines) containing standards that you do not want to include in the sticky standards.