Commit 1d6a2d8d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent f7c6b0ff
...@@ -48,7 +48,7 @@ def eref(ref): ...@@ -48,7 +48,7 @@ def eref(ref):
# iENB is shorthand to request shared instance on ienb. # iENB is shorthand to request shared instance on ienb.
def iENB(ref, kw): def iENB(ref, kw):
return kslap.iENB(ienb, ref, kw) return kslap.iSHARED(ienb, ref, kw)
# Radio Units # Radio Units
...@@ -118,3 +118,34 @@ if 0: # to test 5G ...@@ -118,3 +118,34 @@ if 0: # to test 5G
icell1 = iENB(eref('CELL1'), CELL1) icell1 = iENB(eref('CELL1'), CELL1)
icell2 = iENB(eref('CELL2'), CELL2) icell2 = iENB(eref('CELL2'), CELL2)
# --------
# UEsim
iuesim = kslap.request(kamari,
software_type="ue",
partition_reference="CB5-UE",
filter_kw={"computer_guid": CB5},
partition_parameter_kw={"_": json.dumps({
})})
uRU = copy.deepcopy(RU1)
uRU['cpri_link']['sfp_port'] = 3
uRU['mac_addr'] = '90:A9:F7:C0:00:04'
uCELL = {
'ue_cell_type': 'lte',
'rf_mode': 'fdd',
'dl_earfcn': 300,
'bandwidth': '10 MHz',
'ru': {
'ru_type': 'ru_ref',
'ru_ref': 'CB5-UE.RU',
}
}
kslap.iSHARED(iuesim, 'CB5-UE.RU', uRU)
kslap.iSHARED(iuesim, 'CB5-UE.CELL', uCELL)
...@@ -72,7 +72,7 @@ CELL1_a = { ...@@ -72,7 +72,7 @@ CELL1_a = {
'ru': RU1, # RU definition embedded into CELL 'ru': RU1, # RU definition embedded into CELL
} }
iCELL1_a = kslap.iENB(enb1, 'CELL1_a', CELL1_a) iCELL1_a = kslap.iSHARED(enb1, 'CELL1_a', CELL1_a)
CELL1_b = { CELL1_b = {
...@@ -88,7 +88,7 @@ CELL1_b = { ...@@ -88,7 +88,7 @@ CELL1_b = {
} }
} }
iCELL1_b = kslap.iENB(enb1, 'CELL1_b', CELL1_b) iCELL1_b = kslap.iSHARED(enb1, 'CELL1_b', CELL1_b)
RU2_a = { RU2_a = {
...@@ -116,10 +116,10 @@ RU2_b['cpri_link']['sfp_port'] = 1 ...@@ -116,10 +116,10 @@ RU2_b['cpri_link']['sfp_port'] = 1
RU2_b['tx_gain'] += 10 RU2_b['tx_gain'] += 10
RU2_b['rx_gain'] += 10 RU2_b['rx_gain'] += 10
iRU2_a = kslap.iENB(enb1, 'RU2_a', RU2_a) iRU2_a = kslap.iSHARED(enb1, 'RU2_a', RU2_a)
iRU2_b = kslap.iENB(enb1, 'RU2_b', RU2_b) iRU2_b = kslap.iSHARED(enb1, 'RU2_b', RU2_b)
kslap.iENB(enb1, 'CELL2_a', { kslap.iSHARED(enb1, 'CELL2_a', {
'cell_type': 'lte', 'cell_type': 'lte',
'rf_mode': 'fdd', 'rf_mode': 'fdd',
'bandwidth': '5 MHz', 'bandwidth': '5 MHz',
...@@ -132,7 +132,7 @@ kslap.iENB(enb1, 'CELL2_a', { ...@@ -132,7 +132,7 @@ kslap.iENB(enb1, 'CELL2_a', {
} }
}) })
kslap.iENB(enb1, 'CELL2_b', { kslap.iSHARED(enb1, 'CELL2_b', {
'cell_type': 'nr', 'cell_type': 'nr',
'rf_mode': 'fdd', 'rf_mode': 'fdd',
'bandwidth': 5, 'bandwidth': 5,
......
...@@ -99,15 +99,16 @@ def iSIM(core, sim_n): ...@@ -99,15 +99,16 @@ def iSIM(core, sim_n):
})}) })})
return sim return sim
# iENB adds to enb a shared instance with specified reference and parameters. # iSHARED adds to parent instance a shared instance with specified reference and parameters.
def iENB(enb, ref, kw): def iSHARED(iparent, ref, kw):
enb_ref = ref_of_instance(enb) i_ref = ref_of_instance(iparent)
enb_guid = enb.getInstanceGuid() i_guid = iparent.getInstanceGuid()
enb_sr = enb.getSoftwareRelease() i_sr = iparent.getSoftwareRelease()
ishared = request(enb_sr, i_type = iparent.slap_software_type
software_type="enb", ishared = request(i_sr,
software_type=i_type,
partition_reference=ref, partition_reference=ref,
shared=True, shared=True,
filter_kw={"instance_guid": enb_guid}, filter_kw={"instance_guid": i_guid},
partition_parameter_kw={"_": json.dumps(kw)}) partition_parameter_kw={"_": json.dumps(kw)})
return ishared return ishared
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