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())
OCP:
from sanblaze_test_api import *
from ocp_api import OCP, ocp_config
API_BASES = (OCP,)
TITLE = "Template_OCP.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/OCP"
# Mandatory control flags
NS_MGMT_REQUIRED = 0 # Namespace Management Support Requirement: 0 - Not Required, 1 - Required
PRESERVE_PREEXISTING_NS = 1 # 0 - Remove preexisting NS Before Test, 1 - Do not remove preexisting NS
RESTORE_NS_CONFIG = 1 # 0 - Do not restore preexisting configuration after test, 1 - Restore preexisting
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
ZONETYPE = 1 # Bit mask. 1 - Conventional, 2 - Key/Value, 4 - ZNS (e.g. 7 - All types)
DEBUG = 0 # 0 - Details, 1 - Info, 2 - All available information
SCOPE = "ALL" # "NAMESPACE" - Only run at the namespace level (NS!=0)
# "CONTROLLER" - Only run at the controller level (NS=0)
# "ALL" - Run at both the controller level (NS=0) and namespace level (NS!=0)
def main(test_config):
@setup(test_config)
@ocp_config
def test(dut):
while keep_running():
# Start of user commands
# End of user commands
if __name__ == '__main__':
start_main(main, locals())
FDP:
from sanblaze_test_api import *
from fdp_api import FDP, fdp_config
API_BASES = (FDP,)
TITLE = "Template_FDP.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/FDP"
# Mandatory control flags
NS_MGMT_REQUIRED = 0 # Namespace Management Support Requirement: 0 - Not Required, 1 - Required
PRESERVE_PREEXISTING_NS = 1 # 0 - Remove preexisting NS Before Test, 1 - Do not remove preexisting NS
RESTORE_NS_CONFIG = 1 # 0 - Do not restore preexisting configuration after test, 1 - Restore preexisting
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
ZONETYPE = 1 # Bit mask. 1 - Conventional, 2 - Key/Value, 4 - ZNS (e.g. 7 - All types)
DEBUG = 0 # 0 - Details, 1 - Info, 2 - All available information
def main(test_config):
@setup(test_config)
@fdp_config
def test(dut):
while keep_running():
# Start of user commands
# End of user commands
if __name__ == '__main__':
start_main(main, locals())