From 51d39f23319edf8fdf9dd3cf11a97d49ee41de42 Mon Sep 17 00:00:00 2001
From: Brian Neville <29639579+brianneville@users.noreply.github.com>
Date: Fri, 15 Dec 2023 17:52:29 +0000
Subject: [PATCH] fix index.md and proto file for linter
---
pathz/index.md | 26 +++----
pathz/pathz.pb.go | 175 +++++++++++++++++++++++-----------------------
pathz/pathz.proto | 16 ++---
3 files changed, 108 insertions(+), 109 deletions(-)
diff --git a/pathz/index.md b/pathz/index.md
index 38dd63e..e810be2 100644
--- a/pathz/index.md
+++ b/pathz/index.md
@@ -95,10 +95,10 @@ sent, the proposed configuration is rolled back automatically.
When a gNMI client connects and begins a subscription, the active
pathz policy on the system is applied to that subscription for the entire
-duration of that subscription.
+duration of that subscription.
If a new pathz policy is rotated and finalized, ongoing subscriptions will not be
affected and will continue to be subscribed with whatever authorization
-they had upon beginning the subscription.
+they had upon beginning the subscription.
These clients will not be aware that the pathz policy has been updated
until they disconnect and reconnect, at which point the new policy will
be applied to their subscription, and the subset of YANG leafs which they are
@@ -106,7 +106,7 @@ permitted to read may change.
While rotating a pathz policy, network operators may wish to know which of
the ongoing subscriptions would be affected if the rotation were finalized and
-the gNMI subscriber were to then disconnect and reconnect.
+the gNMI subscriber were to then disconnect and reconnect.
For this purpose, the `pathz.UploadResponse` contains information about the
current ongoing subscriptions, as well as whether or not these subscriptions
would be impacted by the pathz policy which was uploaded in the
@@ -119,19 +119,19 @@ rule for that user and path (or any subpaths underneath that path) would change
the rotation gets finalized.
For example, consider a system with the following installed rules:
-```
+```text
/a/b/[k0=*]/c -> user Alice, action PERMIT
/a/b/[k0=*]/c -> user Bob, action PERMIT
/a/b/[k0=*]/c -> user Charlie, action PERMIT
```
-Then:
-user Alice subscribes to `/a`
-user Bob subscribes to `/a`
-user Charlie subscribes to `/a/b/[k0=X]/c/d`
+Then:
+user Alice subscribes to `/a`
+user Bob subscribes to `/a`
+user Charlie subscribes to `/a/b/[k0=X]/c/d`
Next, a pathz Rotate stream begins, and a `pathz.UploadRequest` is sent containing
the following policy:
-```
+```text
/a/b/[k0=*]/c -> user Alice, action PERMIT READ
/a/b/[k0=*]/c -> user Bob, action PERMIT READ
/a/b/[k0=Y]/c -> user Bob, action DENY READ
@@ -140,15 +140,15 @@ the following policy:
```
The uploadResponse returned specifies that for this incoming policy:
-1. Alice's subscription to `/a` is not impacted.
-2. Bob's subscription to `/a` is impacted.
+1. Alice's subscription to `/a` is not impacted.
+2. Bob's subscription to `/a` is impacted.
3. Charlie's subscription `/a/b/[k0=X]/c/d` is not impacted
- Alice's subscription is not impacted as the best-matching rule for `/a`
- and every path beneath `/a` remains the same.
+ and every path beneath `/a` remains the same.
- Bob's subscription is impacted as currently the best-matching rule
for the subpath `/a/b/[k0=Y]/c` is PERMIT READ, while under this
-incoming policy it is DENY READ.
+incoming policy it is DENY READ.
If this rotation is finalized, his view of the YANG tree would change
when he disconnects/reconnects.
- Charlie's subscription is not impacted as the best-matching rule for his path
diff --git a/pathz/pathz.pb.go b/pathz/pathz.pb.go
index 203127a..db0528c 100755
--- a/pathz/pathz.pb.go
+++ b/pathz/pathz.pb.go
@@ -331,7 +331,7 @@ type UploadResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- ClientInfo []*ClientInfo `protobuf:"bytes,1,rep,name=client_info,json=clientInfo,proto3" json:"client_info,omitempty"`
+ Clients []*ClientInfo `protobuf:"bytes,1,rep,name=clients,proto3" json:"clients,omitempty"`
}
func (x *UploadResponse) Reset() {
@@ -366,9 +366,9 @@ func (*UploadResponse) Descriptor() ([]byte, []int) {
return file_github_com_openconfig_gnsi_pathz_pathz_proto_rawDescGZIP(), []int{4}
}
-func (x *UploadResponse) GetClientInfo() []*ClientInfo {
+func (x *UploadResponse) GetClients() []*ClientInfo {
if x != nil {
- return x.ClientInfo
+ return x.Clients
}
return nil
}
@@ -378,10 +378,10 @@ type ClientInfo struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
- Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
- Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
- SubscriptionInfo []*SubscriptionInfo `protobuf:"bytes,4,rep,name=subscription_info,json=subscriptionInfo,proto3" json:"subscription_info,omitempty"`
+ Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
+ Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
+ Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
+ Subscriptions []*SubscriptionInfo `protobuf:"bytes,4,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"`
}
func (x *ClientInfo) Reset() {
@@ -437,9 +437,9 @@ func (x *ClientInfo) GetVersion() string {
return ""
}
-func (x *ClientInfo) GetSubscriptionInfo() []*SubscriptionInfo {
+func (x *ClientInfo) GetSubscriptions() []*SubscriptionInfo {
if x != nil {
- return x.SubscriptionInfo
+ return x.Subscriptions
}
return nil
}
@@ -780,81 +780,80 @@ var file_github_com_openconfig_gnsi_pathz_pathz_proto_rawDesc = []byte{
0x37, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1f, 0x2e, 0x67, 0x6e, 0x73, 0x69, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x7a, 0x2e, 0x41, 0x75, 0x74,
0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
- 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x4c, 0x0a, 0x0e, 0x55, 0x70, 0x6c, 0x6f,
- 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0b, 0x63, 0x6c,
- 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x19, 0x2e, 0x67, 0x6e, 0x73, 0x69, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x2e,
- 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65,
- 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xaa, 0x01, 0x0a, 0x0a, 0x43, 0x6c, 0x69, 0x65, 0x6e,
- 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d,
- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d,
- 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76,
- 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65,
- 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x11, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x1f, 0x2e, 0x67, 0x6e, 0x73, 0x69, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31,
- 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66,
- 0x6f, 0x52, 0x10, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x49,
- 0x6e, 0x66, 0x6f, 0x22, 0x4e, 0x0a, 0x10, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x50, 0x61, 0x74,
- 0x68, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6d, 0x70, 0x61, 0x63,
- 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x6d, 0x70, 0x61, 0x63,
- 0x74, 0x65, 0x64, 0x22, 0xb0, 0x01, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x50, 0x61,
- 0x74, 0x68, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x67, 0x6e, 0x73, 0x69, 0x2e, 0x70, 0x61,
- 0x74, 0x68, 0x7a, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x46,
- 0x0a, 0x0f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
- 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x67, 0x6e, 0x73, 0x69, 0x2e, 0x70,
- 0x61, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x6e,
- 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x6e,
- 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x55, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x67, 0x6e, 0x73, 0x69, 0x2e, 0x70,
- 0x61, 0x74, 0x68, 0x7a, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x54, 0x0a,
- 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0f, 0x70,
- 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x67, 0x6e, 0x73, 0x69, 0x2e, 0x70, 0x61, 0x74, 0x68,
- 0x7a, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61,
- 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61,
- 0x6e, 0x63, 0x65, 0x22, 0x7f, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a,
- 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04,
- 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x12, 0x37, 0x0a, 0x06, 0x70,
- 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6e,
- 0x73, 0x69, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x7a, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69,
- 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x70, 0x6f,
- 0x6c, 0x69, 0x63, 0x79, 0x2a, 0x6a, 0x0a, 0x0e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x6e,
- 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59,
- 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,
- 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x4f, 0x4c, 0x49, 0x43,
- 0x59, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56,
- 0x45, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x49, 0x4e,
- 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x53, 0x41, 0x4e, 0x44, 0x42, 0x4f, 0x58, 0x10, 0x02,
- 0x32, 0xd4, 0x01, 0x0a, 0x05, 0x50, 0x61, 0x74, 0x68, 0x7a, 0x12, 0x49, 0x0a, 0x06, 0x52, 0x6f,
- 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6e, 0x73, 0x69, 0x2e, 0x70, 0x61, 0x74, 0x68,
- 0x7a, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6e, 0x73, 0x69, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x7a, 0x2e,
- 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x1b,
- 0x2e, 0x67, 0x6e, 0x73, 0x69, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x2e, 0x50,
- 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x6e,
- 0x73, 0x69, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x62,
- 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x03, 0x47, 0x65, 0x74,
- 0x12, 0x19, 0x2e, 0x67, 0x6e, 0x73, 0x69, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31,
- 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x6e,
- 0x73, 0x69, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x22, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75,
- 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x2f, 0x67, 0x6e, 0x73, 0x69, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x7a, 0x62, 0x06, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x33,
+ 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x45, 0x0a, 0x0e, 0x55, 0x70, 0x6c, 0x6f,
+ 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x63, 0x6c,
+ 0x69, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6e,
+ 0x73, 0x69, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, 0x65,
+ 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x22,
+ 0xa3, 0x01, 0x0a, 0x0a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a,
+ 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64,
+ 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64,
+ 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45,
+ 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
+ 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6e, 0x73, 0x69, 0x2e, 0x70, 0x61, 0x74,
+ 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x4e, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x04, 0x70, 0x61, 0x74,
+ 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x50,
+ 0x61, 0x74, 0x68, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6d, 0x70,
+ 0x61, 0x63, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x6d, 0x70,
+ 0x61, 0x63, 0x74, 0x65, 0x64, 0x22, 0xb0, 0x01, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x04, 0x70, 0x61,
+ 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e,
+ 0x50, 0x61, 0x74, 0x68, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x04, 0x6d, 0x6f,
+ 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x67, 0x6e, 0x73, 0x69, 0x2e,
+ 0x70, 0x61, 0x74, 0x68, 0x7a, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65,
+ 0x12, 0x46, 0x0a, 0x0f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61,
+ 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x67, 0x6e, 0x73, 0x69,
+ 0x2e, 0x70, 0x61, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
+ 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79,
+ 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x55, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x62,
+ 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x61, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x67, 0x6e, 0x73, 0x69,
+ 0x2e, 0x70, 0x61, 0x74, 0x68, 0x7a, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22,
+ 0x54, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a,
+ 0x0f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x67, 0x6e, 0x73, 0x69, 0x2e, 0x70, 0x61,
+ 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x6e, 0x73,
+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x6e, 0x73,
+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x7f, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d,
+ 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x04, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x12, 0x37, 0x0a,
+ 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e,
+ 0x67, 0x6e, 0x73, 0x69, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x7a, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f,
+ 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06,
+ 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2a, 0x6a, 0x0a, 0x0e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
+ 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x4f, 0x4c, 0x49,
+ 0x43, 0x59, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50,
+ 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x4f, 0x4c,
+ 0x49, 0x43, 0x59, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x41, 0x43, 0x54,
+ 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f,
+ 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x53, 0x41, 0x4e, 0x44, 0x42, 0x4f, 0x58,
+ 0x10, 0x02, 0x32, 0xd4, 0x01, 0x0a, 0x05, 0x50, 0x61, 0x74, 0x68, 0x7a, 0x12, 0x49, 0x0a, 0x06,
+ 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6e, 0x73, 0x69, 0x2e, 0x70, 0x61,
+ 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6e, 0x73, 0x69, 0x2e, 0x70, 0x61, 0x74, 0x68,
+ 0x7a, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65,
+ 0x12, 0x1b, 0x2e, 0x67, 0x6e, 0x73, 0x69, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31,
+ 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e,
+ 0x67, 0x6e, 0x73, 0x69, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72,
+ 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x03, 0x47,
+ 0x65, 0x74, 0x12, 0x19, 0x2e, 0x67, 0x6e, 0x73, 0x69, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x7a, 0x2e,
+ 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e,
+ 0x67, 0x6e, 0x73, 0x69, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65,
+ 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x22, 0x5a, 0x20, 0x67, 0x69, 0x74,
+ 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x2f, 0x67, 0x6e, 0x73, 0x69, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x7a, 0x62, 0x06, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -879,7 +878,7 @@ var file_github_com_openconfig_gnsi_pathz_pathz_proto_goTypes = []interface{}{
(*UploadRequest)(nil), // 4: gnsi.pathz.v1.UploadRequest
(*UploadResponse)(nil), // 5: gnsi.pathz.v1.UploadResponse
(*ClientInfo)(nil), // 6: gnsi.pathz.v1.ClientInfo
- (*SubscriptionInfo)(nil), // 7: gnsi.pathz.v1.subscriptionInfo
+ (*SubscriptionInfo)(nil), // 7: gnsi.pathz.v1.SubscriptionInfo
(*ProbeRequest)(nil), // 8: gnsi.pathz.v1.ProbeRequest
(*ProbeResponse)(nil), // 9: gnsi.pathz.v1.ProbeResponse
(*GetRequest)(nil), // 10: gnsi.pathz.v1.GetRequest
@@ -894,9 +893,9 @@ var file_github_com_openconfig_gnsi_pathz_pathz_proto_depIdxs = []int32{
3, // 1: gnsi.pathz.v1.RotateRequest.finalize_rotation:type_name -> gnsi.pathz.v1.FinalizeRequest
5, // 2: gnsi.pathz.v1.RotateResponse.upload:type_name -> gnsi.pathz.v1.UploadResponse
12, // 3: gnsi.pathz.v1.UploadRequest.policy:type_name -> gnsi.pathz.AuthorizationPolicy
- 6, // 4: gnsi.pathz.v1.UploadResponse.client_info:type_name -> gnsi.pathz.v1.ClientInfo
- 7, // 5: gnsi.pathz.v1.ClientInfo.subscription_info:type_name -> gnsi.pathz.v1.subscriptionInfo
- 13, // 6: gnsi.pathz.v1.subscriptionInfo.path:type_name -> gnmi.Path
+ 6, // 4: gnsi.pathz.v1.UploadResponse.clients:type_name -> gnsi.pathz.v1.ClientInfo
+ 7, // 5: gnsi.pathz.v1.ClientInfo.subscriptions:type_name -> gnsi.pathz.v1.SubscriptionInfo
+ 13, // 6: gnsi.pathz.v1.SubscriptionInfo.path:type_name -> gnmi.Path
13, // 7: gnsi.pathz.v1.ProbeRequest.path:type_name -> gnmi.Path
14, // 8: gnsi.pathz.v1.ProbeRequest.mode:type_name -> gnsi.pathz.Mode
0, // 9: gnsi.pathz.v1.ProbeRequest.policy_instance:type_name -> gnsi.pathz.v1.PolicyInstance
diff --git a/pathz/pathz.proto b/pathz/pathz.proto
index 505f58d..677a036 100644
--- a/pathz/pathz.proto
+++ b/pathz/pathz.proto
@@ -159,7 +159,7 @@ message UploadRequest {
message UploadResponse {
// client_info contains information about all the ongoing subscriptions on
// the system, and how the policy from the the UploadRequest will affect them
- repeated ClientInfo client_info = 1;
+ repeated ClientInfo clients = 1;
}
message ClientInfo {
@@ -169,20 +169,20 @@ message ClientInfo {
// the pathz policy version which is being applied to
// this client's ongoing subscription
string version = 3;
- repeated subscriptionInfo subscription_info = 4;
+ repeated SubscriptionInfo subscriptions = 4;
}
-message subscriptionInfo {
+message SubscriptionInfo {
gnmi.Path path = 1;
// impacted is a bool that is true if the subscription to this path
// for this user would be impacted if the pathz policy contained in the
// UploadRequest if finalized.
- // A subscription being "impacted" means that for the subscription path and the
- // user who made that subscription, the pathz policy from the
- // pathz.UploadRequest specifies some rules which would mean that the best-matching
- // rule for that user and path (or any subpaths underneath that path) would change if
- // the rotation gets finalized.
+ // A subscription being "impacted" means that for the subscription path
+ // and the user who made that subscription, the pathz policy from the
+ // pathz.UploadRequest specifies some rules which would mean that the
+ // best-matching rule for that user and path (or any subpaths underneath
+ // that path) would change if the rotation gets finalized.
bool impacted = 2;
}