From 95c309d276e51f382f810d01d34255eaa7d51804 Mon Sep 17 00:00:00 2001 From: bgriddaluru Date: Tue, 1 Oct 2024 09:13:13 -0700 Subject: [PATCH] Add comments for messages --- go.mod | 2 +- go.sum | 4 ++-- rpc/common/moc_common_common.pb.go | 1 + rpc/common/moc_common_common.proto | 1 + rpc/nodeagent/compute/moc_nodeagent_virtualmachine.pb.go | 3 +++ .../compute/virtualmachine/moc_nodeagent_virtualmachine.proto | 3 +++ 6 files changed, 11 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 01e6b96c..945b815d 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( golang.org/x/net v0.29.0 // indirect golang.org/x/sys v0.25.0 // indirect golang.org/x/text v0.18.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f // indirect google.golang.org/protobuf v1.34.2 // indirect ) diff --git a/go.sum b/go.sum index f3f24770..7bfb24e7 100644 --- a/go.sum +++ b/go.sum @@ -62,8 +62,8 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61 h1:N9BgCIAUvn/M+p4NJccWPWb3BWh88+zyL0ll9HgbEeM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f h1:cUMEy+8oS78BWIH9OWazBkzbr090Od9tWBNtZHkOhf0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= diff --git a/rpc/common/moc_common_common.pb.go b/rpc/common/moc_common_common.pb.go index af265018..8dc14337 100644 --- a/rpc/common/moc_common_common.pb.go +++ b/rpc/common/moc_common_common.pb.go @@ -1547,6 +1547,7 @@ func (m *ZoneReference) GetName() string { return "" } +// Used by VM proto and Placement Group proto, so it is placed in common type ZoneConfiguration struct { Zones []*ZoneReference `protobuf:"bytes,1,rep,name=zones,proto3" json:"zones,omitempty"` StrictPlacement bool `protobuf:"varint,2,opt,name=strictPlacement,proto3" json:"strictPlacement,omitempty"` diff --git a/rpc/common/moc_common_common.proto b/rpc/common/moc_common_common.proto index 035a8c47..c27551fa 100644 --- a/rpc/common/moc_common_common.proto +++ b/rpc/common/moc_common_common.proto @@ -146,6 +146,7 @@ message ZoneReference { string name = 1; } +// Used by VM proto and Placement Group proto, so it is placed in common message ZoneConfiguration { repeated ZoneReference zones = 1; bool strictPlacement = 2; diff --git a/rpc/nodeagent/compute/moc_nodeagent_virtualmachine.pb.go b/rpc/nodeagent/compute/moc_nodeagent_virtualmachine.pb.go index 5d6df7b9..288856bc 100644 --- a/rpc/nodeagent/compute/moc_nodeagent_virtualmachine.pb.go +++ b/rpc/nodeagent/compute/moc_nodeagent_virtualmachine.pb.go @@ -887,6 +887,9 @@ func (m *SecurityConfiguration) GetSecurityType() common.SecurityType { return common.SecurityType_NOTCONFIGURED } +// Zone entity exists in cloud agent only and platform layer configuration needs node names. +// So this zone information includes node names associated with zone. +// This additional info is not present in ZoneReference defined in common file, which is used by cloud agent. type ZoneReference struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Nodes []string `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"` diff --git a/rpc/nodeagent/compute/virtualmachine/moc_nodeagent_virtualmachine.proto b/rpc/nodeagent/compute/virtualmachine/moc_nodeagent_virtualmachine.proto index 7a086d3d..f6b7387b 100644 --- a/rpc/nodeagent/compute/virtualmachine/moc_nodeagent_virtualmachine.proto +++ b/rpc/nodeagent/compute/virtualmachine/moc_nodeagent_virtualmachine.proto @@ -108,6 +108,9 @@ message SecurityConfiguration { SecurityType securityType = 3; } +// Zone entity exists in cloud agent only and platform layer configuration needs node names. +// So this zone information includes node names associated with zone. +// This additional info is not present in ZoneReference defined in common file, which is used by cloud agent. message ZoneReference { string name = 1; repeated string nodes = 2;