Package: xoa-converter
Xena OpenAutomation Test Config ConverterXena OpenAutomation (XOA) Test Configuration Converter is a supporting tool for users to quickly migrate their Valkyrie test suite configurations into XOA.IntroductionThe XOA Test Config Converter is an open-source tool hosted on Xena Networks' GitHub repository. It is designed to help users migrate their existing Valkyrie test suite configurations into the XOA format, enabling a seamless transition to the XOA ecosystem for network automation and testing.Key features of the XOA Test Config Converter include:Conversion support: The tool supports conversion of Valkyrie test suite configuration files to XOA-compatible format, facilitating the integration of existing test cases into the XOA framework.Ease of use: The XOA Test Config Converter is designed to be user-friendly, with a straightforward process for converting test suite configuration files.Compatibility: The converter ensures that the migrated test suite configurations are compatible with XOA Core and can be executed within the XOA ecosystem.The purpose of XOA Converter is ONLY to convert Xena Valkyrie test suit applications' configuration files into XOA's configuration files. Thus only four test suite types are supported by XOA Converter as the source config files.DocumentationThe user documentation is hosted:Xena OpenAutomation Test Config Converter DocumentationInstallationInstall UsingpipMake sure Pythonpipis installed on you system. If you are using virtualenv, then pip is already installed into environments created by virtualenv, and using sudo is not needed. If you do not have pip installed, download this file:https://bootstrap.pypa.io/get-pip.pyand runpython get-pip.py.To install the latest, use pip to install from pypi:~/>pipinstallxoa-converterTo upgrade to the latest, use pip to upgrade from pypi:~/>pipinstallxoa-converter--upgradeInstall From Source CodeMake sure these packages are installedwheel,setuptoolson your system.Installsetuptoolsusing pip:~/>pipinstallwheelsetuptoolsTo install source of python packages:/xoa_driver>pythonsetup.pyinstallTo build.whlfile for distribution:/xoa_driver>pythonsetup.pybdist_wheelQuick StartGet Python pip if not already installed (Downloadhttps://bootstrap.pypa.io/get-pip.py):python get-pip.pyInstall the latest xoa-driver:pip install xoa-converter -UCode example to convert.v2544into XOA 2544 test configuration:importasyncioimportjsonfromxoa_coreimportcontrollerfromxoa_converter.entryimportconverterfromxoa_converter.typesimportTestSuiteTypeasyncdefstart():SOURCE_CONFIG_FILE="my_old2544_config.v2544"# source config file to be convertedcore_ctrl=awaitcontroller.MainController()# create an instance of xoa core controllerinfo=core_ctrl.get_test_suite_info("RFC-2544")# get 2544 test suite information from the core's registrationtarget_schema=json.load(info['schema'])# get the target json schemawithopen(SOURCE_CONFIG_FILE,'r')assource_data_file:target_config=converter(test_suite_type=TestSuiteType.RFC2544,source_config=source_data_file.read(),target_schema=target_schema)print(target_config)if__name__=='__main__':loop=asyncio.get_event_loop()loop.create_task(start())loop.run_forever()FOR TESTING BEYOND THE STANDARD.