python.conf
The SANBlaze Python api allows users to override certain behaviors by setting values in the python.conf file.
To modify the system configuration, the built in program ‘configuration’ should be run from the cli:
configuration
Note
The python.conf is located on the vlun at /virtualun/python.conf
Warning
The file can be changed by opening it with any text editor and inserting the proper value. Although the file can be modified directly, this is not recommended. Any mistakes in the json will cause the software to crash.
Note
If the configuration file is successfully used to override default behavior, an entry will be added to the beginning of the test log to indicate this modified behavior.
The configuration file is a json formatted file. The following are the valid values:
Outer Value |
Inner Value |
Valid Inputs |
---|---|---|
logging |
resolution |
us, ms |
errors |
link width |
“ignore”, “notify”, “warn”, “error” |
errors |
link speed |
“ignore”, “notify”, “warn”, “error” |
reporting |
SMART |
0, 1 |
Link Speed and Link Width Error Action
Link speed and link width are checked at the start and end of the test. By default, if the starting and ending values are not the same, a item will be logged the level ‘NOTE’.
If different behavior is required, this can be override in the python.conf file by setting the desired fail action.
If the link width value is incorrect, handle this as an error. The script state will be adjusted accordingly and an error message will be logged.
{"errors":
{"link width": "error"}
}
If the link speed or the link width value is incorrect, handle this as a warning. The script state will be adjusted accordingly and a warning message will be logged.
{"errors":
{"link width": "error",
"link speed": "error"}
}
To turn off this notification:
{"errors":
{"link width": "ignore",
"link speed": "ignore"}
}
Note
Invalid values will be ignored.
Health information data (SMART)
Add SMART data as part of the standard report.
To turn on this notification:
{"reporting":
{"SMART": 1}
}
To turn off this notification:
{"reporting":
{"SMART": 0}
}