Commit b7d638e3 authored by Joanne Hugé's avatar Joanne Hugé

ors-amarisoft: fix json formatting and slave description

parent 59ff0e3b
...@@ -112,16 +112,16 @@ with open('software.jinja2.cfg', 'r') as f: ...@@ -112,16 +112,16 @@ with open('software.jinja2.cfg', 'r') as f:
for rf_mode_context in rf_mode_context_list: for rf_mode_context in rf_mode_context_list:
with open('software-{}.cfg.json'.format(rf_mode_context['rf_mode']), with open('software-{}.cfg.json'.format(rf_mode_context['rf_mode']),
'w+') as f: 'w+') as f:
f.write(software_json_template.render(**rf_mode_context, **global_context)) f.write(software_json_template.render(**rf_mode_context, **global_context) + '\n')
with open('software-{}.cfg'.format(rf_mode_context['rf_mode']), with open('software-{}.cfg'.format(rf_mode_context['rf_mode']),
'w+') as f: 'w+') as f:
f.write(software_template.render(**rf_mode_context, **global_context)) f.write(software_template.render(**rf_mode_context, **global_context) + '\n')
for software_type in ['enb', 'enb-epc', 'gnb', 'gnb-epc']: for software_type in ['enb', 'enb-epc', 'gnb', 'gnb-epc']:
with open('instance-{}-{}-input-schema.json'.format( with open('instance-{}-{}-input-schema.json'.format(
rf_mode_context['rf_mode'], rf_mode_context['rf_mode'],
software_type), software_type),
'w+') as f: 'w+') as f:
if software_type in ['enb', 'enb-epc']: if software_type in ['enb', 'enb-epc']:
f.write(instance_enb_json_template.render(**rf_mode_context, **global_context, epc='epc' in software_type)) f.write(instance_enb_json_template.render(**rf_mode_context, **global_context, epc='epc' in software_type) + '\n')
else: else:
f.write(instance_gnb_json_template.render(**rf_mode_context, **global_context, epc='epc' in software_type)) f.write(instance_gnb_json_template.render(**rf_mode_context, **global_context, epc='epc' in software_type) + '\n')
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
"index": 4 "index": 4
}, },
"gnb-epc-slave": { "gnb-epc-slave": {
"title": "Sim Card", "title": "gNB-EPC Sim Card",
"description": "Sim Card Configuration", "description": "gNB-EPC Sim Card Configuration",
"software-type": "gnb-epc", "software-type": "gnb-epc",
"request": "instance-gnb-epc-slave-input-schema.json", "request": "instance-gnb-epc-slave-input-schema.json",
"response": "instance-gnb-epc-slave-schema.json", "response": "instance-gnb-epc-slave-schema.json",
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
"index": 5 "index": 5
}, },
"enb-epc-slave": { "enb-epc-slave": {
"title": "Sim Card", "title": "eNB-EPC Sim Card",
"description": "Sim Card Configuration", "description": "eNB-EPC Sim Card Configuration",
"software-type": "enb-epc", "software-type": "enb-epc",
"request": "instance-enb-epc-slave-input-schema.json", "request": "instance-enb-epc-slave-input-schema.json",
"response": "instance-enb-epc-slave-schema.json", "response": "instance-enb-epc-slave-schema.json",
...@@ -62,8 +62,8 @@ ...@@ -62,8 +62,8 @@
"index": 6 "index": 6
}, },
"epc-slave": { "epc-slave": {
"title": "Sim Card", "title": "EPC Sim Card",
"description": "Sim Card Configuration", "description": "EPC Sim Card Configuration",
"software-type": "epc", "software-type": "epc",
"request": "instance-epc-slave-input-schema.json", "request": "instance-epc-slave-input-schema.json",
"response": "instance-epc-slave-schema.json", "response": "instance-epc-slave-schema.json",
......
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
"index": 4 "index": 4
}, },
"gnb-epc-slave": { "gnb-epc-slave": {
"title": "Sim Card", "title": "gNB-EPC Sim Card",
"description": "Sim Card Configuration", "description": "gNB-EPC Sim Card Configuration",
"software-type": "gnb-epc", "software-type": "gnb-epc",
"request": "instance-gnb-epc-slave-input-schema.json", "request": "instance-gnb-epc-slave-input-schema.json",
"response": "instance-gnb-epc-slave-schema.json", "response": "instance-gnb-epc-slave-schema.json",
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
"index": 5 "index": 5
}, },
"enb-epc-slave": { "enb-epc-slave": {
"title": "Sim Card", "title": "eNB-EPC Sim Card",
"description": "Sim Card Configuration", "description": "eNB-EPC Sim Card Configuration",
"software-type": "enb-epc", "software-type": "enb-epc",
"request": "instance-enb-epc-slave-input-schema.json", "request": "instance-enb-epc-slave-input-schema.json",
"response": "instance-enb-epc-slave-schema.json", "response": "instance-enb-epc-slave-schema.json",
...@@ -62,8 +62,8 @@ ...@@ -62,8 +62,8 @@
"index": 6 "index": 6
}, },
"epc-slave": { "epc-slave": {
"title": "Sim Card", "title": "EPC Sim Card",
"description": "Sim Card Configuration", "description": "EPC Sim Card Configuration",
"software-type": "epc", "software-type": "epc",
"request": "instance-epc-slave-input-schema.json", "request": "instance-epc-slave-input-schema.json",
"response": "instance-epc-slave-schema.json", "response": "instance-epc-slave-schema.json",
......
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
"index": 4 "index": 4
}, },
"gnb-epc-slave": { "gnb-epc-slave": {
"title": "Sim Card", "title": "gNB-EPC Sim Card",
"description": "Sim Card Configuration", "description": "gNB-EPC Sim Card Configuration",
"software-type": "gnb-epc", "software-type": "gnb-epc",
"request": "instance-gnb-epc-slave-input-schema.json", "request": "instance-gnb-epc-slave-input-schema.json",
"response": "instance-gnb-epc-slave-schema.json", "response": "instance-gnb-epc-slave-schema.json",
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
"index": 5 "index": 5
}, },
"enb-epc-slave": { "enb-epc-slave": {
"title": "Sim Card", "title": "eNB-EPC Sim Card",
"description": "Sim Card Configuration", "description": "eNB-EPC Sim Card Configuration",
"software-type": "enb-epc", "software-type": "enb-epc",
"request": "instance-enb-epc-slave-input-schema.json", "request": "instance-enb-epc-slave-input-schema.json",
"response": "instance-enb-epc-slave-schema.json", "response": "instance-enb-epc-slave-schema.json",
...@@ -62,8 +62,8 @@ ...@@ -62,8 +62,8 @@
"index": 6 "index": 6
}, },
"epc-slave": { "epc-slave": {
"title": "Sim Card", "title": "EPC Sim Card",
"description": "Sim Card Configuration", "description": "EPC Sim Card Configuration",
"software-type": "epc", "software-type": "epc",
"request": "instance-epc-slave-input-schema.json", "request": "instance-epc-slave-input-schema.json",
"response": "instance-epc-slave-schema.json", "response": "instance-epc-slave-schema.json",
......
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
"index": 4 "index": 4
}, },
"gnb-epc-slave": { "gnb-epc-slave": {
"title": "Sim Card", "title": "gNB-EPC Sim Card",
"description": "Sim Card Configuration", "description": "gNB-EPC Sim Card Configuration",
"software-type": "gnb-epc", "software-type": "gnb-epc",
"request": "instance-gnb-epc-slave-input-schema.json", "request": "instance-gnb-epc-slave-input-schema.json",
"response": "instance-gnb-epc-slave-schema.json", "response": "instance-gnb-epc-slave-schema.json",
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
"index": 5 "index": 5
}, },
"enb-epc-slave": { "enb-epc-slave": {
"title": "Sim Card", "title": "eNB-EPC Sim Card",
"description": "Sim Card Configuration", "description": "eNB-EPC Sim Card Configuration",
"software-type": "enb-epc", "software-type": "enb-epc",
"request": "instance-enb-epc-slave-input-schema.json", "request": "instance-enb-epc-slave-input-schema.json",
"response": "instance-enb-epc-slave-schema.json", "response": "instance-enb-epc-slave-schema.json",
...@@ -62,8 +62,8 @@ ...@@ -62,8 +62,8 @@
"index": 6 "index": 6
}, },
"epc-slave": { "epc-slave": {
"title": "Sim Card", "title": "EPC Sim Card",
"description": "Sim Card Configuration", "description": "EPC Sim Card Configuration",
"software-type": "epc", "software-type": "epc",
"request": "instance-epc-slave-input-schema.json", "request": "instance-epc-slave-input-schema.json",
"response": "instance-epc-slave-schema.json", "response": "instance-epc-slave-schema.json",
......
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
"index": 4 "index": 4
}, },
"gnb-epc-slave": { "gnb-epc-slave": {
"title": "Sim Card", "title": "gNB-EPC Sim Card",
"description": "Sim Card Configuration", "description": "gNB-EPC Sim Card Configuration",
"software-type": "gnb-epc", "software-type": "gnb-epc",
"request": "instance-gnb-epc-slave-input-schema.json", "request": "instance-gnb-epc-slave-input-schema.json",
"response": "instance-gnb-epc-slave-schema.json", "response": "instance-gnb-epc-slave-schema.json",
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
"index": 5 "index": 5
}, },
"enb-epc-slave": { "enb-epc-slave": {
"title": "Sim Card", "title": "eNB-EPC Sim Card",
"description": "Sim Card Configuration", "description": "eNB-EPC Sim Card Configuration",
"software-type": "enb-epc", "software-type": "enb-epc",
"request": "instance-enb-epc-slave-input-schema.json", "request": "instance-enb-epc-slave-input-schema.json",
"response": "instance-enb-epc-slave-schema.json", "response": "instance-enb-epc-slave-schema.json",
...@@ -62,8 +62,8 @@ ...@@ -62,8 +62,8 @@
"index": 6 "index": 6
}, },
"epc-slave": { "epc-slave": {
"title": "Sim Card", "title": "EPC Sim Card",
"description": "Sim Card Configuration", "description": "EPC Sim Card Configuration",
"software-type": "epc", "software-type": "epc",
"request": "instance-epc-slave-input-schema.json", "request": "instance-epc-slave-input-schema.json",
"response": "instance-epc-slave-schema.json", "response": "instance-epc-slave-schema.json",
......
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