Commit ace910b1 authored by Ayesha Ayub's avatar Ayesha Ayub
Browse files

update model files for new changes in BWM API

parent 1ea34956
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -957,7 +957,7 @@ func bandwidthAllocationPost(w http.ResponseWriter, r *http.Request) {
	// then SessionFilter should also provided in requested body
	if *bwInfo.RequestType == 1 && len(bwInfo.SessionFilter) != 0 {
		for _, flowFilterVal := range bwInfo.SessionFilter {
			if flowFilterVal.SourceIp == "" && len(flowFilterVal.SourcePort) == 0 && flowFilterVal.DstAddress == "" && len(flowFilterVal.DstPort) == 0 && flowFilterVal.Protocol == "" {
			if flowFilterVal.SourceIp == "" && flowFilterVal.SourcePort == "" && flowFilterVal.DstAddress == "" && flowFilterVal.DstPort == "" && flowFilterVal.Protocol == "" {
				log.Error("At least one of sessionFilter subfields shall be included")
				errHandlerProblemDetails(w, "At least one of sessionFilter subfields shall be included in the request body.", http.StatusBadRequest)
				return
+4 −4
Original line number Diff line number Diff line
@@ -25,14 +25,14 @@
package server

type BwInfoDeltasSessionFilter struct {
	// Destination address identity of session (including range)
	// Destination address identity of session. The string for a IPv4 address shall be formatted in the "dotted decimal" notation as defined in IETF RFC 1166 [10]. The string for a IPv6 address shall be formatted according to clause 4 of IETF RFC 5952 [11], with in CIDR notation [12] used to provide the routing prefix.
	DstAddress string `json:"dstAddress,omitempty"`
	// Destination port identity of session
	DstPort []string `json:"dstPort,omitempty"`
	DstPort string `json:"dstPort,omitempty"`
	// Protocol number
	Protocol string `json:"protocol,omitempty"`
	// Source address identity of session (including range)
	// Source address identity of session. The string for a IPv4 address shall be formatted in the "dotted decimal" notation as defined in IETF RFC 1166 [10]. The string for a IPv6 address shall be formatted according to clause 4 of IETF RFC 5952 [11], with in CIDR notation [12] used to provide the routing prefix.
	SourceIp string `json:"sourceIp,omitempty"`
	// Source port identity of session
	SourcePort []string `json:"sourcePort,omitempty"`
	SourcePort string `json:"sourcePort,omitempty"`
}
+4 −4
Original line number Diff line number Diff line
@@ -25,14 +25,14 @@
package server

type BwInfoSessionFilter struct {
	// Destination address identity of session (including range)
	// Destination address identity of session. The string for a IPv4 address shall be formatted in the "dotted decimal" notation as defined in IETF RFC 1166 [10]. The string for a IPv6 address shall be formatted according to clause 4 of IETF RFC 5952 [11], with in CIDR notation [12] used to provide the routing prefix.
	DstAddress string `json:"dstAddress,omitempty"`
	// Destination port identity of session
	DstPort []string `json:"dstPort,omitempty"`
	DstPort string `json:"dstPort,omitempty"`
	// Protocol number
	Protocol string `json:"protocol,omitempty"`
	// Source address identity of session (including range)
	// Source address identity of session. The string for a IPv4 address shall be formatted in the "dotted decimal" notation as defined in IETF RFC 1166 [10]. The string for a IPv6 address shall be formatted according to clause 4 of IETF RFC 5952 [11], with in CIDR notation [12] used to provide the routing prefix.
	SourceIp string `json:"sourceIp,omitempty"`
	// Source port identity of session
	SourcePort []string `json:"sourcePort,omitempty"`
	SourcePort string `json:"sourcePort,omitempty"`
}