Templates¶
Single Port:¶
from sanblaze_test_api import *
TITLE = "Template.py"
VERSION = '1.0'
DESCRIPTION = "Script Description"
PASS_FAIL = "Pass/Fail Criterion"
MINIMUM_BASE_VERSION = "V10.4-64 09/17/2021"
HOMEDIR = "/virtualun/rest/userscripts"
# Mandatory control flags
ZONETYPE = 1 # Bit mask 1 = Conventional, 2 = Key/Value, 4 = ZNS (e.g. 7 = All types)
NS_CSI = 0 # 'Default namespace type when creating new namespaces 0 = Conventional, 1 = Key/Value, 2 = ZNS',
RESTORE_NS_CONFIG = 1 # 0 = Do not restore NS config, 1 = Restore NS config
PRESERVE_PREEXISTING_NS = 0 # 0 = Enable Namespace Manipulation, 1 = Disable namespace manipulation
PORTS = 1 # Number of ports under test. 1 = Single Port, 2 = Dual Port
PORT_LOCKING = 1 # 0 = No Locking, 1 = Lock this port, 2=Lock other port, 3 = Lock both Ports
DEBUG = 0 # 0 = Details, 1 = Info, 2 = All available information
def main(test_config):
@setup(test_config)
def test(dut):
while keep_running():
# Start of user commands
# End of user commands
if __name__ == '__main__':
start_main(main, locals())
Dual Port:¶
from sanblaze_test_api import *
TITLE = "Template.py"
VERSION = '1.0'
DESCRIPTION = "Script Description"
PASS_FAIL = "Pass/Fail Criterion"
MINIMUM_BASE_VERSION = "V10.4-64 05/15/2021"
HOMEDIR = "/virtualun/rest/userscripts"
# Mandatory control flags
ZONETYPE = 1 # Bit mask 1 = Conventional, 2 = Key/Value, 4 = ZNS (e.g. 7 = All types)
NS_CSI = 0 # 'Default namespace type when creating new namespaces 0 = Conventional, 1 = Key/Value, 2 = ZNS',
RESTORE_NS_CONFIG = 1 # 0 = Do not restore NS config, 1 = Restore NS config
PRESERVE_PREEXISTING_NS = 0 # 0 = Enable Namespace Manipulation, 1 = Disable namespace manipulation
PORTS = 2 # Number of ports under test. 1 = Single Port, 2 = Dual Port
PORT_LOCKING = 1 # 0 = No Locking, 1 = Lock this port, 2=Lock other port, 3 = Lock both Ports
DEBUG = 0 # 0 = Details, 1 = Info, 2 = All available information
def main(test_config):
@setup(test_config)
def test(duts):
dut1 = duts[0]
dut2 = duts[1]
while keep_running():
# Start of user commands
# End of user commands
if __name__ == '__main__':
start_main(main, locals())