// TODO: arguments should be validated (filename; xm-url; sbi-if; rest-url; rest-port)
args = make(map[string]*string)
args["configfile"] = flag.String("configfile", "/etc/rtmgrcfg.json", "Routing manager's configuration file path")
- args["nbi"] = flag.String("nbi", "httpGetter", "Northbound interface module to be used. Valid values are: 'httpGetter | httpRESTful'")
+ args["nbi"] = flag.String("nbi", "httpRESTful", "Northbound interface module to be used. Valid values are: 'httpGetter | httpRESTful'")
args["sbi"] = flag.String("sbi", "nngpush", "Southbound interface module to be used. Valid values are: 'nngpush | nngpub'")
args["rpe"] = flag.String("rpe", "rmrpush", "Route Policy Engine to be used. Valid values are: 'rmrpush | rmrpub'")
args["sdl"] = flag.String("sdl", "file", "Datastore enginge to be used. Valid values are: 'file'")
server.Port, err = strconv.Atoi(nbiUrl.Port())
if err != nil {
- rtmgr.Logger.Error("Invalid NBI RestAPI port")
- os.Exit(1)
+ rtmgr.Logger.Error("Invalid NBI RestAPI port")
+ os.Exit(1)
}
- server.Host = nbiUrl.Hostname()
+ server.Host = "0.0.0.0"
// set handlers
api.HandleProvideXappHandleHandler = handle.ProvideXappHandleHandlerFunc(
func(params handle.ProvideXappHandleParams) middleware.Responder {
XApps: *swag.String("[]"),
Version: *swag.Int64(1),
Event: *swag.String("any"),
- ID: *swag.Int64(123456),
+ ID: *swag.String("123456"),
}
ch := make(chan *models.XappCallbackData)
XApps: *swag.String("[]"),
Version: *swag.Int64(1),
Event: *swag.String("someevent"),
- ID: *swag.Int64(123456)}
+ ID: *swag.String("123456")}
var httpRestful, _ = GetNbi("httpRESTful")
err := httpRestful.(*HttpRestful).ProvideXappHandleHandlerImpl(datach, &data)
if err != nil {
XApps: *swag.String("[]"),
Version: *swag.Int64(1),
Event: *swag.String("someevent"),
- ID: *swag.Int64(123456)}
+ ID: *swag.String("123456")}
err := validateXappCallbackData(&data)
if err != nil {
XApps: *swag.String("{}"),
Version: *swag.Int64(1),
Event: *swag.String("someevent"),
- ID: *swag.Int64(123456)}
+ ID: *swag.String("123456")}
err := validateXappCallbackData(&data)
if err == nil {