Add log to happy path for NC refresh
This commit is contained in:
bohuini 2023-05-04 12:00:41 -07:00 коммит произвёл GitHub
Родитель 25319a41d7
Коммит b9861e2582
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -925,15 +925,17 @@ func (service *HTTPRestService) getNetworkContainerByOrchestratorContext(w http.
logger.Response(service.Name, getNetworkContainerResponses[0], getNetworkContainerResponses[0].Response.ReturnCode, err)
}
// getOrRefreshNetworkContainers is to check whether refresh association is needed.
// getOrRefreshNetworkContainers is to check whether refresh association is needed. The state file in CNS will get updated if it is lost.
// If received "GET": Return all NCs in CNS's state file to DNC in order to check if NC refresh is needed
// If received "POST": Store all the NCs (from the request body that client sent) into CNS's state file
func (service *HTTPRestService) getOrRefreshNetworkContainers(w http.ResponseWriter, r *http.Request) {
switch r.Method {
case http.MethodGet:
logger.Printf("[Azure CNS] getOrRefreshNetworkContainers received GET")
service.handleGetNetworkContainers(w)
return
case http.MethodPost:
logger.Printf("[Azure CNS] getOrRefreshNetworkContainers received POST")
service.handlePostNetworkContainers(w, r)
return
default: