From 44bf6f48fc5f97b1781b124fd6d1868b94e50b47 Mon Sep 17 00:00:00 2001 From: Fabian Helm <fabian.helm@stud.h-da.de> Date: Thu, 3 Feb 2022 14:08:21 +0100 Subject: [PATCH] added multiple changes to GetChangeResponse --- go/gosdn/pnd/pnd.pb.go | 6 +++--- openapiv2/gosdn_northbound.swagger.json | 13 ++++++++----- proto/gosdn/pnd/pnd.proto | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/go/gosdn/pnd/pnd.pb.go b/go/gosdn/pnd/pnd.pb.go index f9fd57f..17773f9 100644 --- a/go/gosdn/pnd/pnd.pb.go +++ b/go/gosdn/pnd/pnd.pb.go @@ -993,7 +993,7 @@ type GetChangeResponse struct { // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. Pnd *PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` - Change *Change `protobuf:"bytes,3,opt,name=change,proto3" json:"change,omitempty"` + Change []*Change `protobuf:"bytes,3,rep,name=change,proto3" json:"change,omitempty"` } func (x *GetChangeResponse) Reset() { @@ -1042,7 +1042,7 @@ func (x *GetChangeResponse) GetPnd() *PrincipalNetworkDomain { return nil } -func (x *GetChangeResponse) GetChange() *Change { +func (x *GetChangeResponse) GetChange() []*Change { if x != nil { return x.Change } @@ -2390,7 +2390,7 @@ var file_gosdn_pnd_pnd_proto_rawDesc = []byte{ 0x03, 0x70, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x03, 0x70, - 0x6e, 0x64, 0x12, 0x29, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x6e, 0x64, 0x12, 0x29, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, diff --git a/openapiv2/gosdn_northbound.swagger.json b/openapiv2/gosdn_northbound.swagger.json index 618512d..8947891 100644 --- a/openapiv2/gosdn_northbound.swagger.json +++ b/openapiv2/gosdn_northbound.swagger.json @@ -21,16 +21,16 @@ "name": "gNMI" }, { - "name": "CoreService" + "name": "Collector" }, { - "name": "CsbiService" + "name": "AgentManager" }, { - "name": "AgentManager" + "name": "CoreService" }, { - "name": "Collector" + "name": "CsbiService" } ], "consumes": [ @@ -2113,7 +2113,10 @@ "description": "TODO: Check if this is really needed. Perhaps a reference to the PND's ID\nis also sufficient." }, "change": { - "$ref": "#/definitions/pndChange" + "type": "array", + "items": { + "$ref": "#/definitions/pndChange" + } } } }, diff --git a/proto/gosdn/pnd/pnd.proto b/proto/gosdn/pnd/pnd.proto index 01a18db..5b91e03 100644 --- a/proto/gosdn/pnd/pnd.proto +++ b/proto/gosdn/pnd/pnd.proto @@ -201,7 +201,7 @@ message GetChangeResponse { // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. PrincipalNetworkDomain pnd = 2; - Change change = 3; + repeated Change change = 3; } message GetChangeListResponse { -- GitLab