| Index: go/src/infra/crimson/proto/crimson.pb.go
|
| diff --git a/go/src/infra/crimson/proto/crimson.pb.go b/go/src/infra/crimson/proto/crimson.pb.go
|
| index b667be7211366cf63c677d92724bf50991f3b36c..5ae2ea616a2c192ed00f106b2891b4a7cde008c1 100644
|
| --- a/go/src/infra/crimson/proto/crimson.pb.go
|
| +++ b/go/src/infra/crimson/proto/crimson.pb.go
|
| @@ -13,6 +13,10 @@ It has these top-level messages:
|
| IPRange
|
| IPRangeStatus
|
| IPRangeQuery
|
| + Host
|
| + HostList
|
| + HostStatus
|
| + HostQuery
|
| */
|
| package crimson
|
|
|
| @@ -88,11 +92,66 @@ func (m *IPRangeQuery) String() string { return proto.CompactTextStri
|
| func (*IPRangeQuery) ProtoMessage() {}
|
| func (*IPRangeQuery) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
|
|
|
| +type Host struct {
|
| + Site string `protobuf:"bytes,1,opt,name=site" json:"site,omitempty"`
|
| + Hostname string `protobuf:"bytes,2,opt,name=hostname" json:"hostname,omitempty"`
|
| + MacAddr string `protobuf:"bytes,3,opt,name=mac_addr,json=macAddr" json:"mac_addr,omitempty"`
|
| + Ip string `protobuf:"bytes,4,opt,name=ip" json:"ip,omitempty"`
|
| + BootClass string `protobuf:"bytes,5,opt,name=boot_class,json=bootClass" json:"boot_class,omitempty"`
|
| +}
|
| +
|
| +func (m *Host) Reset() { *m = Host{} }
|
| +func (m *Host) String() string { return proto.CompactTextString(m) }
|
| +func (*Host) ProtoMessage() {}
|
| +func (*Host) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
|
| +
|
| +type HostList struct {
|
| + Hosts []*Host `protobuf:"bytes,1,rep,name=hosts" json:"hosts,omitempty"`
|
| +}
|
| +
|
| +func (m *HostList) Reset() { *m = HostList{} }
|
| +func (m *HostList) String() string { return proto.CompactTextString(m) }
|
| +func (*HostList) ProtoMessage() {}
|
| +func (*HostList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
|
| +
|
| +func (m *HostList) GetHosts() []*Host {
|
| + if m != nil {
|
| + return m.Hosts
|
| + }
|
| + return nil
|
| +}
|
| +
|
| +type HostStatus struct {
|
| +}
|
| +
|
| +func (m *HostStatus) Reset() { *m = HostStatus{} }
|
| +func (m *HostStatus) String() string { return proto.CompactTextString(m) }
|
| +func (*HostStatus) ProtoMessage() {}
|
| +func (*HostStatus) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
|
| +
|
| +type HostQuery struct {
|
| + Limit uint32 `protobuf:"varint,1,opt,name=limit" json:"limit,omitempty"`
|
| + Site string `protobuf:"bytes,2,opt,name=site" json:"site,omitempty"`
|
| + Hostname string `protobuf:"bytes,3,opt,name=hostname" json:"hostname,omitempty"`
|
| + MacAddr string `protobuf:"bytes,4,opt,name=mac_addr,json=macAddr" json:"mac_addr,omitempty"`
|
| + Ip string `protobuf:"bytes,5,opt,name=ip" json:"ip,omitempty"`
|
| + BootClass string `protobuf:"bytes,6,opt,name=boot_class,json=bootClass" json:"boot_class,omitempty"`
|
| +}
|
| +
|
| +func (m *HostQuery) Reset() { *m = HostQuery{} }
|
| +func (m *HostQuery) String() string { return proto.CompactTextString(m) }
|
| +func (*HostQuery) ProtoMessage() {}
|
| +func (*HostQuery) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
|
| +
|
| func init() {
|
| proto.RegisterType((*IPRanges)(nil), "crimson.IPRanges")
|
| proto.RegisterType((*IPRange)(nil), "crimson.IPRange")
|
| proto.RegisterType((*IPRangeStatus)(nil), "crimson.IPRangeStatus")
|
| proto.RegisterType((*IPRangeQuery)(nil), "crimson.IPRangeQuery")
|
| + proto.RegisterType((*Host)(nil), "crimson.Host")
|
| + proto.RegisterType((*HostList)(nil), "crimson.HostList")
|
| + proto.RegisterType((*HostStatus)(nil), "crimson.HostStatus")
|
| + proto.RegisterType((*HostQuery)(nil), "crimson.HostQuery")
|
| }
|
|
|
| // Reference imports to suppress errors if they are not otherwise used.
|
| @@ -108,6 +167,8 @@ const _ = grpc.SupportPackageIsVersion3
|
| type CrimsonClient interface {
|
| CreateIPRange(ctx context.Context, in *IPRange, opts ...grpc.CallOption) (*IPRangeStatus, error)
|
| ReadIPRange(ctx context.Context, in *IPRangeQuery, opts ...grpc.CallOption) (*IPRanges, error)
|
| + CreateHost(ctx context.Context, in *HostList, opts ...grpc.CallOption) (*HostStatus, error)
|
| + ReadHost(ctx context.Context, in *HostQuery, opts ...grpc.CallOption) (*HostList, error)
|
| }
|
| type crimsonPRPCClient struct {
|
| client *prpccommon.Client
|
| @@ -135,6 +196,24 @@ func (c *crimsonPRPCClient) ReadIPRange(ctx context.Context, in *IPRangeQuery, o
|
| return out, nil
|
| }
|
|
|
| +func (c *crimsonPRPCClient) CreateHost(ctx context.Context, in *HostList, opts ...grpc.CallOption) (*HostStatus, error) {
|
| + out := new(HostStatus)
|
| + err := c.client.Call(ctx, "crimson.Crimson", "CreateHost", in, out, opts...)
|
| + if err != nil {
|
| + return nil, err
|
| + }
|
| + return out, nil
|
| +}
|
| +
|
| +func (c *crimsonPRPCClient) ReadHost(ctx context.Context, in *HostQuery, opts ...grpc.CallOption) (*HostList, error) {
|
| + out := new(HostList)
|
| + err := c.client.Call(ctx, "crimson.Crimson", "ReadHost", in, out, opts...)
|
| + if err != nil {
|
| + return nil, err
|
| + }
|
| + return out, nil
|
| +}
|
| +
|
| type crimsonClient struct {
|
| cc *grpc.ClientConn
|
| }
|
| @@ -161,11 +240,31 @@ func (c *crimsonClient) ReadIPRange(ctx context.Context, in *IPRangeQuery, opts
|
| return out, nil
|
| }
|
|
|
| +func (c *crimsonClient) CreateHost(ctx context.Context, in *HostList, opts ...grpc.CallOption) (*HostStatus, error) {
|
| + out := new(HostStatus)
|
| + err := grpc.Invoke(ctx, "/crimson.Crimson/CreateHost", in, out, c.cc, opts...)
|
| + if err != nil {
|
| + return nil, err
|
| + }
|
| + return out, nil
|
| +}
|
| +
|
| +func (c *crimsonClient) ReadHost(ctx context.Context, in *HostQuery, opts ...grpc.CallOption) (*HostList, error) {
|
| + out := new(HostList)
|
| + err := grpc.Invoke(ctx, "/crimson.Crimson/ReadHost", in, out, c.cc, opts...)
|
| + if err != nil {
|
| + return nil, err
|
| + }
|
| + return out, nil
|
| +}
|
| +
|
| // Server API for Crimson service
|
|
|
| type CrimsonServer interface {
|
| CreateIPRange(context.Context, *IPRange) (*IPRangeStatus, error)
|
| ReadIPRange(context.Context, *IPRangeQuery) (*IPRanges, error)
|
| + CreateHost(context.Context, *HostList) (*HostStatus, error)
|
| + ReadHost(context.Context, *HostQuery) (*HostList, error)
|
| }
|
|
|
| func RegisterCrimsonServer(s prpc.Registrar, srv CrimsonServer) {
|
| @@ -208,6 +307,42 @@ func _Crimson_ReadIPRange_Handler(srv interface{}, ctx context.Context, dec func
|
| return interceptor(ctx, in, info, handler)
|
| }
|
|
|
| +func _Crimson_CreateHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
| + in := new(HostList)
|
| + if err := dec(in); err != nil {
|
| + return nil, err
|
| + }
|
| + if interceptor == nil {
|
| + return srv.(CrimsonServer).CreateHost(ctx, in)
|
| + }
|
| + info := &grpc.UnaryServerInfo{
|
| + Server: srv,
|
| + FullMethod: "/crimson.Crimson/CreateHost",
|
| + }
|
| + handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
| + return srv.(CrimsonServer).CreateHost(ctx, req.(*HostList))
|
| + }
|
| + return interceptor(ctx, in, info, handler)
|
| +}
|
| +
|
| +func _Crimson_ReadHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
| + in := new(HostQuery)
|
| + if err := dec(in); err != nil {
|
| + return nil, err
|
| + }
|
| + if interceptor == nil {
|
| + return srv.(CrimsonServer).ReadHost(ctx, in)
|
| + }
|
| + info := &grpc.UnaryServerInfo{
|
| + Server: srv,
|
| + FullMethod: "/crimson.Crimson/ReadHost",
|
| + }
|
| + handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
| + return srv.(CrimsonServer).ReadHost(ctx, req.(*HostQuery))
|
| + }
|
| + return interceptor(ctx, in, info, handler)
|
| +}
|
| +
|
| var _Crimson_serviceDesc = grpc.ServiceDesc{
|
| ServiceName: "crimson.Crimson",
|
| HandlerType: (*CrimsonServer)(nil),
|
| @@ -220,6 +355,14 @@ var _Crimson_serviceDesc = grpc.ServiceDesc{
|
| MethodName: "ReadIPRange",
|
| Handler: _Crimson_ReadIPRange_Handler,
|
| },
|
| + {
|
| + MethodName: "CreateHost",
|
| + Handler: _Crimson_CreateHost_Handler,
|
| + },
|
| + {
|
| + MethodName: "ReadHost",
|
| + Handler: _Crimson_ReadHost_Handler,
|
| + },
|
| },
|
| Streams: []grpc.StreamDesc{},
|
| Metadata: fileDescriptor0,
|
| @@ -228,22 +371,31 @@ var _Crimson_serviceDesc = grpc.ServiceDesc{
|
| func init() { proto.RegisterFile("crimson.proto", fileDescriptor0) }
|
|
|
| var fileDescriptor0 = []byte{
|
| - // 260 bytes of a gzipped FileDescriptorProto
|
| - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x51, 0x3d, 0x4f, 0xc3, 0x30,
|
| - 0x10, 0x25, 0xfd, 0x48, 0xca, 0x95, 0x20, 0x38, 0x51, 0x14, 0x3a, 0x21, 0x4b, 0x48, 0x99, 0x3a,
|
| - 0x14, 0x16, 0xc4, 0xd8, 0x29, 0x1b, 0x98, 0x15, 0x09, 0x99, 0xd6, 0x42, 0x96, 0xda, 0xc4, 0x3a,
|
| - 0x3b, 0x48, 0x8c, 0xfc, 0x73, 0x1c, 0xdb, 0x61, 0x08, 0x4b, 0xb7, 0xf7, 0xde, 0xbd, 0x97, 0x7b,
|
| - 0x39, 0x43, 0xbe, 0x25, 0x75, 0x30, 0x4d, 0xbd, 0xd2, 0xd4, 0xd8, 0x06, 0xb3, 0x48, 0xd9, 0x03,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f, 0xf5, 0x00,
|
| - 0xc4, 0x01, 0x00, 0x00,
|
| + // 414 bytes of a gzipped FileDescriptorProto
|
| + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x53, 0x5b, 0x8b, 0xd3, 0x40,
|
| + 0x14, 0x6e, 0xda, 0xdc, 0x7a, 0xda, 0x88, 0x1d, 0xad, 0xc4, 0x80, 0x20, 0x23, 0x42, 0x9f, 0x2a,
|
| + 0xb4, 0x22, 0x88, 0x4f, 0xd2, 0x17, 0x0b, 0x3e, 0x68, 0x7c, 0x15, 0xca, 0x34, 0x19, 0x34, 0xd0,
|
| + 0x5c, 0x98, 0x99, 0x2e, 0xec, 0xdb, 0xfe, 0x8f, 0xfd, 0x8f, 0xfb, 0x1b, 0x76, 0x6e, 0x09, 0xdb,
|
| + 0x6c, 0xbb, 0xec, 0xdb, 0xf9, 0xbe, 0x73, 0xf9, 0xce, 0x77, 0x32, 0x81, 0x28, 0x63, 0x45, 0xc9,
|
| + 0xeb, 0x6a, 0xd9, 0xb0, 0x5a, 0xd4, 0x28, 0xb0, 0x10, 0x7f, 0x86, 0x70, 0xfb, 0x2b, 0x25, 0xd5,
|
| + 0x3f, 0xca, 0xd1, 0x02, 0x7c, 0xa6, 0xa3, 0xd8, 0x79, 0x3f, 0x5a, 0x4c, 0x56, 0x2f, 0x97, 0x6d,
|
| + 0x93, 0x2d, 0x49, 0x6d, 0x1e, 0x67, 0x10, 0x58, 0x0a, 0x21, 0x70, 0x79, 0x21, 0xa8, 0x6c, 0x71,
|
| + 0x16, 0xe3, 0x54, 0xc7, 0x8a, 0xbb, 0x3a, 0x90, 0x2a, 0x1e, 0x1a, 0x4e, 0xc5, 0xe8, 0x2d, 0x84,
|
| + 0x5c, 0x10, 0x26, 0x76, 0x45, 0x13, 0x8f, 0x34, 0x1f, 0x68, 0xbc, 0x6d, 0xd0, 0x1c, 0x7c, 0x5a,
|
| + 0xe5, 0x2a, 0x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