diff options
24 files changed, 2813 insertions, 301 deletions
diff --git a/ransim/docker/config/db/ransim_schema.sql b/ransim/docker/config/db/ransim_schema.sql index ecb9687..cb07932 100644 --- a/ransim/docker/config/db/ransim_schema.sql +++ b/ransim/docker/config/db/ransim_schema.sql @@ -3,11 +3,13 @@ CREATE SCHEMA IF NOT EXISTS `ransim_db` DEFAULT CHARACTER SET utf8; USE `ransim_db`; grant all privileges on ransim_db.* TO 'uroot'@'%' identified by 'psecret'; flush privileges; + drop table if exists nearrtric; drop table if exists gnbcucpfunction; drop table if exists gnbcuupfunction; drop table if exists gnbdufunction; drop table if exists nrcellcu; +drop table if exists nrcellrelation; drop table if exists nrcelldu; drop table if exists raninventory; drop table if exists rrmpolicyratio; @@ -131,8 +133,24 @@ create table nrcelldu ( operationalstate varchar(255), gnbduid integer, prb integer, + latitude numeric(17,15), + longitude numeric(17,15), + network_id varchar(255), primary key (celllocalid) ) engine = InnoDB; + +-- ----------------------------------------------------- +-- Table `ransim_db`.`nrcellrelation` +-- ----------------------------------------------------- +create table nrcellrelation ( + sno integer not null, + idnrcellrelation integer not null, + nrtci integer, + ishoallowed BOOLEAN, + celllocalid integer not null, + primary key (sno) +) engine = InnoDB; + -- ----------------------------------------------------- -- Table `ransim_db`.`raninventory` -- ----------------------------------------------------- @@ -261,126 +279,231 @@ INSERT INTO gnbdufunction(gnbduid,gnbduname, gnbid, gnbidlength, nftype, plmnid, INSERT INTO gnbdufunction(gnbduid,gnbduname, gnbid, gnbidlength, nftype, plmnid, nearrtricid) VALUES(660,'gnduserver6', 25, 25, 'DU', '310-410', 22); --nrcellcu -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(15289,'RRC Connected Users','cucpserver1'); - -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(15290,'RRC Connected Users','cucpserver1'); - -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(15296,'RRC Connected Users','cucpserver1'); - -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(15687,'RRC Connected Users','cucpserver1'); - -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(15689,'RRC Connected Users','cucpserver1'); - -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(15155,'RRC Connected Users','cucpserver1'); - -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(15174,'RRC Connected Users','cucpserver1'); - -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(15175,'RRC Connected Users','cucpserver1'); - -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(15176,'RRC Connected Users','cucpserver1'); - -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(15825,'RRC Connected Users','cucpserver1'); - -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(15826,'RRC Connected Users','cucpserver1'); - -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(15425,'RRC Connected Users','cucpserver1'); +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(15289,'RRC Connected Users','cucpserver1'); -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(15426,'RRC Connected Users','cucpserver1'); +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(15290,'RRC Connected Users','cucpserver1'); -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(13999,'RRC Connected Users','cucpserver1'); +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(15296,'RRC Connected Users','cucpserver1'); -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(14000,'RRC Connected Users','cucpserver1'); +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(15687,'RRC Connected Users','cucpserver1'); -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(11561,'RRC Connected Users','cucpserver2'); +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(15689,'RRC Connected Users','cucpserver1'); -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(11562,'RRC Connected Users','cucpserver2'); +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(15155,'RRC Connected Users','cucpserver1'); -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(11568,'RRC Connected Users','cucpserver2'); +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(15174,'RRC Connected Users','cucpserver1'); -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(11569,'RRC Connected Users','cucpserver2'); +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(15175,'RRC Connected Users','cucpserver1'); -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(10896,'RRC Connected Users','cucpserver2'); +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(15176,'RRC Connected Users','cucpserver1'); -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(10897,'RRC Connected Users','cucpserver2'); +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(15825,'RRC Connected Users','cucpserver1'); -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(14655,'RRC Connected Users','cucpserver2'); +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(15826,'RRC Connected Users','cucpserver1'); -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(14656,'RRC Connected Users','cucpserver2'); +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(15425,'RRC Connected Users','cucpserver1'); -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(13905,'RRC Connected Users','cucpserver2'); +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(15426,'RRC Connected Users','cucpserver1'); -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(13910,'RRC Connected Users','cucpserver2'); +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(13999,'RRC Connected Users','cucpserver1'); -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(15360,'RRC Connected Users','cucpserver2'); +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(14000,'RRC Connected Users','cucpserver1'); -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(15361,'RRC Connected Users','cucpserver2'); +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(11561,'RRC Connected Users','cucpserver2'); -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(15548,'RRC Connected Users','cucpserver2'); +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(11562,'RRC Connected Users','cucpserver2'); -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(15549,'RRC Connected Users','cucpserver2'); +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(11568,'RRC Connected Users','cucpserver2'); -INSERT INTO nrcellcu(celllocalId,resourcetype,gnbcuname) VALUES(14427,'RRC Connected Users','cucpserver2'); +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(11569,'RRC Connected Users','cucpserver2'); +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(10896,'RRC Connected Users','cucpserver2'); + +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(10897,'RRC Connected Users','cucpserver2'); + +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(14655,'RRC Connected Users','cucpserver2'); + +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(14656,'RRC Connected Users','cucpserver2'); + +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(13905,'RRC Connected Users','cucpserver2'); + +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(13910,'RRC Connected Users','cucpserver2'); + +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(15360,'RRC Connected Users','cucpserver2'); + +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(15361,'RRC Connected Users','cucpserver2'); + +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(15548,'RRC Connected Users','cucpserver2'); + +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(15549,'RRC Connected Users','cucpserver2'); + +INSERT INTO nrcellcu(celllocalid,resourcetype,gnbcuname) VALUES(14427,'RRC Connected Users','cucpserver2'); + +--nrcellrelation + +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(0,15290,15290,true,15289); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(1,15296,15296,true,15289); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(2,15687,15687,true,15289); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(3,15687,15687,true,15290); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(4,15289,15289,true,15290); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(5,15296,15296,true,15290); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(6,15687,15687,true,15296); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(7,15289,15289,true,15296); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(8,15290,15290,true,15296); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(9,15289,15289,true,15687); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(10,15296,15296,true,15687); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(11,15290,15290,true,15687); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(12,15175,15175,true,15174); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(13,15176,15176,true,15174); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(14,15155,15155,true,15174); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(15,15174,15174,true,15175); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(16,15176,15176,true,15175); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(17,15155,15155,true,15175); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(18,15174,15174,true,15176); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(19,15175,15175,true,15176); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(20,15155,15155,true,15176); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(21,15174,15174,true,15155); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(22,15175,15175,true,15155); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(23,15176,15176,true,15155); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(24,15826,15826,true,15825); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(25,15689,15689,true,15825); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(26,13999,13999,true,15825); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(27,15825,15825,true,15826); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(28,13999,13999,true,15826); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(29,15689,15689,true,15826); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(30,15825,15825,true,15689); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(31,15826,15826,true,15689); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(32,13999,13999,true,15689); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(33,15825,15825,true,13999); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(34,15826,15826,true,13999); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(35,15689,15689,true,13999); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(36,15425,15425,true,14000); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(37,15426,15426,true,14000); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(38,14000,14000,true,15425); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(39,15426,15426,true,15425); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(40,15425,15425,true,15426); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(41,14000,14000,true,15426); + +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(42,11562,11562,true,11561); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(43,11568,11568,true,11561); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(44,11569,11569,true,11561); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(45,11561,11561,true,11562); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(46,11568,11568,true,11562); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(47,11569,11569,true,11562); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(48,11562,11562,true,11568); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(49,11561,11561,true,11568); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(50,11569,11569,true,11568); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(51,11561,11561,true,11569); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(52,11562,11562,true,11569); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(53,11568,11568,true,11569); + +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(54,10897,10897,true,10896); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(55,14655,14655,true,10896); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(56,14656,14656,true,10896); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(57,10896,10896,true,10897); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(58,14655,14655,true,10897); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(59,14656,14656,true,10897); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(60,10896,10896,true,14655); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(61,10897,10897,true,14655); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(62,14656,14656,true,14655); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(63,10896,10896,true,14656); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(64,10897,10897,true,14656); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(65,14655,14655,true,14656); + +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(66,13910,13910,true,13905); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(67,15360,15360,true,13905); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(68,15361,15361,true,13905); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(69,13905,13905,true,13910); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(70,15360,15360,true,13910); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(71,15361,15361,true,13910); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(72,13905,13905,true,15360); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(73,13910,13910,true,15360); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(74,15361,15361,true,15360); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(75,13905,13905,true,15361); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(76,13910,13910,true,15361); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(77,15360,15360,true,15361); + +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(78,15549,15549,true,15548); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(79,14427,14427,true,15548); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(80,15548,15548,true,15549); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(81,14427,14427,true,15549); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(82,15548,15548,true,14427); +INSERT INTO nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) VALUES(83,15549,15549,true,14427); +insert into nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) values(84,15425,15425,true,14427); +insert into nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) values(85,15296,15296,true,14427); +insert into nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) values(86,15155,15155,true,14427); +insert into nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) values(87,13999,13999,true,14427); +insert into nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) values(88,14000,14000,true,14427); +insert into nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) values(89,15825,15825,true,14427); +insert into nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) values(90,15548,15548,true,14427); +insert into nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) values(91,13905,13905,true,14427); +insert into nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) values(92,15361,15361,true,14427); +insert into nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) values(93,15360,15360,true,14427); +insert into nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) values(94,15174,15174,true,14427); +insert into nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) values(95,15175,15175,true,14427); +insert into nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) values(96,15176,15176,true,14427); +insert into nrcellrelation(sno,idnrcellrelation,nrtci,ishoallowed,celllocalid) values(97,15426,15426,true,14427); + --nrcelldu -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(15289,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',110); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(15289,'PRB','UNLOCKED','ACTIVE',0,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',110); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(15290,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',110); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(15290,'PRB','UNLOCKED','ACTIVE',1,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',110); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(15296,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',110); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(15296,'PRB','UNLOCKED','ACTIVE',2,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',110); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(15687,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',110); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(15687,'PRB','UNLOCKED','ACTIVE',3,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',110); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(15689,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',110); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(15689,'PRB','UNLOCKED','ACTIVE',4,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',110); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(15155,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',220); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(15155,'PRB','UNLOCKED','ACTIVE',0,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',220); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(15174,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',220); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(15174,'PRB','UNLOCKED','ACTIVE',1,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',220); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(15175,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',220); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(15175,'PRB','UNLOCKED','ACTIVE',2,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',220); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(15176,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',220); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(15176,'PRB','UNLOCKED','ACTIVE',3,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',220); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(15825,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',220); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(15825,'PRB','UNLOCKED','ACTIVE',4,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',220); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(15826,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',330); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(15826,'PRB','UNLOCKED','ACTIVE',0,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',330); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(15425,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',330); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(15425,'PRB','UNLOCKED','ACTIVE',1,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',330); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(15426,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',330); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(15426,'PRB','UNLOCKED','ACTIVE',2,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',330); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(13999,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',330); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(13999,'PRB','UNLOCKED','ACTIVE',3,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',330); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(14000,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',330); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(14000,'PRB','UNLOCKED','ACTIVE',4,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',330); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(11561,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',440); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(11561,'PRB','UNLOCKED','ACTIVE',0,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',440); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(11562,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',440); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(11562,'PRB','UNLOCKED','ACTIVE',1,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',440); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(11568,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',440); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(11568,'PRB','UNLOCKED','ACTIVE',2,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',440); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(11569,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',440); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(11569,'PRB','UNLOCKED','ACTIVE',3,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',440); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(10896,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',440); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(10896,'PRB','UNLOCKED','ACTIVE',4,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',440); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(10897,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',550); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(10897,'PRB','UNLOCKED','ACTIVE',0,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',550); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(14655,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',550); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(14655,'PRB','UNLOCKED','ACTIVE',1,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',550); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(14656,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',550); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(14656,'PRB','UNLOCKED','ACTIVE',2,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',550); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(13905,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',550); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(13905,'PRB','UNLOCKED','ACTIVE',3,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',550); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(13910,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',550); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(13910,'PRB','UNLOCKED','ACTIVE',4,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',550); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(15360,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',660); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(15360,'PRB','UNLOCKED','ACTIVE',0,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',660); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(15361,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',660); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(15361,'PRB','UNLOCKED','ACTIVE',1,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',660); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(15548,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',660); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(15548,'PRB','UNLOCKED','ACTIVE',2,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',660); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(15549,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',660); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(15549,'PRB','UNLOCKED','ACTIVE',3,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',660); -INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, operationalstate,gnbduid) VALUES(14427,'PRB','UNLOCKED','ACTIVE',12,310,'ENABLED',660); +INSERT INTO nrcelldu(celllocalId,resourcetype,administrativestate,cellstate, nrpci, nrtac, latitude, longitude, network_id, operationalstate,gnbduid) VALUES(14427,'PRB','UNLOCKED','ACTIVE',4,310,21.478915984298443,-51.40392800806856,'RAN001','ENABLED',660); UPDATE nrcelldu SET prb=500; diff --git a/ransim/docker/config/ransim/ransimdata.json b/ransim/docker/config/ransim/ransimdata.json new file mode 100644 index 0000000..b77cfdf --- /dev/null +++ b/ransim/docker/config/ransim/ransimdata.json @@ -0,0 +1,1508 @@ +[ + { + "gNBCUName": "cucpserver1", + "gNBId": 98763, + "gNBIdLength": 32, + "pLMNId": "310-410", + "nFType": "CUCP", + "nearRTRICId": 11, + "cellCUList": [ + { + "cellLocalId": 15289, + "nRCellRelationList": [ + { + "idNRCellRelation": 15290, + "attributes": { + "nRTCI": 15290, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15296, + "attributes": { + "nRTCI": 15296, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15687, + "attributes": { + "nRTCI": 15687, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 15290, + "nRCellRelationList": [ + { + "idNRCellRelation": 15296, + "attributes": { + "nRTCI": 15296, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15289, + "attributes": { + "nRTCI": 15289, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15687, + "attributes": { + "nRTCI": 15687, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + } + ] + }, + { + "cellLocalId": 15296, + "nRCellRelationList": [ + { + "idNRCellRelation": 15290, + "attributes": { + "nRTCI": 15290, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15289, + "attributes": { + "nRTCI": 15289, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15687, + "attributes": { + "nRTCI": 15287, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 15687, + "nRCellRelationList": [ + { + "idNRCellRelation": 15290, + "attributes": { + "nRTCI": 15290, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15296, + "attributes": { + "nRTCI": 15296, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15289, + "attributes": { + "nRTCI": 15289, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 15689, + "nRCellRelationList": [ + { + "idNRCellRelation": 15825, + "attributes": { + "nRTCI": 15825, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15826, + "attributes": { + "nRTCI": 15826, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 13999, + "attributes": { + "nRTCI": 13999, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 15155, + "nRCellRelationList": [ + { + "idNRCellRelation": 15174, + "attributes": { + "nRTCI": 15174, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15175, + "attributes": { + "nRTCI": 15175, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15176, + "attributes": { + "nRTCI": 15176, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 15174, + "nRCellRelationList": [ + { + "idNRCellRelation": 15155, + "attributes": { + "nRTCI": 15155, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15175, + "attributes": { + "nRTCI": 15175, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15176, + "attributes": { + "nRTCI": 15176, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 15175, + "nRCellRelationList": [ + { + "idNRCellRelation": 15155, + "attributes": { + "nRTCI": 15155, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15174, + "attributes": { + "nRTCI": 15174, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15176, + "attributes": { + "nRTCI": 15176, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 15176, + "nRCellRelationList": [ + { + "idNRCellRelation": 15174, + "attributes": { + "nRTCI": 15174, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15155, + "attributes": { + "nRTCI": 15155, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15175, + "attributes": { + "nRTCI": 15175, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 15825, + "nRCellRelationList": [ + { + "idNRCellRelation": 15826, + "attributes": { + "nRTCI": 15826, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15689, + "attributes": { + "nRTCI": 15689, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 13999, + "attributes": { + "nRTCI": 13999, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 15826, + "nRCellRelationList": [ + { + "idNRCellRelation": 15825, + "attributes": { + "nRTCI": 15825, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15689, + "attributes": { + "nRTCI": 15689, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 13999, + "attributes": { + "nRTCI": 13999, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 15425, + "nRCellRelationList": [ + { + "idNRCellRelation": 15426, + "attributes": { + "nRTCI": 15426, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 14000, + "attributes": { + "nRTCI": 14000, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 15426, + "nRCellRelationList": [ + { + "idNRCellRelation": 15425, + "attributes": { + "nRTCI": 15425, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 14000, + "attributes": { + "nRTCI": 14000, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 13999, + "nRCellRelationList": [ + { + "idNRCellRelation": 15825, + "attributes": { + "nRTCI": 15825, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15689, + "attributes": { + "nRTCI": 15689, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15826, + "attributes": { + "nRTCI": 15826, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 14000, + "nRCellRelationList": [ + { + "idNRCellRelation": 15425, + "attributes": { + "nRTCI": 15425, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15426, + "attributes": { + "nRTCI": 15426, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + } + ] + }, + { + "gNBCUName": "cucpserver2", + "gNBId": 98763, + "gNBIdLength": 32, + "pLMNId": "310-410", + "nFType": "CUCP", + "nearRTRICId": 22, + "cellCUList": [ + { + "cellLocalId": 11561, + "nRCellRelationList": [ + { + "idNRCellRelation": 11562, + "attributes": { + "nRTCI": 11562, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 11568, + "attributes": { + "nRTCI": 11568, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 11569, + "attributes": { + "nRTCI": 11569, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 11562, + "nRCellRelationList": [ + { + "idNRCellRelation": 11561, + "attributes": { + "nRTCI": 11561, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 11568, + "attributes": { + "nRTCI": 11568, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 11569, + "attributes": { + "nRTCI": 11569, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 11568, + "nRCellRelationList": [ + { + "idNRCellRelation": 11561, + "attributes": { + "nRTCI": 11561, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 11562, + "attributes": { + "nRTCI": 11562, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 11569, + "attributes": { + "nRTCI": 11569, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 11569, + "nRCellRelationList": [ + { + "idNRCellRelation": 11561, + "attributes": { + "nRTCI": 11561, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 11562, + "attributes": { + "nRTCI": 11562, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 11568, + "attributes": { + "nRTCI": 11568, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 10896, + "nRCellRelationList": [ + { + "idNRCellRelation": 10897, + "attributes": { + "nRTCI": 10897, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 14655, + "attributes": { + "nRTCI": 14655, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 14656, + "attributes": { + "nRTCI": 14656, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 10897, + "nRCellRelationList": [ + { + "idNRCellRelation": 10896, + "attributes": { + "nRTCI": 10896, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 14655, + "attributes": { + "nRTCI": 14655, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 14656, + "attributes": { + "nRTCI": 14656, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 14655, + "nRCellRelationList": [ + { + "idNRCellRelation": 14656, + "attributes": { + "nRTCI": 14656, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 10897, + "attributes": { + "nRTCI": 10897, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 10896, + "attributes": { + "nRTCI": 10896, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 14656, + "nRCellRelationList": [ + { + "idNRCellRelation": 10896, + "attributes": { + "nRTCI": 10896, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 10897, + "attributes": { + "nRTCI": 10897, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 14655, + "attributes": { + "nRTCI": 14655, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 13905, + "nRCellRelationList": [ + { + "idNRCellRelation": 13910, + "attributes": { + "nRTCI": 13910, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15360, + "attributes": { + "nRTCI": 15360, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15361, + "attributes": { + "nRTCI": 15361, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 13910, + "nRCellRelationList": [ + { + "idNRCellRelation": 15360, + "attributes": { + "nRTCI": 15360, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15361, + "attributes": { + "nRTCI": 15361, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 13905, + "attributes": { + "nRTCI": 13905, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 15360, + "nRCellRelationList": [ + { + "idNRCellRelation": 15361, + "attributes": { + "nRTCI": 15361, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 13905, + "attributes": { + "nRTCI": 13905, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 13910, + "attributes": { + "nRTCI": 13910, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 15361, + "nRCellRelationList": [ + { + "idNRCellRelation": 15360, + "attributes": { + "nRTCI": 15360, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 13905, + "attributes": { + "nRTCI": 13905, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 13910, + "attributes": { + "nRTCI": 13910, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 15548, + "nRCellRelationList": [ + { + "idNRCellRelation": 15549, + "attributes": { + "nRTCI": 15549, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 14427, + "attributes": { + "nRTCI": 14427, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 15549, + "nRCellRelationList": [ + { + "idNRCellRelation": 15548, + "attributes": { + "nRTCI": 15548, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 14427, + "attributes": { + "nRTCI": 14427, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + }, + { + "cellLocalId": 14427, + "nRCellRelationList": [ + { + "idNRCellRelation": 15548, + "attributes": { + "nRTCI": 15548, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15549, + "attributes": { + "nRTCI": 15549, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15425, + "attributes": { + "nRTCI": 15425, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15296, + "attributes": { + "nRTCI": 15296, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15155, + "attributes": { + "nRTCI": 15155, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 13999, + "attributes": { + "nRTCI": 13999, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 14000, + "attributes": { + "nRTCI": 14000, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15825, + "attributes": { + "nRTCI": 15825, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15548, + "attributes": { + "nRTCI": 15548, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 13905, + "attributes": { + "nRTCI": 13905, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15361, + "attributes": { + "nRTCI": 15361, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15174, + "attributes": { + "nRTCI": 15174, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15175, + "attributes": { + "nRTCI": 15175, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15176, + "attributes": { + "nRTCI": 15176, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15426, + "attributes": { + "nRTCI": 15426, + "isHOAllowed": "true" + } + }, + { + "idNRCellRelation": 15360, + "attributes": { + "nRTCI": 15360, + "isHOAllowed": "true" + } + } + ], + "pLMNInfoList": [ + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0010-1110", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 6000 + } + } + }, + { + "pLMNId": "310-410", + "sNSSAI": { + "sNSSAI": "0011-0010", + "status": "ACTIVE", + "configData": { + "maxNumberOfConns": 4500 + } + } + } + ] + } + ] + } +] diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/netconf/NetconfClient.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/netconf/NetconfClient.java index 46d4e05..344dfd7 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/netconf/NetconfClient.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/netconf/NetconfClient.java @@ -25,28 +25,59 @@ import com.tailf.jnc.DeviceUser; import com.tailf.jnc.Element; import com.tailf.jnc.JNCException; import com.tailf.jnc.NetconfSession; - +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.Gson; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileReader; +import java.io.InputStream; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Map; +import java.util.Objects; +import java.util.Properties; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; + +import javax.annotation.PostConstruct; +import javax.websocket.Session; +import java.util.ArrayList; +import java.util.Collections; import java.io.IOException; import java.net.ConnectException; import java.util.List; +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; + import org.apache.log4j.Logger; import org.onap.ransim.rest.api.models.PLMNInfoModel; +import org.onap.ransim.rest.web.mapper.NRRelationData; import org.onap.ransim.rest.web.mapper.GNBCUCPModel; import org.onap.ransim.rest.web.mapper.GNBCUUPModel; import org.onap.ransim.rest.web.mapper.GNBDUModel; import org.onap.ransim.rest.web.mapper.NRCellCUModel; import org.onap.ransim.rest.web.mapper.NRCellDUModel; +import org.onap.ransim.rest.web.mapper.NRCellRelationModel; import org.onap.ransim.rest.web.mapper.NearRTRICModel; import org.onap.ransim.websocket.model.ConfigData; +import org.onap.ransim.rest.api.services.RANSliceConfigService; +import org.springframework.beans.factory.annotation.Autowired; public class NetconfClient { static Logger log = Logger.getLogger(NetconfClient.class.getName()); + static List<NRCellRelationModel> relationModelList = Collections.synchronizedList(new ArrayList<>()); private String emsUserName; private Device device; + @Autowired + RANSliceConfigService ranSliceConfigService; + public NetconfClient(Device device) { this.device = device; } @@ -74,7 +105,69 @@ public class NetconfClient { portElement.setValue("8080"); sapElement.addChild(hostElement); sapElement.addChild(portElement); - + NearRTRICModel nRICmodel = new NearRTRICModel(); + org.json.simple.parser.JSONParser jsonParser = new org.json.simple.parser.JSONParser(); + try (FileReader reader = new FileReader("/tmp/ransim-install/config/ransimdata.json")) { + // Read JSON file + Object obj = jsonParser.parse(reader); + JSONArray List = (JSONArray) obj; + List<GNBCUCPModel> savedGNBModelList = new ArrayList<GNBCUCPModel>(); + for (int i = 0; i < List.size(); i++) { + JSONObject gNB = (JSONObject) List.get(i); + String gNBCUName = (String) gNB.get("gNBCUName"); + Long gNBId = (Long) gNB.get("gNBId"); + Long gNBIdLength = (Long) gNB.get("gNBIdLength"); + String pLMNId = (String) gNB.get("pLMNId"); + String nFType = (String) gNB.get("nFType"); + Long nearRTRICId = (Long) gNB.get("nearRTRICId"); + String cellListVar = (String) gNB.get("cellCUList").toString(); + Object cellListObj = jsonParser.parse(cellListVar); + JSONArray cellList = (JSONArray) cellListObj; + List<NRCellCUModel> nRCellCUModelList = new ArrayList<NRCellCUModel>(); + for (int j = 0; j < cellList.size(); j++) { + JSONObject cell = (JSONObject) cellList.get(j); + Long cellLocalId = (Long) cell.get("cellLocalId"); + String nRCellRelVar = (String) cell.get("nRCellRelationList").toString(); + Object nRCellVarObj = jsonParser.parse(nRCellRelVar); + JSONArray nRCellRelList = (JSONArray) nRCellVarObj; + List<NRCellRelationModel> nrCellRelationModelList = new ArrayList<NRCellRelationModel>(); + for (int k = 0; k < nRCellRelList.size(); k++) { + JSONObject nrcellrel = (JSONObject) nRCellRelList.get(k); + Long idNRCellRelation = (Long) nrcellrel.get("idNRCellRelation"); + JSONObject attributes = (JSONObject) nrcellrel.get("attributes"); + Long nRTCI = (Long) attributes.get("nRTCI"); + String isHOAllowed = (String) attributes.get("isHOAllowed"); + NRRelationData nrRelationDataObj = new NRRelationData(); + nrRelationDataObj.setNRTCI(nRTCI.intValue()); + nrRelationDataObj.setIsHOAllowed(Boolean.valueOf(isHOAllowed)); + NRCellRelationModel nrCellRelationModel = new NRCellRelationModel(); + nrCellRelationModel.setIdNRCellRelation(idNRCellRelation.intValue()); + nrCellRelationModel.setNRRelationData(nrRelationDataObj); + nrCellRelationModelList.add(nrCellRelationModel); + } + NRCellCUModel nrCellCUModel = new NRCellCUModel(); + nrCellCUModel.setCellLocalId(cellLocalId.intValue()); + nrCellCUModel.setNRCellRelation(nrCellRelationModelList); + nRCellCUModelList.add(nrCellCUModel); + log.info(" saved nrcellcu in netconfclent is : " + nrCellCUModel); + } + GNBCUCPModel SavedgNBCUCPModel = new GNBCUCPModel(); + SavedgNBCUCPModel.setgNBCUName(gNBCUName); + SavedgNBCUCPModel.setgNBId(gNBId.intValue()); + SavedgNBCUCPModel.setgNBIdLength(gNBIdLength.intValue()); + SavedgNBCUCPModel.setpLMNId(pLMNId); + SavedgNBCUCPModel.setnFType(nFType); + SavedgNBCUCPModel.setNearRTRICId(nearRTRICId.intValue()); + SavedgNBCUCPModel.setCellCUList(nRCellCUModelList); + savedGNBModelList.add(SavedgNBCUCPModel); + log.info(" saved gnbcucp in netconfclent is : " + SavedgNBCUCPModel); + } + nRICmodel.setgNBCUCPList(savedGNBModelList); + nRICmodel.setNearRTRICId(Integer.parseInt(serverId)); + } + catch (Exception e) { + log.error("Properties file error", e); + } for (GNBCUUPModel gNBCUUPModel : rtRicModel.getgNBCUUPList()) { if (gNBCUUPModel.getgNBCUUPId().toString().equals(serverId) || rtRicModel.getNearRTRICId().toString().equals(serverId)) { @@ -95,7 +188,7 @@ public class NetconfClient { nearRTRICElement.addChild(gNBCUUPFunctionElement); } } - for (GNBCUCPModel gNBCUCPModel : rtRicModel.getgNBCUCPList()) { + for (GNBCUCPModel gNBCUCPModel : nRICmodel.getgNBCUCPList()) { if (gNBCUCPModel.getgNBCUName().equals(serverId) || rtRicModel.getNearRTRICId().toString().equals(serverId)) { Element gNBCUCPFunctionElement = @@ -119,20 +212,41 @@ public class NetconfClient { attributesElement.addChild(gNBIdLengthElement); attributesElement.addChild(sapElement); for (NRCellCUModel nRCellCUModel : gNBCUCPModel.getCellCUList()) { - Element nRCellCUElement = - Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/NRCellCU"); - Element idNRCellCUElement = - Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/idNRCellCU"); - idNRCellCUElement.setValue(nRCellCUModel.getCellLocalId()); - Element nRCellattributesElement = - Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/attributes"); - Element cellLocalIdElement = - Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/cellLocalId"); - cellLocalIdElement.setValue(nRCellCUModel.getCellLocalId()); - nRCellattributesElement.addChild(cellLocalIdElement); - nRCellattributesElement.addChild(sapElement); - nRCellCUElement.addChild(idNRCellCUElement); - nRCellCUElement.addChild(nRCellattributesElement); + Element nRCellCUElement = + Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/NRCellCU"); + Element idNRCellCUElement = + Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/idNRCellCU"); + idNRCellCUElement.setValue(nRCellCUModel.getCellLocalId()); + Element nRCellattributesElement = + Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/attributes"); + Element cellLocalIdElement = + Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/cellLocalId"); + cellLocalIdElement.setValue(nRCellCUModel.getCellLocalId()); + nRCellattributesElement.addChild(cellLocalIdElement); + nRCellattributesElement.addChild(sapElement); + nRCellCUElement.addChild(idNRCellCUElement); + nRCellCUElement.addChild(nRCellattributesElement); + for (NRCellRelationModel nRCellRelationModel : nRCellCUModel.getNRCellRelationList()) { + Element nRCellRelationElement = + Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/NRCellRelation"); + Element idNRCellRelationElement = + Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/idNRCellRelation"); + idNRCellRelationElement.setValue(nRCellRelationModel.getIdNRCellRelation()); + Element nRCellRelationattributesElement = + Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/attributes"); + Element nRTCIElement = + Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/nRTCI"); + nRTCIElement.setValue(nRCellRelationModel.getNRRelationData().getNRTCI()); + Element isHOAllowedElement = + Element.create("org:onap:ccsdk:features:sdnr:northbound:ran-network", "/isHOAllowed"); + isHOAllowedElement.setValue(nRCellRelationModel.getNRRelationData().getIsHOAllowed()); + nRCellRelationattributesElement.addChild(nRTCIElement); + nRCellRelationattributesElement.addChild(isHOAllowedElement); + nRCellRelationattributesElement.addChild(sapElement); + nRCellRelationElement.addChild(idNRCellRelationElement); + nRCellRelationElement.addChild(nRCellRelationattributesElement); + nRCellCUElement.addChild(nRCellRelationElement); + } gNBCUCPFunctionElement.addChild(nRCellCUElement); } gNBCUCPFunctionElement.addChild(idGNBCUCPFunctionElement); diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/RansimController.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/RansimController.java index ddf2513..93b4f5c 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/RansimController.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/RansimController.java @@ -345,6 +345,46 @@ public class RansimController { } } + + @ApiOperation("Retrieves the neighbor list details for the cell with the mentioned cellId") + @RequestMapping(value = "/GetCUNeighborList", method = RequestMethod.POST) + @ApiResponses( + value = {@ApiResponse(code = 200, message = "Successful"), + @ApiResponse(code = 500, message = "Cannot Insert the given parameters")}) + public ResponseEntity<String> getCUNeighborList(@RequestBody GetNeighborListReq req) throws Exception { + + log.debug("Inside getNeighborList..."); + try { + String jsonStr = ""; + GetNeighborList message = rsPciHdlr.generateNeighborList(req.getNodeId()); + if (message != null) { + log.info("message.getNodeId(): " + message.getNodeId()); + Gson gson = new Gson(); + jsonStr = gson.toJson(message); + } + return new ResponseEntity<>(jsonStr, HttpStatus.OK); + } catch (Exception eu) { + log.info("/getCUNeighborList", eu); + return new ResponseEntity<>("Failure", HttpStatus.INTERNAL_SERVER_ERROR); + } + } + + @ApiOperation("Sets the netconfserver for the cellId") + @RequestMapping(value = "/SetCUCPNetconfServer", method = RequestMethod.POST) + @ApiResponses( + value = {@ApiResponse(code = 200, message = "Successful"), + @ApiResponse(code = 500, message = "Cannot Insert the given parameters")}) + public ResponseEntity<String> setNetconfServer(@RequestBody Integer cellLocalId) throws Exception { + log.debug("Inside setNetconfServer..."); + try { + rscServices.setRanCUCPNetconfServers(cellLocalId); + return new ResponseEntity<>("Server set. ", HttpStatus.OK); + } catch (Exception eu) { + log.info("/SetCUCPNetconfServer", eu); + return new ResponseEntity<>("Failure", HttpStatus.INTERNAL_SERVER_ERROR); + } + } + /** * The function retrieves the neighbor list for the cell with the mentioned * nodeId. diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/handler/RansimPciHandler.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/handler/RansimPciHandler.java index 6ba89c2..48d78c5 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/handler/RansimPciHandler.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/handler/RansimPciHandler.java @@ -44,6 +44,8 @@ import org.onap.ransim.rest.api.models.FmAlarmInfo; import org.onap.ransim.rest.api.models.GetNeighborList; import org.onap.ransim.rest.api.models.NeighborDetails; import org.onap.ransim.rest.api.models.NetconfServers; +import org.onap.ransim.rest.api.models.NRCellCU; +import org.onap.ransim.rest.api.models.NRCellRelation; import org.onap.ransim.rest.api.models.OperationLog; import org.onap.ransim.rest.api.models.PmDataDump; import org.onap.ransim.rest.api.models.PmParameters; @@ -171,41 +173,41 @@ public class RansimPciHandler { * @return Returns GetNeighborList object */ public GetNeighborList generateNeighborList(String nodeId) { - - try { - log.info("inside generateNeighborList for: " + nodeId); - CellNeighbor neighborList = ransimRepo.getCellNeighbor(nodeId); - GetNeighborList result = new GetNeighborList(); - neighborList.display(); - List<CellDetails> cellsWithNoHO = new ArrayList<CellDetails>(); - List<CellDetails> cellsWithHO = new ArrayList<CellDetails>(); - - List<NeighborDetails> nbrList = new ArrayList<>(); - if (neighborList != null) { - nbrList.addAll(neighborList.getNeighborList()); - } - - for (int i = 0; i < nbrList.size(); i++) { - - CellDetails nbr = ransimRepo.getCellDetail(nbrList.get(i).getNeigbor().getNeighborCell()); - - if (nbrList.get(i).isBlacklisted()) { - cellsWithNoHO.add(nbr); - } else { - cellsWithHO.add(nbr); - } - - } - - result.setNodeId(nodeId); - result.setCellsWithHo(cellsWithHO); - result.setCellsWithNoHo(cellsWithNoHO); - return result; - - } catch (Exception eu) { - log.info("/getNeighborList", eu); - return null; - } + + try { + log.info("inside generateNeighborList for: " + nodeId); + NRCellCU neighborList = ransimRepo.getCellRelation(Integer.valueOf(nodeId)); + GetNeighborList result = new GetNeighborList(); + neighborList.display(); + + List<NRCellCU> cellsWithNoHO = new ArrayList<>(); + List<NRCellCU> cellsWithHO = new ArrayList<>(); + + List<NRCellRelation> nbrList = new ArrayList<>(); + if (neighborList != null) { + nbrList.addAll(neighborList.getNrCellRelationsList()); + log.info("neighborList.getNrCellRelationsList() is : " + nbrList); + } + + for (int i = 0; i < nbrList.size(); i++) { + NRCellCU nbr = ransimRepo.getNRCellCUDetail(nbrList.get(i).getIdNRCellRelation()); + if (nbrList.get(i).getisHOAllowed()) { + cellsWithHO.add(nbr); + log.info("cellswithHO is : " + cellsWithHO); + } else { + cellsWithNoHO.add(nbr); + log.info("cellswithNoHO is : " + cellsWithNoHO); + } + } + result.setNodeId(nodeId); + result.setCUCellsWithHo(cellsWithHO); + result.setCUCellsWithNoHo(cellsWithNoHO); + log.info(" Generate neighbour result is : " + result); + return result; + } catch (Exception eu) { + log.info("/getCUNeighborList", eu); + return null; + } } public void checkCollisionAfterModify() { @@ -535,6 +537,8 @@ public class RansimPciHandler { @Transactional public List<String> generatePmData(String nodeIdBad, String nodeIdPoor) { + log.info(" nodeIdBad in generatePmData is" + nodeIdBad); + log.info(" nodeIdPoor in generatePmData is" + nodeIdPoor); List<String> result = new ArrayList<>(); String parameter1 = ""; @@ -555,13 +559,21 @@ public class RansimPciHandler { try { log.info("next : " + next); parameter1 = pmParameters.get(next).getParameter1(); + log.info("parameter1 is : " + parameter1); successValue1 = pmParameters.get(next).getSuccessValue1(); + log.info("successValue1 is : " + successValue1); badValue1 = pmParameters.get(next).getBadValue1(); + log.info("badValue1 is : " + badValue1); poorValue1 = pmParameters.get(next).getPoorValue1(); + log.info("poorValue1 is : " + poorValue1); parameter2 = pmParameters.get(next).getParameter2(); + log.info("parameter2 is : " + parameter2); successValue2 = pmParameters.get(next).getSuccessValue2(); + log.info("successValue2 is : " + successValue2); badValue2 = pmParameters.get(next).getBadValue2(); + log.info("badValue2 is : " + badValue2); poorValue2 = pmParameters.get(next).getPoorValue2(); + log.info("poorValue2 is : " + poorValue2); next++; } catch (Exception e) { log.info("Exception: ", e); @@ -578,149 +590,141 @@ public class RansimPciHandler { cellIdsBad = nodeIdBad.split(","); for (int a = 0; a < cellIdsBad.length; a++) { nodeIdsBad.add(cellIdsBad[a].trim()); + log.info("nodeIds bad is : " + nodeIdsBad); + } } if (nodeIdPoor != null) { cellIdsPoor = nodeIdPoor.split(","); for (int a = 0; a < cellIdsPoor.length; a++) { nodeIdsPoor.add(cellIdsPoor[a].trim()); + log.info("nodeIds poor is : " + nodeIdsPoor); } } for (int i = 0; i < cnl.size(); i++) { - long startTime = System.currentTimeMillis(); - List<CellDetails> cellList = new ArrayList<CellDetails>(cnl.get(i).getCells()); - List<EventPm> data = new ArrayList<EventPm>(); - - for (int j = 0; j < cellList.size(); j++) { - - long startTimeCell = System.currentTimeMillis(); - String nodeId = cellList.get(j).getNodeId(); - EventPm event = new EventPm(); - CommonEventHeaderPm commonEventHeader = new CommonEventHeaderPm(); - commonEventHeader.setSourceName(nodeId); - commonEventHeader.setStartEpochMicrosec(System.currentTimeMillis() * 1000); - String uuid = globalPmCellIdUuidMap.get(nodeId); - if (uuid == null) { - uuid = getUuid(); - globalPmCellIdUuidMap.put(nodeId, uuid); - } - commonEventHeader.setSourceUuid(uuid); - - Measurement measurement = new Measurement(); - measurement.setMeasurementInterval(180); - - GetNeighborList cellNbrList = generateNeighborList(nodeId); - - long startTimeCheckBadPoor = System.currentTimeMillis(); - - boolean checkBad = false; - boolean checkPoor = false; - int countBad = 0; - int countPoor = 0; - - if (nodeIdsBad.contains(nodeId)) { - checkBad = true; - countBad = (int) (cellNbrList.getCellsWithHo().size() * 0.2); - } - if (nodeIdsPoor.contains(nodeId)) { - checkPoor = true; - countPoor = (int) (cellNbrList.getCellsWithHo().size() * 0.2); - } - - long endTimeCheckBadPoor = System.currentTimeMillis(); - log.debug("Time taken CheckBadPoor : " + (endTimeCheckBadPoor - startTimeCheckBadPoor)); - List<AdditionalMeasurements> additionalMeasurements = new ArrayList<AdditionalMeasurements>(); - if (checkPoor || checkBad) { - - Collections.sort(cellNbrList.getCellsWithHo()); - - for (int k = 0; k < cellNbrList.getCellsWithHo().size(); k++) { - AdditionalMeasurements addMsmnt = new AdditionalMeasurements(); - addMsmnt.setName(cellNbrList.getCellsWithHo().get(k).getNodeId()); - Map<String, String> hashMap = new HashMap<String, String>(); - hashMap.put("networkId", cellNbrList.getCellsWithHo().get(k).getNetworkId()); - - hashMap.put(parameter1, successValue1); - - if (checkBad == true) { - - if (countBad > 0) { - log.info("countBad: " + countBad); - hashMap.put(parameter2, badValue2); - countBad--; - } else { - hashMap.put(parameter2, successValue2); - } - - } else if (checkPoor == true) { - if (countPoor > 0) { - log.info("countBad: " + countPoor); - hashMap.put(parameter2, poorValue2); - countPoor--; - } else { - hashMap.put(parameter2, successValue2); - } - - } - - addMsmnt.setHashMap(hashMap); - - additionalMeasurements.add(addMsmnt); - - } - } else { - for (int k = 0; k < cellNbrList.getCellsWithHo().size(); k++) { - AdditionalMeasurements addMsmnt = new AdditionalMeasurements(); - addMsmnt.setName(cellNbrList.getCellsWithHo().get(k).getNodeId()); - Map<String, String> hashMap = new HashMap<String, String>(); - - hashMap.put("networkId", cellNbrList.getCellsWithHo().get(k).getNetworkId()); - - hashMap.put(parameter1, successValue1); - - hashMap.put(parameter2, successValue2); - - addMsmnt.setHashMap(hashMap); - additionalMeasurements.add(addMsmnt); - } - } - - commonEventHeader.setLastEpochMicrosec(System.currentTimeMillis() * 1000); - measurement.setAdditionalMeasurements(additionalMeasurements); - - event.setCommonEventHeader(commonEventHeader); - event.setMeasurement(measurement); - - data.add(event); - long endTimeCell = System.currentTimeMillis(); - log.debug("Time taken to Process Cell list : " + (endTimeCell - startTimeCell)); - } - - long endTime = System.currentTimeMillis(); - log.info("Time taken for generating PM data for " + cnl.get(i).getServerId() + " : " - + (endTime - startTime)); - PmMessage msg = new PmMessage(); - - if (data.size() > 0) { - msg.setEventPmList(data); - Gson gson = new Gson(); - String jsonStr = gson.toJson(msg); - sendPmdata(cnl.get(i).getServerId(), jsonStr); - - result.add(jsonStr); - } - - } - } catch (Exception e) { - log.info("Exception in string builder", e); - } - - return result; + long startTime = System.currentTimeMillis(); + List<NRCellCU> cellList = new ArrayList<NRCellCU>(cnl.get(i).getCellList()); + log.info(" CellList in generatePmData is : " + cellList); + List<EventPm> data = new ArrayList<EventPm>(); + for (int j = 0; j < cellList.size(); j++) { + + long startTimeCell = System.currentTimeMillis(); + String nodeId = cellList.get(j).getCellLocalId().toString(); + log.info(" nodeId in cellList in generatePmData is : " + nodeId); + String reportingEntityName = cellList.get(j).getgNBCUCPFunction().getgNBCUName(); + EventPm event = new EventPm(); + CommonEventHeaderPm commonEventHeader = new CommonEventHeaderPm(); + commonEventHeader.setSourceName(nodeId); + commonEventHeader.setReportingEntityName(reportingEntityName); + commonEventHeader.setStartEpochMicrosec(System.currentTimeMillis() * 1000); + String uuid = globalPmCellIdUuidMap.get(nodeId); + if (uuid == null) { + uuid = getUuid(); + globalPmCellIdUuidMap.put(nodeId, uuid); + } + commonEventHeader.setSourceUuid(uuid); + Measurement measurement = new Measurement(); + measurement.setMeasurementInterval(180); + + GetNeighborList cellNbrList = generateNeighborList(nodeId); + log.info("Get CellCU neighbourList with HO is : " + cellNbrList.getCUCellsWithHo()); + + long startTimeCheckBadPoor = System.currentTimeMillis(); + boolean checkBad = false; + boolean checkPoor = false; + int countBad = 0; + int countPoor = 0; + log.info( "nodeIdsBad in for loop is" + nodeIdsBad); + log.info( "nodeIdsPoor in for loop is" + nodeIdsPoor); + + if (nodeIdsBad.contains(nodeId)) { + log.info( " inside nodeIdsBad if condition " + nodeId); + checkBad = true; + countBad = (int) (cellNbrList.getCUCellsWithHo().size() * 0.2); + log.info( " check bad is : " + checkBad); + log.info( " count bad is : " + countBad); + } + + if (nodeIdsPoor.contains(nodeId)) { + log.info( " inside nodeIdsPoor if condition " + nodeId); + checkPoor = true; + countPoor = (int) (cellNbrList.getCUCellsWithHo().size() * 0.2); + log.info( " check poor is : " + checkPoor); + log.info( " count bad is : " + countPoor); + } + + long endTimeCheckBadPoor = System.currentTimeMillis(); + log.debug("Time taken CheckBadPoor : " + (endTimeCheckBadPoor - startTimeCheckBadPoor)); + List<AdditionalMeasurements> additionalMeasurements = new ArrayList<AdditionalMeasurements>(); + if (checkPoor || checkBad) { + Collections.sort(cellNbrList.getCUCellsWithHo()); + for (int k = 0; k < cellNbrList.getCUCellsWithHo().size(); k++) { + AdditionalMeasurements addMsmnt = new AdditionalMeasurements(); + addMsmnt.setName(cellNbrList.getCUCellsWithHo().get(k).getCellLocalId().toString()); + Map<String, String> hashMap = new HashMap<String, String>(); + hashMap.put("networkId", "RAN001"); + hashMap.put(parameter1, successValue1); + if (checkBad == true) { + if (countBad > 0) { + log.info("countBad: " + countBad); + hashMap.put(parameter2, badValue2); + countBad--; + } else { + hashMap.put(parameter2, successValue2); + } + } else if (checkPoor == true) { + if (countPoor > 0) { + log.info("countPoor: " + countPoor); + hashMap.put(parameter2, poorValue2); + countPoor--; + } else { + hashMap.put(parameter2, successValue2); + } + } + addMsmnt.setHashMap(hashMap); + additionalMeasurements.add(addMsmnt); + } + } else { + for (int k = 0; k < cellNbrList.getCUCellsWithHo().size(); k++) { + AdditionalMeasurements addMsmnt = new AdditionalMeasurements(); + addMsmnt.setName(cellNbrList.getCUCellsWithHo().get(k).getCellLocalId().toString()); + Map<String, String> hashMap = new HashMap<String, String>(); + hashMap.put("networkId", "RAN001"); + hashMap.put(parameter1, successValue1); + hashMap.put(parameter2, successValue2); + addMsmnt.setHashMap(hashMap); + additionalMeasurements.add(addMsmnt); + } + } + commonEventHeader.setLastEpochMicrosec(System.currentTimeMillis() * 1000); + measurement.setAdditionalMeasurements(additionalMeasurements); + event.setCommonEventHeader(commonEventHeader); + event.setMeasurement(measurement); + data.add(event); + long endTimeCell = System.currentTimeMillis(); + log.debug("Time taken to Process Cell list : " + (endTimeCell - startTimeCell)); + } + long endTime = System.currentTimeMillis(); + log.info("Time taken for generating PM data for " + cnl.get(i).getServerId() + " : " + + (endTime - startTime)); + PmMessage msg = new PmMessage(); + if (data.size() > 0) { + msg.setEventPmList(data); + Gson gson = new Gson(); + String jsonStr = gson.toJson(msg); + sendPmdata(cnl.get(i).getServerId(), jsonStr); + result.add(jsonStr); + } + } + } catch (Exception e) { + log.info("Exception in string builder", e); + } + return result; } - - /** + + /** * Sets the value for all fields in the FM data for individual cell. * * @param networkId diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GetNeighborList.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GetNeighborList.java index 11e8019..ed32bf3 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GetNeighborList.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/GetNeighborList.java @@ -25,6 +25,8 @@ import java.util.List; public class GetNeighborList { private String nodeId; + private List<NRCellCU> CellsWithNoHo; + private List<NRCellCU> CellsWithHo; private List<CellDetails> cellsWithNoHo; private List<CellDetails> cellsWithHo; @@ -70,4 +72,19 @@ public class GetNeighborList { this.cellsWithHo = cellsWithHo; } + public List<NRCellCU> getCUCellsWithNoHo() { + return CellsWithNoHo; + } + + public void setCUCellsWithNoHo(List<NRCellCU> CellsWithNoHo) { + this.CellsWithNoHo = CellsWithNoHo; + } + + public List<NRCellCU> getCUCellsWithHo() { + return CellsWithHo; + } + + public void setCUCellsWithHo(List<NRCellCU> CellsWithHo) { + this.CellsWithHo = CellsWithHo; + } } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellCU.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellCU.java index 2d49f63..af552e3 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellCU.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellCU.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * Ran Simulator Controller * ================================================================================ - * Copyright (C) 2020-2021 Wipro Limited. + * Copyright (C) 2020-2022 Wipro Limited. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,10 @@ package org.onap.ransim.rest.api.models; import java.io.Serializable; +import org.apache.log4j.Logger; import java.util.List; +import java.util.ArrayList; +import org.onap.ransim.rest.api.controller.RansimController; import javax.persistence.CascadeType; import javax.persistence.CollectionTable; @@ -37,7 +40,7 @@ import javax.persistence.Table; @Entity @Table(name = "NRCELLCU") -public class NRCellCU implements Serializable { +public class NRCellCU implements Serializable, Comparable<NRCellCU> { private static final long serialVersionUID = 1L; @Id @Column(name = "CELLLOCALID") @@ -47,6 +50,9 @@ public class NRCellCU implements Serializable { @ElementCollection(fetch = FetchType.EAGER) @CollectionTable(name = "PLMNINFO", joinColumns = @JoinColumn(name = "nrcellcu_celllocalid")) private List<PLMNInfo> pLMNInfoList; + @Column(name = "NRCELLRELATIONLIST") + @OneToMany(mappedBy = "cellLocalId", cascade = CascadeType.ALL) + private List<NRCellRelation> nrCellRelationsList; @ManyToOne @JoinColumn(name = "gnbcuname") private GNBCUCPFunction gNBCUCPFunction; @@ -58,6 +64,11 @@ public class NRCellCU implements Serializable { public void setCellLocalId(Integer cellLocalId) { this.cellLocalId = cellLocalId; } + public List<NRCellRelation> getNrCellRelationsList() { return nrCellRelationsList; } + + public void setNrCellRelationsList(List<NRCellRelation> nrCellRelationsList) { + this.nrCellRelationsList = nrCellRelationsList; + } public List<PLMNInfo> getpLMNInfoList() { return pLMNInfoList; @@ -83,4 +94,20 @@ public class NRCellCU implements Serializable { this.resourceType = resourceType; } + static Logger log = Logger.getLogger(RansimController.class.getName()); + + public void display() { + + List<NRCellRelation> iterator = new ArrayList<>(nrCellRelationsList); + for (int ii = 0; ii < iterator.size(); ii++) { + log.info("neighbors NeighborList: " + iterator.get(ii).getCellLocalId()+ " " + + iterator.get(ii).getIdNRCellRelation() + " " + iterator.get(ii).getisHOAllowed()); + } + } + + @Override + public int compareTo(NRCellCU cd) { + return this.getCellLocalId().compareTo(cd.getCellLocalId()); + } + } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellDU.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellDU.java index 4bd9f1c..0172049 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellDU.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellDU.java @@ -48,6 +48,12 @@ public class NRCellDU implements Serializable { private String administrativeState; @Column(name = "CELLSTATE") private String cellState; + @Column(name = "LATITUDE") + private Double latitude; + @Column(name = "LONGITUDE") + private Double longitude; + @Column(name = "NETWORKID") + private String networkId; @ElementCollection(fetch = FetchType.EAGER) @CollectionTable(name = "PLMNINFO", joinColumns = @JoinColumn(name = "nrcelldu_celllocalid")) private List<PLMNInfo> pLMNInfoList; @@ -63,6 +69,30 @@ public class NRCellDU implements Serializable { @Column(name = "prb") private Integer prbs; + public Double getLatitude() { + return latitude; + } + + public void setLatitude(Double latitude) { + this.latitude = latitude; + } + + public Double getLongitude() { + return longitude; + } + + public void setLongitude(Double longitude) { + this.longitude = longitude; + } + + public String getNetworkId() { + return networkId; + } + + public void setNetworkId(String networkId) { + this.networkId = networkId; + } + public Integer getCellLocalId() { return cellLocalId; } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellRelation.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellRelation.java new file mode 100644 index 0000000..e825b04 --- /dev/null +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NRCellRelation.java @@ -0,0 +1,74 @@ +/* + ** ============LICENSE_START======================================================= + ** Ran Simulator Controller + ** ================================================================================ + ** Copyright (C) 2022 Wipro Limited. + ** ================================================================================ + ** Licensed under the Apache License, Version 2.0 (the "License"); + ** you may not use this file except in compliance with the License. + ** You may obtain a copy of the License at + ** + ** http://www.apache.org/licenses/LICENSE-2.0 + ** + ** Unless required by applicable law or agreed to in writing, software + ** distributed under the License is distributed on an "AS IS" BASIS, + ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ** See the License for the specific language governing permissions and + ** limitations under the License. + ** ============LICENSE_END========================================================= + **/ + +package org.onap.ransim.rest.api.models; + +import java.io.Serializable; +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.CollectionTable; +import javax.persistence.Column; +import javax.persistence.ElementCollection; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.Table; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; + +@Entity +@Table(name = "NRCELLRELATION") +public class NRCellRelation implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer sno; + + @Column(name = "IDNRCELLRELATION") + private Integer idNRCellRelation; + @Column(name = "nRTCI") + private Integer nRTCI; + @Column(name = "ISHOALLOWED") + private boolean isHOAllowed; + @ManyToOne + @JoinColumn(name = "celllocalid", referencedColumnName="celllocalid") + private NRCellCU cellLocalId; + + public NRCellCU getCellLocalId() { return cellLocalId; } + + public void setCellLocalId(NRCellCU cellLocalId) { this.cellLocalId = cellLocalId; } + + public Integer getIdNRCellRelation() { return idNRCellRelation; } + + public void setIdNRCellRelation(Integer idNRCellRelation) { this.idNRCellRelation = idNRCellRelation; } + + public Integer getnRTCI() { return nRTCI; } + + public void setnRTCI(Integer nRTCI) { this.nRTCI = nRTCI; } + + public boolean getisHOAllowed() { return isHOAllowed; } + + public void setisHOAllowed(boolean isHOAllowed) { this.isHOAllowed = isHOAllowed; } +} diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NetconfServers.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NetconfServers.java index a33f616..3c56e26 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NetconfServers.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/models/NetconfServers.java @@ -21,7 +21,8 @@ package org.onap.ransim.rest.api.models; import java.util.Set; - +import java.util.Collection; +import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; @@ -44,6 +45,10 @@ public class NetconfServers { @OneToMany(targetEntity = CellDetails.class, fetch = FetchType.EAGER, cascade = CascadeType.ALL) private Set<CellDetails> cells; + @OneToMany(targetEntity = NRCellCU.class, fetch = FetchType.EAGER, cascade = CascadeType.ALL) + private Set<NRCellCU> cellCUList; + + public NetconfServers() { } @@ -96,4 +101,11 @@ public class NetconfServers { this.cells = cells; } + public Set<NRCellCU> getCellList() { + return cellCUList; + } + + public void setCellList(Set<NRCellCU> cellCUList) { + this.cellCUList = cellCUList; + } } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/NRCellRelationRepository.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/NRCellRelationRepository.java new file mode 100644 index 0000000..7e8f6ed --- /dev/null +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/repository/NRCellRelationRepository.java @@ -0,0 +1,30 @@ +/* =============LICENSE_START======================================================= + * Ran Simulator Controller + ** ================================================================================ + ** Copyright (C) 2022 Wipro Limited. + ** ================================================================================ + ** Licensed under the Apache License, Version 2.0 (the "License"); + ** you may not use this file except in compliance with the License. + ** You may obtain a copy of the License at + ** + ** http://www.apache.org/licenses/LICENSE-2.0 + ** + ** Unless required by applicable law or agreed to in writing, software + ** distributed under the License is distributed on an "AS IS" BASIS, + ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ** See the License for the specific language governing permissions and + ** limitations under the License. + ** ============LICENSE_END========================================================= + **/ + + + package org.onap.ransim.rest.api.repository; + + import org.onap.ransim.rest.api.models.NRCellRelation; + import org.springframework.data.repository.CrudRepository; + import org.springframework.stereotype.Repository; + + @Repository + public interface NRCellRelationRepository extends CrudRepository<NRCellRelation, Integer>{ + } + diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RANSliceConfigService.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RANSliceConfigService.java index 36bd48a..01ef2f1 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RANSliceConfigService.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RANSliceConfigService.java @@ -44,10 +44,12 @@ import org.onap.ransim.rest.api.models.RANSliceInfo; import org.onap.ransim.rest.api.models.RRMPolicyRatio; import org.onap.ransim.rest.api.models.SliceProfile; import org.onap.ransim.rest.api.models.TACells; +import org.onap.ransim.rest.api.models.*; import org.onap.ransim.rest.api.repository.GNBCUCPRepository; import org.onap.ransim.rest.api.repository.GNBCUUPRepository; import org.onap.ransim.rest.api.repository.GNBDURepository; import org.onap.ransim.rest.api.repository.NRCellCURepository; +import org.onap.ransim.rest.api.repository.NRCellRelationRepository; import org.onap.ransim.rest.api.repository.NearRTRICRepository; import org.onap.ransim.rest.api.repository.RANInventoryRepository; import org.onap.ransim.rest.api.repository.RRMPolicyRepository; @@ -56,6 +58,7 @@ import org.onap.ransim.rest.web.mapper.GNBCUCPModel; import org.onap.ransim.rest.web.mapper.GNBCUUPModel; import org.onap.ransim.rest.web.mapper.GNBDUModel; import org.onap.ransim.rest.web.mapper.NRCellCUModel; +import org.onap.ransim.rest.web.mapper.*; import org.onap.ransim.rest.web.mapper.NRCellDUModel; import org.onap.ransim.rest.web.mapper.NearRTRICModel; import org.onap.ransim.rest.web.mapper.RANSliceInfoModel; @@ -77,6 +80,9 @@ public class RANSliceConfigService { @Autowired private GNBDURepository gNBDURepository; + + @Autowired + private NRCellRelationRepository nRCellRelationRepository; @Autowired private NearRTRICRepository nearRTRICRepository; @@ -157,6 +163,7 @@ public class RANSliceConfigService { logger.debug("Error occured during saveGNBCUCP" + e.getMessage()); return null; } + logger.info("saved gNBCUCPmodel is : " + gNBCUCPModel); return gNBCUCPModel; } @@ -652,9 +659,23 @@ public class RANSliceConfigService { logger.debug("Request received to fetch all NearRTRICModel"); modelMapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT); List<NearRTRIC> rtricList = (List<NearRTRIC>) nearRTRICRepository.findAll(); + logger.info ("NearRTRIC model is from findall is : " + rtricList); List<NearRTRICModel> rtricmodels = rtricList.stream() .map(rtricEntity -> modelMapper.map(rtricEntity, NearRTRICModel.class)).collect(Collectors.toList()); + logger.info ("NearRTRIC model after mapping is : " + rtricmodels); return rtricmodels; } + public List<NRCellRelationModel> findAllNRCellRelation() { + logger.debug("Request received to fetch all NRCellRelationModel"); + modelMapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT); + + List<NRCellRelation> relationList = (List<NRCellRelation>) nRCellRelationRepository.findAll(); + logger.info ("NRCellRelation model is from findall is : " + relationList); + List<NRCellRelationModel> nRCellRelationmodels = relationList.stream() + .map(relationEntity -> modelMapper.map(relationEntity, NRCellRelationModel.class)).collect(Collectors.toList()); + logger.info ("NRCellRelation model after mapping is : " + nRCellRelationmodels); + return nRCellRelationmodels; + } + } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimControllerServices.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimControllerServices.java index 514666f..924f9b1 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimControllerServices.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimControllerServices.java @@ -57,6 +57,7 @@ import org.onap.ransim.rest.api.models.NbrDump; import org.onap.ransim.rest.api.models.NeighborDetails; import org.onap.ransim.rest.api.models.NeihborId; import org.onap.ransim.rest.api.models.NetconfServers; +import org.onap.ransim.rest.api.models.NRCellCU; import org.onap.ransim.rest.api.models.PLMNInfo; import org.onap.ransim.rest.api.models.RRMPolicyMember; import org.onap.ransim.rest.api.models.RRMPolicyRatio; @@ -72,6 +73,8 @@ import org.onap.ransim.rest.client.RestClient; import org.onap.ransim.rest.web.mapper.GNBCUCPModel; import org.onap.ransim.rest.web.mapper.GNBCUUPModel; import org.onap.ransim.rest.web.mapper.GNBDUModel; +import org.onap.ransim.rest.web.mapper.NRRelationData; +import org.onap.ransim.rest.web.mapper.NRCellRelationModel; import org.onap.ransim.rest.web.mapper.NRCellCUModel; import org.onap.ransim.rest.web.mapper.NRCellDUModel; import org.onap.ransim.rest.web.mapper.NSSAIData; @@ -82,6 +85,7 @@ import org.onap.ransim.utilities.RansimUtilities; import org.onap.ransim.websocket.model.*; import org.onap.ransim.websocket.model.ConfigData; import org.onap.ransim.websocket.model.ConfigPLMNInfo; +import org.onap.ransim.websocket.model.GNBCUCPFunction; import org.onap.ransim.websocket.model.ModifyNeighbor; import org.onap.ransim.websocket.model.ModifyPci; import org.onap.ransim.websocket.model.Neighbor; @@ -447,8 +451,9 @@ public class RansimControllerServices { } public void loadGNBFunctionProperties() { - try { - sdnrServerIp = System.getenv("SDNR_IP"); + try { + + sdnrServerIp = System.getenv("SDNR_IP"); sdnrServerPort = Integer.parseInt(System.getenv("SDNR_PORT")); sdnrServerUserid = System.getenv("SDNR_USER"); sdnrServerPassword = System.getenv("SDNR_PASSWORD"); @@ -458,11 +463,10 @@ public class RansimControllerServices { List<String> gNBList = new ArrayList<>(); for (GNBCUCPModel gNBCUCPModel : rtricModel.getgNBCUCPList()) { gNBList.add(gNBCUCPModel.getgNBCUName()); - setRanNetconfServers(gNBCUCPModel.getgNBCUName()); for (NRCellCUModel nRCellCUModel : gNBCUCPModel.getCellCUList()) { - if (nRCellCUModel.getpLMNInfoList().isEmpty()) { + if (nRCellCUModel.getpLMNInfoList().isEmpty()) { org.json.simple.parser.JSONParser jsonParser = new org.json.simple.parser.JSONParser(); - try (FileReader reader = new FileReader("/tmp/ransim-install/config/gNBCUConfig.json")) { + try (FileReader reader = new FileReader("/tmp/ransim-install/config/ransimdata.json")) { // Read JSON file Object obj = jsonParser.parse(reader); JSONArray List = (JSONArray) obj; @@ -481,6 +485,24 @@ public class RansimControllerServices { for (int j = 0; j < cellList.size(); j++) { JSONObject cell = (JSONObject) cellList.get(j); Long cellLocalId = (Long) cell.get("cellLocalId"); + String nRCellRelVar = (String) cell.get("nRCellRelationList").toString(); + Object nRCellVarObj = jsonParser.parse(nRCellRelVar); + JSONArray nRCellRelList = (JSONArray) nRCellVarObj; + List<NRCellRelationModel> nrCellRelationModelList = new ArrayList<NRCellRelationModel>(); + for (int k = 0; k < nRCellRelList.size(); k++) { + JSONObject nrcellrel = (JSONObject) nRCellRelList.get(k); + Long idNRCellRelation = (Long) nrcellrel.get("idNRCellRelation"); + JSONObject attributes = (JSONObject) nrcellrel.get("attributes"); + Long nRTCI = (Long) attributes.get("nRTCI"); + String isHOAllowed = (String) attributes.get("isHOAllowed"); + NRRelationData nrRelationDataObj = new NRRelationData(); + nrRelationDataObj.setNRTCI(nRTCI.intValue()); + nrRelationDataObj.setIsHOAllowed(Boolean.valueOf(isHOAllowed)); + NRCellRelationModel nrCellRelationModel = new NRCellRelationModel(); + nrCellRelationModel.setIdNRCellRelation(idNRCellRelation.intValue()); + nrCellRelationModel.setNRRelationData(nrRelationDataObj); + nrCellRelationModelList.add(nrCellRelationModel); + } String plmVar = (String) cell.get("pLMNInfoList").toString(); Object pmlVarObj = jsonParser.parse(plmVar); JSONArray pmlList = (JSONArray) pmlVarObj; @@ -506,8 +528,30 @@ public class RansimControllerServices { } NRCellCUModel nrCellCUModel = new NRCellCUModel(); nrCellCUModel.setCellLocalId(cellLocalId.intValue()); + nrCellCUModel.setNRCellRelation(nrCellRelationModelList); nrCellCUModel.setpLMNInfoList(plmnInfoModelList); + List<String> attachedNoeds; + if (serverIdIpNodeMapping.isEmpty()) { + attachedNoeds = new ArrayList<String>(); + attachedNoeds.add(Integer.toString(nrCellCUModel.getCellLocalId())); + serverIdIpNodeMapping.put(gNBCUCPModel.getgNBCUName(), attachedNoeds); + if (attachedNoeds.size() > numberOfCellsPerNcServer) { + log.info("Attaching Cell:"); + } + } else { + attachedNoeds = serverIdIpNodeMapping.get(gNBCUCPModel.getgNBCUName()); + attachedNoeds.add(Integer.toString(nrCellCUModel.getCellLocalId())); + serverIdIpNodeMapping.put(gNBCUCPModel.getgNBCUName(), attachedNoeds); + if (attachedNoeds.size() > numberOfCellsPerNcServer) { + log.info("Attaching Cell:"); + } + } + log.info("Attaching Cell:" + nrCellCUModel.getCellLocalId() + " to " + + gNBCUCPModel.getgNBCUName()); + setRanCUCPNetconfServers(nrCellCUModel.getCellLocalId()); + dumpSessionDetails(); nRCellCUModelList.add(nrCellCUModel); + log.info("NRCELLCU LIST is : " + nRCellCUModelList); } GNBCUCPModel gNBModel = new GNBCUCPModel(); gNBModel.setgNBCUName(gNBCUName); @@ -518,6 +562,7 @@ public class RansimControllerServices { gNBModel.setNearRTRICId(nearRTRICId.intValue()); gNBModel.setCellCUList(nRCellCUModelList); ranSliceConfigService.saveGNBCUCP(gNBModel); + log.info("gnBCUCP model is: " + gNBModel); } } catch (Exception e) { log.error("Properties file error", e); @@ -533,29 +578,60 @@ public class RansimControllerServices { gNBList.add(gNBDUModel.getgNBDUId().toString()); setRanNetconfServers(gNBDUModel.getgNBDUId().toString()); } + log.info(" gNBList in loadGNB is : " + gNBList); unassignedrtRicIds.add(rtricModel.getNearRTRICId().toString()); ricIdFunctionMapping.put(rtricModel.getNearRTRICId().toString(), gNBList); setRanNetconfServers(rtricModel.getNearRTRICId().toString()); - } - } catch (Exception e) { - log.error("Properties file error", e); - } + + } + } catch (Exception e) { + log.error("Properties file error", e); + } } public void setRanNetconfServers(String serverId) { - try { + try { + NetconfServers server = ransimRepo.getNetconfServer(serverId); + if (server == null) { + server = new NetconfServers(); + server.setServerId(serverId); + } + ransimRepo.mergeNetconfServers(server); + + } catch (Exception eu) { + log.error("setRanNetconfServers Function Error", eu); + + + } - NetconfServers server = ransimRepo.getNetconfServer(serverId); - if (server == null) { - server = new NetconfServers(); - server.setServerId(serverId); - } - ransimRepo.mergeNetconfServers(server); - - } catch (Exception eu) { - log.error("setNetconfServers Function Error", eu); + } - } + + public void setRanCUCPNetconfServers(Integer cellLocalId) { + + NRCellCU currentCell = ransimRepo.getNRCellCUDetail(cellLocalId); + Set<NRCellCU> newList = new HashSet<NRCellCU>(); + + try { + if (currentCell != null) { + NetconfServers server = ransimRepo.getNetconfServer(currentCell.getgNBCUCPFunction().getgNBCUName()); + if (server == null) { + server = new NetconfServers(); + server.setServerId(currentCell.getgNBCUCPFunction().getgNBCUName()); + } else { + newList.addAll(server.getCellList()); + + } + newList.add(currentCell); + server.setCellList(newList); + log.info("setNetconfServer CUCP: cellLocalId: " + cellLocalId + ", ip: " + server.getIp() + ", portNum: " + server.getNetconfPort() + + ", serverId:" + currentCell.getgNBCUCPFunction().getgNBCUName()); + + ransimRepo.mergeNetconfServers(server); + } + } catch (Exception eu) { + log.error("setRanCUCPNetconfServers Function Error", eu); + } } /** @@ -981,6 +1057,7 @@ public class RansimControllerServices { } for (NearRTRICModel rtRicModel : rtricModelList) { + log.info(" rtric model in sendRanInintialConfig is : " + rtricModelList); if (rtRicModel.getNearRTRICId().toString().equals(serverId)) { getInitalConfigTree(rtRicModel, serverId); NetconfClient netconfClient = new NetconfClient("ransim", "admin", "admin", server.getServerId(), @@ -1023,6 +1100,7 @@ public class RansimControllerServices { attributes.setLocationName("Palmdale"); attributes.setgNBId(rtRicModel.getgNBId().toString()); nearRTRIC.setAttributes(attributes); + log.info("RTRIC model is : " + rtRicModel); List<GNBCUUPFunction> gNBCUUPFunctionList = new ArrayList<>(); for (GNBCUUPModel gNBCUUPModel : rtRicModel.getgNBCUUPList()) { @@ -1059,6 +1137,39 @@ public class RansimControllerServices { gNBDUFunctionList.add(gNBDUFunction); } } + /* List<GNBCUCPFunction> gNBCUCPFunctionList = new ArrayList<>(); + for (GNBCUCPModel gnbcucpModel : rtRicModel.getgNBCUCPList()){ + if (gnbcucpModel.getgNBId().toString().equals(serverId) + || rtRicModel.getNearRTRICId().toString().equals(serverId)) { + GNBCUCPFunction gNBCUCPFunction = new GNBCUCPFunction(); + Attributes cUCPattributes = new Attributes(); + cUCPattributes.setgNBId(gnbcucpModel.getgNBId().toString()); + gNBCUCPFunction.setAttributes(cUCPattributes); + gNBCUCPFunction.setIdGNBCUCPFunction(gnbcucpModel.getgNBCUName()); + List<NRCellCU> nRCellCUList = new ArrayList<>(); + for (NRCellCUModel nRCellCUModel : gnbcucpModel.getCellCUList()) { + NRCellCU nRCellCU = new NRCellCU(); + log.info("gnbcucpModel from DB:"+gnbcucpModel); + nRCellCU.setIdNRCellCU(nRCellCUModel.getCellLocalId().toString()); + List<NRCellRelation> nRCellRelationList = new ArrayList<NRCellRelation>(); + for(NRCellRelationModel nrCellRelationModel : nRCellCUModel.getNRCellRelationList()) + { + NRCellRelation nRCellRelation = new NRCellRelation(); + nRCellRelation.setIdNRCellRelation(nrCellRelationModel.getIdNRCellRelation()); + AttributesNRRelation attributesNRRelation = new AttributesNRRelation(); + attributesNRRelation.setNRTCI(nrCellRelationModel.getNRRelationData().getNRTCI()); + attributesNRRelation.setIsHoAllowed(nrCellRelationModel.getNRRelationData().getIsHOAllowed()); + nRCellRelation.setAttributes(attributesNRRelation); + nRCellRelationList.add(nRCellRelation); + nRCellCU.setNRCellRelation(nRCellRelationList); + } + nRCellCUList.add(nRCellCU); + } + gNBCUCPFunction.setnRCellCU(nRCellCUList); + gNBCUCPFunctionList.add(gNBCUCPFunction); + } + } + nearRTRIC.setgNBCUCPFunction(gNBCUCPFunctionList); */ nearRTRIC.setgNBDUFunction(gNBDUFunctionList); nearRTRIC.setgNBCUUPFunction(gNBCUUPFunctionList); nearRTRICList.add(nearRTRIC); diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimRepositoryService.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimRepositoryService.java index ecc76b3..f707369 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimRepositoryService.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimRepositoryService.java @@ -29,9 +29,11 @@ import org.onap.ransim.rest.api.models.CellDetails; import org.onap.ransim.rest.api.models.CellNeighbor; import org.onap.ransim.rest.api.models.NeighborDetails; import org.onap.ransim.rest.api.models.NetconfServers; +import org.onap.ransim.rest.api.models.NRCellCU; import org.onap.ransim.rest.api.models.OperationLog; import org.onap.ransim.rest.api.repository.CellDetailsRepo; import org.onap.ransim.rest.api.repository.CellNeighborRepo; +import org.onap.ransim.rest.api.repository.NRCellCURepository; import org.onap.ransim.rest.api.repository.NeighborDetailsRepo; import org.onap.ransim.rest.api.repository.NetconfServersRepo; import org.onap.ransim.rest.api.repository.OperationLogRepo; @@ -47,6 +49,9 @@ public class RansimRepositoryService { CellDetailsRepo cellDetailsRepo; @Autowired + NRCellCURepository nRCellCURepo; + + @Autowired NetconfServersRepo netconfServersRepo; @Autowired @@ -73,6 +78,36 @@ public class RansimRepositoryService { return cellDetails; } + /** + * Method to retrieve cellCU details + * + * @param cellLocalId + * @return + */ + public NRCellCU getNRCellCUDetail(Integer cellLocalId) { + Optional<NRCellCU> cd = nRCellCURepo.findById(cellLocalId); + NRCellCU nrCellCU = null; + if (cd.isPresent()) { + nrCellCU = cd.get(); + } + return nrCellCU; + } + + /** + * Method to retrieve cellCU neighbors + * + * @param cellLocalId + * @return + */ + public NRCellCU getCellRelation(Integer cellLocalId) { + Optional<NRCellCU> cellNeighborDetails = nRCellCURepo.findById(cellLocalId); + NRCellCU cellRelation = null; + if (cellNeighborDetails.isPresent()) { + cellRelation = cellNeighborDetails.get(); + } + return cellRelation; + } + /** * Method to retrieve netconf server details * diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NRCellCUModel.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NRCellCUModel.java index 0ee438b..60228f4 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NRCellCUModel.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NRCellCUModel.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * Ran Simulator Controller * ================================================================================ - * Copyright (C) 2020-2021 Wipro Limited. + * Copyright (C) 2020-2022 Wipro Limited. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ public class NRCellCUModel { private Integer cellLocalId; private List<PLMNInfoModel> pLMNInfoList; private String resourceType; + private List<NRCellRelationModel> nRCellRelationList; public Integer getCellLocalId() { return cellLocalId; @@ -51,9 +52,17 @@ public class NRCellCUModel { this.resourceType = resourceType; } + public List<NRCellRelationModel> getNRCellRelationList() { + return nRCellRelationList; + } + + public void setNRCellRelation(List<NRCellRelationModel> nRCellRelationList) { + this.nRCellRelationList = nRCellRelationList; + } + @Override public String toString() { - return "NRCellCUModel [cellLocalId=" + cellLocalId + ", pLMNInfoList=" + pLMNInfoList + ", resourceType=" + return "NRCellCUModel [cellLocalId=" + cellLocalId + ", pLMNInfoList=" + pLMNInfoList + ", nRCellRelationList=" + nRCellRelationList + ", resourceType=" + resourceType + "]"; } } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NRCellRelationModel.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NRCellRelationModel.java new file mode 100644 index 0000000..aacd5b1 --- /dev/null +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NRCellRelationModel.java @@ -0,0 +1,51 @@ +/* ============LICENSE_START======================================================= + * Ran Simulator Controller + ** ================================================================================ + ** Copyright (C) 2022 Wipro Limited. + ** ================================================================================ + ** Licensed under the Apache License, Version 2.0 (the "License"); + ** you may not use this file except in compliance with the License. + ** You may obtain a copy of the License at + ** + ** http://www.apache.org/licenses/LICENSE-2.0 + ** + ** Unless required by applicable law or agreed to in writing, software + ** distributed under the License is distributed on an "AS IS" BASIS, + ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ** See the License for the specific language governing permissions and + ** limitations under the License. + ** ============LICENSE_END========================================================= + **/ + + package org.onap.ransim.rest.web.mapper; + + import org.onap.ransim.rest.web.mapper.NRRelationData; + + public class NRCellRelationModel { + + private Integer idNRCellRelation; + private NRRelationData nRRelationData; + + + public Integer getIdNRCellRelation() { + return idNRCellRelation; + } + + public void setIdNRCellRelation(Integer idNRCellRelation) { + this.idNRCellRelation = idNRCellRelation; + } + + public NRRelationData getNRRelationData() { + return nRRelationData; + } + + public void setNRRelationData(NRRelationData nRRelationData) { + this.nRRelationData = nRRelationData; + } + + @Override + public String toString() { + return "NRCellRelationModel [idNRCellRelation=" + idNRCellRelation + ", nRRelationData=" + nRRelationData + "]"; + } + } + diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NRRelationData.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NRRelationData.java new file mode 100644 index 0000000..29dc2d4 --- /dev/null +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/web/mapper/NRRelationData.java @@ -0,0 +1,47 @@ +/* ========LICENSE_START======================================================= + * Ran Simulator Controller + ** ================================================================================ + ** Copyright (C) 2022 Wipro Limited. + ** ================================================================================ + ** Licensed under the Apache License, Version 2.0 (the "License"); + ** you may not use this file except in compliance with the License. + ** You may obtain a copy of the License at + ** + ** http://www.apache.org/licenses/LICENSE-2.0 + ** + ** Unless required by applicable law or agreed to in writing, software + ** distributed under the License is distributed on an "AS IS" BASIS, + ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ** See the License for the specific language governing permissions and + ** limitations under the License. + ** ============LICENSE_END========================================================= + **/ + + package org.onap.ransim.rest.web.mapper; + + public class NRRelationData { + + private Integer nRTCI; + private boolean isHOAllowed; + + public Integer getNRTCI() { + return nRTCI; + } + + public void setNRTCI(Integer nRTCI) { + this.nRTCI = nRTCI; + } + + public boolean getIsHOAllowed() { + return isHOAllowed; + } + + public void setIsHOAllowed(boolean isHOAllowed) { + this.isHOAllowed = isHOAllowed; + } + + @Override + public String toString() { + return "NRRelationData [nRTCI=" + nRTCI + ", isHOAllowed=" + isHOAllowed + "]"; + } + } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/AttributesNRRelation.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/AttributesNRRelation.java new file mode 100644 index 0000000..791c78d --- /dev/null +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/AttributesNRRelation.java @@ -0,0 +1,48 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + ** ================================================================================ + ** Copyright (C) 2022 Wipro Limited. + ** ================================================================================ + ** Licensed under the Apache License, Version 2.0 (the "License"); + ** you may not use this file except in compliance with the License. + ** You may obtain a copy of the License at + ** + ** http://www.apache.org/licenses/LICENSE-2.0 + ** + ** Unless required by applicable law or agreed to in writing, software + ** distributed under the License is distributed on an "AS IS" BASIS, + ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ** See the License for the specific language governing permissions and + ** limitations under the License. + ** ============LICENSE_END========================================================= + **/ + + package org.onap.ransim.websocket.model; + + import com.fasterxml.jackson.annotation.JsonInclude; + import com.fasterxml.jackson.annotation.JsonProperty; + + @JsonInclude(JsonInclude.Include.NON_NULL) + public class AttributesNRRelation { + + private Integer nRTCI; + private boolean isHOAllowed; + + public Integer getNRTCI() { + return nRTCI; + } + + public void setNRTCI(Integer nRTCI) { + this.nRTCI = nRTCI; + } + + public boolean getIsHOAllowed() { + return isHOAllowed; + } + + public void setIsHoAllowed(boolean isHOAllowed) { + this.isHOAllowed = isHOAllowed; + } + } + diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/CommonEventHeaderPm.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/CommonEventHeaderPm.java index e31a62c..a023286 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/CommonEventHeaderPm.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/CommonEventHeaderPm.java @@ -24,6 +24,7 @@ public class CommonEventHeaderPm { private String sourceName; private String sourceUuid; + private String reportingEntityName; private long startEpochMicrosec; private long lastEpochMicrosec; @@ -58,5 +59,15 @@ public class CommonEventHeaderPm { public void setLastEpochMicrosec(long lastEpochMicrosec) { this.lastEpochMicrosec = lastEpochMicrosec; } + public void setReportingEntityName(String reportingEntityName) { this.reportingEntityName = reportingEntityName; } + + public String getReportingEntityName(){ return reportingEntityName; } + + @Override + public String toString() { + return "CommonEventHeaderPm [sourceName=" + sourceName + ", sourceUuid=" + sourceUuid + ", reportingEntityName=" + + reportingEntityName + ", startEpochMicrosec=" + startEpochMicrosec + ", lastEpochMicrosec=" + + lastEpochMicrosec + "]"; + } } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/GNBCUCPFunction.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/GNBCUCPFunction.java new file mode 100644 index 0000000..2d228e0 --- /dev/null +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/GNBCUCPFunction.java @@ -0,0 +1,71 @@ +/* + * =============LICENSE_START======================================================= + * Ran Simulator Controller + ** ================================================================================ + ** Copyright (C) 2022 Wipro Limited. + ** ================================================================================ + ** Licensed under the Apache License, Version 2.0 (the "License"); + ** you may not use this file except in compliance with the License. + ** You may obtain a copy of the License at + ** + ** http://www.apache.org/licenses/LICENSE-2.0 + ** + ** Unless required by applicable law or agreed to in writing, software + ** distributed under the License is distributed on an "AS IS" BASIS, + ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ** See the License for the specific language governing permissions and + ** limitations under the License. + ** ============LICENSE_END========================================================= + **/ + + package org.onap.ransim.websocket.model; + + import com.fasterxml.jackson.annotation.JsonProperty; + import com.fasterxml.jackson.annotation.JsonInclude; + + import java.util.List; + + @JsonInclude(JsonInclude.Include.NON_NULL) + public class GNBCUCPFunction { + + private String idGNBCUCPFunction; + private Attributes attributes; + + @JsonProperty("NRCellCU") + public List<NRCellCU> nRCellCU; + + + public String getIdGNBCUCPFunction() { + return idGNBCUCPFunction; + } + + + public void setIdGNBCUCPFunction(String idGNBCUCPFunction) { + this.idGNBCUCPFunction = idGNBCUCPFunction; + } + + + public Attributes getAttributes() { + return attributes; + } + + + public void setAttributes(Attributes attributes) { + this.attributes = attributes; + } + + + public List<NRCellCU> getnRCellCU() { + return nRCellCU; + } + + + public void setnRCellCU(List<NRCellCU> nRCellCU) { + this.nRCellCU = nRCellCU; + } + + + public GNBCUCPFunction() { + } + } + diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/NRCellCU.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/NRCellCU.java new file mode 100644 index 0000000..9f83f8d --- /dev/null +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/NRCellCU.java @@ -0,0 +1,73 @@ +/* ==============LICENSE_START======================================================= + * Ran Simulator Controller + ** ================================================================================ + ** Copyright (C) 2022 Wipro Limited. + ** ================================================================================ + ** Licensed under the Apache License, Version 2.0 (the "License"); + ** you may not use this file except in compliance with the License. + ** You may obtain a copy of the License at + ** + ** http://www.apache.org/licenses/LICENSE-2.0 + ** + ** Unless required by applicable law or agreed to in writing, software + ** distributed under the License is distributed on an "AS IS" BASIS, + ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ** See the License for the specific language governing permissions and + ** limitations under the License. + ** ============LICENSE_END========================================================= + **/ + + package org.onap.ransim.websocket.model; + + import com.fasterxml.jackson.annotation.JsonInclude; + import com.fasterxml.jackson.annotation.JsonProperty; + + import java.util.List; + + @JsonInclude(JsonInclude.Include.NON_NULL) + public class NRCellCU { + + private String idNRCellCU; + private Attributes attributes; + + @JsonProperty("NRCellRelation") + private List<NRCellRelation> NRCellRelation; + + public NRCellCU() { + } + + public String getIdNRCellCU() { + return idNRCellCU; + } + + public void setIdNRCellCU(String idNRCellCU) { + this.idNRCellCU = idNRCellCU; + } + + public Attributes getAttributes() { + return attributes; + } + + public void setAttributes(Attributes attributes) { + this.attributes = attributes; + } + + public List<NRCellRelation> getNRCellRelation() { + return NRCellRelation; + } + + public void setNRCellRelation(List<NRCellRelation> NRCellRelation) { + this.NRCellRelation = NRCellRelation; + } + + public NRCellCU(Attributes attributes) { + super(); + this.attributes = attributes; + } + + public NRCellCU(List<NRCellRelation> NRCellRelation) { + super(); + this.NRCellRelation = NRCellRelation; + } + } + diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/NRCellRelation.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/NRCellRelation.java new file mode 100644 index 0000000..f419df8 --- /dev/null +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/NRCellRelation.java @@ -0,0 +1,52 @@ +/* + * ============LICENSE_START======================================================= + * Ran Simulator Controller + ** ================================================================================ + ** Copyright (C) 2022 Wipro Limited. + ** ================================================================================ + ** Licensed under the Apache License, Version 2.0 (the "License"); + ** you may not use this file except in compliance with the License. + ** You may obtain a copy of the License at + ** + ** http://www.apache.org/licenses/LICENSE-2.0 + ** + ** Unless required by applicable law or agreed to in writing, software + ** distributed under the License is distributed on an "AS IS" BASIS, + ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ** See the License for the specific language governing permissions and + ** limitations under the License. + ** ============LICENSE_END========================================================= + **/ + + package org.onap.ransim.websocket.model; + + import com.fasterxml.jackson.annotation.JsonInclude; + + @JsonInclude(JsonInclude.Include.NON_NULL) + public class NRCellRelation { + + private Integer idNRCellRelation; + private AttributesNRRelation attributes; + + + public NRCellRelation() { + } + + public Integer getIdNRCellRelation(){ return idNRCellRelation; } + + public void setIdNRCellRelation(Integer idNRCellRelation){ this.idNRCellRelation = idNRCellRelation; } + + public AttributesNRRelation getAttributes() { + return attributes; + } + + public void setAttributes(AttributesNRRelation attributes) { + this.attributes = attributes; + } + + public NRCellRelation(AttributesNRRelation attributes) { + super(); + this.attributes = attributes; + } + } + diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/NearRTRIC.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/NearRTRIC.java index 0178fa1..439ca8a 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/NearRTRIC.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/model/NearRTRIC.java @@ -38,6 +38,9 @@ public class NearRTRIC { @JsonProperty("GNBCUUPFunction") private List<GNBCUUPFunction> gNBCUUPFunction; + @JsonProperty("GNBCUCPFunction") + private List<GNBCUCPFunction> gNBCUCPFunction; + public String getIdNearRTRIC() { return idNearRTRIC; } @@ -71,6 +74,10 @@ public class NearRTRIC { } public NearRTRIC() { - } + + public void setgNBCUCPFunction(List<GNBCUCPFunction> gNBCUCPFunctionList) { this.gNBCUCPFunction = gNBCUCPFunction; } + + public List<GNBCUCPFunction> getgNBCUCPFunction(){ return gNBCUCPFunction;} + } diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/server/RansimWebSocketServer.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/server/RansimWebSocketServer.java index 52c9445..6168764 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/server/RansimWebSocketServer.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/websocket/server/RansimWebSocketServer.java @@ -66,7 +66,7 @@ public class RansimWebSocketServer { public void onOpen(Session session, @PathParam("IpPort") String ipPort) { try { String useCaseType = RansimControllerServices.useCaseType; - switch (useCaseType) { + /*switch (useCaseType) { case "sonUsecase": log.info("RansimWebSocketServer : Assign serverId wrt SlicingUsecase"); String serverId = rscServices.addWebSocketSessions(ipPort, session); @@ -78,27 +78,24 @@ public class RansimWebSocketServer { "RansimWebSocketServer: No assigned ServerId found - No intial configuration sent to New Agent " + ipPort); } - break; - case "ranSlicingUsecase": - log.info("RansimWebSocketServer : Assign serverId wrt RANSlicingUsecase"); - String ranServerId = rscServices.addRanWebSocketSessions(ipPort, session); - if (ranServerId != null) { - log.info("New websocket session added for " + ranServerId); - rscServices.sendRanInitialConfigForNewAgent(ipPort, ranServerId); - } else { - log.info( - "RansimWebSocketServer: No assigned ServerId found - No intial configuration sent to New Agent " - + ipPort); - } - break; - default: - log.info("RansimWebSocketServer: No assigned ServerId found"); - } - } catch (Exception e) { - log.info("Exception in onOpen:", e); + break;*/ + if(useCaseType == "sonUsecase" || useCaseType == "ranSlicingUsecase") { + log.info("RansimWebSocketServer : Assign serverId wrt RANSlicingUsecase"); + String ranServerId = rscServices.addRanWebSocketSessions(ipPort, session); + if (ranServerId != null) { + log.info("New websocket session added for " + ranServerId); + rscServices.sendRanInitialConfigForNewAgent(ipPort, ranServerId); + } + else { + log.info("RansimWebSocketServer: No assigned ServerId found - No intial configuration sent to New Agent" + ipPort); + } + } + else + log.info("RansimWebSocketServer: No assigned ServerId found"); + } catch (Exception e) { + log.info("Exception in onOpen:", e); } - } - + } /** * Handles the message sent from the agent. * |