From 7e972b4cb68bbc0d1b01b402d110f39d834d8c29 Mon Sep 17 00:00:00 2001 From: kishiguro Date: Mon, 12 Mar 2018 13:45:28 -0700 Subject: [PATCH] Add prefix-list support. --- config/config.go | 1 + config/grpc.go | 2 + config/ospf.go | 10 +- config/subscribe.go | 87 +++++++++++++- config/vrf.go | 2 + proto/openconfig.pb.go | 252 +++++++++++++++++++++++++---------------- proto/openconfig.proto | 9 ++ yang/coreswitch.yang | 3 + 8 files changed, 257 insertions(+), 109 deletions(-) diff --git a/config/config.go b/config/config.go index 7c1b50a..4386eb2 100644 --- a/config/config.go +++ b/config/config.go @@ -927,6 +927,7 @@ func (this *ConfigComponent) Stop() component.Component { RelayExitFunc() QuaggaExit() OspfVrfExit() + DistributeListExit() GobgpWanExit() return this diff --git a/config/grpc.go b/config/grpc.go index 7ad8fd2..5f8c877 100644 --- a/config/grpc.go +++ b/config/grpc.go @@ -234,6 +234,8 @@ loop: go SubscribeRemoteAdd(stream, msg) case rpc.ConfigType_SUBSCRIBE_MULTI: go SubscribeRemoteAddMulti(stream, msg) + case rpc.ConfigType_SUBSCRIBE_REQUEST: + go SubscribeAdd(stream, msg) case rpc.ConfigType_SET: YangConfigPush(msg.Path) case rpc.ConfigType_DELETE: diff --git a/config/ospf.go b/config/ospf.go index ea411b7..dfe7155 100644 --- a/config/ospf.go +++ b/config/ospf.go @@ -23,10 +23,12 @@ import ( ) type Ospf struct { - Network string `mapstructure:"network" json:"network,omitempty"` - Area uint32 `mapstructure:"area" json:"area,omitempty"` - InterfaceIps []InterfaceIp `mapstructure:"interfaces" json:"interfaces,omitempty"` - Interface string `mapstructure:"interface" json:"interface,omitempty"` // Deplicated from 2.4 + Network string `mapstructure:"network" json:"network,omitempty"` + Area uint32 `mapstructure:"area" json:"area,omitempty"` + InterfaceIps []InterfaceIp `mapstructure:"interfaces" json:"interfaces,omitempty"` + Interface string `mapstructure:"interface" json:"interface,omitempty"` // Deplicated from 2.4 + PrimaryList []DistributeListEntry `mapstructure:"primary-distribute-list" json:"primary-distribute-list,omitempty"` + BackupList []DistributeListEntry `mapstructure:"backup-distribute-list" json:"backup-distribute-list,omitempty"` } type OspfArray []Ospf diff --git a/config/subscribe.go b/config/subscribe.go index c92a780..c80ce63 100644 --- a/config/subscribe.go +++ b/config/subscribe.go @@ -55,8 +55,7 @@ type SubPath interface { } type SubPathBase struct { - path *Path - //cmd []*Command + path *Path pathcmd map[string][]*Command sync bool json bool @@ -106,9 +105,23 @@ func (subPath *SubPathBase) CommandClear() { func (subPath *SubPathRemote) Commit() { fmt.Println("[cmd]SubPathRemote:Commit() Start", subPath.path.Name) - for _, pathcmd := range subPath.pathcmd { - for _, cmd := range pathcmd { - subPath.sub.SendCommand(cmd) + for pathstr, pathcmd := range subPath.pathcmd { + if subPath.json { + fmt.Println("XXX JSON Commit", pathstr) + path := strings.Split(pathstr, "|") + config := configCandidate.LookupByPath(path) + json := "{}" + if config != nil { + json = config.JsonMarshal() + } else { + fmt.Println("XXXX empty JSON", path) + } + subPath.sub.SendJSON(path, json) + fmt.Println("JSON:", json) + } else { + for _, cmd := range pathcmd { + subPath.sub.SendCommand(cmd) + } } } fmt.Println("[cmd]SubPathRemote:Commit() End", subPath.path.Name) @@ -158,6 +171,19 @@ func (sub *Subscriber) SendMessage(typ rpc.ConfigType, path []string) { sub.stream.Send(msg) } +func (sub *Subscriber) SendJSON(path []string, json string) { + if sub.stream == nil { + fmt.Println("[cmd]SendJSON: sub.stream is nil") + return + } + msg := &rpc.ConfigReply{ + Type: rpc.ConfigType_JSON_CONFIG, + Path: path, + Json: json, + } + sub.stream.Send(msg) +} + func (sub *Subscriber) SendCommand(cmd *Command) { if cmd.set { fmt.Println("[cmd]SendCommand set:", cmd.cmds) @@ -512,6 +538,57 @@ func SubscribeRemoteAdd(stream rpc.Config_DoConfigServer, req *rpc.ConfigRequest } } +func SubscribeAdd(stream rpc.Config_DoConfigServer, req *rpc.ConfigRequest) { + fmt.Println("[sub]SubscribeAdd:", req.Module) + + // In case of ribd we do a full resync from etcd - Delete and create + if IsRibdAsync(req.Module) { + RIBD_SYNCHRONIZED = true + } else { + fmt.Println("Lock:SubscribeAdd") + SubscribeMutex.Lock() + defer SubscribeMutex.Unlock() + } + + sub := SubscribeLookup(stream) + if sub == nil { + sub = &Subscriber{Module: req.Module, Port: req.Port, stream: stream} + SubscribeMap[sub] = sub + } + + // Registration + subPathList := []*SubPathRemote{} + for _, path := range req.Subscribe { + subPath := &SubPathRemote{sub: sub} + subPath.pathcmd = map[string][]*Command{} + subPath.sync = true + subPath.RegisterPath([]string{path.Path}) + if path.Type == rpc.SubscribeType_JSON { + fmt.Println("XXX enable JSON", path.Path) + subPath.json = true + } + sub.SubPath = append(sub.SubPath, subPath) + subPathList = append(subPathList, subPath) + } + + // Sync. Ribd needs special handling (order of resource configurations) + // So do a full etcd resync when ribd gets connected + if !IsRibdAsync(req.Module) { + SubscribeSync() + } + + // Clear sync flag. + for _, subPath := range subPathList { + subPath.sync = false + } + + if IsRibdAsync(req.Module) { + fmt.Println("Ribd connected. Perform full resync") + EtcdWatchUpdate() + } + //SubscribeDump() +} + func SubscribeRemoteAddMulti(stream rpc.Config_DoConfigServer, req *rpc.ConfigRequest) { fmt.Println("[sub]SubscribeRemoteAddMulti:", req.Module) diff --git a/config/vrf.go b/config/vrf.go index 01dee69..98bf273 100644 --- a/config/vrf.go +++ b/config/vrf.go @@ -494,6 +494,7 @@ func VrfParse(vrfId int, jsonStr string) { VrrpVrfSync(vrfId, &vrf) QuaggaVrfSync(vrfId, &vrf) OspfVrfSync(vrfId, &vrf) + DistributeListSync(vrfId, &vrf) // GoBGP VrfConfig vrfConfig := vrf.Copy() @@ -518,6 +519,7 @@ func VrfDelete(vrfId int, vrfIfDelete bool) { VrrpVrfDelete(vrfId) QuaggaVrfDelete(vrfId) OspfVrfDelete(vrfId) + DistributeListDelete(vrfId) EtcdVrfDelete(vrfId, vrfIfDelete) delete(EtcdVrfMap, vrfId) diff --git a/proto/openconfig.pb.go b/proto/openconfig.pb.go index 6ecee27..1bad788 100644 --- a/proto/openconfig.pb.go +++ b/proto/openconfig.pb.go @@ -17,6 +17,7 @@ It has these top-level messages: RegisterModuleReply ExecModuleRequest ExecModuleReply + SubscribeRequest ConfigRequest ConfigReply ShowRequest @@ -138,41 +139,47 @@ func (ExecCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int type ConfigType int32 const ( - ConfigType_SET ConfigType = 0 - ConfigType_DELETE ConfigType = 1 - ConfigType_VALIDATE_START ConfigType = 2 - ConfigType_VALIDATE_END ConfigType = 3 - ConfigType_VALIDATE_SUCCESS ConfigType = 4 - ConfigType_VALIDATE_FAILED ConfigType = 5 - ConfigType_COMMIT_START ConfigType = 6 - ConfigType_COMMIT_END ConfigType = 7 - ConfigType_SUBSCRIBE ConfigType = 8 - ConfigType_SUBSCRIBE_MULTI ConfigType = 9 + ConfigType_SET ConfigType = 0 + ConfigType_DELETE ConfigType = 1 + ConfigType_VALIDATE_START ConfigType = 2 + ConfigType_VALIDATE_END ConfigType = 3 + ConfigType_VALIDATE_SUCCESS ConfigType = 4 + ConfigType_VALIDATE_FAILED ConfigType = 5 + ConfigType_COMMIT_START ConfigType = 6 + ConfigType_COMMIT_END ConfigType = 7 + ConfigType_SUBSCRIBE ConfigType = 8 + ConfigType_SUBSCRIBE_MULTI ConfigType = 9 + ConfigType_SUBSCRIBE_REQUEST ConfigType = 10 + ConfigType_JSON_CONFIG ConfigType = 11 ) var ConfigType_name = map[int32]string{ - 0: "SET", - 1: "DELETE", - 2: "VALIDATE_START", - 3: "VALIDATE_END", - 4: "VALIDATE_SUCCESS", - 5: "VALIDATE_FAILED", - 6: "COMMIT_START", - 7: "COMMIT_END", - 8: "SUBSCRIBE", - 9: "SUBSCRIBE_MULTI", + 0: "SET", + 1: "DELETE", + 2: "VALIDATE_START", + 3: "VALIDATE_END", + 4: "VALIDATE_SUCCESS", + 5: "VALIDATE_FAILED", + 6: "COMMIT_START", + 7: "COMMIT_END", + 8: "SUBSCRIBE", + 9: "SUBSCRIBE_MULTI", + 10: "SUBSCRIBE_REQUEST", + 11: "JSON_CONFIG", } var ConfigType_value = map[string]int32{ - "SET": 0, - "DELETE": 1, - "VALIDATE_START": 2, - "VALIDATE_END": 3, - "VALIDATE_SUCCESS": 4, - "VALIDATE_FAILED": 5, - "COMMIT_START": 6, - "COMMIT_END": 7, - "SUBSCRIBE": 8, - "SUBSCRIBE_MULTI": 9, + "SET": 0, + "DELETE": 1, + "VALIDATE_START": 2, + "VALIDATE_END": 3, + "VALIDATE_SUCCESS": 4, + "VALIDATE_FAILED": 5, + "COMMIT_START": 6, + "COMMIT_END": 7, + "SUBSCRIBE": 8, + "SUBSCRIBE_MULTI": 9, + "SUBSCRIBE_REQUEST": 10, + "JSON_CONFIG": 11, } func (x ConfigType) String() string { @@ -482,18 +489,43 @@ func (m *ExecModuleReply) GetLine() string { return "" } +type SubscribeRequest struct { + Type SubscribeType `protobuf:"varint,1,opt,name=type,enum=openconfig.SubscribeType" json:"type,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"` +} + +func (m *SubscribeRequest) Reset() { *m = SubscribeRequest{} } +func (m *SubscribeRequest) String() string { return proto.CompactTextString(m) } +func (*SubscribeRequest) ProtoMessage() {} +func (*SubscribeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } + +func (m *SubscribeRequest) GetType() SubscribeType { + if m != nil { + return m.Type + } + return SubscribeType_COMMAND +} + +func (m *SubscribeRequest) GetPath() string { + if m != nil { + return m.Path + } + return "" +} + type ConfigRequest struct { - Type ConfigType `protobuf:"varint,1,opt,name=type,enum=openconfig.ConfigType" json:"type,omitempty"` - Module string `protobuf:"bytes,2,opt,name=module" json:"module,omitempty"` - Port uint32 `protobuf:"varint,3,opt,name=port" json:"port,omitempty"` - Subtype SubscribeType `protobuf:"varint,4,opt,name=subtype,enum=openconfig.SubscribeType" json:"subtype,omitempty"` - Path []string `protobuf:"bytes,5,rep,name=path" json:"path,omitempty"` + Type ConfigType `protobuf:"varint,1,opt,name=type,enum=openconfig.ConfigType" json:"type,omitempty"` + Module string `protobuf:"bytes,2,opt,name=module" json:"module,omitempty"` + Port uint32 `protobuf:"varint,3,opt,name=port" json:"port,omitempty"` + Subtype SubscribeType `protobuf:"varint,4,opt,name=subtype,enum=openconfig.SubscribeType" json:"subtype,omitempty"` + Path []string `protobuf:"bytes,5,rep,name=path" json:"path,omitempty"` + Subscribe []*SubscribeRequest `protobuf:"bytes,6,rep,name=subscribe" json:"subscribe,omitempty"` } func (m *ConfigRequest) Reset() { *m = ConfigRequest{} } func (m *ConfigRequest) String() string { return proto.CompactTextString(m) } func (*ConfigRequest) ProtoMessage() {} -func (*ConfigRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +func (*ConfigRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } func (m *ConfigRequest) GetType() ConfigType { if m != nil { @@ -530,16 +562,24 @@ func (m *ConfigRequest) GetPath() []string { return nil } +func (m *ConfigRequest) GetSubscribe() []*SubscribeRequest { + if m != nil { + return m.Subscribe + } + return nil +} + type ConfigReply struct { Result int32 `protobuf:"varint,1,opt,name=result" json:"result,omitempty"` Type ConfigType `protobuf:"varint,2,opt,name=type,enum=openconfig.ConfigType" json:"type,omitempty"` Path []string `protobuf:"bytes,3,rep,name=path" json:"path,omitempty"` + Json string `protobuf:"bytes,4,opt,name=json" json:"json,omitempty"` } func (m *ConfigReply) Reset() { *m = ConfigReply{} } func (m *ConfigReply) String() string { return proto.CompactTextString(m) } func (*ConfigReply) ProtoMessage() {} -func (*ConfigReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +func (*ConfigReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } func (m *ConfigReply) GetResult() int32 { if m != nil { @@ -562,6 +602,13 @@ func (m *ConfigReply) GetPath() []string { return nil } +func (m *ConfigReply) GetJson() string { + if m != nil { + return m.Json + } + return "" +} + // Show service. type ShowRequest struct { Line string `protobuf:"bytes,1,opt,name=line" json:"line,omitempty"` @@ -571,7 +618,7 @@ type ShowRequest struct { func (m *ShowRequest) Reset() { *m = ShowRequest{} } func (m *ShowRequest) String() string { return proto.CompactTextString(m) } func (*ShowRequest) ProtoMessage() {} -func (*ShowRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +func (*ShowRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } func (m *ShowRequest) GetLine() string { if m != nil { @@ -594,7 +641,7 @@ type ShowReply struct { func (m *ShowReply) Reset() { *m = ShowReply{} } func (m *ShowReply) String() string { return proto.CompactTextString(m) } func (*ShowReply) ProtoMessage() {} -func (*ShowReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } +func (*ShowReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } func (m *ShowReply) GetStr() string { if m != nil { @@ -612,6 +659,7 @@ func init() { proto.RegisterType((*RegisterModuleReply)(nil), "openconfig.RegisterModuleReply") proto.RegisterType((*ExecModuleRequest)(nil), "openconfig.ExecModuleRequest") proto.RegisterType((*ExecModuleReply)(nil), "openconfig.ExecModuleReply") + proto.RegisterType((*SubscribeRequest)(nil), "openconfig.SubscribeRequest") proto.RegisterType((*ConfigRequest)(nil), "openconfig.ConfigRequest") proto.RegisterType((*ConfigReply)(nil), "openconfig.ConfigReply") proto.RegisterType((*ShowRequest)(nil), "openconfig.ShowRequest") @@ -1046,66 +1094,70 @@ var _Show_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("openconfig.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 963 bytes of a gzipped FileDescriptorProto + // 1025 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0xcd, 0x72, 0xe3, 0x44, - 0x10, 0xb6, 0x6c, 0x59, 0x96, 0x3b, 0x71, 0x32, 0x3b, 0x9b, 0x4d, 0x9c, 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 0x35, 0x74, 0x16, 0x61, 0x90, 0x92, 0x20, 0xed, 0x77, 0x18, 0xc4, 0x93, 0x6d, - 0x88, 0x5a, 0x18, 0x90, 0x20, 0x65, 0x40, 0xf3, 0x54, 0xe5, 0x4f, 0xe8, 0x66, 0x24, 0x23, 0xff, - 0x8e, 0x52, 0x5c, 0x50, 0xe0, 0xef, 0xa1, 0xa8, 0x85, 0x4b, 0xe2, 0xb0, 0x0c, 0x7c, 0x00, 0x6d, - 0x0a, 0x32, 0xe1, 0x1c, 0x33, 0x87, 0xc2, 0x8a, 0xc2, 0x38, 0xe5, 0xfc, 0x98, 0x8d, 0x3f, 0x05, - 0x58, 0xcc, 0x82, 0xe5, 0x6a, 0x39, 0x4b, 0x49, 0xd2, 0x17, 0x19, 0xe0, 0x4a, 0x44, 0xf9, 0x57, - 0x80, 0x7d, 0x87, 0xdc, 0xac, 0x92, 0x94, 0xc4, 0xb9, 0xd4, 0x18, 0xc4, 0x60, 0xb6, 0xce, 0x70, - 0x74, 0x1d, 0x66, 0xe3, 0x43, 0x90, 0xd6, 0xe1, 0x72, 0xe3, 0xe7, 0xb2, 0x72, 0xaf, 0x10, 0xbb, - 0x55, 0x11, 0xfb, 0x21, 0x39, 0x6b, 0x0f, 0xd0, 0xde, 0x7e, 0x80, 0x03, 0x68, 0xdf, 0x12, 0x3f, - 0xca, 0x15, 0xcd, 0x9c, 0x42, 0x8f, 0xce, 0x87, 0xf4, 0x50, 0xbe, 0x82, 0x5e, 0x49, 0x82, 0x4a, - 0xc9, 0x68, 0xfb, 0xfe, 0x7c, 0xb6, 0xf8, 0x65, 0xb5, 0x64, 0x44, 0xda, 0x4e, 0x25, 0xa2, 0x68, - 0xf0, 0x2c, 0x3f, 0x60, 0x31, 0x22, 0x39, 0xf7, 0x92, 0xa7, 0xb0, 0xcd, 0x93, 0x69, 0xcb, 0x9b, - 0x8a, 0xda, 0xca, 0x97, 0xf0, 0x74, 0xbb, 0x08, 0xbd, 0xfb, 0x10, 0xa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 0x0e, 0x22, 0x06, 0xf1, 0xa7, 0xd0, + 0x73, 0xf9, 0x5b, 0xa2, 0xb6, 0xf4, 0x25, 0xb4, 0xac, 0x7b, 0xef, 0xb7, 0xdc, 0x73, 0x65, 0x33, + 0x16, 0x72, 0xcf, 0x8d, 0x97, 0xd1, 0xcf, 0x36, 0x92, 0xb2, 0x97, 0xd0, 0x8c, 0xcb, 0x28, 0x5e, + 0x04, 0x95, 0x30, 0x0a, 0x92, 0x1a, 0x6a, 0xf6, 0x03, 0x68, 0xf0, 0x45, 0x8a, 0x1b, 0x20, 0x92, + 0x5b, 0xa2, 0xa0, 0x12, 0x7e, 0x06, 0x0d, 0x65, 0xa8, 0x7f, 0x18, 0x10, 0x9b, 0x20, 0x01, 0x9f, + 0xc1, 0x09, 0xf7, 0xc6, 0xb6, 0x29, 0x6b, 0x03, 0xcd, 0xb8, 0x19, 0x5b, 0x1f, 0x64, 0x85, 0xa0, + 0x72, 0xe1, 0xf0, 0x5a, 0x33, 0x2d, 0x7b, 0xac, 0x0c, 0x75, 0x5d, 0x36, 0x54, 0x0b, 0x55, 0xf0, + 0x21, 0xa0, 0xf4, 0x50, 0xfd, 0xde, 0x90, 0x75, 0x4d, 0x41, 0x62, 0xff, 0x1d, 0xec, 0x15, 0x37, + 0x23, 0x46, 0xf0, 0x4c, 0x19, 0x1a, 0x36, 0x31, 0xec, 0xb1, 0x4d, 0x6e, 0x6d, 0x54, 0xca, 0x47, + 0xbe, 0xb6, 0x86, 0x06, 0x12, 0xfa, 0x6e, 0x8c, 0x94, 0xbe, 0x7f, 0xdc, 0x82, 0xba, 0x35, 0x52, + 0x14, 0x62, 0x59, 0xa8, 0x44, 0x1d, 0x63, 0xa8, 0xcb, 0xb6, 0xf2, 0x1e, 0x09, 0x78, 0x0f, 0x40, + 0x33, 0x52, 0xec, 0x65, 0xdc, 0x86, 0xa6, 0xac, 0x5f, 0x69, 0x37, 0xa3, 0xe1, 0x88, 0x02, 0x6a, + 0x80, 0x68, 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x00, 0xaa, 0x97, 0x7a, 0x67, 0xf9, 0x9a, + 0xad, 0x7f, 0x4b, 0xdd, 0xd3, 0xdd, 0x87, 0xac, 0x29, 0xbe, 0x05, 0x94, 0xf5, 0x89, 0x37, 0x23, + 0xfe, 0x6c, 0x57, 0x41, 0x61, 0xfd, 0x76, 0x3f, 0x7d, 0x2c, 0x25, 0x86, 0xfb, 0x03, 0x40, 0xb6, + 0x6d, 0xf1, 0x00, 0x9e, 0xc5, 0xc4, 0x13, 0xff, 0xe5, 0x36, 0xcb, 0x62, 0xff, 0xb3, 0x8f, 0x1d, + 0xc7, 0xbd, 0x0d, 0xa8, 0xc5, 0x17, 0x0b, 0xab, 0xd0, 0x50, 0xbd, 0xc4, 0x3e, 0x7d, 0xb8, 0x25, + 0x78, 0xbf, 0x93, 0x5d, 0x47, 0xac, 0x57, 0x4f, 0x78, 0xc3, 0xc6, 0x43, 0x9f, 0x38, 0xbe, 0x4c, + 0xfe, 0x16, 0xd2, 0x73, 0x3b, 0xa3, 0x38, 0x9c, 0x74, 0x2b, 0x48, 0xa5, 0x37, 0xc2, 0xb4, 0xc6, + 0x7e, 0x8b, 0xbd, 0xfd, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x66, 0x51, 0x0c, 0x7a, 0x9f, 0x09, 0x00, + 0x00, } diff --git a/proto/openconfig.proto b/proto/openconfig.proto index 6b73466..e8c9b79 100644 --- a/proto/openconfig.proto +++ b/proto/openconfig.proto @@ -128,6 +128,8 @@ enum ConfigType { COMMIT_END = 7; SUBSCRIBE = 8; SUBSCRIBE_MULTI = 9; + SUBSCRIBE_REQUEST = 10; + JSON_CONFIG = 11; } // Configuration @@ -141,18 +143,25 @@ enum SubscribeType { JSON = 1; } +message SubscribeRequest { + SubscribeType type = 1; + string path = 2; +} + message ConfigRequest { ConfigType type = 1; string module = 2; uint32 port = 3; SubscribeType subtype = 4; repeated string path = 5; + repeated SubscribeRequest subscribe = 6; } message ConfigReply { int32 result = 1; ConfigType type = 2; repeated string path = 3; + string json = 4; } // Show service. diff --git a/yang/coreswitch.yang b/yang/coreswitch.yang index 1152f1a..09bfe79 100644 --- a/yang/coreswitch.yang +++ b/yang/coreswitch.yang @@ -40,6 +40,9 @@ module coreswitch { leaf hub-node { type string; } + leaf distribute-list-ospf { + type string; + } container dhcp { uses "dhcp:dhcp"; }