Skip to content

Commit

Permalink
[minor_changes] Added connType attribute to vns_abs_func_conn.go file…
Browse files Browse the repository at this point in the history
… and added a condition in service_manager.go file to check if the error message is 202-Request in progess.
  • Loading branch information
anvitha-jain authored and lhercot committed Mar 2, 2024
1 parent 543c37d commit a2fa02b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client/service_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 3 additions & 0 deletions models/vns_abs_func_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
Expand Down Expand Up @@ -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)

Expand All @@ -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"),
},
Expand Down

0 comments on commit a2fa02b

Please sign in to comment.