Skip to content

Commit b9861e2

Browse files
authored
Add log to happy path (#1929)
Add log to happy path for NC refresh
1 parent 25319a4 commit b9861e2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cns/restserver/api.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,15 +925,17 @@ func (service *HTTPRestService) getNetworkContainerByOrchestratorContext(w http.
925925
logger.Response(service.Name, getNetworkContainerResponses[0], getNetworkContainerResponses[0].Response.ReturnCode, err)
926926
}
927927

928-
// getOrRefreshNetworkContainers is to check whether refresh association is needed.
928+
// getOrRefreshNetworkContainers is to check whether refresh association is needed. The state file in CNS will get updated if it is lost.
929929
// If received "GET": Return all NCs in CNS's state file to DNC in order to check if NC refresh is needed
930930
// If received "POST": Store all the NCs (from the request body that client sent) into CNS's state file
931931
func (service *HTTPRestService) getOrRefreshNetworkContainers(w http.ResponseWriter, r *http.Request) {
932932
switch r.Method {
933933
case http.MethodGet:
934+
logger.Printf("[Azure CNS] getOrRefreshNetworkContainers received GET")
934935
service.handleGetNetworkContainers(w)
935936
return
936937
case http.MethodPost:
938+
logger.Printf("[Azure CNS] getOrRefreshNetworkContainers received POST")
937939
service.handlePostNetworkContainers(w, r)
938940
return
939941
default:

0 commit comments

Comments
 (0)