Change-Id: I5ed314b37bbc9021efa7cd217a74e8350580a66a
Signed-off-by: Tuan Nguyen <hoang.su.tk@gmail.com>
"strconv"\r
"time"\r
"unsafe"\r
"strconv"\r
"time"\r
"unsafe"\r
\r
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/clientmodel"\r
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"\r
\r
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/clientmodel"\r
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"\r
}\r
\r
func NewControl() Control {\r
}\r
\r
func NewControl() Control {\r
- xapp.Logger.Info("In new control\n")\r
+ xapp.Logger.Info("In new control")\r
- xapp.Logger.Info("returning control\n")\r
+ xapp.Logger.Info("returning control")\r
return Control{\r
make(chan *xapp.RMRParams),\r
influxdb2.NewClient("http://ricplt-influxdb.ricplt:8086", "client"),\r
return Control{\r
make(chan *xapp.RMRParams),\r
influxdb2.NewClient("http://ricplt-influxdb.ricplt:8086", "client"),\r
}\r
func create_db() {\r
//Create a database named kpimon in influxDB\r
}\r
func create_db() {\r
//Create a database named kpimon in influxDB\r
- xapp.Logger.Info("In create_db\n")\r
+ xapp.Logger.Info("In create_db")\r
_, err := http.Post("http://ricplt-influxdb.ricplt:8086/query?q=create%20database%20kpimon", "", nil)\r
if err != nil {\r
xapp.Logger.Error("Create database failed!")\r
}\r
_, err := http.Post("http://ricplt-influxdb.ricplt:8086/query?q=create%20database%20kpimon", "", nil)\r
if err != nil {\r
xapp.Logger.Error("Create database failed!")\r
}\r
- xapp.Logger.Info("exiting create_db\n")\r
+ xapp.Logger.Info("exiting create_db")\r
}\r
\r
func (c Control) getEnbList() ([]*xapp.RNIBNbIdentity, error) {\r
}\r
\r
func (c Control) getEnbList() ([]*xapp.RNIBNbIdentity, error) {\r
- xapp.Logger.Info("List for connected eNBs :")\r
- for index, enb := range enbs {\r
- xapp.Logger.Info("%d. enbid: %s", index+1, enb.InventoryName)\r
+ var connected_enb_names []string\r
+ for _, enb := range enbs {\r
+ connected_enb_names = append(connected_enb_names, enb.InventoryName)\r
+ xapp.Logger.Info("List for connected eNBs: [%s]", strings.Join(connected_enb_names, ", "))\r
+ \r
return enbs, nil\r
}\r
\r
return enbs, nil\r
}\r
\r
xapp.Logger.Error("err: %s", err)\r
return nil, err\r
}\r
xapp.Logger.Error("err: %s", err)\r
return nil, err\r
}\r
- xapp.Logger.Info("List of connected gNBs :")\r
- for index, gnb := range gnbs {\r
- xapp.Logger.Info("%d. gnbid : %s", index+1, gnb.InventoryName)\r
+\r
+ var connected_gnb_names []string\r
+ for _, gnb := range gnbs {\r
+ connected_gnb_names = append(connected_gnb_names, gnb.InventoryName)\r
+ xapp.Logger.Info("List for connected gNBs: [%s]", strings.Join(connected_gnb_names, ", "))\r
+\r
return gnbs, nil\r
}\r
\r
return gnbs, nil\r
}\r
\r
{\r
"xapp_name": "kpimon-go",\r
{\r
"xapp_name": "kpimon-go",\r
+ "version": "2.0.2-alpha",\r
"containers": [\r
{\r
"name": "kpimon-go",\r
"containers": [\r
{\r
"name": "kpimon-go",\r
+ "livenessProbe": {\r
+ "httpGet": {\r
+ "path": "ric/v1/health/alive",\r
+ "port": 8080\r
+ },\r
+ "initialDelaySeconds": 5,\r
+ "periodSeconds": 15\r
+ },\r
+ "readinessProbe": {\r
+ "httpGet": {\r
+ "path": "ric/v1/health/ready",\r
+ "port": 8080\r
+ },\r
+ "initialDelaySeconds": 5,\r
+ "periodSeconds": 15\r
+ },\r
"messaging": {\r
"ports": [\r
{\r
"messaging": {\r
"ports": [\r
{\r