diff --git a/factory_reset/factory_reset.pb.go b/factory_reset/factory_reset.pb.go index d7b0507..3c0db43 100644 --- a/factory_reset/factory_reset.pb.go +++ b/factory_reset/factory_reset.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc v6.32.0 +// protoc-gen-go v1.36.9 +// protoc v6.32.1 // source: github.com/openconfig/gnoi/factory_reset/factory_reset.proto package factory_reset @@ -22,18 +22,87 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type BootzConfiguration struct { + state protoimpl.MessageState `protogen:"open.v1"` + BootzServerUri string `protobuf:"bytes,1,opt,name=bootz_server_uri,json=bootzServerUri,proto3" json:"bootz_server_uri,omitempty"` + ManagementIp string `protobuf:"bytes,2,opt,name=management_ip,json=managementIp,proto3" json:"management_ip,omitempty"` + ManagementSubnetMask string `protobuf:"bytes,3,opt,name=management_subnet_mask,json=managementSubnetMask,proto3" json:"management_subnet_mask,omitempty"` + DefaultGateway string `protobuf:"bytes,4,opt,name=default_gateway,json=defaultGateway,proto3" json:"default_gateway,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BootzConfiguration) Reset() { + *x = BootzConfiguration{} + mi := &file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BootzConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootzConfiguration) ProtoMessage() {} + +func (x *BootzConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootzConfiguration.ProtoReflect.Descriptor instead. +func (*BootzConfiguration) Descriptor() ([]byte, []int) { + return file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_rawDescGZIP(), []int{0} +} + +func (x *BootzConfiguration) GetBootzServerUri() string { + if x != nil { + return x.BootzServerUri + } + return "" +} + +func (x *BootzConfiguration) GetManagementIp() string { + if x != nil { + return x.ManagementIp + } + return "" +} + +func (x *BootzConfiguration) GetManagementSubnetMask() string { + if x != nil { + return x.ManagementSubnetMask + } + return "" +} + +func (x *BootzConfiguration) GetDefaultGateway() string { + if x != nil { + return x.DefaultGateway + } + return "" +} + type StartRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - FactoryOs bool `protobuf:"varint,1,opt,name=factory_os,json=factoryOs,proto3" json:"factory_os,omitempty"` - ZeroFill bool `protobuf:"varint,2,opt,name=zero_fill,json=zeroFill,proto3" json:"zero_fill,omitempty"` - RetainCerts bool `protobuf:"varint,3,opt,name=retain_certs,json=retainCerts,proto3" json:"retain_certs,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + FactoryOs bool `protobuf:"varint,1,opt,name=factory_os,json=factoryOs,proto3" json:"factory_os,omitempty"` + ZeroFill bool `protobuf:"varint,2,opt,name=zero_fill,json=zeroFill,proto3" json:"zero_fill,omitempty"` + RetainCerts bool `protobuf:"varint,3,opt,name=retain_certs,json=retainCerts,proto3" json:"retain_certs,omitempty"` + BootzConfiguration *BootzConfiguration `protobuf:"bytes,4,opt,name=bootz_configuration,json=bootzConfiguration,proto3" json:"bootz_configuration,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StartRequest) Reset() { *x = StartRequest{} - mi := &file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_msgTypes[0] + mi := &file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -45,7 +114,7 @@ func (x *StartRequest) String() string { func (*StartRequest) ProtoMessage() {} func (x *StartRequest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_msgTypes[0] + mi := &file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -58,7 +127,7 @@ func (x *StartRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StartRequest.ProtoReflect.Descriptor instead. func (*StartRequest) Descriptor() ([]byte, []int) { - return file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_rawDescGZIP(), []int{0} + return file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_rawDescGZIP(), []int{1} } func (x *StartRequest) GetFactoryOs() bool { @@ -82,6 +151,13 @@ func (x *StartRequest) GetRetainCerts() bool { return false } +func (x *StartRequest) GetBootzConfiguration() *BootzConfiguration { + if x != nil { + return x.BootzConfiguration + } + return nil +} + type ResetSuccess struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields @@ -90,7 +166,7 @@ type ResetSuccess struct { func (x *ResetSuccess) Reset() { *x = ResetSuccess{} - mi := &file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_msgTypes[1] + mi := &file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -102,7 +178,7 @@ func (x *ResetSuccess) String() string { func (*ResetSuccess) ProtoMessage() {} func (x *ResetSuccess) ProtoReflect() protoreflect.Message { - mi := &file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_msgTypes[1] + mi := &file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115,7 +191,7 @@ func (x *ResetSuccess) ProtoReflect() protoreflect.Message { // Deprecated: Use ResetSuccess.ProtoReflect.Descriptor instead. func (*ResetSuccess) Descriptor() ([]byte, []int) { - return file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_rawDescGZIP(), []int{1} + return file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_rawDescGZIP(), []int{2} } type ResetError struct { @@ -130,7 +206,7 @@ type ResetError struct { func (x *ResetError) Reset() { *x = ResetError{} - mi := &file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_msgTypes[2] + mi := &file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -142,7 +218,7 @@ func (x *ResetError) String() string { func (*ResetError) ProtoMessage() {} func (x *ResetError) ProtoReflect() protoreflect.Message { - mi := &file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_msgTypes[2] + mi := &file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -155,7 +231,7 @@ func (x *ResetError) ProtoReflect() protoreflect.Message { // Deprecated: Use ResetError.ProtoReflect.Descriptor instead. func (*ResetError) Descriptor() ([]byte, []int) { - return file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_rawDescGZIP(), []int{2} + return file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_rawDescGZIP(), []int{3} } func (x *ResetError) GetFactoryOsUnsupported() bool { @@ -199,7 +275,7 @@ type StartResponse struct { func (x *StartResponse) Reset() { *x = StartResponse{} - mi := &file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_msgTypes[3] + mi := &file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -211,7 +287,7 @@ func (x *StartResponse) String() string { func (*StartResponse) ProtoMessage() {} func (x *StartResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_msgTypes[3] + mi := &file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -224,7 +300,7 @@ func (x *StartResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StartResponse.ProtoReflect.Descriptor instead. func (*StartResponse) Descriptor() ([]byte, []int) { - return file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_rawDescGZIP(), []int{3} + return file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_rawDescGZIP(), []int{4} } func (x *StartResponse) GetResponse() isStartResponse_Response { @@ -272,12 +348,18 @@ var File_github_com_openconfig_gnoi_factory_reset_factory_reset_proto protorefle const file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_rawDesc = "" + "\n" + - " gnoi.factory_reset.ResetSuccess - 2, // 1: gnoi.factory_reset.StartResponse.reset_error:type_name -> gnoi.factory_reset.ResetError - 0, // 2: gnoi.factory_reset.FactoryReset.Start:input_type -> gnoi.factory_reset.StartRequest - 3, // 3: gnoi.factory_reset.FactoryReset.Start:output_type -> gnoi.factory_reset.StartResponse - 3, // [3:4] is the sub-list for method output_type - 2, // [2:3] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 0, // 0: gnoi.factory_reset.StartRequest.bootz_configuration:type_name -> gnoi.factory_reset.BootzConfiguration + 2, // 1: gnoi.factory_reset.StartResponse.reset_success:type_name -> gnoi.factory_reset.ResetSuccess + 3, // 2: gnoi.factory_reset.StartResponse.reset_error:type_name -> gnoi.factory_reset.ResetError + 1, // 3: gnoi.factory_reset.FactoryReset.Start:input_type -> gnoi.factory_reset.StartRequest + 4, // 4: gnoi.factory_reset.FactoryReset.Start:output_type -> gnoi.factory_reset.StartResponse + 4, // [4:5] is the sub-list for method output_type + 3, // [3:4] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_init() } @@ -330,7 +414,7 @@ func file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_init() { if File_github_com_openconfig_gnoi_factory_reset_factory_reset_proto != nil { return } - file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_msgTypes[3].OneofWrappers = []any{ + file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_msgTypes[4].OneofWrappers = []any{ (*StartResponse_ResetSuccess)(nil), (*StartResponse_ResetError)(nil), } @@ -340,7 +424,7 @@ func file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_rawDesc), len(file_github_com_openconfig_gnoi_factory_reset_factory_reset_proto_rawDesc)), NumEnums: 0, - NumMessages: 4, + NumMessages: 5, NumExtensions: 0, NumServices: 1, }, diff --git a/factory_reset/factory_reset.proto b/factory_reset/factory_reset.proto index a035c63..e104709 100644 --- a/factory_reset/factory_reset.proto +++ b/factory_reset/factory_reset.proto @@ -28,6 +28,20 @@ service FactoryReset { rpc Start(StartRequest) returns (StartResponse); } +message BootzConfiguration { + // The Bootz server address to connect to after a factory reset. + // The format is `bootz://
:. Some IPv4 and IPv6 examples are shown below: + // * bootz://192.168.1.1:8080 + // * bootz://[2001:4860:f802::f2]:15006 + string bootz_server_uri = 1; + // The IP address to assign to the management interface of the active control card. + string management_ip = 2; + // The subnet mask to apply to the management interface address. + string management_subnet_mask = 3; + // The default gateway to assign to the management interface. + string default_gateway = 4; +} + message StartRequest { // Instructs the Target to rollback the OS to the same version as it shipped // from factory. @@ -36,6 +50,9 @@ message StartRequest { bool zero_fill = 2; // Instructs the Target to retain certificates bool retain_certs = 3; + // Bootz configuration options. If set, the device will not attempt to perform DHCP + // upon startup and instead start Bootz based on the provided configuration. + BootzConfiguration bootz_configuration = 4; } message ResetSuccess { diff --git a/factory_reset/factory_reset_grpc.pb.go b/factory_reset/factory_reset_grpc.pb.go index 31c76d5..42f804f 100644 --- a/factory_reset/factory_reset_grpc.pb.go +++ b/factory_reset/factory_reset_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v6.32.0 +// - protoc v6.32.1 // source: github.com/openconfig/gnoi/factory_reset/factory_reset.proto package factory_reset