Code Review
/
ric-plt
/
xapp-frame.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
A wrapper for RNIB event subscription
[ric-plt/xapp-frame.git]
/
pkg
/
xapp
/
xapp.go
diff --git
a/pkg/xapp/xapp.go
b/pkg/xapp/xapp.go
index
124fbcf
..
0ae9b02
100755
(executable)
--- a/
pkg/xapp/xapp.go
+++ b/
pkg/xapp/xapp.go
@@
-37,6
+37,7
@@
var (
Logger *Log
Config Configurator
Subscription *Subscriber
Logger *Log
Config Configurator
Subscription *Subscriber
+ Alarm *AlarmClient
readyCb ReadyCB
readyCbParams interface{}
)
readyCb ReadyCB
readyCbParams interface{}
)
@@
-51,6
+52,8
@@
func SetReadyCB(cb ReadyCB, params interface{}) {
}
func xappReadyCb(params interface{}) {
}
func xappReadyCb(params interface{}) {
+ Alarm = NewAlarmClient(viper.GetString("alarm.MOId"), viper.GetString("alarm.APPId"))
+
if readyCb != nil {
readyCb(readyCbParams)
}
if readyCb != nil {
readyCb(readyCbParams)
}
@@
-68,10
+71,10
@@
func init() {
if viper.IsSet("db.namespaces") {
namespaces := viper.GetStringSlice("db.namespaces")
if viper.IsSet("db.namespaces") {
namespaces := viper.GetStringSlice("db.namespaces")
- if namespaces[0] != "" {
+ if
len(namespaces) > 0 &&
namespaces[0] != "" {
Sdl = NewSDLClient(viper.GetStringSlice("db.namespaces")[0])
}
Sdl = NewSDLClient(viper.GetStringSlice("db.namespaces")[0])
}
- if namespaces[1] != "" {
+ if
len(namespaces) > 1 &&
namespaces[1] != "" {
Rnib = NewRNIBClient(viper.GetStringSlice("db.namespaces")[1])
}
} else {
Rnib = NewRNIBClient(viper.GetStringSlice("db.namespaces")[1])
}
} else {