Commit 5047099d authored by Joanne Hugé's avatar Joanne Hugé

Update Release Candidate

parents 77cb3afe 6268abe3
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = 8b275dc35fdb169eca6b087bc32a9286 md5sum = fe055b993754ca665b8249cbfb9bbc8b
[template-lte-enb-epc] [template-lte-enb-epc]
_update_hash_filename_ = instance-enb-epc.jinja2.cfg _update_hash_filename_ = instance-enb-epc.jinja2.cfg
...@@ -24,7 +24,7 @@ md5sum = c9994f2ef03edd7d6773307a6385c47c ...@@ -24,7 +24,7 @@ md5sum = c9994f2ef03edd7d6773307a6385c47c
[template-lte-enb] [template-lte-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg _update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = 7f101e9777fb53e06e9138b3be562a68 md5sum = e3c2063efb76759fc6e7600b2e1e2cfb
[template-lte-gnb-epc] [template-lte-gnb-epc]
_update_hash_filename_ = instance-gnb-epc.jinja2.cfg _update_hash_filename_ = instance-gnb-epc.jinja2.cfg
...@@ -36,7 +36,7 @@ md5sum = b17674f523adce9b0dda942c1493674d ...@@ -36,7 +36,7 @@ md5sum = b17674f523adce9b0dda942c1493674d
[template-lte-gnb] [template-lte-gnb]
_update_hash_filename_ = instance-gnb.jinja2.cfg _update_hash_filename_ = instance-gnb.jinja2.cfg
md5sum = 69faf2e00fd0beb906bf11f40a4e4d91 md5sum = 1fefb9b0bf1ce6a93e8f0cb993c2f63d
[template-lte-mme] [template-lte-mme]
_update_hash_filename_ = instance-mme.jinja2.cfg _update_hash_filename_ = instance-mme.jinja2.cfg
...@@ -56,7 +56,7 @@ md5sum = dcaac06553a3222b14c0013a13f4a149 ...@@ -56,7 +56,7 @@ md5sum = dcaac06553a3222b14c0013a13f4a149
[enb.jinja2.cfg] [enb.jinja2.cfg]
filename = config/enb.jinja2.cfg filename = config/enb.jinja2.cfg
md5sum = de256b536ef731f123d9f9a239cdce06 md5sum = 9fd6abb1e69fe59af0dafbb336f24f8d
[sib23.asn] [sib23.asn]
filename = config/sib23.asn filename = config/sib23.asn
...@@ -64,7 +64,7 @@ md5sum = b377dac7f1fcf94fb9ce9ebed617f36a ...@@ -64,7 +64,7 @@ md5sum = b377dac7f1fcf94fb9ce9ebed617f36a
[gnb.jinja2.cfg] [gnb.jinja2.cfg]
filename = config/gnb.jinja2.cfg filename = config/gnb.jinja2.cfg
md5sum = 8d0c56aef8446b4f5b41353f1ee775f6 md5sum = 0ad683812818a02ef5010d087ec7138b
[ltelogs.jinja2.sh] [ltelogs.jinja2.sh]
filename = ltelogs.jinja2.sh filename = ltelogs.jinja2.sh
...@@ -80,15 +80,15 @@ md5sum = 36281b03597252cf75169417d02fc28c ...@@ -80,15 +80,15 @@ md5sum = 36281b03597252cf75169417d02fc28c
[ue-lte.jinja2.cfg] [ue-lte.jinja2.cfg]
filename = config/ue-lte.jinja2.cfg filename = config/ue-lte.jinja2.cfg
md5sum = ee034558efb3e1fad4687fcd2f448872 md5sum = b90ac384eca6fcd4249fbf0b2cf63e1e
[ue-nr.jinja2.cfg] [ue-nr.jinja2.cfg]
filename = config/ue-nr.jinja2.cfg filename = config/ue-nr.jinja2.cfg
md5sum = 2082bcb28d9be653225ce6db46dc236a md5sum = a904db3ba9518ae0edf0ddcccfa57485
[sdr-busy-promise] [sdr-busy-promise]
_update_hash_filename_ = promise/check_sdr_busy.py _update_hash_filename_ = promise/check_sdr_busy.py
md5sum = e5853b4fecae68debcb7b32d3c13368c md5sum = a9d7a06c43410e02070b9ddae7b46b38
[interface-up-promise] [interface-up-promise]
_update_hash_filename_ = promise/check_interface_up.py _update_hash_filename_ = promise/check_interface_up.py
......
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
cipher_algo_pref: [], cipher_algo_pref: [],
integ_algo_pref: [2, 1], integ_algo_pref: [2, 1],
inactivity_timer: 10000, inactivity_timer: {{ slapparameter_dict.get('inactivity_timer', slap_configuration['configuration.default_lte_inactivity_timer']) }},
srb_config: [ srb_config: [
{ {
......
...@@ -577,7 +577,7 @@ ...@@ -577,7 +577,7 @@
cipher_algo_pref: [], cipher_algo_pref: [],
integ_algo_pref: [2, 1], integ_algo_pref: [2, 1],
inactivity_timer: 10000, inactivity_timer: {{ slapparameter_dict.get('inactivity_timer', slap_configuration['configuration.default_nr_inactivity_timer']) }},
#ifndef EPS_FALLBACK #ifndef EPS_FALLBACK
#define EPS_FALLBACK 0 #define EPS_FALLBACK 0
......
...@@ -28,6 +28,12 @@ rf_driver: { ...@@ -28,6 +28,12 @@ rf_driver: {
}], }],
ue_list: [ ue_list: [
{ {
sim_algo: "{{ slapparameter_dict.get('sim_algo', 'milenage') }}",
opc: "{{ slapparameter_dict.get('opc', '') }}",
amf: {{ slapparameter_dict.get('amf', '0x9001') }},
sqn: "{{ slapparameter_dict.get('sqn', '000000000000') }}",
impu: "{{ slapparameter_dict.get('impu', '') }}",
impi: "{{ slapparameter_dict.get('impi', '') }}",
imsi: "{{ slapparameter_dict.get('imsi', slap_configuration['configuration.default_lte_imsi']) }}", imsi: "{{ slapparameter_dict.get('imsi', slap_configuration['configuration.default_lte_imsi']) }}",
K: "{{ slapparameter_dict.get('k', slap_configuration['configuration.default_lte_k']) }}", K: "{{ slapparameter_dict.get('k', slap_configuration['configuration.default_lte_k']) }}",
rue_addr: "{{ slapparameter_dict.get('rue_addr') }}", rue_addr: "{{ slapparameter_dict.get('rue_addr') }}",
......
...@@ -29,6 +29,12 @@ rf_driver: { ...@@ -29,6 +29,12 @@ rf_driver: {
}], }],
ue_list: [ ue_list: [
{ {
sim_algo: "{{ slapparameter_dict.get('sim_algo', 'milenage') }}",
opc: "{{ slapparameter_dict.get('opc', '') }}",
amf: {{ slapparameter_dict.get('amf', '0x9001') }},
sqn: "{{ slapparameter_dict.get('sqn', '000000000000') }}",
impu: "{{ slapparameter_dict.get('impu', '') }}",
impi: "{{ slapparameter_dict.get('impi', '') }}",
imsi: "{{ slapparameter_dict.get('imsi', slap_configuration['configuration.default_nr_imsi']) }}", imsi: "{{ slapparameter_dict.get('imsi', slap_configuration['configuration.default_nr_imsi']) }}",
K: "{{ slapparameter_dict.get('k', slap_configuration['configuration.default_nr_k']) }}", K: "{{ slapparameter_dict.get('k', slap_configuration['configuration.default_nr_k']) }}",
rue_addr: "{{ slapparameter_dict.get('rue_addr') }}", rue_addr: "{{ slapparameter_dict.get('rue_addr') }}",
......
...@@ -108,6 +108,12 @@ ...@@ -108,6 +108,12 @@
"type": "object", "type": "object",
"default": {} "default": {}
}, },
"inactivity_timer": {
"title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.",
"type": "number",
"default": {{ default_lte_inactivity_timer }}
},
"use_ipv4": { "use_ipv4": {
"default": false, "default": false,
"title": "Use IPv4", "title": "Use IPv4",
......
...@@ -36,6 +36,7 @@ configuration.default_lte_band = {{ default_lte_band }} ...@@ -36,6 +36,7 @@ configuration.default_lte_band = {{ default_lte_band }}
configuration.default_lte_n_rb_dl = {{ default_lte_n_rb_dl }} configuration.default_lte_n_rb_dl = {{ default_lte_n_rb_dl }}
configuration.default_lte_tx_gain = {{ default_lte_tx_gain }} configuration.default_lte_tx_gain = {{ default_lte_tx_gain }}
configuration.default_lte_rx_gain = {{ default_lte_rx_gain }} configuration.default_lte_rx_gain = {{ default_lte_rx_gain }}
configuration.default_lte_inactivity_timer = {{ default_lte_inactivity_timer }}
[directory] [directory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
......
...@@ -150,6 +150,12 @@ ...@@ -150,6 +150,12 @@
"type": "object", "type": "object",
"default": {} "default": {}
}, },
"inactivity_timer": {
"title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.",
"type": "number",
"default": {{ default_nr_inactivity_timer }}
},
"use_ipv4": { "use_ipv4": {
"default": false, "default": false,
"title": "Use IPv4", "title": "Use IPv4",
......
...@@ -35,6 +35,7 @@ configuration.default_nr_band = {{ default_nr_band }} ...@@ -35,6 +35,7 @@ configuration.default_nr_band = {{ default_nr_band }}
configuration.default_nr_dl_freq = {{ default_nr_dl_freq }} configuration.default_nr_dl_freq = {{ default_nr_dl_freq }}
configuration.default_nr_bandwidth = {{ default_nr_bandwidth }} configuration.default_nr_bandwidth = {{ default_nr_bandwidth }}
configuration.default_nr_tx_gain = {{ default_nr_tx_gain }} configuration.default_nr_tx_gain = {{ default_nr_tx_gain }}
configuration.default_nr_inactivity_timer = {{ default_nr_inactivity_timer }}
configuration.default_nr_rx_gain = {{ default_nr_rx_gain }} configuration.default_nr_rx_gain = {{ default_nr_rx_gain }}
configuration.default_nr_ssb_pos_bitmap = {{ default_nr_ssb_pos_bitmap }} configuration.default_nr_ssb_pos_bitmap = {{ default_nr_ssb_pos_bitmap }}
......
...@@ -106,6 +106,12 @@ ...@@ -106,6 +106,12 @@
"type": "object", "type": "object",
"default": {} "default": {}
}, },
"inactivity_timer": {
"title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.",
"type": "number",
"default": 10000
},
"use_ipv4": { "use_ipv4": {
"default": false, "default": false,
"title": "Use IPv4", "title": "Use IPv4",
......
...@@ -88,6 +88,12 @@ ...@@ -88,6 +88,12 @@
"type": "object", "type": "object",
"default": {} "default": {}
}, },
"inactivity_timer": {
"title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.",
"type": "number",
"default": 10000
},
"use_ipv4": { "use_ipv4": {
"default": false, "default": false,
"title": "Use IPv4", "title": "Use IPv4",
......
...@@ -148,6 +148,12 @@ ...@@ -148,6 +148,12 @@
"type": "object", "type": "object",
"default": {} "default": {}
}, },
"inactivity_timer": {
"title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.",
"type": "number",
"default": 10000
},
"use_ipv4": { "use_ipv4": {
"default": false, "default": false,
"title": "Use IPv4", "title": "Use IPv4",
......
...@@ -130,6 +130,12 @@ ...@@ -130,6 +130,12 @@
"type": "object", "type": "object",
"default": {} "default": {}
}, },
"inactivity_timer": {
"title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.",
"type": "number",
"default": 10000
},
"use_ipv4": { "use_ipv4": {
"default": false, "default": false,
"title": "Use IPv4", "title": "Use IPv4",
......
...@@ -56,6 +56,42 @@ ...@@ -56,6 +56,42 @@
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).", "description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string", "type": "string",
"default": "00112233445566778899aabbccddeeff" "default": "00112233445566778899aabbccddeeff"
},
"sim_algo": {
"title": "sim_algo",
"description": "Optional enumeration. xor, milenage or tuak (default = milenage). Set the USIM authentication algorithm. Note: test USIM cards use the XOR algorithm.",
"type": "string",
"default": "milenage"
},
"opc": {
"title": "opc",
"description": "Optional string. Operator key preprocessed with the user secret key (as a 16 byte hexadecimal string). When the Milenage authentication algorithm is used, either op or opc must be set.",
"type": "string",
"default": "milenage"
},
"amf": {
"title": "amf",
"description": "Range: 0 to 65535. Set the Authentication Management Field.",
"type": "string",
"default": "0x9001"
},
"sqn": {
"title": "sqn",
"description": "Optional String (6 byte hexadecimal string). Default = '000000000000'. Set the initial sequence number. For the XOR algorithm, the actual value does not matter. For the Milenage or TUAK algorithm, a sequence number resynchronization is initiated if the sequence number does not match the one stored in the USIM.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "Array of string or object. Each string represent an IMPU and can be a sip URI or a telephone number.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "String. Defines user IMPI. Must be fully filled with hostname if necessary.",
"type": "string",
"default": ""
} }
} }
} }
...@@ -68,6 +68,42 @@ ...@@ -68,6 +68,42 @@
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).", "description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string", "type": "string",
"default": "00112233445566778899aabbccddeeff" "default": "00112233445566778899aabbccddeeff"
},
"sim_algo": {
"title": "sim_algo",
"description": "Optional enumeration. xor, milenage or tuak (default = milenage). Set the USIM authentication algorithm. Note: test USIM cards use the XOR algorithm.",
"type": "string",
"default": "milenage"
},
"opc": {
"title": "opc",
"description": "Optional string. Operator key preprocessed with the user secret key (as a 16 byte hexadecimal string). When the Milenage authentication algorithm is used, either op or opc must be set.",
"type": "string",
"default": "milenage"
},
"amf": {
"title": "amf",
"description": "Range: 0 to 65535. Set the Authentication Management Field.",
"type": "string",
"default": "0x9001"
},
"sqn": {
"title": "sqn",
"description": "Optional String (6 byte hexadecimal string). Default = '000000000000'. Set the initial sequence number. For the XOR algorithm, the actual value does not matter. For the Milenage or TUAK algorithm, a sequence number resynchronization is initiated if the sequence number does not match the one stored in the USIM.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "Array of string or object. Each string represent an IMPU and can be a sip URI or a telephone number.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "String. Defines user IMPI. Must be fully filled with hostname if necessary.",
"type": "string",
"default": ""
} }
} }
} }
...@@ -106,6 +106,12 @@ ...@@ -106,6 +106,12 @@
"type": "object", "type": "object",
"default": {} "default": {}
}, },
"inactivity_timer": {
"title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.",
"type": "number",
"default": 10000
},
"use_ipv4": { "use_ipv4": {
"default": false, "default": false,
"title": "Use IPv4", "title": "Use IPv4",
......
...@@ -88,6 +88,12 @@ ...@@ -88,6 +88,12 @@
"type": "object", "type": "object",
"default": {} "default": {}
}, },
"inactivity_timer": {
"title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.",
"type": "number",
"default": 10000
},
"use_ipv4": { "use_ipv4": {
"default": false, "default": false,
"title": "Use IPv4", "title": "Use IPv4",
......
...@@ -148,6 +148,12 @@ ...@@ -148,6 +148,12 @@
"type": "object", "type": "object",
"default": {} "default": {}
}, },
"inactivity_timer": {
"title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.",
"type": "number",
"default": 10000
},
"use_ipv4": { "use_ipv4": {
"default": false, "default": false,
"title": "Use IPv4", "title": "Use IPv4",
......
...@@ -130,6 +130,12 @@ ...@@ -130,6 +130,12 @@
"type": "object", "type": "object",
"default": {} "default": {}
}, },
"inactivity_timer": {
"title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.",
"type": "number",
"default": 10000
},
"use_ipv4": { "use_ipv4": {
"default": false, "default": false,
"title": "Use IPv4", "title": "Use IPv4",
......
...@@ -56,6 +56,42 @@ ...@@ -56,6 +56,42 @@
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).", "description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string", "type": "string",
"default": "00112233445566778899aabbccddeeff" "default": "00112233445566778899aabbccddeeff"
},
"sim_algo": {
"title": "sim_algo",
"description": "Optional enumeration. xor, milenage or tuak (default = milenage). Set the USIM authentication algorithm. Note: test USIM cards use the XOR algorithm.",
"type": "string",
"default": "milenage"
},
"opc": {
"title": "opc",
"description": "Optional string. Operator key preprocessed with the user secret key (as a 16 byte hexadecimal string). When the Milenage authentication algorithm is used, either op or opc must be set.",
"type": "string",
"default": "milenage"
},
"amf": {
"title": "amf",
"description": "Range: 0 to 65535. Set the Authentication Management Field.",
"type": "string",
"default": "0x9001"
},
"sqn": {
"title": "sqn",
"description": "Optional String (6 byte hexadecimal string). Default = '000000000000'. Set the initial sequence number. For the XOR algorithm, the actual value does not matter. For the Milenage or TUAK algorithm, a sequence number resynchronization is initiated if the sequence number does not match the one stored in the USIM.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "Array of string or object. Each string represent an IMPU and can be a sip URI or a telephone number.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "String. Defines user IMPI. Must be fully filled with hostname if necessary.",
"type": "string",
"default": ""
} }
} }
} }
...@@ -68,6 +68,42 @@ ...@@ -68,6 +68,42 @@
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).", "description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string", "type": "string",
"default": "00112233445566778899aabbccddeeff" "default": "00112233445566778899aabbccddeeff"
},
"sim_algo": {
"title": "sim_algo",
"description": "Optional enumeration. xor, milenage or tuak (default = milenage). Set the USIM authentication algorithm. Note: test USIM cards use the XOR algorithm.",
"type": "string",
"default": "milenage"
},
"opc": {
"title": "opc",
"description": "Optional string. Operator key preprocessed with the user secret key (as a 16 byte hexadecimal string). When the Milenage authentication algorithm is used, either op or opc must be set.",
"type": "string",
"default": "milenage"
},
"amf": {
"title": "amf",
"description": "Range: 0 to 65535. Set the Authentication Management Field.",
"type": "string",
"default": "0x9001"
},
"sqn": {
"title": "sqn",
"description": "Optional String (6 byte hexadecimal string). Default = '000000000000'. Set the initial sequence number. For the XOR algorithm, the actual value does not matter. For the Milenage or TUAK algorithm, a sequence number resynchronization is initiated if the sequence number does not match the one stored in the USIM.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "Array of string or object. Each string represent an IMPU and can be a sip URI or a telephone number.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "String. Defines user IMPI. Must be fully filled with hostname if necessary.",
"type": "string",
"default": ""
} }
} }
} }
...@@ -106,6 +106,12 @@ ...@@ -106,6 +106,12 @@
"type": "object", "type": "object",
"default": {} "default": {}
}, },
"inactivity_timer": {
"title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.",
"type": "number",
"default": 10000
},
"use_ipv4": { "use_ipv4": {
"default": false, "default": false,
"title": "Use IPv4", "title": "Use IPv4",
......
...@@ -88,6 +88,12 @@ ...@@ -88,6 +88,12 @@
"type": "object", "type": "object",
"default": {} "default": {}
}, },
"inactivity_timer": {
"title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.",
"type": "number",
"default": 10000
},
"use_ipv4": { "use_ipv4": {
"default": false, "default": false,
"title": "Use IPv4", "title": "Use IPv4",
......
...@@ -148,6 +148,12 @@ ...@@ -148,6 +148,12 @@
"type": "object", "type": "object",
"default": {} "default": {}
}, },
"inactivity_timer": {
"title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.",
"type": "number",
"default": 10000
},
"use_ipv4": { "use_ipv4": {
"default": false, "default": false,
"title": "Use IPv4", "title": "Use IPv4",
......
...@@ -130,6 +130,12 @@ ...@@ -130,6 +130,12 @@
"type": "object", "type": "object",
"default": {} "default": {}
}, },
"inactivity_timer": {
"title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.",
"type": "number",
"default": 10000
},
"use_ipv4": { "use_ipv4": {
"default": false, "default": false,
"title": "Use IPv4", "title": "Use IPv4",
......
...@@ -56,6 +56,42 @@ ...@@ -56,6 +56,42 @@
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).", "description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string", "type": "string",
"default": "00112233445566778899aabbccddeeff" "default": "00112233445566778899aabbccddeeff"
},
"sim_algo": {
"title": "sim_algo",
"description": "Optional enumeration. xor, milenage or tuak (default = milenage). Set the USIM authentication algorithm. Note: test USIM cards use the XOR algorithm.",
"type": "string",
"default": "milenage"
},
"opc": {
"title": "opc",
"description": "Optional string. Operator key preprocessed with the user secret key (as a 16 byte hexadecimal string). When the Milenage authentication algorithm is used, either op or opc must be set.",
"type": "string",
"default": "milenage"
},
"amf": {
"title": "amf",
"description": "Range: 0 to 65535. Set the Authentication Management Field.",
"type": "string",
"default": "0x9001"
},
"sqn": {
"title": "sqn",
"description": "Optional String (6 byte hexadecimal string). Default = '000000000000'. Set the initial sequence number. For the XOR algorithm, the actual value does not matter. For the Milenage or TUAK algorithm, a sequence number resynchronization is initiated if the sequence number does not match the one stored in the USIM.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "Array of string or object. Each string represent an IMPU and can be a sip URI or a telephone number.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "String. Defines user IMPI. Must be fully filled with hostname if necessary.",
"type": "string",
"default": ""
} }
} }
} }
...@@ -68,6 +68,42 @@ ...@@ -68,6 +68,42 @@
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).", "description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string", "type": "string",
"default": "00112233445566778899aabbccddeeff" "default": "00112233445566778899aabbccddeeff"
},
"sim_algo": {
"title": "sim_algo",
"description": "Optional enumeration. xor, milenage or tuak (default = milenage). Set the USIM authentication algorithm. Note: test USIM cards use the XOR algorithm.",
"type": "string",
"default": "milenage"
},
"opc": {
"title": "opc",
"description": "Optional string. Operator key preprocessed with the user secret key (as a 16 byte hexadecimal string). When the Milenage authentication algorithm is used, either op or opc must be set.",
"type": "string",
"default": "milenage"
},
"amf": {
"title": "amf",
"description": "Range: 0 to 65535. Set the Authentication Management Field.",
"type": "string",
"default": "0x9001"
},
"sqn": {
"title": "sqn",
"description": "Optional String (6 byte hexadecimal string). Default = '000000000000'. Set the initial sequence number. For the XOR algorithm, the actual value does not matter. For the Milenage or TUAK algorithm, a sequence number resynchronization is initiated if the sequence number does not match the one stored in the USIM.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "Array of string or object. Each string represent an IMPU and can be a sip URI or a telephone number.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "String. Defines user IMPI. Must be fully filled with hostname if necessary.",
"type": "string",
"default": ""
} }
} }
} }
...@@ -106,6 +106,12 @@ ...@@ -106,6 +106,12 @@
"type": "object", "type": "object",
"default": {} "default": {}
}, },
"inactivity_timer": {
"title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.",
"type": "number",
"default": 10000
},
"use_ipv4": { "use_ipv4": {
"default": false, "default": false,
"title": "Use IPv4", "title": "Use IPv4",
......
...@@ -88,6 +88,12 @@ ...@@ -88,6 +88,12 @@
"type": "object", "type": "object",
"default": {} "default": {}
}, },
"inactivity_timer": {
"title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.",
"type": "number",
"default": 10000
},
"use_ipv4": { "use_ipv4": {
"default": false, "default": false,
"title": "Use IPv4", "title": "Use IPv4",
......
...@@ -148,6 +148,12 @@ ...@@ -148,6 +148,12 @@
"type": "object", "type": "object",
"default": {} "default": {}
}, },
"inactivity_timer": {
"title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.",
"type": "number",
"default": 10000
},
"use_ipv4": { "use_ipv4": {
"default": false, "default": false,
"title": "Use IPv4", "title": "Use IPv4",
......
...@@ -130,6 +130,12 @@ ...@@ -130,6 +130,12 @@
"type": "object", "type": "object",
"default": {} "default": {}
}, },
"inactivity_timer": {
"title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.",
"type": "number",
"default": 10000
},
"use_ipv4": { "use_ipv4": {
"default": false, "default": false,
"title": "Use IPv4", "title": "Use IPv4",
......
...@@ -56,6 +56,42 @@ ...@@ -56,6 +56,42 @@
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).", "description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string", "type": "string",
"default": "00112233445566778899aabbccddeeff" "default": "00112233445566778899aabbccddeeff"
},
"sim_algo": {
"title": "sim_algo",
"description": "Optional enumeration. xor, milenage or tuak (default = milenage). Set the USIM authentication algorithm. Note: test USIM cards use the XOR algorithm.",
"type": "string",
"default": "milenage"
},
"opc": {
"title": "opc",
"description": "Optional string. Operator key preprocessed with the user secret key (as a 16 byte hexadecimal string). When the Milenage authentication algorithm is used, either op or opc must be set.",
"type": "string",
"default": "milenage"
},
"amf": {
"title": "amf",
"description": "Range: 0 to 65535. Set the Authentication Management Field.",
"type": "string",
"default": "0x9001"
},
"sqn": {
"title": "sqn",
"description": "Optional String (6 byte hexadecimal string). Default = '000000000000'. Set the initial sequence number. For the XOR algorithm, the actual value does not matter. For the Milenage or TUAK algorithm, a sequence number resynchronization is initiated if the sequence number does not match the one stored in the USIM.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "Array of string or object. Each string represent an IMPU and can be a sip URI or a telephone number.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "String. Defines user IMPI. Must be fully filled with hostname if necessary.",
"type": "string",
"default": ""
} }
} }
} }
...@@ -68,6 +68,42 @@ ...@@ -68,6 +68,42 @@
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).", "description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string", "type": "string",
"default": "00112233445566778899aabbccddeeff" "default": "00112233445566778899aabbccddeeff"
},
"sim_algo": {
"title": "sim_algo",
"description": "Optional enumeration. xor, milenage or tuak (default = milenage). Set the USIM authentication algorithm. Note: test USIM cards use the XOR algorithm.",
"type": "string",
"default": "milenage"
},
"opc": {
"title": "opc",
"description": "Optional string. Operator key preprocessed with the user secret key (as a 16 byte hexadecimal string). When the Milenage authentication algorithm is used, either op or opc must be set.",
"type": "string",
"default": "milenage"
},
"amf": {
"title": "amf",
"description": "Range: 0 to 65535. Set the Authentication Management Field.",
"type": "string",
"default": "0x9001"
},
"sqn": {
"title": "sqn",
"description": "Optional String (6 byte hexadecimal string). Default = '000000000000'. Set the initial sequence number. For the XOR algorithm, the actual value does not matter. For the Milenage or TUAK algorithm, a sequence number resynchronization is initiated if the sequence number does not match the one stored in the USIM.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "Array of string or object. Each string represent an IMPU and can be a sip URI or a telephone number.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "String. Defines user IMPI. Must be fully filled with hostname if necessary.",
"type": "string",
"default": ""
} }
} }
} }
...@@ -56,6 +56,42 @@ ...@@ -56,6 +56,42 @@
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).", "description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string", "type": "string",
"default": "{{ default_lte_k }}" "default": "{{ default_lte_k }}"
},
"sim_algo": {
"title": "sim_algo",
"description": "Optional enumeration. xor, milenage or tuak (default = milenage). Set the USIM authentication algorithm. Note: test USIM cards use the XOR algorithm.",
"type": "string",
"default": "milenage"
},
"opc": {
"title": "opc",
"description": "Optional string. Operator key preprocessed with the user secret key (as a 16 byte hexadecimal string). When the Milenage authentication algorithm is used, either op or opc must be set.",
"type": "string",
"default": "milenage"
},
"amf": {
"title": "amf",
"description": "Range: 0 to 65535. Set the Authentication Management Field.",
"type": "string",
"default": "0x9001"
},
"sqn": {
"title": "sqn",
"description": "Optional String (6 byte hexadecimal string). Default = '000000000000'. Set the initial sequence number. For the XOR algorithm, the actual value does not matter. For the Milenage or TUAK algorithm, a sequence number resynchronization is initiated if the sequence number does not match the one stored in the USIM.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "Array of string or object. Each string represent an IMPU and can be a sip URI or a telephone number.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "String. Defines user IMPI. Must be fully filled with hostname if necessary.",
"type": "string",
"default": ""
} }
} }
} }
...@@ -68,6 +68,42 @@ ...@@ -68,6 +68,42 @@
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).", "description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string", "type": "string",
"default": "{{ default_nr_k }}" "default": "{{ default_nr_k }}"
},
"sim_algo": {
"title": "sim_algo",
"description": "Optional enumeration. xor, milenage or tuak (default = milenage). Set the USIM authentication algorithm. Note: test USIM cards use the XOR algorithm.",
"type": "string",
"default": "milenage"
},
"opc": {
"title": "opc",
"description": "Optional string. Operator key preprocessed with the user secret key (as a 16 byte hexadecimal string). When the Milenage authentication algorithm is used, either op or opc must be set.",
"type": "string",
"default": "milenage"
},
"amf": {
"title": "amf",
"description": "Range: 0 to 65535. Set the Authentication Management Field.",
"type": "string",
"default": "0x9001"
},
"sqn": {
"title": "sqn",
"description": "Optional String (6 byte hexadecimal string). Default = '000000000000'. Set the initial sequence number. For the XOR algorithm, the actual value does not matter. For the Milenage or TUAK algorithm, a sequence number resynchronization is initiated if the sequence number does not match the one stored in the USIM.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "Array of string or object. Each string represent an IMPU and can be a sip URI or a telephone number.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "String. Defines user IMPI. Must be fully filled with hostname if necessary.",
"type": "string",
"default": ""
} }
} }
} }
...@@ -106,14 +106,15 @@ extra-context = ...@@ -106,14 +106,15 @@ extra-context =
raw ltelogs_template ${ltelogs.jinja2.sh:target} raw ltelogs_template ${ltelogs.jinja2.sh:target}
raw sdr_busy_promise ${sdr-busy-promise:target} raw sdr_busy_promise ${sdr-busy-promise:target}
raw openssl_location ${openssl:location} raw openssl_location ${openssl:location}
raw default_dl_earfcn ${enb:default-dl-earfcn} raw default_dl_earfcn ${default-params:default-dl-earfcn}
raw default_lte_dl_freq ${enb:default-lte-dl-freq} raw default_lte_dl_freq ${default-params:default-lte-dl-freq}
raw default_lte_band ${enb:default-lte-band} raw default_lte_band ${default-params:default-lte-band}
raw default_lte_n_rb_dl ${enb:default-lte-n-rb-dl} raw default_lte_n_rb_dl ${default-params:default-lte-n-rb-dl}
raw default_lte_tx_gain ${enb:default-lte-tx-gain} raw default_lte_tx_gain ${default-params:default-lte-tx-gain}
raw default_lte_rx_gain ${enb:default-lte-rx-gain} raw default_lte_rx_gain ${default-params:default-lte-rx-gain}
raw min_frequency ${enb:min-frequency} raw default_lte_inactivity_timer ${default-params:default-lte-inactivity-timer}
raw max_frequency ${enb:max-frequency} raw min_frequency ${default-params:min-frequency}
raw max_frequency ${default-params:max-frequency}
[dynamic-template-lte-gnb] [dynamic-template-lte-gnb]
< = jinja2-template-base < = jinja2-template-base
...@@ -127,15 +128,16 @@ extra-context = ...@@ -127,15 +128,16 @@ extra-context =
raw ltelogs_template ${ltelogs.jinja2.sh:target} raw ltelogs_template ${ltelogs.jinja2.sh:target}
raw sdr_busy_promise ${sdr-busy-promise:target} raw sdr_busy_promise ${sdr-busy-promise:target}
raw openssl_location ${openssl:location} raw openssl_location ${openssl:location}
raw default_dl_nr_arfcn ${enb:default-dl-nr-arfcn} raw default_dl_nr_arfcn ${default-params:default-dl-nr-arfcn}
raw default_nr_band ${enb:default-nr-band} raw default_nr_band ${default-params:default-nr-band}
raw default_nr_dl_freq ${enb:default-nr-dl-freq} raw default_nr_dl_freq ${default-params:default-nr-dl-freq}
raw default_nr_bandwidth ${enb:default-nr-bandwidth} raw default_nr_bandwidth ${default-params:default-nr-bandwidth}
raw default_nr_tx_gain ${enb:default-nr-tx-gain} raw default_nr_tx_gain ${default-params:default-nr-tx-gain}
raw default_nr_rx_gain ${enb:default-nr-rx-gain} raw default_nr_rx_gain ${default-params:default-nr-rx-gain}
raw default_nr_ssb_pos_bitmap ${enb:default-nr-ssb-pos-bitmap} raw default_nr_ssb_pos_bitmap ${default-params:default-nr-ssb-pos-bitmap}
raw min_frequency ${enb:min-frequency} raw default_nr_inactivity_timer ${default-params:default-nr-inactivity-timer}
raw max_frequency ${enb:max-frequency} raw min_frequency ${default-params:min-frequency}
raw max_frequency ${default-params:max-frequency}
[dynamic-template-lte-mme] [dynamic-template-lte-mme]
< = jinja2-template-base < = jinja2-template-base
...@@ -167,15 +169,15 @@ extra-context = ...@@ -167,15 +169,15 @@ extra-context =
raw ltelogs_template ${ltelogs.jinja2.sh:target} raw ltelogs_template ${ltelogs.jinja2.sh:target}
raw sdr_busy_promise ${sdr-busy-promise:target} raw sdr_busy_promise ${sdr-busy-promise:target}
raw openssl_location ${openssl:location} raw openssl_location ${openssl:location}
raw default_dl_earfcn ${enb:default-dl-earfcn} raw default_dl_earfcn ${default-params:default-dl-earfcn}
raw default_lte_dl_freq ${enb:default-lte-dl-freq} raw default_lte_dl_freq ${default-params:default-lte-dl-freq}
raw default_lte_n_rb_dl ${enb:default-lte-n-rb-dl} raw default_lte_n_rb_dl ${default-params:default-lte-n-rb-dl}
raw default_lte_tx_gain ${enb:default-lte-tx-gain} raw default_lte_tx_gain ${default-params:default-lte-tx-gain}
raw default_lte_rx_gain ${enb:default-lte-rx-gain} raw default_lte_rx_gain ${default-params:default-lte-rx-gain}
raw default_n_antenna_dl ${enb:default-n-antenna-dl} raw default_n_antenna_dl ${default-params:default-n-antenna-dl}
raw default_n_antenna_ul ${enb:default-n-antenna-ul} raw default_n_antenna_ul ${default-params:default-n-antenna-ul}
raw default_lte_imsi ${enb:default-lte-imsi} raw default_lte_imsi ${default-params:default-lte-imsi}
raw default_lte_k ${enb:default-lte-k} raw default_lte_k ${default-params:default-lte-k}
[dynamic-template-lte-ue-nr] [dynamic-template-lte-ue-nr]
< = jinja2-template-base < = jinja2-template-base
...@@ -190,16 +192,16 @@ extra-context = ...@@ -190,16 +192,16 @@ extra-context =
raw ltelogs_template ${ltelogs.jinja2.sh:target} raw ltelogs_template ${ltelogs.jinja2.sh:target}
raw sdr_busy_promise ${sdr-busy-promise:target} raw sdr_busy_promise ${sdr-busy-promise:target}
raw openssl_location ${openssl:location} raw openssl_location ${openssl:location}
raw default_dl_nr_arfcn ${enb:default-dl-nr-arfcn} raw default_dl_nr_arfcn ${default-params:default-dl-nr-arfcn}
raw default_nr_band ${enb:default-nr-band} raw default_nr_band ${default-params:default-nr-band}
raw default_nr_bandwidth ${enb:default-nr-bandwidth} raw default_nr_bandwidth ${default-params:default-nr-bandwidth}
raw default_nr_tx_gain ${enb:default-nr-tx-gain} raw default_nr_tx_gain ${default-params:default-nr-tx-gain}
raw default_nr_rx_gain ${enb:default-nr-rx-gain} raw default_nr_rx_gain ${default-params:default-nr-rx-gain}
raw default_n_antenna_dl ${enb:default-n-antenna-dl} raw default_n_antenna_dl ${default-params:default-n-antenna-dl}
raw default_n_antenna_ul ${enb:default-n-antenna-ul} raw default_n_antenna_ul ${default-params:default-n-antenna-ul}
raw default_nr_imsi ${enb:default-nr-imsi} raw default_nr_imsi ${default-params:default-nr-imsi}
raw default_nr_k ${enb:default-nr-k} raw default_nr_k ${default-params:default-nr-k}
raw default_ssb_nr_arfcn ${enb:default-ssb-nr-arfcn} raw default_ssb_nr_arfcn ${default-params:default-ssb-nr-arfcn}
[ue-db-config] [ue-db-config]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
......
...@@ -27,7 +27,6 @@ class RunPromise(GenericPromise): ...@@ -27,7 +27,6 @@ class RunPromise(GenericPromise):
In this case, check whether the file exists. In this case, check whether the file exists.
""" """
testing = {{ slapparameter_dict.get('testing', False) }}
testing = self.getConfig('testing') == "True" testing = self.getConfig('testing') == "True"
sdr_dev = '/dev/sdr0' sdr_dev = '/dev/sdr0'
......
...@@ -3,138 +3,80 @@ ...@@ -3,138 +3,80 @@
from jinja2 import Template from jinja2 import Template
import os import os
# Values: 6 (1.4 MHz), 15 (3MHz), 25 (5MHz), 50 (10MHz), 75 (15MHz), 100 (20MHz)
LTE_N_RB_DL=100
LTE_TX_GAIN=78
LTE_RX_GAIN=40
LTE_IMSI="001010123456789"
LTE_K="00112233445566778899aabbccddeeff"
NR_BANDWIDTH=40
NR_TX_GAIN=78
NR_RX_GAIN=40
NR_IMSI="001010123456789"
NR_K="00112233445566778899aabbccddeeff"
N_ANTENNA_DL=2
N_ANTENNA_UL=2
global_context = { global_context = {
'generated_file_message': "This file was generated using a jinja2 template and the render-templates script, don't modify directly." 'generated_file_message': "This file was generated using a jinja2 template and the render-templates script, don't modify directly."
} }
rf_mode_context_list = [ rf_mode_context_list = [
{ {
'rf_mode': 'tdd1900', 'rf_mode' : 'tdd1900',
'default_dl_earfcn' : 38350,
'default_dl_earfcn': 38350, 'default_lte_dl_freq' : 1890.0,
'default_lte_dl_freq': 1890.0, 'default_lte_band' : 39,
'default_lte_band': 39, 'default_dl_nr_arfcn' : 378000,
'default_lte_n_rb_dl': LTE_N_RB_DL, 'default_nr_band' : 39,
'default_lte_tx_gain': LTE_TX_GAIN, 'default_nr_dl_freq' : 1890.0,
'default_lte_rx_gain': LTE_RX_GAIN, 'default_nr_ssb_pos_bitmap' : "1000",
'default_lte_imsi': LTE_IMSI, 'default_ssb_nr_arfcn' : 377790,
'default_lte_k': LTE_K, 'min_frequency' : 1880.0,
'max_frequency' : 1920,
'default_dl_nr_arfcn': 378000,
'default_nr_band': 39,
'default_nr_dl_freq': 1890.0,
'default_nr_bandwidth': NR_BANDWIDTH,
'default_nr_tx_gain': NR_TX_GAIN,
'default_nr_rx_gain': NR_RX_GAIN,
'default_nr_ssb_pos_bitmap': "1000",
'default_ssb_nr_arfcn': 377790,
'default_nr_imsi': NR_IMSI,
'default_nr_k': NR_K,
'min_frequency': 1880.0,
'max_frequency': 1920,
'default_n_antenna_dl': N_ANTENNA_DL,
'default_n_antenna_ul': N_ANTENNA_UL,
}, { }, {
'rf_mode': 'tdd2600', 'rf_mode' : 'tdd2600',
'default_dl_earfcn' : 38050,
'default_dl_earfcn': 38050, 'default_lte_dl_freq' : 2600.0,
'default_lte_dl_freq': 2600.0, 'default_lte_band' : 38,
'default_lte_band': 38, 'default_dl_nr_arfcn' : 520000,
'default_lte_n_rb_dl': LTE_N_RB_DL, 'default_nr_band' : 38,
'default_lte_tx_gain': LTE_TX_GAIN, 'default_nr_dl_freq' : 2600.0,
'default_lte_rx_gain': LTE_RX_GAIN, 'default_nr_ssb_pos_bitmap' : "10000000",
'default_lte_imsi': LTE_IMSI, 'default_ssb_nr_arfcn' : 517930,
'default_lte_k': LTE_K, 'min_frequency' : 2570,
'max_frequency' : 2620,
'default_dl_nr_arfcn': 520000,
'default_nr_band': 38,
'default_nr_dl_freq': 2600.0,
'default_nr_bandwidth': NR_BANDWIDTH,
'default_nr_tx_gain': NR_TX_GAIN,
'default_nr_rx_gain': NR_RX_GAIN,
'default_nr_ssb_pos_bitmap': "10000000",
'default_ssb_nr_arfcn': 517930,
'default_nr_imsi': NR_IMSI,
'default_nr_k': NR_K,
'min_frequency': 2570,
'max_frequency': 2620,
'default_n_antenna_dl': N_ANTENNA_DL,
'default_n_antenna_ul': N_ANTENNA_UL,
}, { }, {
'rf_mode': 'tdd3500', 'rf_mode' : 'tdd3500',
'default_dl_earfcn' : 42590,
'default_dl_earfcn': 42590, 'default_lte_dl_freq' : 3500.0,
'default_lte_dl_freq': 3500.0, 'default_lte_band' : 42,
'default_lte_band': 42, 'default_dl_nr_arfcn' : 632628,
'default_lte_n_rb_dl': LTE_N_RB_DL, 'default_nr_band' : 78,
'default_lte_tx_gain': LTE_TX_GAIN, 'default_nr_dl_freq' : 3489.42,
'default_lte_rx_gain': LTE_RX_GAIN, 'default_nr_ssb_pos_bitmap' : "10000000",
'default_lte_imsi': LTE_IMSI, 'default_ssb_nr_arfcn' : 632544,
'default_lte_k': LTE_K, 'min_frequency' : 3400,
'max_frequency' : 3600,
'default_dl_nr_arfcn': 632628,
'default_nr_band': 78,
'default_nr_dl_freq': 3489.42,
'default_nr_bandwidth': NR_BANDWIDTH,
'default_nr_tx_gain': NR_TX_GAIN,
'default_nr_rx_gain': NR_RX_GAIN,
'default_nr_ssb_pos_bitmap': "10000000",
'default_ssb_nr_arfcn': 632544,
'default_nr_imsi': NR_IMSI,
'default_nr_k': NR_K,
'min_frequency': 3400,
'max_frequency': 3600,
'default_n_antenna_dl': N_ANTENNA_DL,
'default_n_antenna_ul': N_ANTENNA_UL,
}, { }, {
'rf_mode': 'tdd3700', 'rf_mode' : 'tdd3700',
'default_dl_earfcn' : 44590,
'default_dl_earfcn': 44590, 'default_lte_dl_freq' : 3700.0,
'default_lte_dl_freq': 3700.0, 'default_lte_band' : 43,
'default_lte_band': 43, 'default_dl_nr_arfcn' : 646666,
'default_lte_n_rb_dl': LTE_N_RB_DL, 'default_nr_band' : 78,
'default_lte_tx_gain': LTE_TX_GAIN, 'default_nr_dl_freq' : 3699.99,
'default_lte_rx_gain': LTE_RX_GAIN, 'default_nr_ssb_pos_bitmap' : "10000000",
'default_lte_imsi': LTE_IMSI, 'default_ssb_nr_arfcn' : 646656,
'default_lte_k': LTE_K, 'min_frequency' : 3600,
'max_frequency' : 3800,
'default_dl_nr_arfcn': 646666,
'default_nr_band': 78,
'default_nr_dl_freq': 3699.99,
'default_nr_bandwidth': NR_BANDWIDTH,
'default_nr_tx_gain': NR_TX_GAIN,
'default_nr_rx_gain': NR_RX_GAIN,
'default_nr_ssb_pos_bitmap': "10000000",
'default_ssb_nr_arfcn': 646656,
'default_nr_imsi': NR_IMSI,
'default_nr_k': NR_K,
'min_frequency': 3600,
'max_frequency': 3800,
'default_n_antenna_dl': N_ANTENNA_DL,
'default_n_antenna_ul': N_ANTENNA_UL,
} }
] ]
for i in range (4):
rf_mode_context_list[i].update({
'default_lte_n_rb_dl' : 100,
'default_lte_tx_gain' : 78,
'default_lte_rx_gain' : 40,
'default_lte_imsi' : "001010123456789",
'default_lte_k' : "00112233445566778899aabbccddeeff",
'default_lte_inactivity_timer' : 10000,
'default_nr_bandwidth' : 40,
'default_nr_tx_gain' : 78,
'default_nr_rx_gain' : 40,
'default_nr_imsi' : "001010123456789",
'default_nr_k' : "00112233445566778899aabbccddeeff",
'default_n_antenna_dl' : 2,
'default_n_antenna_ul' : 2,
'default_nr_inactivity_timer' : 10000,
})
with open('software.cfg.json.jinja2', 'r') as f: with open('software.cfg.json.jinja2', 'r') as f:
software_json_template = Template(f.read()) software_json_template = Template(f.read())
with open('instance-enb-input-schema.json.jinja2', 'r') as f: with open('instance-enb-input-schema.json.jinja2', 'r') as f:
......
...@@ -3,13 +3,14 @@ ...@@ -3,13 +3,14 @@
extends = extends =
software.cfg software.cfg
[enb] [default-params]
default-dl-earfcn = 38350 default-dl-earfcn = 38350
default-lte-dl-freq = 1890.0 default-lte-dl-freq = 1890.0
default-lte-band = 39 default-lte-band = 39
default-lte-n-rb-dl = 100 default-lte-n-rb-dl = 100
default-lte-tx-gain = 78 default-lte-tx-gain = 78
default-lte-rx-gain = 40 default-lte-rx-gain = 40
default-lte-inactivity-timer = 10000
default-lte-imsi = 001010123456789 default-lte-imsi = 001010123456789
default-lte-k = 00112233445566778899aabbccddeeff default-lte-k = 00112233445566778899aabbccddeeff
...@@ -21,6 +22,7 @@ default-nr-tx-gain = 78 ...@@ -21,6 +22,7 @@ default-nr-tx-gain = 78
default-nr-rx-gain = 40 default-nr-rx-gain = 40
default-nr-ssb-pos-bitmap = 1000 default-nr-ssb-pos-bitmap = 1000
default-ssb-nr-arfcn = 377790 default-ssb-nr-arfcn = 377790
default-nr-inactivity-timer = 10000
default-nr-imsi = 001010123456789 default-nr-imsi = 001010123456789
default-nr-k = 00112233445566778899aabbccddeeff default-nr-k = 00112233445566778899aabbccddeeff
......
...@@ -3,13 +3,14 @@ ...@@ -3,13 +3,14 @@
extends = extends =
software.cfg software.cfg
[enb] [default-params]
default-dl-earfcn = 38050 default-dl-earfcn = 38050
default-lte-dl-freq = 2600.0 default-lte-dl-freq = 2600.0
default-lte-band = 38 default-lte-band = 38
default-lte-n-rb-dl = 100 default-lte-n-rb-dl = 100
default-lte-tx-gain = 78 default-lte-tx-gain = 78
default-lte-rx-gain = 40 default-lte-rx-gain = 40
default-lte-inactivity-timer = 10000
default-lte-imsi = 001010123456789 default-lte-imsi = 001010123456789
default-lte-k = 00112233445566778899aabbccddeeff default-lte-k = 00112233445566778899aabbccddeeff
...@@ -21,6 +22,7 @@ default-nr-tx-gain = 78 ...@@ -21,6 +22,7 @@ default-nr-tx-gain = 78
default-nr-rx-gain = 40 default-nr-rx-gain = 40
default-nr-ssb-pos-bitmap = 10000000 default-nr-ssb-pos-bitmap = 10000000
default-ssb-nr-arfcn = 517930 default-ssb-nr-arfcn = 517930
default-nr-inactivity-timer = 10000
default-nr-imsi = 001010123456789 default-nr-imsi = 001010123456789
default-nr-k = 00112233445566778899aabbccddeeff default-nr-k = 00112233445566778899aabbccddeeff
......
...@@ -3,13 +3,14 @@ ...@@ -3,13 +3,14 @@
extends = extends =
software.cfg software.cfg
[enb] [default-params]
default-dl-earfcn = 42590 default-dl-earfcn = 42590
default-lte-dl-freq = 3500.0 default-lte-dl-freq = 3500.0
default-lte-band = 42 default-lte-band = 42
default-lte-n-rb-dl = 100 default-lte-n-rb-dl = 100
default-lte-tx-gain = 78 default-lte-tx-gain = 78
default-lte-rx-gain = 40 default-lte-rx-gain = 40
default-lte-inactivity-timer = 10000
default-lte-imsi = 001010123456789 default-lte-imsi = 001010123456789
default-lte-k = 00112233445566778899aabbccddeeff default-lte-k = 00112233445566778899aabbccddeeff
...@@ -21,6 +22,7 @@ default-nr-tx-gain = 78 ...@@ -21,6 +22,7 @@ default-nr-tx-gain = 78
default-nr-rx-gain = 40 default-nr-rx-gain = 40
default-nr-ssb-pos-bitmap = 10000000 default-nr-ssb-pos-bitmap = 10000000
default-ssb-nr-arfcn = 632544 default-ssb-nr-arfcn = 632544
default-nr-inactivity-timer = 10000
default-nr-imsi = 001010123456789 default-nr-imsi = 001010123456789
default-nr-k = 00112233445566778899aabbccddeeff default-nr-k = 00112233445566778899aabbccddeeff
......
...@@ -3,13 +3,14 @@ ...@@ -3,13 +3,14 @@
extends = extends =
software.cfg software.cfg
[enb] [default-params]
default-dl-earfcn = 44590 default-dl-earfcn = 44590
default-lte-dl-freq = 3700.0 default-lte-dl-freq = 3700.0
default-lte-band = 43 default-lte-band = 43
default-lte-n-rb-dl = 100 default-lte-n-rb-dl = 100
default-lte-tx-gain = 78 default-lte-tx-gain = 78
default-lte-rx-gain = 40 default-lte-rx-gain = 40
default-lte-inactivity-timer = 10000
default-lte-imsi = 001010123456789 default-lte-imsi = 001010123456789
default-lte-k = 00112233445566778899aabbccddeeff default-lte-k = 00112233445566778899aabbccddeeff
...@@ -21,6 +22,7 @@ default-nr-tx-gain = 78 ...@@ -21,6 +22,7 @@ default-nr-tx-gain = 78
default-nr-rx-gain = 40 default-nr-rx-gain = 40
default-nr-ssb-pos-bitmap = 10000000 default-nr-ssb-pos-bitmap = 10000000
default-ssb-nr-arfcn = 646656 default-ssb-nr-arfcn = 646656
default-nr-inactivity-timer = 10000
default-nr-imsi = 001010123456789 default-nr-imsi = 001010123456789
default-nr-k = 00112233445566778899aabbccddeeff default-nr-k = 00112233445566778899aabbccddeeff
......
...@@ -3,13 +3,14 @@ ...@@ -3,13 +3,14 @@
extends = extends =
software.cfg software.cfg
[enb] [default-params]
default-dl-earfcn = {{ default_dl_earfcn }} default-dl-earfcn = {{ default_dl_earfcn }}
default-lte-dl-freq = {{ default_lte_dl_freq }} default-lte-dl-freq = {{ default_lte_dl_freq }}
default-lte-band = {{ default_lte_band }} default-lte-band = {{ default_lte_band }}
default-lte-n-rb-dl = {{ default_lte_n_rb_dl }} default-lte-n-rb-dl = {{ default_lte_n_rb_dl }}
default-lte-tx-gain = {{ default_lte_tx_gain }} default-lte-tx-gain = {{ default_lte_tx_gain }}
default-lte-rx-gain = {{ default_lte_rx_gain }} default-lte-rx-gain = {{ default_lte_rx_gain }}
default-lte-inactivity-timer = {{ default_lte_inactivity_timer }}
default-lte-imsi = {{ default_lte_imsi }} default-lte-imsi = {{ default_lte_imsi }}
default-lte-k = {{ default_lte_k }} default-lte-k = {{ default_lte_k }}
...@@ -21,6 +22,7 @@ default-nr-tx-gain = {{ default_nr_tx_gain }} ...@@ -21,6 +22,7 @@ default-nr-tx-gain = {{ default_nr_tx_gain }}
default-nr-rx-gain = {{ default_nr_rx_gain }} default-nr-rx-gain = {{ default_nr_rx_gain }}
default-nr-ssb-pos-bitmap = {{ default_nr_ssb_pos_bitmap }} default-nr-ssb-pos-bitmap = {{ default_nr_ssb_pos_bitmap }}
default-ssb-nr-arfcn = {{ default_ssb_nr_arfcn }} default-ssb-nr-arfcn = {{ default_ssb_nr_arfcn }}
default-nr-inactivity-timer = {{ default_nr_inactivity_timer }}
default-nr-imsi = {{ default_nr_imsi }} default-nr-imsi = {{ default_nr_imsi }}
default-nr-k = {{ default_nr_k }} default-nr-k = {{ default_nr_k }}
......
...@@ -36,59 +36,69 @@ setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass( ...@@ -36,59 +36,69 @@ setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass(
os.path.abspath( os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', 'software-{{ rf_mode }}.cfg'))) os.path.join(os.path.dirname(__file__), '..', 'software-{{ rf_mode }}.cfg')))
class TestGNBParameters(ORSTestCase): param_dict = {
param_dict = {
'testing': True,
'nssai': {
'1': {'sd': '1', 'sst': '10'},
'2': {'sd': '2', 'sst': '20'},
},
}
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(cls.param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
for p in conf['nr_cell_default']['plmn_list'][0]['nssai']:
for n in "sd sst".split():
self.assertEqual(p[n], self.param_dict['nssai'][p['sd']][n])
class TestGNBParameters(ORSTestCase):
param_dict = {
'testing': True, 'testing': True,
"sim_algo": "milenage",
"imsi": "001010000000331",
"opc": "000102030405060708090A0B0C0D0E0F",
"amf": "0x9001",
"sqn": "000000000000",
"k": "00112233445566778899AABBCCDDEEFF",
"impu": "impu331",
"impi": "impi331@amarisoft.com",
'tx_gain': 17, 'tx_gain': 17,
'rx_gain': 17, 'rx_gain': 17,
'dl_earfcn': 325320,
'n_rb_dl': 50,
'enb_id': "0x17",
'pci': 250,
'mme_list': {
'10.0.0.1': {'mme_addr': '10.0.0.1'},
'2001:db8::1': {'mme_addr': '2001:db8::1'},
},
'epc_plmn': '00102',
'dl_nr_arfcn': 325320, 'dl_nr_arfcn': 325320,
'nr_band': 99, 'nr_band': 99,
'nr_bandwidth': 50, 'nr_bandwidth': 50,
'ssb_nr_arfcn': 377790,
'rue_addr': "192.168.99.88",
'n_antenna_dl': 2,
'n_antenna_ul': 2,
'inactivity_timer': 17,
'gnb_id': "0x17", 'gnb_id': "0x17",
'ssb_pos_bitmap': "10", 'ssb_pos_bitmap': "10",
'pci': 250, 'amf_list': {
'10.0.0.1': {'amf_addr': '10.0.0.1'},
'2001:db8::1': {'amf_addr': '2001:db8::1'},
},
}
enb_param_dict = {
'plmn_list': {
'00101': {'attach_without_pdn': True, 'plmn': '00101', 'reserved': True},
'00102': {'attach_without_pdn': False, 'plmn': '00102', 'reserved': False},
},
}
gnb_param_dict1 = {
'plmn_list': { 'plmn_list': {
'00101': {'plmn': '00101', 'ranac': 1, 'reserved': True, 'tac': 1}, '00101': {'plmn': '00101', 'ranac': 1, 'reserved': True, 'tac': 1},
'00102': {'plmn': '00102', 'ranac': 2, 'reserved': False, 'tac': 2}, '00102': {'plmn': '00102', 'ranac': 2, 'reserved': False, 'tac': 2},
}, },
'amf_list': { }
'10.0.0.1': {'amf_addr': '10.0.0.1'}, gnb_param_dict2 = {
'2001:db8::1': {'amf_addr': '2001:db8::1'}, 'nssai': {
'1': {'sd': 1, 'sst': 10},
'2': {'sd': 2, 'sst': 20},
}, },
} }
enb_param_dict.update(param_dict)
gnb_param_dict1.update(param_dict)
gnb_param_dict2.update(param_dict)
class TestGNBParameters1(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps(cls.param_dict)} return {'_': json.dumps(gnb_param_dict1)}
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return "gnb" return "gnb"
...@@ -99,63 +109,44 @@ class TestGNBParameters(ORSTestCase): ...@@ -99,63 +109,44 @@ class TestGNBParameters(ORSTestCase):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], self.param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain'])
self.assertEqual(conf['rx_gain'], self.param_dict['rx_gain']) self.assertEqual(conf['rx_gain'], gnb_param_dict1['rx_gain'])
self.assertEqual(conf['nr_cell_list'][0]['dl_nr_arfcn'], self.param_dict['dl_nr_arfcn']) self.assertEqual(conf['nr_cell_default']['inactivity_timer'], gnb_param_dict1['inactivity_timer'])
self.assertEqual(conf['nr_cell_list'][0]['band'], self.param_dict['nr_band']) self.assertEqual(conf['nr_cell_list'][0]['dl_nr_arfcn'], gnb_param_dict1['dl_nr_arfcn'])
self.assertEqual(conf['nr_cell_list'][0]['ssb_pos_bitmap'], self.param_dict['ssb_pos_bitmap']) self.assertEqual(conf['nr_cell_list'][0]['band'], gnb_param_dict1['nr_band'])
self.assertEqual(conf['nr_cell_default']['n_id_cell'], self.param_dict['pci']) self.assertEqual(conf['nr_cell_list'][0]['ssb_pos_bitmap'], gnb_param_dict1['ssb_pos_bitmap'])
self.assertEqual(conf['gnb_id'], int(self.param_dict['gnb_id'], 16)) self.assertEqual(conf['nr_cell_default']['n_id_cell'], gnb_param_dict1['pci'])
self.assertEqual(conf['gnb_id'], int(gnb_param_dict1['gnb_id'], 16))
for p in conf['nr_cell_default']['plmn_list']: for p in conf['nr_cell_default']['plmn_list']:
for n in "plmn ranac reserved tac".split(): for n in "plmn ranac reserved tac".split():
self.assertEqual(p[n], self.param_dict['plmn_list'][p['plmn']][n]) self.assertEqual(p[n], gnb_param_dict1['plmn_list'][p['plmn']][n])
for p in conf['amf_list']: for p in conf['amf_list']:
self.assertEqual(p['amf_addr'], self.param_dict['amf_list'][p['amf_addr']]['amf_addr']) self.assertEqual(p['amf_addr'], gnb_param_dict1['amf_list'][p['amf_addr']]['amf_addr'])
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
for l in f: for l in f:
if l.startswith('#define NR_BANDWIDTH'): if l.startswith('#define NR_BANDWIDTH'):
self.assertIn(str(self.param_dict['nr_bandwidth']), l) self.assertIn(str(gnb_param_dict1['nr_bandwidth']), l)
class TestGNBParameters2(ORSTestCase):
enb_param_dict = { @classmethod
'testing': True, def getInstanceParameterDict(cls):
'tx_gain': 17, return {'_': json.dumps(gnb_param_dict2)}
'rx_gain': 17, @classmethod
'dl_earfcn': 325320, def getInstanceSoftwareType(cls):
'n_rb_dl': 50, return "gnb"
'enb_id': "0x17", def test_gnb_conf(self):
'pci': 250,
'plmn_list': {
'00101': {'attach_without_pdn': True, 'plmn': '00101', 'reserved': True},
'00102': {'attach_without_pdn': False, 'plmn': '00102', 'reserved': False},
},
'mme_list': {
'10.0.0.1': {'mme_addr': '10.0.0.1'},
'2001:db8::1': {'mme_addr': '2001:db8::1'},
},
}
epc_param_dict = {
'testing': True,
'epc_plmn': '00102',
}
ue_param_dict = { conf_file = glob.glob(os.path.join(
'testing': True, self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
'tx_gain': 17,
'rx_gain': 17, with open(conf_file, 'r') as f:
'dl_earfcn': 325320, conf = yaml.load(f)
'n_rb_dl': 50,
'dl_nr_arfcn': 325320, for p in conf['nr_cell_default']['plmn_list'][0]['nssai']:
'nr_band': 99, for n in "sd sst".split():
'nr_bandwidth': 50, self.assertEqual(p[n], gnb_param_dict2['nssai'][str(p['sd'])][n])
'ssb_nr_arfcn': 377790,
'imsi': "001010123456789",
'k': "00112233445566778899aabbccddeeff",
'rue_addr': "192.168.99.88",
'n_antenna_dl': 2,
'n_antenna_ul': 2,
}
def test_enb_conf(self): def test_enb_conf(self):
...@@ -166,6 +157,7 @@ def test_enb_conf(self): ...@@ -166,6 +157,7 @@ def test_enb_conf(self):
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain']) self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain'])
self.assertEqual(conf['cell_default']['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn']) self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn'])
self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16)) self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16))
self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci']) self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci'])
...@@ -186,7 +178,7 @@ def test_mme_conf(self): ...@@ -186,7 +178,7 @@ def test_mme_conf(self):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['plmn'], epc_param_dict['epc_plmn']) self.assertEqual(conf['plmn'], param_dict['epc_plmn'])
class TestENBParameters(ORSTestCase): class TestENBParameters(ORSTestCase):
...@@ -203,7 +195,7 @@ class TestEPCParameters(ORSTestCase): ...@@ -203,7 +195,7 @@ class TestEPCParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps(epc_param_dict)} return {'_': json.dumps(param_dict)}
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return "epc" return "epc"
...@@ -215,7 +207,7 @@ class TestENBEPCParameters(ORSTestCase): ...@@ -215,7 +207,7 @@ class TestENBEPCParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return { return {
'_': json.dumps(dict(enb_param_dict, **epc_param_dict)), '_': json.dumps(enb_param_dict),
} }
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
...@@ -225,17 +217,6 @@ class TestENBEPCParameters(ORSTestCase): ...@@ -225,17 +217,6 @@ class TestENBEPCParameters(ORSTestCase):
def test_mme_conf(self): def test_mme_conf(self):
test_mme_conf(self) test_mme_conf(self)
sim_card_param_dict = {
"sim_algo": "milenage",
"imsi": "001010000000331",
"opc": "000102030405060708090A0B0C0D0E0F",
"amf": "0x9001",
"sqn": "000000000000",
"k": "00112233445566778899AABBCCDDEEFF",
"impu": "impu331",
"impi": "impi331@amarisoft.com",
}
def test_ue_db(self): def test_ue_db(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
...@@ -244,16 +225,16 @@ def test_ue_db(self): ...@@ -244,16 +225,16 @@ def test_ue_db(self):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
for n in "sim_algo imsi opc sqn impu impi".split(): for n in "sim_algo imsi opc sqn impu impi".split():
self.assertEqual(conf['ue_db'][0][n], sim_card_param_dict[n]) self.assertEqual(conf['ue_db'][0][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], sim_card_param_dict['k']) self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
self.assertEqual(conf['ue_db'][0]['amf'], int(sim_card_param_dict['amf'], 16)) self.assertEqual(conf['ue_db'][0]['amf'], int(param_dict['amf'], 16))
def requestSlaveInstance(cls, software_type): def requestSlaveInstance(cls, software_type):
software_url = cls.getSoftwareURL() software_url = cls.getSoftwareURL()
return cls.slap.request( return cls.slap.request(
software_release=software_url, software_release=software_url,
partition_reference="SIM-CARD-EPC", partition_reference="SIM-CARD-EPC",
partition_parameter_kw={'_': json.dumps(sim_card_param_dict)}, partition_parameter_kw={'_': json.dumps(param_dict)},
shared=True, shared=True,
software_type=software_type, software_type=software_type,
) )
...@@ -330,7 +311,7 @@ class TestGNBEPCSimCard(ORSTestCase): ...@@ -330,7 +311,7 @@ class TestGNBEPCSimCard(ORSTestCase):
class TestUELTEParameters(ORSTestCase): class TestUELTEParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps(ue_param_dict)} return {'_': json.dumps(param_dict)}
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return "ue-lte" return "ue-lte"
...@@ -340,20 +321,20 @@ class TestUELTEParameters(ORSTestCase): ...@@ -340,20 +321,20 @@ class TestUELTEParameters(ORSTestCase):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], ue_param_dict['dl_earfcn']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], param_dict['dl_earfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], ue_param_dict['n_rb_dl']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], param_dict['n_rb_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], ue_param_dict['n_antenna_dl']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], ue_param_dict['n_antenna_ul']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'],ue_param_dict['rue_addr']) self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], ue_param_dict['imsi']) self.assertEqual(conf['ue_list'][0]['imsi'], param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], ue_param_dict['k']) self.assertEqual(conf['ue_list'][0]['K'], param_dict['k'])
self.assertEqual(conf['tx_gain'], ue_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], ue_param_dict['rx_gain']) self.assertEqual(conf['rx_gain'], param_dict['rx_gain'])
class TestUENRParameters(ORSTestCase): class TestUENRParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps(ue_param_dict)} return {'_': json.dumps(param_dict)}
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return "ue-nr" return "ue-nr"
...@@ -363,15 +344,15 @@ class TestUENRParameters(ORSTestCase): ...@@ -363,15 +344,15 @@ class TestUENRParameters(ORSTestCase):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], ue_param_dict['ssb_nr_arfcn']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], param_dict['ssb_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_nr_arfcn'], ue_param_dict['dl_nr_arfcn']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_nr_arfcn'], param_dict['dl_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], ue_param_dict['nr_bandwidth']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], param_dict['nr_bandwidth'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['band'], ue_param_dict['nr_band']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['band'], param_dict['nr_band'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], ue_param_dict['n_antenna_dl']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], ue_param_dict['n_antenna_ul']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'],ue_param_dict['rue_addr']) self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], ue_param_dict['imsi']) self.assertEqual(conf['ue_list'][0]['imsi'], param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], ue_param_dict['k']) self.assertEqual(conf['ue_list'][0]['K'], param_dict['k'])
self.assertEqual(conf['tx_gain'], ue_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'],ue_param_dict['rx_gain']) self.assertEqual(conf['rx_gain'], param_dict['rx_gain'])
...@@ -36,59 +36,69 @@ setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass( ...@@ -36,59 +36,69 @@ setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass(
os.path.abspath( os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', 'software-tdd1900.cfg'))) os.path.join(os.path.dirname(__file__), '..', 'software-tdd1900.cfg')))
class TestGNBParameters(ORSTestCase): param_dict = {
param_dict = {
'testing': True,
'nssai': {
'1': {'sd': '1', 'sst': '10'},
'2': {'sd': '2', 'sst': '20'},
},
}
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(cls.param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
for p in conf['nr_cell_default']['plmn_list'][0]['nssai']:
for n in "sd sst".split():
self.assertEqual(p[n], self.param_dict['nssai'][p['sd']][n])
class TestGNBParameters(ORSTestCase):
param_dict = {
'testing': True, 'testing': True,
"sim_algo": "milenage",
"imsi": "001010000000331",
"opc": "000102030405060708090A0B0C0D0E0F",
"amf": "0x9001",
"sqn": "000000000000",
"k": "00112233445566778899AABBCCDDEEFF",
"impu": "impu331",
"impi": "impi331@amarisoft.com",
'tx_gain': 17, 'tx_gain': 17,
'rx_gain': 17, 'rx_gain': 17,
'dl_earfcn': 325320,
'n_rb_dl': 50,
'enb_id': "0x17",
'pci': 250,
'mme_list': {
'10.0.0.1': {'mme_addr': '10.0.0.1'},
'2001:db8::1': {'mme_addr': '2001:db8::1'},
},
'epc_plmn': '00102',
'dl_nr_arfcn': 325320, 'dl_nr_arfcn': 325320,
'nr_band': 99, 'nr_band': 99,
'nr_bandwidth': 50, 'nr_bandwidth': 50,
'ssb_nr_arfcn': 377790,
'rue_addr': "192.168.99.88",
'n_antenna_dl': 2,
'n_antenna_ul': 2,
'inactivity_timer': 17,
'gnb_id': "0x17", 'gnb_id': "0x17",
'ssb_pos_bitmap': "10", 'ssb_pos_bitmap': "10",
'pci': 250, 'amf_list': {
'10.0.0.1': {'amf_addr': '10.0.0.1'},
'2001:db8::1': {'amf_addr': '2001:db8::1'},
},
}
enb_param_dict = {
'plmn_list': {
'00101': {'attach_without_pdn': True, 'plmn': '00101', 'reserved': True},
'00102': {'attach_without_pdn': False, 'plmn': '00102', 'reserved': False},
},
}
gnb_param_dict1 = {
'plmn_list': { 'plmn_list': {
'00101': {'plmn': '00101', 'ranac': 1, 'reserved': True, 'tac': 1}, '00101': {'plmn': '00101', 'ranac': 1, 'reserved': True, 'tac': 1},
'00102': {'plmn': '00102', 'ranac': 2, 'reserved': False, 'tac': 2}, '00102': {'plmn': '00102', 'ranac': 2, 'reserved': False, 'tac': 2},
}, },
'amf_list': { }
'10.0.0.1': {'amf_addr': '10.0.0.1'}, gnb_param_dict2 = {
'2001:db8::1': {'amf_addr': '2001:db8::1'}, 'nssai': {
'1': {'sd': 1, 'sst': 10},
'2': {'sd': 2, 'sst': 20},
}, },
} }
enb_param_dict.update(param_dict)
gnb_param_dict1.update(param_dict)
gnb_param_dict2.update(param_dict)
class TestGNBParameters1(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps(cls.param_dict)} return {'_': json.dumps(gnb_param_dict1)}
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return "gnb" return "gnb"
...@@ -99,63 +109,44 @@ class TestGNBParameters(ORSTestCase): ...@@ -99,63 +109,44 @@ class TestGNBParameters(ORSTestCase):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], self.param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain'])
self.assertEqual(conf['rx_gain'], self.param_dict['rx_gain']) self.assertEqual(conf['rx_gain'], gnb_param_dict1['rx_gain'])
self.assertEqual(conf['nr_cell_list'][0]['dl_nr_arfcn'], self.param_dict['dl_nr_arfcn']) self.assertEqual(conf['nr_cell_default']['inactivity_timer'], gnb_param_dict1['inactivity_timer'])
self.assertEqual(conf['nr_cell_list'][0]['band'], self.param_dict['nr_band']) self.assertEqual(conf['nr_cell_list'][0]['dl_nr_arfcn'], gnb_param_dict1['dl_nr_arfcn'])
self.assertEqual(conf['nr_cell_list'][0]['ssb_pos_bitmap'], self.param_dict['ssb_pos_bitmap']) self.assertEqual(conf['nr_cell_list'][0]['band'], gnb_param_dict1['nr_band'])
self.assertEqual(conf['nr_cell_default']['n_id_cell'], self.param_dict['pci']) self.assertEqual(conf['nr_cell_list'][0]['ssb_pos_bitmap'], gnb_param_dict1['ssb_pos_bitmap'])
self.assertEqual(conf['gnb_id'], int(self.param_dict['gnb_id'], 16)) self.assertEqual(conf['nr_cell_default']['n_id_cell'], gnb_param_dict1['pci'])
self.assertEqual(conf['gnb_id'], int(gnb_param_dict1['gnb_id'], 16))
for p in conf['nr_cell_default']['plmn_list']: for p in conf['nr_cell_default']['plmn_list']:
for n in "plmn ranac reserved tac".split(): for n in "plmn ranac reserved tac".split():
self.assertEqual(p[n], self.param_dict['plmn_list'][p['plmn']][n]) self.assertEqual(p[n], gnb_param_dict1['plmn_list'][p['plmn']][n])
for p in conf['amf_list']: for p in conf['amf_list']:
self.assertEqual(p['amf_addr'], self.param_dict['amf_list'][p['amf_addr']]['amf_addr']) self.assertEqual(p['amf_addr'], gnb_param_dict1['amf_list'][p['amf_addr']]['amf_addr'])
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
for l in f: for l in f:
if l.startswith('#define NR_BANDWIDTH'): if l.startswith('#define NR_BANDWIDTH'):
self.assertIn(str(self.param_dict['nr_bandwidth']), l) self.assertIn(str(gnb_param_dict1['nr_bandwidth']), l)
class TestGNBParameters2(ORSTestCase):
enb_param_dict = { @classmethod
'testing': True, def getInstanceParameterDict(cls):
'tx_gain': 17, return {'_': json.dumps(gnb_param_dict2)}
'rx_gain': 17, @classmethod
'dl_earfcn': 325320, def getInstanceSoftwareType(cls):
'n_rb_dl': 50, return "gnb"
'enb_id': "0x17", def test_gnb_conf(self):
'pci': 250,
'plmn_list': {
'00101': {'attach_without_pdn': True, 'plmn': '00101', 'reserved': True},
'00102': {'attach_without_pdn': False, 'plmn': '00102', 'reserved': False},
},
'mme_list': {
'10.0.0.1': {'mme_addr': '10.0.0.1'},
'2001:db8::1': {'mme_addr': '2001:db8::1'},
},
}
epc_param_dict = {
'testing': True,
'epc_plmn': '00102',
}
ue_param_dict = { conf_file = glob.glob(os.path.join(
'testing': True, self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
'tx_gain': 17,
'rx_gain': 17, with open(conf_file, 'r') as f:
'dl_earfcn': 325320, conf = yaml.load(f)
'n_rb_dl': 50,
'dl_nr_arfcn': 325320, for p in conf['nr_cell_default']['plmn_list'][0]['nssai']:
'nr_band': 99, for n in "sd sst".split():
'nr_bandwidth': 50, self.assertEqual(p[n], gnb_param_dict2['nssai'][str(p['sd'])][n])
'ssb_nr_arfcn': 377790,
'imsi': "001010123456789",
'k': "00112233445566778899aabbccddeeff",
'rue_addr': "192.168.99.88",
'n_antenna_dl': 2,
'n_antenna_ul': 2,
}
def test_enb_conf(self): def test_enb_conf(self):
...@@ -166,6 +157,7 @@ def test_enb_conf(self): ...@@ -166,6 +157,7 @@ def test_enb_conf(self):
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain']) self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain'])
self.assertEqual(conf['cell_default']['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn']) self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn'])
self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16)) self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16))
self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci']) self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci'])
...@@ -186,7 +178,7 @@ def test_mme_conf(self): ...@@ -186,7 +178,7 @@ def test_mme_conf(self):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['plmn'], epc_param_dict['epc_plmn']) self.assertEqual(conf['plmn'], param_dict['epc_plmn'])
class TestENBParameters(ORSTestCase): class TestENBParameters(ORSTestCase):
...@@ -203,7 +195,7 @@ class TestEPCParameters(ORSTestCase): ...@@ -203,7 +195,7 @@ class TestEPCParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps(epc_param_dict)} return {'_': json.dumps(param_dict)}
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return "epc" return "epc"
...@@ -215,7 +207,7 @@ class TestENBEPCParameters(ORSTestCase): ...@@ -215,7 +207,7 @@ class TestENBEPCParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return { return {
'_': json.dumps(dict(enb_param_dict, **epc_param_dict)), '_': json.dumps(enb_param_dict),
} }
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
...@@ -225,17 +217,6 @@ class TestENBEPCParameters(ORSTestCase): ...@@ -225,17 +217,6 @@ class TestENBEPCParameters(ORSTestCase):
def test_mme_conf(self): def test_mme_conf(self):
test_mme_conf(self) test_mme_conf(self)
sim_card_param_dict = {
"sim_algo": "milenage",
"imsi": "001010000000331",
"opc": "000102030405060708090A0B0C0D0E0F",
"amf": "0x9001",
"sqn": "000000000000",
"k": "00112233445566778899AABBCCDDEEFF",
"impu": "impu331",
"impi": "impi331@amarisoft.com",
}
def test_ue_db(self): def test_ue_db(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
...@@ -244,16 +225,16 @@ def test_ue_db(self): ...@@ -244,16 +225,16 @@ def test_ue_db(self):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
for n in "sim_algo imsi opc sqn impu impi".split(): for n in "sim_algo imsi opc sqn impu impi".split():
self.assertEqual(conf['ue_db'][0][n], sim_card_param_dict[n]) self.assertEqual(conf['ue_db'][0][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], sim_card_param_dict['k']) self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
self.assertEqual(conf['ue_db'][0]['amf'], int(sim_card_param_dict['amf'], 16)) self.assertEqual(conf['ue_db'][0]['amf'], int(param_dict['amf'], 16))
def requestSlaveInstance(cls, software_type): def requestSlaveInstance(cls, software_type):
software_url = cls.getSoftwareURL() software_url = cls.getSoftwareURL()
return cls.slap.request( return cls.slap.request(
software_release=software_url, software_release=software_url,
partition_reference="SIM-CARD-EPC", partition_reference="SIM-CARD-EPC",
partition_parameter_kw={'_': json.dumps(sim_card_param_dict)}, partition_parameter_kw={'_': json.dumps(param_dict)},
shared=True, shared=True,
software_type=software_type, software_type=software_type,
) )
...@@ -330,7 +311,7 @@ class TestGNBEPCSimCard(ORSTestCase): ...@@ -330,7 +311,7 @@ class TestGNBEPCSimCard(ORSTestCase):
class TestUELTEParameters(ORSTestCase): class TestUELTEParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps(ue_param_dict)} return {'_': json.dumps(param_dict)}
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return "ue-lte" return "ue-lte"
...@@ -340,20 +321,20 @@ class TestUELTEParameters(ORSTestCase): ...@@ -340,20 +321,20 @@ class TestUELTEParameters(ORSTestCase):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], ue_param_dict['dl_earfcn']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], param_dict['dl_earfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], ue_param_dict['n_rb_dl']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], param_dict['n_rb_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], ue_param_dict['n_antenna_dl']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], ue_param_dict['n_antenna_ul']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'],ue_param_dict['rue_addr']) self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], ue_param_dict['imsi']) self.assertEqual(conf['ue_list'][0]['imsi'], param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], ue_param_dict['k']) self.assertEqual(conf['ue_list'][0]['K'], param_dict['k'])
self.assertEqual(conf['tx_gain'], ue_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], ue_param_dict['rx_gain']) self.assertEqual(conf['rx_gain'], param_dict['rx_gain'])
class TestUENRParameters(ORSTestCase): class TestUENRParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps(ue_param_dict)} return {'_': json.dumps(param_dict)}
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return "ue-nr" return "ue-nr"
...@@ -363,15 +344,15 @@ class TestUENRParameters(ORSTestCase): ...@@ -363,15 +344,15 @@ class TestUENRParameters(ORSTestCase):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], ue_param_dict['ssb_nr_arfcn']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], param_dict['ssb_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_nr_arfcn'], ue_param_dict['dl_nr_arfcn']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_nr_arfcn'], param_dict['dl_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], ue_param_dict['nr_bandwidth']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], param_dict['nr_bandwidth'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['band'], ue_param_dict['nr_band']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['band'], param_dict['nr_band'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], ue_param_dict['n_antenna_dl']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], ue_param_dict['n_antenna_ul']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'],ue_param_dict['rue_addr']) self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], ue_param_dict['imsi']) self.assertEqual(conf['ue_list'][0]['imsi'], param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], ue_param_dict['k']) self.assertEqual(conf['ue_list'][0]['K'], param_dict['k'])
self.assertEqual(conf['tx_gain'], ue_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'],ue_param_dict['rx_gain']) self.assertEqual(conf['rx_gain'], param_dict['rx_gain'])
...@@ -36,59 +36,69 @@ setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass( ...@@ -36,59 +36,69 @@ setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass(
os.path.abspath( os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', 'software-tdd2600.cfg'))) os.path.join(os.path.dirname(__file__), '..', 'software-tdd2600.cfg')))
class TestGNBParameters(ORSTestCase): param_dict = {
param_dict = {
'testing': True,
'nssai': {
'1': {'sd': '1', 'sst': '10'},
'2': {'sd': '2', 'sst': '20'},
},
}
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(cls.param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
for p in conf['nr_cell_default']['plmn_list'][0]['nssai']:
for n in "sd sst".split():
self.assertEqual(p[n], self.param_dict['nssai'][p['sd']][n])
class TestGNBParameters(ORSTestCase):
param_dict = {
'testing': True, 'testing': True,
"sim_algo": "milenage",
"imsi": "001010000000331",
"opc": "000102030405060708090A0B0C0D0E0F",
"amf": "0x9001",
"sqn": "000000000000",
"k": "00112233445566778899AABBCCDDEEFF",
"impu": "impu331",
"impi": "impi331@amarisoft.com",
'tx_gain': 17, 'tx_gain': 17,
'rx_gain': 17, 'rx_gain': 17,
'dl_earfcn': 325320,
'n_rb_dl': 50,
'enb_id': "0x17",
'pci': 250,
'mme_list': {
'10.0.0.1': {'mme_addr': '10.0.0.1'},
'2001:db8::1': {'mme_addr': '2001:db8::1'},
},
'epc_plmn': '00102',
'dl_nr_arfcn': 325320, 'dl_nr_arfcn': 325320,
'nr_band': 99, 'nr_band': 99,
'nr_bandwidth': 50, 'nr_bandwidth': 50,
'ssb_nr_arfcn': 377790,
'rue_addr': "192.168.99.88",
'n_antenna_dl': 2,
'n_antenna_ul': 2,
'inactivity_timer': 17,
'gnb_id': "0x17", 'gnb_id': "0x17",
'ssb_pos_bitmap': "10", 'ssb_pos_bitmap': "10",
'pci': 250, 'amf_list': {
'10.0.0.1': {'amf_addr': '10.0.0.1'},
'2001:db8::1': {'amf_addr': '2001:db8::1'},
},
}
enb_param_dict = {
'plmn_list': {
'00101': {'attach_without_pdn': True, 'plmn': '00101', 'reserved': True},
'00102': {'attach_without_pdn': False, 'plmn': '00102', 'reserved': False},
},
}
gnb_param_dict1 = {
'plmn_list': { 'plmn_list': {
'00101': {'plmn': '00101', 'ranac': 1, 'reserved': True, 'tac': 1}, '00101': {'plmn': '00101', 'ranac': 1, 'reserved': True, 'tac': 1},
'00102': {'plmn': '00102', 'ranac': 2, 'reserved': False, 'tac': 2}, '00102': {'plmn': '00102', 'ranac': 2, 'reserved': False, 'tac': 2},
}, },
'amf_list': { }
'10.0.0.1': {'amf_addr': '10.0.0.1'}, gnb_param_dict2 = {
'2001:db8::1': {'amf_addr': '2001:db8::1'}, 'nssai': {
'1': {'sd': 1, 'sst': 10},
'2': {'sd': 2, 'sst': 20},
}, },
} }
enb_param_dict.update(param_dict)
gnb_param_dict1.update(param_dict)
gnb_param_dict2.update(param_dict)
class TestGNBParameters1(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps(cls.param_dict)} return {'_': json.dumps(gnb_param_dict1)}
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return "gnb" return "gnb"
...@@ -99,63 +109,44 @@ class TestGNBParameters(ORSTestCase): ...@@ -99,63 +109,44 @@ class TestGNBParameters(ORSTestCase):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], self.param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain'])
self.assertEqual(conf['rx_gain'], self.param_dict['rx_gain']) self.assertEqual(conf['rx_gain'], gnb_param_dict1['rx_gain'])
self.assertEqual(conf['nr_cell_list'][0]['dl_nr_arfcn'], self.param_dict['dl_nr_arfcn']) self.assertEqual(conf['nr_cell_default']['inactivity_timer'], gnb_param_dict1['inactivity_timer'])
self.assertEqual(conf['nr_cell_list'][0]['band'], self.param_dict['nr_band']) self.assertEqual(conf['nr_cell_list'][0]['dl_nr_arfcn'], gnb_param_dict1['dl_nr_arfcn'])
self.assertEqual(conf['nr_cell_list'][0]['ssb_pos_bitmap'], self.param_dict['ssb_pos_bitmap']) self.assertEqual(conf['nr_cell_list'][0]['band'], gnb_param_dict1['nr_band'])
self.assertEqual(conf['nr_cell_default']['n_id_cell'], self.param_dict['pci']) self.assertEqual(conf['nr_cell_list'][0]['ssb_pos_bitmap'], gnb_param_dict1['ssb_pos_bitmap'])
self.assertEqual(conf['gnb_id'], int(self.param_dict['gnb_id'], 16)) self.assertEqual(conf['nr_cell_default']['n_id_cell'], gnb_param_dict1['pci'])
self.assertEqual(conf['gnb_id'], int(gnb_param_dict1['gnb_id'], 16))
for p in conf['nr_cell_default']['plmn_list']: for p in conf['nr_cell_default']['plmn_list']:
for n in "plmn ranac reserved tac".split(): for n in "plmn ranac reserved tac".split():
self.assertEqual(p[n], self.param_dict['plmn_list'][p['plmn']][n]) self.assertEqual(p[n], gnb_param_dict1['plmn_list'][p['plmn']][n])
for p in conf['amf_list']: for p in conf['amf_list']:
self.assertEqual(p['amf_addr'], self.param_dict['amf_list'][p['amf_addr']]['amf_addr']) self.assertEqual(p['amf_addr'], gnb_param_dict1['amf_list'][p['amf_addr']]['amf_addr'])
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
for l in f: for l in f:
if l.startswith('#define NR_BANDWIDTH'): if l.startswith('#define NR_BANDWIDTH'):
self.assertIn(str(self.param_dict['nr_bandwidth']), l) self.assertIn(str(gnb_param_dict1['nr_bandwidth']), l)
class TestGNBParameters2(ORSTestCase):
enb_param_dict = { @classmethod
'testing': True, def getInstanceParameterDict(cls):
'tx_gain': 17, return {'_': json.dumps(gnb_param_dict2)}
'rx_gain': 17, @classmethod
'dl_earfcn': 325320, def getInstanceSoftwareType(cls):
'n_rb_dl': 50, return "gnb"
'enb_id': "0x17", def test_gnb_conf(self):
'pci': 250,
'plmn_list': {
'00101': {'attach_without_pdn': True, 'plmn': '00101', 'reserved': True},
'00102': {'attach_without_pdn': False, 'plmn': '00102', 'reserved': False},
},
'mme_list': {
'10.0.0.1': {'mme_addr': '10.0.0.1'},
'2001:db8::1': {'mme_addr': '2001:db8::1'},
},
}
epc_param_dict = {
'testing': True,
'epc_plmn': '00102',
}
ue_param_dict = { conf_file = glob.glob(os.path.join(
'testing': True, self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
'tx_gain': 17,
'rx_gain': 17, with open(conf_file, 'r') as f:
'dl_earfcn': 325320, conf = yaml.load(f)
'n_rb_dl': 50,
'dl_nr_arfcn': 325320, for p in conf['nr_cell_default']['plmn_list'][0]['nssai']:
'nr_band': 99, for n in "sd sst".split():
'nr_bandwidth': 50, self.assertEqual(p[n], gnb_param_dict2['nssai'][str(p['sd'])][n])
'ssb_nr_arfcn': 377790,
'imsi': "001010123456789",
'k': "00112233445566778899aabbccddeeff",
'rue_addr': "192.168.99.88",
'n_antenna_dl': 2,
'n_antenna_ul': 2,
}
def test_enb_conf(self): def test_enb_conf(self):
...@@ -166,6 +157,7 @@ def test_enb_conf(self): ...@@ -166,6 +157,7 @@ def test_enb_conf(self):
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain']) self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain'])
self.assertEqual(conf['cell_default']['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn']) self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn'])
self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16)) self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16))
self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci']) self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci'])
...@@ -186,7 +178,7 @@ def test_mme_conf(self): ...@@ -186,7 +178,7 @@ def test_mme_conf(self):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['plmn'], epc_param_dict['epc_plmn']) self.assertEqual(conf['plmn'], param_dict['epc_plmn'])
class TestENBParameters(ORSTestCase): class TestENBParameters(ORSTestCase):
...@@ -203,7 +195,7 @@ class TestEPCParameters(ORSTestCase): ...@@ -203,7 +195,7 @@ class TestEPCParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps(epc_param_dict)} return {'_': json.dumps(param_dict)}
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return "epc" return "epc"
...@@ -215,7 +207,7 @@ class TestENBEPCParameters(ORSTestCase): ...@@ -215,7 +207,7 @@ class TestENBEPCParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return { return {
'_': json.dumps(dict(enb_param_dict, **epc_param_dict)), '_': json.dumps(enb_param_dict),
} }
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
...@@ -225,17 +217,6 @@ class TestENBEPCParameters(ORSTestCase): ...@@ -225,17 +217,6 @@ class TestENBEPCParameters(ORSTestCase):
def test_mme_conf(self): def test_mme_conf(self):
test_mme_conf(self) test_mme_conf(self)
sim_card_param_dict = {
"sim_algo": "milenage",
"imsi": "001010000000331",
"opc": "000102030405060708090A0B0C0D0E0F",
"amf": "0x9001",
"sqn": "000000000000",
"k": "00112233445566778899AABBCCDDEEFF",
"impu": "impu331",
"impi": "impi331@amarisoft.com",
}
def test_ue_db(self): def test_ue_db(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
...@@ -244,16 +225,16 @@ def test_ue_db(self): ...@@ -244,16 +225,16 @@ def test_ue_db(self):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
for n in "sim_algo imsi opc sqn impu impi".split(): for n in "sim_algo imsi opc sqn impu impi".split():
self.assertEqual(conf['ue_db'][0][n], sim_card_param_dict[n]) self.assertEqual(conf['ue_db'][0][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], sim_card_param_dict['k']) self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
self.assertEqual(conf['ue_db'][0]['amf'], int(sim_card_param_dict['amf'], 16)) self.assertEqual(conf['ue_db'][0]['amf'], int(param_dict['amf'], 16))
def requestSlaveInstance(cls, software_type): def requestSlaveInstance(cls, software_type):
software_url = cls.getSoftwareURL() software_url = cls.getSoftwareURL()
return cls.slap.request( return cls.slap.request(
software_release=software_url, software_release=software_url,
partition_reference="SIM-CARD-EPC", partition_reference="SIM-CARD-EPC",
partition_parameter_kw={'_': json.dumps(sim_card_param_dict)}, partition_parameter_kw={'_': json.dumps(param_dict)},
shared=True, shared=True,
software_type=software_type, software_type=software_type,
) )
...@@ -330,7 +311,7 @@ class TestGNBEPCSimCard(ORSTestCase): ...@@ -330,7 +311,7 @@ class TestGNBEPCSimCard(ORSTestCase):
class TestUELTEParameters(ORSTestCase): class TestUELTEParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps(ue_param_dict)} return {'_': json.dumps(param_dict)}
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return "ue-lte" return "ue-lte"
...@@ -340,20 +321,20 @@ class TestUELTEParameters(ORSTestCase): ...@@ -340,20 +321,20 @@ class TestUELTEParameters(ORSTestCase):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], ue_param_dict['dl_earfcn']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], param_dict['dl_earfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], ue_param_dict['n_rb_dl']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], param_dict['n_rb_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], ue_param_dict['n_antenna_dl']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], ue_param_dict['n_antenna_ul']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'],ue_param_dict['rue_addr']) self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], ue_param_dict['imsi']) self.assertEqual(conf['ue_list'][0]['imsi'], param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], ue_param_dict['k']) self.assertEqual(conf['ue_list'][0]['K'], param_dict['k'])
self.assertEqual(conf['tx_gain'], ue_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], ue_param_dict['rx_gain']) self.assertEqual(conf['rx_gain'], param_dict['rx_gain'])
class TestUENRParameters(ORSTestCase): class TestUENRParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps(ue_param_dict)} return {'_': json.dumps(param_dict)}
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return "ue-nr" return "ue-nr"
...@@ -363,15 +344,15 @@ class TestUENRParameters(ORSTestCase): ...@@ -363,15 +344,15 @@ class TestUENRParameters(ORSTestCase):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], ue_param_dict['ssb_nr_arfcn']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], param_dict['ssb_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_nr_arfcn'], ue_param_dict['dl_nr_arfcn']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_nr_arfcn'], param_dict['dl_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], ue_param_dict['nr_bandwidth']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], param_dict['nr_bandwidth'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['band'], ue_param_dict['nr_band']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['band'], param_dict['nr_band'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], ue_param_dict['n_antenna_dl']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], ue_param_dict['n_antenna_ul']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'],ue_param_dict['rue_addr']) self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], ue_param_dict['imsi']) self.assertEqual(conf['ue_list'][0]['imsi'], param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], ue_param_dict['k']) self.assertEqual(conf['ue_list'][0]['K'], param_dict['k'])
self.assertEqual(conf['tx_gain'], ue_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'],ue_param_dict['rx_gain']) self.assertEqual(conf['rx_gain'], param_dict['rx_gain'])
...@@ -36,59 +36,69 @@ setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass( ...@@ -36,59 +36,69 @@ setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass(
os.path.abspath( os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', 'software-tdd3500.cfg'))) os.path.join(os.path.dirname(__file__), '..', 'software-tdd3500.cfg')))
class TestGNBParameters(ORSTestCase): param_dict = {
param_dict = {
'testing': True,
'nssai': {
'1': {'sd': '1', 'sst': '10'},
'2': {'sd': '2', 'sst': '20'},
},
}
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(cls.param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
for p in conf['nr_cell_default']['plmn_list'][0]['nssai']:
for n in "sd sst".split():
self.assertEqual(p[n], self.param_dict['nssai'][p['sd']][n])
class TestGNBParameters(ORSTestCase):
param_dict = {
'testing': True, 'testing': True,
"sim_algo": "milenage",
"imsi": "001010000000331",
"opc": "000102030405060708090A0B0C0D0E0F",
"amf": "0x9001",
"sqn": "000000000000",
"k": "00112233445566778899AABBCCDDEEFF",
"impu": "impu331",
"impi": "impi331@amarisoft.com",
'tx_gain': 17, 'tx_gain': 17,
'rx_gain': 17, 'rx_gain': 17,
'dl_earfcn': 325320,
'n_rb_dl': 50,
'enb_id': "0x17",
'pci': 250,
'mme_list': {
'10.0.0.1': {'mme_addr': '10.0.0.1'},
'2001:db8::1': {'mme_addr': '2001:db8::1'},
},
'epc_plmn': '00102',
'dl_nr_arfcn': 325320, 'dl_nr_arfcn': 325320,
'nr_band': 99, 'nr_band': 99,
'nr_bandwidth': 50, 'nr_bandwidth': 50,
'ssb_nr_arfcn': 377790,
'rue_addr': "192.168.99.88",
'n_antenna_dl': 2,
'n_antenna_ul': 2,
'inactivity_timer': 17,
'gnb_id': "0x17", 'gnb_id': "0x17",
'ssb_pos_bitmap': "10", 'ssb_pos_bitmap': "10",
'pci': 250, 'amf_list': {
'10.0.0.1': {'amf_addr': '10.0.0.1'},
'2001:db8::1': {'amf_addr': '2001:db8::1'},
},
}
enb_param_dict = {
'plmn_list': {
'00101': {'attach_without_pdn': True, 'plmn': '00101', 'reserved': True},
'00102': {'attach_without_pdn': False, 'plmn': '00102', 'reserved': False},
},
}
gnb_param_dict1 = {
'plmn_list': { 'plmn_list': {
'00101': {'plmn': '00101', 'ranac': 1, 'reserved': True, 'tac': 1}, '00101': {'plmn': '00101', 'ranac': 1, 'reserved': True, 'tac': 1},
'00102': {'plmn': '00102', 'ranac': 2, 'reserved': False, 'tac': 2}, '00102': {'plmn': '00102', 'ranac': 2, 'reserved': False, 'tac': 2},
}, },
'amf_list': { }
'10.0.0.1': {'amf_addr': '10.0.0.1'}, gnb_param_dict2 = {
'2001:db8::1': {'amf_addr': '2001:db8::1'}, 'nssai': {
'1': {'sd': 1, 'sst': 10},
'2': {'sd': 2, 'sst': 20},
}, },
} }
enb_param_dict.update(param_dict)
gnb_param_dict1.update(param_dict)
gnb_param_dict2.update(param_dict)
class TestGNBParameters1(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps(cls.param_dict)} return {'_': json.dumps(gnb_param_dict1)}
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return "gnb" return "gnb"
...@@ -99,63 +109,44 @@ class TestGNBParameters(ORSTestCase): ...@@ -99,63 +109,44 @@ class TestGNBParameters(ORSTestCase):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], self.param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain'])
self.assertEqual(conf['rx_gain'], self.param_dict['rx_gain']) self.assertEqual(conf['rx_gain'], gnb_param_dict1['rx_gain'])
self.assertEqual(conf['nr_cell_list'][0]['dl_nr_arfcn'], self.param_dict['dl_nr_arfcn']) self.assertEqual(conf['nr_cell_default']['inactivity_timer'], gnb_param_dict1['inactivity_timer'])
self.assertEqual(conf['nr_cell_list'][0]['band'], self.param_dict['nr_band']) self.assertEqual(conf['nr_cell_list'][0]['dl_nr_arfcn'], gnb_param_dict1['dl_nr_arfcn'])
self.assertEqual(conf['nr_cell_list'][0]['ssb_pos_bitmap'], self.param_dict['ssb_pos_bitmap']) self.assertEqual(conf['nr_cell_list'][0]['band'], gnb_param_dict1['nr_band'])
self.assertEqual(conf['nr_cell_default']['n_id_cell'], self.param_dict['pci']) self.assertEqual(conf['nr_cell_list'][0]['ssb_pos_bitmap'], gnb_param_dict1['ssb_pos_bitmap'])
self.assertEqual(conf['gnb_id'], int(self.param_dict['gnb_id'], 16)) self.assertEqual(conf['nr_cell_default']['n_id_cell'], gnb_param_dict1['pci'])
self.assertEqual(conf['gnb_id'], int(gnb_param_dict1['gnb_id'], 16))
for p in conf['nr_cell_default']['plmn_list']: for p in conf['nr_cell_default']['plmn_list']:
for n in "plmn ranac reserved tac".split(): for n in "plmn ranac reserved tac".split():
self.assertEqual(p[n], self.param_dict['plmn_list'][p['plmn']][n]) self.assertEqual(p[n], gnb_param_dict1['plmn_list'][p['plmn']][n])
for p in conf['amf_list']: for p in conf['amf_list']:
self.assertEqual(p['amf_addr'], self.param_dict['amf_list'][p['amf_addr']]['amf_addr']) self.assertEqual(p['amf_addr'], gnb_param_dict1['amf_list'][p['amf_addr']]['amf_addr'])
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
for l in f: for l in f:
if l.startswith('#define NR_BANDWIDTH'): if l.startswith('#define NR_BANDWIDTH'):
self.assertIn(str(self.param_dict['nr_bandwidth']), l) self.assertIn(str(gnb_param_dict1['nr_bandwidth']), l)
class TestGNBParameters2(ORSTestCase):
enb_param_dict = { @classmethod
'testing': True, def getInstanceParameterDict(cls):
'tx_gain': 17, return {'_': json.dumps(gnb_param_dict2)}
'rx_gain': 17, @classmethod
'dl_earfcn': 325320, def getInstanceSoftwareType(cls):
'n_rb_dl': 50, return "gnb"
'enb_id': "0x17", def test_gnb_conf(self):
'pci': 250,
'plmn_list': {
'00101': {'attach_without_pdn': True, 'plmn': '00101', 'reserved': True},
'00102': {'attach_without_pdn': False, 'plmn': '00102', 'reserved': False},
},
'mme_list': {
'10.0.0.1': {'mme_addr': '10.0.0.1'},
'2001:db8::1': {'mme_addr': '2001:db8::1'},
},
}
epc_param_dict = {
'testing': True,
'epc_plmn': '00102',
}
ue_param_dict = { conf_file = glob.glob(os.path.join(
'testing': True, self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
'tx_gain': 17,
'rx_gain': 17, with open(conf_file, 'r') as f:
'dl_earfcn': 325320, conf = yaml.load(f)
'n_rb_dl': 50,
'dl_nr_arfcn': 325320, for p in conf['nr_cell_default']['plmn_list'][0]['nssai']:
'nr_band': 99, for n in "sd sst".split():
'nr_bandwidth': 50, self.assertEqual(p[n], gnb_param_dict2['nssai'][str(p['sd'])][n])
'ssb_nr_arfcn': 377790,
'imsi': "001010123456789",
'k': "00112233445566778899aabbccddeeff",
'rue_addr': "192.168.99.88",
'n_antenna_dl': 2,
'n_antenna_ul': 2,
}
def test_enb_conf(self): def test_enb_conf(self):
...@@ -166,6 +157,7 @@ def test_enb_conf(self): ...@@ -166,6 +157,7 @@ def test_enb_conf(self):
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain']) self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain'])
self.assertEqual(conf['cell_default']['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn']) self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn'])
self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16)) self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16))
self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci']) self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci'])
...@@ -186,7 +178,7 @@ def test_mme_conf(self): ...@@ -186,7 +178,7 @@ def test_mme_conf(self):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['plmn'], epc_param_dict['epc_plmn']) self.assertEqual(conf['plmn'], param_dict['epc_plmn'])
class TestENBParameters(ORSTestCase): class TestENBParameters(ORSTestCase):
...@@ -203,7 +195,7 @@ class TestEPCParameters(ORSTestCase): ...@@ -203,7 +195,7 @@ class TestEPCParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps(epc_param_dict)} return {'_': json.dumps(param_dict)}
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return "epc" return "epc"
...@@ -215,7 +207,7 @@ class TestENBEPCParameters(ORSTestCase): ...@@ -215,7 +207,7 @@ class TestENBEPCParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return { return {
'_': json.dumps(dict(enb_param_dict, **epc_param_dict)), '_': json.dumps(enb_param_dict),
} }
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
...@@ -225,17 +217,6 @@ class TestENBEPCParameters(ORSTestCase): ...@@ -225,17 +217,6 @@ class TestENBEPCParameters(ORSTestCase):
def test_mme_conf(self): def test_mme_conf(self):
test_mme_conf(self) test_mme_conf(self)
sim_card_param_dict = {
"sim_algo": "milenage",
"imsi": "001010000000331",
"opc": "000102030405060708090A0B0C0D0E0F",
"amf": "0x9001",
"sqn": "000000000000",
"k": "00112233445566778899AABBCCDDEEFF",
"impu": "impu331",
"impi": "impi331@amarisoft.com",
}
def test_ue_db(self): def test_ue_db(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
...@@ -244,16 +225,16 @@ def test_ue_db(self): ...@@ -244,16 +225,16 @@ def test_ue_db(self):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
for n in "sim_algo imsi opc sqn impu impi".split(): for n in "sim_algo imsi opc sqn impu impi".split():
self.assertEqual(conf['ue_db'][0][n], sim_card_param_dict[n]) self.assertEqual(conf['ue_db'][0][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], sim_card_param_dict['k']) self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
self.assertEqual(conf['ue_db'][0]['amf'], int(sim_card_param_dict['amf'], 16)) self.assertEqual(conf['ue_db'][0]['amf'], int(param_dict['amf'], 16))
def requestSlaveInstance(cls, software_type): def requestSlaveInstance(cls, software_type):
software_url = cls.getSoftwareURL() software_url = cls.getSoftwareURL()
return cls.slap.request( return cls.slap.request(
software_release=software_url, software_release=software_url,
partition_reference="SIM-CARD-EPC", partition_reference="SIM-CARD-EPC",
partition_parameter_kw={'_': json.dumps(sim_card_param_dict)}, partition_parameter_kw={'_': json.dumps(param_dict)},
shared=True, shared=True,
software_type=software_type, software_type=software_type,
) )
...@@ -330,7 +311,7 @@ class TestGNBEPCSimCard(ORSTestCase): ...@@ -330,7 +311,7 @@ class TestGNBEPCSimCard(ORSTestCase):
class TestUELTEParameters(ORSTestCase): class TestUELTEParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps(ue_param_dict)} return {'_': json.dumps(param_dict)}
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return "ue-lte" return "ue-lte"
...@@ -340,20 +321,20 @@ class TestUELTEParameters(ORSTestCase): ...@@ -340,20 +321,20 @@ class TestUELTEParameters(ORSTestCase):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], ue_param_dict['dl_earfcn']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], param_dict['dl_earfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], ue_param_dict['n_rb_dl']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], param_dict['n_rb_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], ue_param_dict['n_antenna_dl']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], ue_param_dict['n_antenna_ul']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'],ue_param_dict['rue_addr']) self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], ue_param_dict['imsi']) self.assertEqual(conf['ue_list'][0]['imsi'], param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], ue_param_dict['k']) self.assertEqual(conf['ue_list'][0]['K'], param_dict['k'])
self.assertEqual(conf['tx_gain'], ue_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], ue_param_dict['rx_gain']) self.assertEqual(conf['rx_gain'], param_dict['rx_gain'])
class TestUENRParameters(ORSTestCase): class TestUENRParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps(ue_param_dict)} return {'_': json.dumps(param_dict)}
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return "ue-nr" return "ue-nr"
...@@ -363,15 +344,15 @@ class TestUENRParameters(ORSTestCase): ...@@ -363,15 +344,15 @@ class TestUENRParameters(ORSTestCase):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], ue_param_dict['ssb_nr_arfcn']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], param_dict['ssb_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_nr_arfcn'], ue_param_dict['dl_nr_arfcn']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_nr_arfcn'], param_dict['dl_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], ue_param_dict['nr_bandwidth']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], param_dict['nr_bandwidth'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['band'], ue_param_dict['nr_band']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['band'], param_dict['nr_band'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], ue_param_dict['n_antenna_dl']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], ue_param_dict['n_antenna_ul']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'],ue_param_dict['rue_addr']) self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], ue_param_dict['imsi']) self.assertEqual(conf['ue_list'][0]['imsi'], param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], ue_param_dict['k']) self.assertEqual(conf['ue_list'][0]['K'], param_dict['k'])
self.assertEqual(conf['tx_gain'], ue_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'],ue_param_dict['rx_gain']) self.assertEqual(conf['rx_gain'], param_dict['rx_gain'])
...@@ -36,59 +36,69 @@ setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass( ...@@ -36,59 +36,69 @@ setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass(
os.path.abspath( os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', 'software-tdd3700.cfg'))) os.path.join(os.path.dirname(__file__), '..', 'software-tdd3700.cfg')))
class TestGNBParameters(ORSTestCase): param_dict = {
param_dict = {
'testing': True,
'nssai': {
'1': {'sd': '1', 'sst': '10'},
'2': {'sd': '2', 'sst': '20'},
},
}
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(cls.param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
for p in conf['nr_cell_default']['plmn_list'][0]['nssai']:
for n in "sd sst".split():
self.assertEqual(p[n], self.param_dict['nssai'][p['sd']][n])
class TestGNBParameters(ORSTestCase):
param_dict = {
'testing': True, 'testing': True,
"sim_algo": "milenage",
"imsi": "001010000000331",
"opc": "000102030405060708090A0B0C0D0E0F",
"amf": "0x9001",
"sqn": "000000000000",
"k": "00112233445566778899AABBCCDDEEFF",
"impu": "impu331",
"impi": "impi331@amarisoft.com",
'tx_gain': 17, 'tx_gain': 17,
'rx_gain': 17, 'rx_gain': 17,
'dl_earfcn': 325320,
'n_rb_dl': 50,
'enb_id': "0x17",
'pci': 250,
'mme_list': {
'10.0.0.1': {'mme_addr': '10.0.0.1'},
'2001:db8::1': {'mme_addr': '2001:db8::1'},
},
'epc_plmn': '00102',
'dl_nr_arfcn': 325320, 'dl_nr_arfcn': 325320,
'nr_band': 99, 'nr_band': 99,
'nr_bandwidth': 50, 'nr_bandwidth': 50,
'ssb_nr_arfcn': 377790,
'rue_addr': "192.168.99.88",
'n_antenna_dl': 2,
'n_antenna_ul': 2,
'inactivity_timer': 17,
'gnb_id': "0x17", 'gnb_id': "0x17",
'ssb_pos_bitmap': "10", 'ssb_pos_bitmap': "10",
'pci': 250, 'amf_list': {
'10.0.0.1': {'amf_addr': '10.0.0.1'},
'2001:db8::1': {'amf_addr': '2001:db8::1'},
},
}
enb_param_dict = {
'plmn_list': {
'00101': {'attach_without_pdn': True, 'plmn': '00101', 'reserved': True},
'00102': {'attach_without_pdn': False, 'plmn': '00102', 'reserved': False},
},
}
gnb_param_dict1 = {
'plmn_list': { 'plmn_list': {
'00101': {'plmn': '00101', 'ranac': 1, 'reserved': True, 'tac': 1}, '00101': {'plmn': '00101', 'ranac': 1, 'reserved': True, 'tac': 1},
'00102': {'plmn': '00102', 'ranac': 2, 'reserved': False, 'tac': 2}, '00102': {'plmn': '00102', 'ranac': 2, 'reserved': False, 'tac': 2},
}, },
'amf_list': { }
'10.0.0.1': {'amf_addr': '10.0.0.1'}, gnb_param_dict2 = {
'2001:db8::1': {'amf_addr': '2001:db8::1'}, 'nssai': {
'1': {'sd': 1, 'sst': 10},
'2': {'sd': 2, 'sst': 20},
}, },
} }
enb_param_dict.update(param_dict)
gnb_param_dict1.update(param_dict)
gnb_param_dict2.update(param_dict)
class TestGNBParameters1(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps(cls.param_dict)} return {'_': json.dumps(gnb_param_dict1)}
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return "gnb" return "gnb"
...@@ -99,63 +109,44 @@ class TestGNBParameters(ORSTestCase): ...@@ -99,63 +109,44 @@ class TestGNBParameters(ORSTestCase):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], self.param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain'])
self.assertEqual(conf['rx_gain'], self.param_dict['rx_gain']) self.assertEqual(conf['rx_gain'], gnb_param_dict1['rx_gain'])
self.assertEqual(conf['nr_cell_list'][0]['dl_nr_arfcn'], self.param_dict['dl_nr_arfcn']) self.assertEqual(conf['nr_cell_default']['inactivity_timer'], gnb_param_dict1['inactivity_timer'])
self.assertEqual(conf['nr_cell_list'][0]['band'], self.param_dict['nr_band']) self.assertEqual(conf['nr_cell_list'][0]['dl_nr_arfcn'], gnb_param_dict1['dl_nr_arfcn'])
self.assertEqual(conf['nr_cell_list'][0]['ssb_pos_bitmap'], self.param_dict['ssb_pos_bitmap']) self.assertEqual(conf['nr_cell_list'][0]['band'], gnb_param_dict1['nr_band'])
self.assertEqual(conf['nr_cell_default']['n_id_cell'], self.param_dict['pci']) self.assertEqual(conf['nr_cell_list'][0]['ssb_pos_bitmap'], gnb_param_dict1['ssb_pos_bitmap'])
self.assertEqual(conf['gnb_id'], int(self.param_dict['gnb_id'], 16)) self.assertEqual(conf['nr_cell_default']['n_id_cell'], gnb_param_dict1['pci'])
self.assertEqual(conf['gnb_id'], int(gnb_param_dict1['gnb_id'], 16))
for p in conf['nr_cell_default']['plmn_list']: for p in conf['nr_cell_default']['plmn_list']:
for n in "plmn ranac reserved tac".split(): for n in "plmn ranac reserved tac".split():
self.assertEqual(p[n], self.param_dict['plmn_list'][p['plmn']][n]) self.assertEqual(p[n], gnb_param_dict1['plmn_list'][p['plmn']][n])
for p in conf['amf_list']: for p in conf['amf_list']:
self.assertEqual(p['amf_addr'], self.param_dict['amf_list'][p['amf_addr']]['amf_addr']) self.assertEqual(p['amf_addr'], gnb_param_dict1['amf_list'][p['amf_addr']]['amf_addr'])
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
for l in f: for l in f:
if l.startswith('#define NR_BANDWIDTH'): if l.startswith('#define NR_BANDWIDTH'):
self.assertIn(str(self.param_dict['nr_bandwidth']), l) self.assertIn(str(gnb_param_dict1['nr_bandwidth']), l)
class TestGNBParameters2(ORSTestCase):
enb_param_dict = { @classmethod
'testing': True, def getInstanceParameterDict(cls):
'tx_gain': 17, return {'_': json.dumps(gnb_param_dict2)}
'rx_gain': 17, @classmethod
'dl_earfcn': 325320, def getInstanceSoftwareType(cls):
'n_rb_dl': 50, return "gnb"
'enb_id': "0x17", def test_gnb_conf(self):
'pci': 250,
'plmn_list': {
'00101': {'attach_without_pdn': True, 'plmn': '00101', 'reserved': True},
'00102': {'attach_without_pdn': False, 'plmn': '00102', 'reserved': False},
},
'mme_list': {
'10.0.0.1': {'mme_addr': '10.0.0.1'},
'2001:db8::1': {'mme_addr': '2001:db8::1'},
},
}
epc_param_dict = {
'testing': True,
'epc_plmn': '00102',
}
ue_param_dict = { conf_file = glob.glob(os.path.join(
'testing': True, self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
'tx_gain': 17,
'rx_gain': 17, with open(conf_file, 'r') as f:
'dl_earfcn': 325320, conf = yaml.load(f)
'n_rb_dl': 50,
'dl_nr_arfcn': 325320, for p in conf['nr_cell_default']['plmn_list'][0]['nssai']:
'nr_band': 99, for n in "sd sst".split():
'nr_bandwidth': 50, self.assertEqual(p[n], gnb_param_dict2['nssai'][str(p['sd'])][n])
'ssb_nr_arfcn': 377790,
'imsi': "001010123456789",
'k': "00112233445566778899aabbccddeeff",
'rue_addr': "192.168.99.88",
'n_antenna_dl': 2,
'n_antenna_ul': 2,
}
def test_enb_conf(self): def test_enb_conf(self):
...@@ -166,6 +157,7 @@ def test_enb_conf(self): ...@@ -166,6 +157,7 @@ def test_enb_conf(self):
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain']) self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain'])
self.assertEqual(conf['cell_default']['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn']) self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn'])
self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16)) self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16))
self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci']) self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci'])
...@@ -186,7 +178,7 @@ def test_mme_conf(self): ...@@ -186,7 +178,7 @@ def test_mme_conf(self):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['plmn'], epc_param_dict['epc_plmn']) self.assertEqual(conf['plmn'], param_dict['epc_plmn'])
class TestENBParameters(ORSTestCase): class TestENBParameters(ORSTestCase):
...@@ -203,7 +195,7 @@ class TestEPCParameters(ORSTestCase): ...@@ -203,7 +195,7 @@ class TestEPCParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps(epc_param_dict)} return {'_': json.dumps(param_dict)}
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return "epc" return "epc"
...@@ -215,7 +207,7 @@ class TestENBEPCParameters(ORSTestCase): ...@@ -215,7 +207,7 @@ class TestENBEPCParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return { return {
'_': json.dumps(dict(enb_param_dict, **epc_param_dict)), '_': json.dumps(enb_param_dict),
} }
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
...@@ -225,17 +217,6 @@ class TestENBEPCParameters(ORSTestCase): ...@@ -225,17 +217,6 @@ class TestENBEPCParameters(ORSTestCase):
def test_mme_conf(self): def test_mme_conf(self):
test_mme_conf(self) test_mme_conf(self)
sim_card_param_dict = {
"sim_algo": "milenage",
"imsi": "001010000000331",
"opc": "000102030405060708090A0B0C0D0E0F",
"amf": "0x9001",
"sqn": "000000000000",
"k": "00112233445566778899AABBCCDDEEFF",
"impu": "impu331",
"impi": "impi331@amarisoft.com",
}
def test_ue_db(self): def test_ue_db(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
...@@ -244,16 +225,16 @@ def test_ue_db(self): ...@@ -244,16 +225,16 @@ def test_ue_db(self):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
for n in "sim_algo imsi opc sqn impu impi".split(): for n in "sim_algo imsi opc sqn impu impi".split():
self.assertEqual(conf['ue_db'][0][n], sim_card_param_dict[n]) self.assertEqual(conf['ue_db'][0][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], sim_card_param_dict['k']) self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
self.assertEqual(conf['ue_db'][0]['amf'], int(sim_card_param_dict['amf'], 16)) self.assertEqual(conf['ue_db'][0]['amf'], int(param_dict['amf'], 16))
def requestSlaveInstance(cls, software_type): def requestSlaveInstance(cls, software_type):
software_url = cls.getSoftwareURL() software_url = cls.getSoftwareURL()
return cls.slap.request( return cls.slap.request(
software_release=software_url, software_release=software_url,
partition_reference="SIM-CARD-EPC", partition_reference="SIM-CARD-EPC",
partition_parameter_kw={'_': json.dumps(sim_card_param_dict)}, partition_parameter_kw={'_': json.dumps(param_dict)},
shared=True, shared=True,
software_type=software_type, software_type=software_type,
) )
...@@ -330,7 +311,7 @@ class TestGNBEPCSimCard(ORSTestCase): ...@@ -330,7 +311,7 @@ class TestGNBEPCSimCard(ORSTestCase):
class TestUELTEParameters(ORSTestCase): class TestUELTEParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps(ue_param_dict)} return {'_': json.dumps(param_dict)}
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return "ue-lte" return "ue-lte"
...@@ -340,20 +321,20 @@ class TestUELTEParameters(ORSTestCase): ...@@ -340,20 +321,20 @@ class TestUELTEParameters(ORSTestCase):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], ue_param_dict['dl_earfcn']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], param_dict['dl_earfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], ue_param_dict['n_rb_dl']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], param_dict['n_rb_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], ue_param_dict['n_antenna_dl']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], ue_param_dict['n_antenna_ul']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'],ue_param_dict['rue_addr']) self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], ue_param_dict['imsi']) self.assertEqual(conf['ue_list'][0]['imsi'], param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], ue_param_dict['k']) self.assertEqual(conf['ue_list'][0]['K'], param_dict['k'])
self.assertEqual(conf['tx_gain'], ue_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], ue_param_dict['rx_gain']) self.assertEqual(conf['rx_gain'], param_dict['rx_gain'])
class TestUENRParameters(ORSTestCase): class TestUENRParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps(ue_param_dict)} return {'_': json.dumps(param_dict)}
@classmethod @classmethod
def getInstanceSoftwareType(cls): def getInstanceSoftwareType(cls):
return "ue-nr" return "ue-nr"
...@@ -363,15 +344,15 @@ class TestUENRParameters(ORSTestCase): ...@@ -363,15 +344,15 @@ class TestUENRParameters(ORSTestCase):
with open(conf_file, 'r') as f: with open(conf_file, 'r') as f:
conf = yaml.load(f) conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], ue_param_dict['ssb_nr_arfcn']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], param_dict['ssb_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_nr_arfcn'], ue_param_dict['dl_nr_arfcn']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_nr_arfcn'], param_dict['dl_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], ue_param_dict['nr_bandwidth']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], param_dict['nr_bandwidth'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['band'], ue_param_dict['nr_band']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['band'], param_dict['nr_band'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], ue_param_dict['n_antenna_dl']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], ue_param_dict['n_antenna_ul']) self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'],ue_param_dict['rue_addr']) self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], ue_param_dict['imsi']) self.assertEqual(conf['ue_list'][0]['imsi'], param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], ue_param_dict['k']) self.assertEqual(conf['ue_list'][0]['K'], param_dict['k'])
self.assertEqual(conf['tx_gain'], ue_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'],ue_param_dict['rx_gain']) self.assertEqual(conf['rx_gain'], param_dict['rx_gain'])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment