@@ -593,9 +593,13 @@ def load_config(config_file_path: Path) -> Configuration:
config_data = yaml.safe_load(f)
schema_path = os.path.join(Path(__file__).parent.resolve(), "conf_yaml_schema.json")
+ allowed_values_path = os.path.join(Path(__file__).parent.resolve(), "conf_allowed_values.json")
with open(schema_path, "r") as f:
schema = json.load(f)
+ with open(allowed_values_path, "r") as f:
+ allowed_values = json.load(f)
+ schema.update(allowed_values)
config = warlock.model_factory(schema, name="_Config")(config_data)
config_obj: Configuration = Configuration.from_dict(dict(config)) # type: ignore[arg-type]
return config_obj
new file mode 100644
@@ -0,0 +1,131 @@
+{
+ "$defs": {
+ "description": "Allowed/supported values and test suites within the current DTS framework.",
+ "test_suites": {
+ "description": "Developed test suites within the current framework. Add additional test suites here.",
+ "enum": [
+ "hello_world",
+ "os_udp",
+ "pmd_buffer_scatter"
+ ]
+ },
+ "traffic_generators": {
+ "description": "Scapy traffic generator. Used for functional testing.",
+ "enum": [
+ "SCAPY"
+ ]
+ },
+ "node_architectures": {
+ "description": "Supported node architectures within DPDK.",
+ "enum": [
+ "x86_64",
+ "arm64",
+ "ppc64le"
+ ]
+ },
+ "build_target_architectures": {
+ "description": "Supported build-target architectures.",
+ "enum": [
+ "ALL",
+ "x86_64",
+ "arm64",
+ "ppc64le",
+ "other"
+ ]
+ },
+ "operating_systems": {
+ "description": "Supported node operating systems",
+ "enum": [
+ "linux"
+ ]
+ },
+ "cpus": {
+ "description": "Supported build-target CPUs",
+ "enum": [
+ "native",
+ "armv8a",
+ "dpaa2",
+ "thunderx",
+ "xgene1"
+ ]
+ },
+ "compilers": {
+ "description": "Supported build-target compilers.",
+ "enum": [
+ "gcc",
+ "clang",
+ "icc",
+ "mscv"
+ ]
+ },
+ "NICs": {
+ "description": "Supported NICs",
+ "enum": [
+ "ALL",
+ "ConnectX3_MT4103",
+ "ConnectX4_LX_MT4117",
+ "ConnectX4_MT4115",
+ "ConnectX5_MT4119",
+ "ConnectX5_MT4121",
+ "I40E_10G-10G_BASE_T_BC",
+ "I40E_10G-10G_BASE_T_X722",
+ "I40E_10G-SFP_X722",
+ "I40E_10G-SFP_XL710",
+ "I40E_10G-X722_A0",
+ "I40E_1G-1G_BASE_T_X722",
+ "I40E_25G-25G_SFP28",
+ "I40E_40G-QSFP_A",
+ "I40E_40G-QSFP_B",
+ "IAVF-ADAPTIVE_VF",
+ "IAVF-VF",
+ "IAVF_10G-X722_VF",
+ "ICE_100G-E810C_QSFP",
+ "ICE_25G-E810C_SFP",
+ "ICE_25G-E810_XXV_SFP",
+ "IGB-I350_VF",
+ "IGB_1G-82540EM",
+ "IGB_1G-82545EM_COPPER",
+ "IGB_1G-82571EB_COPPER",
+ "IGB_1G-82574L",
+ "IGB_1G-82576",
+ "IGB_1G-82576_QUAD_COPPER",
+ "IGB_1G-82576_QUAD_COPPER_ET2",
+ "IGB_1G-82580_COPPER",
+ "IGB_1G-I210_COPPER",
+ "IGB_1G-I350_COPPER",
+ "IGB_1G-I354_SGMII",
+ "IGB_1G-PCH_LPTLP_I218_LM",
+ "IGB_1G-PCH_LPTLP_I218_V",
+ "IGB_1G-PCH_LPT_I217_LM",
+ "IGB_1G-PCH_LPT_I217_V",
+ "IGB_2.5G-I354_BACKPLANE_2_5GBPS",
+ "IGC-I225_LM",
+ "IGC-I226_LM",
+ "IXGBE_10G-82599_SFP",
+ "IXGBE_10G-82599_SFP_SF_QP",
+ "IXGBE_10G-82599_T3_LOM",
+ "IXGBE_10G-82599_VF",
+ "IXGBE_10G-X540T",
+ "IXGBE_10G-X540_VF",
+ "IXGBE_10G-X550EM_A_SFP",
+ "IXGBE_10G-X550EM_X_10G_T",
+ "IXGBE_10G-X550EM_X_SFP",
+ "IXGBE_10G-X550EM_X_VF",
+ "IXGBE_10G-X550T",
+ "IXGBE_10G-X550_VF",
+ "brcm_57414",
+ "brcm_P2100G",
+ "cavium_0011",
+ "cavium_a034",
+ "cavium_a063",
+ "cavium_a064",
+ "fastlinq_ql41000",
+ "fastlinq_ql41000_vf",
+ "fastlinq_ql45000",
+ "fastlinq_ql45000_vf",
+ "hi1822",
+ "virtio"
+ ]
+ }
+ }
+}
\ No newline at end of file
@@ -8,107 +8,25 @@
},
"NIC": {
"type": "string",
- "enum": [
- "ALL",
- "ConnectX3_MT4103",
- "ConnectX4_LX_MT4117",
- "ConnectX4_MT4115",
- "ConnectX5_MT4119",
- "ConnectX5_MT4121",
- "I40E_10G-10G_BASE_T_BC",
- "I40E_10G-10G_BASE_T_X722",
- "I40E_10G-SFP_X722",
- "I40E_10G-SFP_XL710",
- "I40E_10G-X722_A0",
- "I40E_1G-1G_BASE_T_X722",
- "I40E_25G-25G_SFP28",
- "I40E_40G-QSFP_A",
- "I40E_40G-QSFP_B",
- "IAVF-ADAPTIVE_VF",
- "IAVF-VF",
- "IAVF_10G-X722_VF",
- "ICE_100G-E810C_QSFP",
- "ICE_25G-E810C_SFP",
- "ICE_25G-E810_XXV_SFP",
- "IGB-I350_VF",
- "IGB_1G-82540EM",
- "IGB_1G-82545EM_COPPER",
- "IGB_1G-82571EB_COPPER",
- "IGB_1G-82574L",
- "IGB_1G-82576",
- "IGB_1G-82576_QUAD_COPPER",
- "IGB_1G-82576_QUAD_COPPER_ET2",
- "IGB_1G-82580_COPPER",
- "IGB_1G-I210_COPPER",
- "IGB_1G-I350_COPPER",
- "IGB_1G-I354_SGMII",
- "IGB_1G-PCH_LPTLP_I218_LM",
- "IGB_1G-PCH_LPTLP_I218_V",
- "IGB_1G-PCH_LPT_I217_LM",
- "IGB_1G-PCH_LPT_I217_V",
- "IGB_2.5G-I354_BACKPLANE_2_5GBPS",
- "IGC-I225_LM",
- "IGC-I226_LM",
- "IXGBE_10G-82599_SFP",
- "IXGBE_10G-82599_SFP_SF_QP",
- "IXGBE_10G-82599_T3_LOM",
- "IXGBE_10G-82599_VF",
- "IXGBE_10G-X540T",
- "IXGBE_10G-X540_VF",
- "IXGBE_10G-X550EM_A_SFP",
- "IXGBE_10G-X550EM_X_10G_T",
- "IXGBE_10G-X550EM_X_SFP",
- "IXGBE_10G-X550EM_X_VF",
- "IXGBE_10G-X550T",
- "IXGBE_10G-X550_VF",
- "brcm_57414",
- "brcm_P2100G",
- "cavium_0011",
- "cavium_a034",
- "cavium_a063",
- "cavium_a064",
- "fastlinq_ql41000",
- "fastlinq_ql41000_vf",
- "fastlinq_ql45000",
- "fastlinq_ql45000_vf",
- "hi1822",
- "virtio"
- ]
+ "$ref": "#/$defs/NICs"
},
"ARCH": {
"type": "string",
- "enum": [
- "x86_64",
- "arm64",
- "ppc64le"
- ]
+ "$ref": "#/$defs/node_architectures"
},
"OS": {
"type": "string",
- "enum": [
- "linux"
- ]
+ "$ref": "#/$defs/operating_systems"
},
"cpu": {
"type": "string",
"description": "Native should be the default on x86",
- "enum": [
- "native",
- "armv8a",
- "dpaa2",
- "thunderx",
- "xgene1"
- ]
+ "$refs": "#/$defs/cpus"
},
"compiler": {
"type": "string",
- "enum": [
- "gcc",
- "clang",
- "icc",
- "mscv"
- ]
+ "$ref": "#/$defs/compilers"
},
"build_target": {
"type": "object",
@@ -116,13 +34,7 @@
"properties": {
"arch": {
"type": "string",
- "enum": [
- "ALL",
- "x86_64",
- "arm64",
- "ppc64le",
- "other"
- ]
+ "$ref": "#/$defs/build_target_architectures"
},
"os": {
"$ref": "#/definitions/OS"
@@ -184,11 +96,7 @@
},
"test_suite": {
"type": "string",
- "enum": [
- "hello_world",
- "os_udp",
- "pmd_buffer_scatter"
- ]
+ "$ref": "#/$defs/test_suites"
},
"test_target": {
"type": "object",
@@ -298,13 +206,10 @@
"oneOf": [
{
"type": "object",
- "description": "Scapy traffic generator. Used for functional testing.",
"properties": {
"type": {
"type": "string",
- "enum": [
- "SCAPY"
- ]
+ "$ref": "#/$defs/traffic_generators"
}
}
}