Commit 95d7c0b0 authored by Yann Garcia's avatar Yann Garcia
Browse files

Bug fixed in Router

parent 4c1216c1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ set -e
set +x

docker pull golang
docker run --rm --expose 80 --expose 443 -it -v$PWD:/opt/local/etsi/demo6  -v$HOME/var:/opt/local/etsi/var golang bash -c "cd /opt/local/etsi/demo6/bin && ./demo6 ../app_instance.yaml"
docker run --rm --expose 80 --expose 443 -p 80:80 -p 443:443 -it -v$PWD:/opt/local/etsi/demo6  -v$HOME/var:/opt/local/etsi/var golang bash -c "cd /opt/local/etsi/demo6/bin && ./demo6 ../app_instance.yaml"

echo ""
echo ">>> Done"
+3 −1
Original line number Diff line number Diff line
@@ -1100,6 +1100,7 @@ func mec013_subscribe_ue_loc(ue_address string) (body []byte, response *http.Res
		SubscriptionType:        "UserLocationEventSubscription",
	}
	userLocationEventSubscription.LocationEventCriteria = append(userLocationEventSubscription.LocationEventCriteria, "ENTERING_AREA_EVENT")
	userLocationEventSubscription.LocationEventCriteria = append(userLocationEventSubscription.LocationEventCriteria, "LEAVING_AREA_EVENT")
	var m = map[string]UserLocationEventSubscription{}
	m["userLocationEventSubscription"] = userLocationEventSubscription
	json_body, err := json.Marshal(m)
@@ -1193,7 +1194,7 @@ func mec030_subscribe_v2x_messages() (body []byte, response *http.Response, err
	var v2xMsgSubscription = V2xMsgSubscription{
		CallbackReference: callbackUrl + "/vis/v2/v2x_msg_notification",
		FilterCriteria: &V2xMsgSubscriptionFilterCriteria{
			MsgType:         []string{"1", "2"},
			MsgType:         []string{"1", "2", "14", "16"}, // CAM, DENM, CPM & VAM
			StdOrganization: "ETSI",
		},
		SubscriptionType: "V2xMsgSubscription",
@@ -1664,6 +1665,7 @@ func main() {

	// Start REST API Server
	go func() {
		fmt.Println(">>> Start REST API Server on port : ", config.CallbackPort)
		router := NewRouter()
		methods := handlers.AllowedMethods([]string{"OPTIONS", "DELETE", "GET", "HEAD", "POST", "PUT"})
		header := handlers.AllowedHeaders([]string{"content-type"})
+5 −5
Original line number Diff line number Diff line
@@ -66,25 +66,25 @@ var routes = HttpRoutes{
		Index,
	},
	HttpRoute{
		"Index",
		"mec013_notification",
		"POST",
		"location/v3/users_notification",
		"/location/v3/users_notification",
		mec013_notification,
	},
	HttpRoute{
		"Index",
		"v2x_msg_notification",
		"POST",
		"/vis/v2/v2x_msg_notification",
		v2x_msg_notification,
	},
	HttpRoute{
		"Index",
		"fed_notification",
		"POST",
		"/fed/v1/notification",
		fed_notification,
	},
	HttpRoute{
		"Index",
		"mec011_service_statistic_get",
		"GET",
		"/statistic/v1/quantity",
		mec011_service_statistic_get,