From a2fa02badddd4b2d3052baf859a3fd1f870a684f Mon Sep 17 00:00:00 2001 From: anvitha-jain Date: Fri, 1 Mar 2024 14:49:11 -0800 Subject: [PATCH] [minor_changes] Added connType attribute to vns_abs_func_conn.go file and added a condition in service_manager.go file to check if the error message is 202-Request in progess. --- client/service_manager.go | 5 +++++ models/vns_abs_func_conn.go | 3 +++ 2 files changed, 8 insertions(+) diff --git a/client/service_manager.go b/client/service_manager.go index bfe3fcf..173de4d 100644 --- a/client/service_manager.go +++ b/client/service_manager.go @@ -103,6 +103,11 @@ func CheckForErrors(cont *container.Container, method string, skipLoggingPayload log.Printf("[DEBUG] Exit from error 1, 107 or 120 %v", cont) } return nil + } else if errorCode == "202" { // Ignore errors of type "Request in progress" + if !skipLoggingPayload { + log.Printf("[DEBUG] Exit from error 202 %v", cont) + } + return nil } else { if (models.StripQuotes(imdata.Path("error.attributes.text").String()) == "" && errorCode == "403") || (errorCode == "401") { if !skipLoggingPayload { diff --git a/models/vns_abs_func_conn.go b/models/vns_abs_func_conn.go index ab1c155..78e4b3d 100644 --- a/models/vns_abs_func_conn.go +++ b/models/vns_abs_func_conn.go @@ -18,6 +18,7 @@ type FunctionConnectorAttributes struct { Name string `json:",omitempty"` Annotation string `json:",omitempty"` AttNotify string `json:",omitempty"` + ConnType string `json:",omitempty"` NameAlias string `json:",omitempty"` DeviceLIfName string `json:",omitempty"` } @@ -46,6 +47,7 @@ func (vnsAbsFuncConn *FunctionConnector) ToMap() (map[string]string, error) { A(vnsAbsFuncConnMap, "name", vnsAbsFuncConn.Name) A(vnsAbsFuncConnMap, "annotation", vnsAbsFuncConn.Annotation) A(vnsAbsFuncConnMap, "attNotify", vnsAbsFuncConn.AttNotify) + A(vnsAbsFuncConnMap, "connType", vnsAbsFuncConn.ConnType) A(vnsAbsFuncConnMap, "nameAlias", vnsAbsFuncConn.NameAlias) A(vnsAbsFuncConnMap, "deviceLIfName", vnsAbsFuncConn.DeviceLIfName) @@ -68,6 +70,7 @@ func FunctionConnectorFromContainerList(cont *container.Container, index int) *F Name: G(FunctionConnectorCont, "name"), Annotation: G(FunctionConnectorCont, "annotation"), AttNotify: G(FunctionConnectorCont, "attNotify"), + ConnType: G(FunctionConnectorCont, "connType"), NameAlias: G(FunctionConnectorCont, "nameAlias"), DeviceLIfName: G(FunctionConnectorCont, "deviceLIfName"), },