Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Module name in the go.mod & log cleanup #77

Merged
merged 1 commit into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module simapp
module github.com/omec-project/simapp

go 1.21

Expand Down
16 changes: 8 additions & 8 deletions simapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ func sendMessage(msgChan chan configMessage, subProvisionEndpt SubProvisionEndpt
log.Printf("Post Message [%v] to %v", msg.String(), httpend)
req, err := http.NewRequestWithContext(context.Background(), http.MethodPost, httpend, msg.msgPtr)
if err != nil {
fmt.Printf("An Error Occurred %v", err)
log.Printf("An Error Occurred %v", err)
time.Sleep(1 * time.Second)
continue
}
Expand All @@ -430,14 +430,14 @@ func sendMessage(msgChan chan configMessage, subProvisionEndpt SubProvisionEndpt
log.Printf("Post Message [%v] returned error [%v] ", httpend, httpErr.Error())
}

fmt.Printf("Message POST %v Success\n", rsp.StatusCode)
log.Printf("Message POST %v Success\n", rsp.StatusCode)
} else if msg.msgOp == modify_op {
log.Printf("Put Message [%v] to %v", msg.String(), httpend)

req, err := http.NewRequestWithContext(context.Background(), http.MethodPut, httpend, msg.msgPtr)
// Handle Error
if err != nil {
fmt.Printf("An Error Occurred %v", err)
log.Printf("An Error Occurred %v", err)
time.Sleep(1 * time.Second)
continue
}
Expand All @@ -451,14 +451,14 @@ func sendMessage(msgChan chan configMessage, subProvisionEndpt SubProvisionEndpt
log.Printf("Put Message [%v] returned error [%v] ", httpend, httpErr.Error())
}

fmt.Printf("Message PUT %v Success\n", rsp.StatusCode)
log.Printf("Message PUT %v Success\n", rsp.StatusCode)
} else if msg.msgOp == delete_op {
log.Printf("Delete Message [%v] to %v", msg.String(), httpend)

req, err := http.NewRequestWithContext(context.Background(), http.MethodDelete, httpend, msg.msgPtr)
// Handle Error
if err != nil {
fmt.Printf("An Error Occurred %v", err)
log.Printf("An Error Occurred %v", err)
time.Sleep(1 * time.Second)
continue
}
Expand All @@ -471,7 +471,7 @@ func sendMessage(msgChan chan configMessage, subProvisionEndpt SubProvisionEndpt
if httpErr != nil {
log.Printf("Delete Message [%v] returned error [%v] ", httpend, httpErr.Error())
}
fmt.Printf("Message DEL %v Success\n", rsp.StatusCode)
log.Printf("Message DEL %v Success\n", rsp.StatusCode)
}
err := rsp.Body.Close()
if err != nil {
Expand Down Expand Up @@ -954,13 +954,13 @@ func dispatchAllGroups(configMsgChan chan configMessage) {

func dispatchNetworkSlice(configMsgChan chan configMessage, slice *NetworkSlice, msgOp int) {
log.Println(" Slice Name : ", slice.Name)
fmt.Printf(" Slice sst %v, sd %v", slice.SliceId.Sst, slice.SliceId.Sd)
log.Printf(" Slice sst %v, sd %v", slice.SliceId.Sst, slice.SliceId.Sd)
log.Println(" Slice site info ", slice.SiteInfo)
site := slice.SiteInfo
log.Println(" Slice site name ", site.SiteName)
log.Println(" Slice gNB ", len(site.Gnb))
for e := 0; e < len(site.Gnb); e++ {
fmt.Printf(" Slice gNB[%v] = %v \n", e, site.Gnb[e])
log.Printf(" Slice gNB[%v] = %v \n", e, site.Gnb[e])
}
log.Println(" Slice Plmn ", site.Plmn)
log.Println(" Slice Upf ", site.Upf)
Expand Down