Commit 69602afe authored by Kirill Smelkov's avatar Kirill Smelkov

software/ors-amarisoft: slapos-render-config: Add peers

We already have peer cells in the setup of generated enb/gnb, but there were no
X2/XN peers there. Add them to be able to see how handling of peers works.

Rendered files change as expected:

```
$ ./pythonwitheggs slapos-render-config.py && xdiff config/{old,out}
```

```diff
diff --git a/config/old/ors/enb/enb.cfg b/config/out/ors/enb/enb.cfg
index 252c2e379..15f3b68e9 100644
--- a/config/old/ors/enb/enb.cfg
+++ b/config/out/ors/enb/enb.cfg
@@ -22,7 +22,7 @@
     },
   ],
   gtp_addr: "127.0.1.1",
-  x2_peers: [],
+  x2_peers: ["44.1.1.1", "44.1.1.2"],
   enb_id: 0x1A2D0,

   // LTE cells
diff --git a/config/old/ors/gnb/enb.cfg b/config/out/ors/gnb/enb.cfg
index b401f3513..ac564db6c 100644
--- a/config/old/ors/gnb/enb.cfg
+++ b/config/out/ors/gnb/enb.cfg
@@ -22,7 +22,7 @@
     },
   ],
   gtp_addr: "127.0.1.1",
-  xn_peers: [],
+  xn_peers: ["55.1.1.1", "55.1.1.2"],
   gnb_id_bits: 28,
   gnb_id: 0x12345,
   en_dc_support: true,
```
parent 1e3e198d
......@@ -81,14 +81,31 @@ def do_enb():
j2render(src, out, json_params % locals())
peer_lte = {
peer_lte1 = {
'peer_type': 'lte',
'x2_addr': '44.1.1.1',
}
peer_lte2 = {
'peer_type': 'lte',
'x2_addr': '44.1.1.2',
}
peer_nr1 = {
'peer_type': 'nr',
'xn_addr': '55.1.1.1',
}
peer_nr2 = {
'peer_type': 'nr',
'xn_addr': '55.1.1.2',
}
peercell_lte = {
'cell_type': 'lte',
'e_cell_id': '0x12345',
'pci': 35,
'dl_earfcn': 700,
'tac': 123,
}
peer_nr = {
peercell_nr = {
'cell_type': 'nr',
'nr_cell_id': '0x77712',
'gnb_id_bits': 22,
......@@ -126,7 +143,8 @@ def do_enb():
}},
"mme_list": {"1": {"mme_addr": "127.0.1.100"}},
'plmn_list': {"1": {'plmn': '00101'}},
"ncell_list": {'1': peer_lte},
"peers": {"1": peer_lte1, "2": peer_lte2},
"ncell_list": {'1': peercell_lte},
})
do('enb.jinja2.cfg', 'ors/gnb/enb.cfg', {
'gnb_id': "0x12345",
......@@ -147,7 +165,8 @@ def do_enb():
}},
"amf_list": {"1": {"amf_addr": "127.0.1.100"}},
"plmn_list_5g": {'1': {'plmn': '00101', 'tac': 100}},
"ncell_list": {'1': peer_nr},
"peers": {"1": peer_nr1, "2": peer_nr2},
"ncell_list": {'1': peercell_nr},
})
# TODO render drb.cfg + sib.asn for all cells
......
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