From ff5b56920da681fdd9bb2e6987f57f99882dd019 Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Wed, 26 Aug 2020 18:05:50 +1200 Subject: [PATCH] Detect non dovesnap ports in OVS, and add/remove them from FAUCET. --- Gopkg.lock | 15 +- Gopkg.toml | 2 +- lib_test.sh | 2 +- ovs/driver.go | 85 ++- ovs/ovs_bridge.go | 32 +- ovs/ovs_config.go | 2 + ovs/ovs_port.go | 10 +- test_dovesnap_mirrorbridge.sh | 1 + .../faucetconfrpc/faucetconfrpc.pb.go | 698 +++++++++++++++--- .../faucetconfrpc/faucetconfrpc_client.py | 19 +- .../faucetconfrpc/faucetconfrpc_client_lib.py | 49 +- .../faucetconfrpc/faucetconfrpc_pb2.py | 255 ++++++- .../faucetconfrpc/faucetconfrpc_pb2_grpc.py | 96 +++ .../faucetconfrpc/faucetconfrpc_server.py | 52 +- .../faucetconfrpc/generate_pb_grpc.sh | 5 +- vendor/github.com/kare/base62/.gitignore | 4 + vendor/github.com/kare/base62/.travis.yml | 6 + vendor/github.com/kare/base62/LICENSE | 28 + vendor/github.com/kare/base62/Makefile | 39 + vendor/github.com/kare/base62/README.md | 21 + vendor/github.com/kare/base62/base62.go | 42 ++ vendor/github.com/kare/base62/go.mod | 3 + 22 files changed, 1295 insertions(+), 171 deletions(-) create mode 100644 vendor/github.com/kare/base62/.gitignore create mode 100644 vendor/github.com/kare/base62/.travis.yml create mode 100644 vendor/github.com/kare/base62/LICENSE create mode 100644 vendor/github.com/kare/base62/Makefile create mode 100644 vendor/github.com/kare/base62/README.md create mode 100644 vendor/github.com/kare/base62/base62.go create mode 100644 vendor/github.com/kare/base62/go.mod diff --git a/Gopkg.lock b/Gopkg.lock index a246cb45..2fd27474 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -138,12 +138,20 @@ version = "v1.4.2" [[projects]] - digest = "1:180b828c80945f65ca18d72b325e4c6b9defd87ca6fba9e449197df1b92e5bc9" + digest = "1:6a4271130d5a5856fa87115d1cd25ca1c1c9ada910ba1753ada8b324f44efdb7" name = "github.com/iqtlabs/faucetconfrpc" packages = ["faucetconfrpc"] pruneopts = "UT" - revision = "396d48909d3deb8d53e36aef7dadd0d624dadba5" - version = "v0.17" + revision = "fdfad7ac14a0891f4e005f1d1c609591f71e4793" + version = "v0.20" + +[[projects]] + digest = "1:2b7adfde806a216220edb82348de19ea774379c46b8062a8a79f0e591ce7ec7d" + name = "github.com/kare/base62" + packages = ["."] + pruneopts = "UT" + revision = "b85cb792a24dec30071a48431465dea64496a534" + version = "v0.1.0" [[projects]] branch = "master" @@ -365,6 +373,7 @@ "github.com/docker/go-plugins-helpers/network", "github.com/docker/libnetwork/iptables", "github.com/iqtlabs/faucetconfrpc/faucetconfrpc", + "github.com/kare/base62", "github.com/kenshaw/baseconv", "github.com/sirupsen/logrus", "github.com/vishvananda/netlink", diff --git a/Gopkg.toml b/Gopkg.toml index 93d31527..5950957d 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -4,7 +4,7 @@ [[constraint]] name = "github.com/iqtlabs/faucetconfrpc" - version = "0.17" + version = "0.20" [prune] go-tests = true diff --git a/lib_test.sh b/lib_test.sh index f8fea72d..a1895bdd 100644 --- a/lib_test.sh +++ b/lib_test.sh @@ -161,7 +161,7 @@ wait_for_pcap_match () { i=0 OUT="" - while [ "$OUT" == "" ] && [ i != 30 ] ; do + while [ "$OUT" == "" ] && [ "$i" != 30 ] ; do echo waiting for pcap match $PCAPMATCH: $i OUT=$(sudo tcpdump -n -r $MIRROR_PCAP -v | grep $PCAPMATCH) ((i=i+1)) diff --git a/ovs/driver.go b/ovs/driver.go index 3c3274fd..bed8ef79 100755 --- a/ovs/driver.go +++ b/ovs/driver.go @@ -69,6 +69,7 @@ type NetworkState struct { BridgeVLAN int MTU int Mode string + AddPorts string Gateway string GatewayMask string FlatBindInterface string @@ -224,6 +225,7 @@ func (d *Driver) ReOrCreateNetwork(r *networkplugin.CreateNetworkRequest, operat BridgeVLAN: vlan, MTU: mtu, Mode: mode, + AddPorts: add_ports, Gateway: gateway, GatewayMask: mask, FlatBindInterface: bindInterface, @@ -618,6 +620,28 @@ func mustHandleAdd(d *Driver, confclient faucetconfserver.FaucetConfServerClient (*OFPorts)[mapMsg.EndpointID] = containerMap } +func deleteDpInterface(confclient faucetconfserver.FaucetConfServerClient, dpName string, ofport uint32) { + interfaces := &faucetconfserver.InterfaceInfo{ + PortNo: uint32(ofport), + } + interfacesConf := []*faucetconfserver.DpInfo{ + { + Name: dpName, + Interfaces: []*faucetconfserver.InterfaceInfo{interfaces}, + }, + } + + req := &faucetconfserver.DelDpInterfacesRequest{ + InterfacesConfig: interfacesConf, + DeleteEmptyDp: true, + } + + _, err := confclient.DelDpInterfaces(context.Background(), req) + if err != nil { + log.Errorf("Error while calling DelDpInterfaces RPC %s: %v", req, err) + } +} + func mustHandleRm(d *Driver, confclient faucetconfserver.FaucetConfServerClient, mapMsg OFPortMap, OFPorts *map[string]OFPortContainer) { defer func() { if rerr := recover(); rerr != nil { @@ -632,9 +656,11 @@ func mustHandleRm(d *Driver, confclient faucetconfserver.FaucetConfServerClient, udhcpcCmd.Process.Kill() udhcpcCmd.Wait() } - ns := d.networks[mapMsg.NetworkID] - interfaces := &faucetconfserver.InterfaceInfo{ - PortNo: int32(mapMsg.OFPort), + ns, have_network := d.networks[mapMsg.NetworkID] + if !have_network { + log.Debugf("Network %s already gone", mapMsg.NetworkID) + delete(*OFPorts, mapMsg.EndpointID) + return } log.Debugf("Removing port %d on %s from Faucet config", mapMsg.OFPort, ns.NetworkName) @@ -655,21 +681,7 @@ func mustHandleRm(d *Driver, confclient faucetconfserver.FaucetConfServerClient, } } - interfacesConf := []*faucetconfserver.DpInfo{ - { - Name: ns.NetworkName, - Interfaces: []*faucetconfserver.InterfaceInfo{interfaces}, - }, - } - - req := &faucetconfserver.DelDpInterfacesRequest{ - InterfacesConfig: interfacesConf, - DeleteEmptyDp: true, - } - _, err := confclient.DelDpInterfaces(context.Background(), req) - if err != nil { - log.Errorf("Error while calling DelDpInterfaces RPC %s: %v", req, err) - } + deleteDpInterface(confclient, ns.NetworkName, uint32(mapMsg.OFPort)) // The container will be gone by the time we query docker. delete(*OFPorts, mapMsg.EndpointID) @@ -683,28 +695,57 @@ func reconcileOvs(d *Driver, allPortDesc *map[string]map[uint]string) { if err != nil { continue } + addPorts := make(map[string]uint32) + d.ovsdber.parseAddPorts(ns.AddPorts, &addPorts) + portDesc, have_port_desc := (*allPortDesc)[id] if have_port_desc { if reflect.DeepEqual(newPortDesc, portDesc) { continue } log.Debugf("portDesc for %s updated", ns.BridgeName) + + for ofport, desc := range portDesc { + _, have_new_port_desc := newPortDesc[ofport] + if have_new_port_desc { + continue + } + // Ignore container ports + if strings.HasPrefix(desc, ovsPortPrefix) { + continue + } + log.Infof("removing non dovesnap port: %s %s %d %s", id, ns.BridgeName, ofport, desc) + deleteDpInterface(d.faucetclient, ns.NetworkName, uint32(ofport)) + } } else { log.Debugf("new portDesc for %s", ns.BridgeName) } + add_interfaces := "" + for ofport, desc := range newPortDesc { - if uint32(ofport) == ofPortLocal { + // Ignore NAT and mirror port + if uint32(ofport) == ofPortLocal || uint32(ofport) == stackMirrorConfig.LbPort { continue } - if uint32(ofport) == stackMirrorConfig.LbPort { + // Ignore container and patch ports. + if strings.HasPrefix(desc, ovsPortPrefix) || strings.HasPrefix(desc, patchPrefix) { continue } - if strings.HasPrefix(desc, ovsPortPrefix) { + // Skip ports that were added at creation time. + _, have_add_port := addPorts[desc] + if have_add_port { continue } - log.Debugf("non container port: %s %s %d %s", id, ns.BridgeName, ofport, desc) + log.Infof("adding non dovesnap port: %s %s %d %s", id, ns.BridgeName, ofport, desc) + add_interfaces += fmt.Sprintf("%d: {description: %s, native_vlan: %d},", ofport, "Physical interface "+desc, ns.BridgeVLAN) } + + if add_interfaces != "" { + configYaml := mergeInterfacesYaml(ns.NetworkName, ns.BridgeDpidInt, ns.BridgeName, add_interfaces) + setFaucetConfigFile(d.faucetclient, configYaml) + } + (*allPortDesc)[id] = newPortDesc } } diff --git a/ovs/ovs_bridge.go b/ovs/ovs_bridge.go index 2eb4761e..7b1b8cbb 100644 --- a/ovs/ovs_bridge.go +++ b/ovs/ovs_bridge.go @@ -2,6 +2,7 @@ package ovs import ( "fmt" + "strconv" "strings" "time" @@ -69,6 +70,26 @@ func (ovsdber *ovsdber) makeLoopbackBridge(bridgeName string) (err error) { return err } +func (ovsdber *ovsdber) parseAddPorts(add_ports string, addPorts *map[string]uint32) { + if add_ports == "" { + return + } + for _, add_port_number_str := range strings.Split(add_ports, ",") { + add_port_number := strings.Split(add_port_number_str, "/") + add_port := add_port_number[0] + if len(add_port_number) == 2 { + number, err := strconv.ParseUint(add_port_number[1], 10, 32) + if err != nil { + panic(err) + } + (*addPorts)[add_port] = uint32(number) + } else { + (*addPorts)[add_port] = 0 + } + } + return +} + func (ovsdber *ovsdber) createBridge(bridgeName string, controller string, dpid string, add_ports string, exists bool) error { if exists { if _, err := ovsdber.addBridgeExists(bridgeName); err != nil { @@ -94,12 +115,11 @@ func (ovsdber *ovsdber) createBridge(bridgeName string, controller string, dpid } if add_ports != "" { - for _, add_port_number_str := range strings.Split(add_ports, ",") { - add_port_number := strings.Split(add_port_number_str, "/") - add_port := add_port_number[0] - if len(add_port_number) == 2 { - number := add_port_number[1] - ovsConfigCmds = append(ovsConfigCmds, []string{"add-port", bridgeName, add_port, "--", "set", "Interface", add_port, fmt.Sprintf("ofport_request=%s", number)}) + addPorts := make(map[string]uint32) + ovsdber.parseAddPorts(add_ports, &addPorts) + for add_port, number := range addPorts { + if number > 0 { + ovsConfigCmds = append(ovsConfigCmds, []string{"add-port", bridgeName, add_port, "--", "set", "Interface", add_port, fmt.Sprintf("ofport_request=%d", number)}) } else { ovsConfigCmds = append(ovsConfigCmds, []string{"add-port", bridgeName, add_port}) } diff --git a/ovs/ovs_config.go b/ovs/ovs_config.go index 0e46fb84..0d77aebe 100644 --- a/ovs/ovs_config.go +++ b/ovs/ovs_config.go @@ -49,6 +49,7 @@ const ( netNsPath = "/var/run/netns" ofPortLocal uint32 = 4294967294 ovsPortPrefix = "ovs-veth0-" + patchPrefix = "ovp" peerOvsPortPrefix = "ethc" stackDpidPrefix = "0x0E0F00" ovsStartupRetries = 5 @@ -400,6 +401,7 @@ func getNetworkStateFromResource(r *types.NetworkResource) (ns NetworkState, err MTU: getIntOptionFromResource(r, mtuOption, defaultMTU), Mode: getStrOptionFromResource(r, modeOption, defaultMode), FlatBindInterface: getStrOptionFromResource(r, bindInterfaceOption, ""), + AddPorts: getStrOptionFromResource(r, bridgeAddPorts, ""), UseDHCP: parseBool(getStrOptionFromResource(r, dhcpOption, "")), Gateway: gateway, GatewayMask: mask, diff --git a/ovs/ovs_port.go b/ovs/ovs_port.go index 380c38b3..f48fb0af 100644 --- a/ovs/ovs_port.go +++ b/ovs/ovs_port.go @@ -8,6 +8,7 @@ import ( "strconv" "strings" + base62 "github.com/kare/base62" log "github.com/sirupsen/logrus" "github.com/vishvananda/netlink" ) @@ -39,6 +40,7 @@ func (ovsdber *ovsdber) lowestFreePortOnBridge(bridgeName string) (lowestFreePor existingOfPorts = append(existingOfPorts, int(ofport)) } sort.Ints(existingOfPorts) + log.Debugf("existing ports on %s: %+v", bridgeName, existingOfPorts) intLowestFreePort := 1 for _, existingPort := range existingOfPorts { if existingPort != intLowestFreePort { @@ -63,11 +65,15 @@ func (ovsdber *ovsdber) addInternalPort(bridgeName string, portName string, tag } func patchStr(a string) string { - return strconv.FormatUint(uint64(crc32.ChecksumIEEE([]byte(a))), 36) + return base62.Encode(int64(crc32.ChecksumIEEE([]byte(a)))) } func patchName(a string, b string) string { - return patchStr(a) + patchStr(b) + name := patchPrefix + patchStr(a) + patchStr(b) + if len(name) > 15 { + panic(fmt.Errorf("%s too long for ifName", name)) + } + return name } func (ovsdber *ovsdber) addPatchPort(bridgeName string, bridgeNamePeer string, port uint, portPeer uint) (uint, uint, error) { diff --git a/test_dovesnap_mirrorbridge.sh b/test_dovesnap_mirrorbridge.sh index 7fe43948..d81173bd 100755 --- a/test_dovesnap_mirrorbridge.sh +++ b/test_dovesnap_mirrorbridge.sh @@ -37,6 +37,7 @@ wait_mirror sudo grep -q "description: /testcon" $FAUCET_CONFIG || exit 1 echo verifying networking sudo timeout 30s tcpdump -n -c 1 -U -i mirroro -w $MIRROR_PCAP tcp & +sleep 3 docker exec -t testcon wget -q -O- bing.com || exit 1 PCAPMATCH=TCP wait_for_pcap_match diff --git a/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc.pb.go b/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc.pb.go index 5cbdb466..df3bcfcf 100644 --- a/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc.pb.go +++ b/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc.pb.go @@ -1317,7 +1317,7 @@ type InterfaceInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - PortNo int32 `protobuf:"varint,1,opt,name=port_no,json=portNo,proto3" json:"port_no,omitempty"` + PortNo uint32 `protobuf:"varint,1,opt,name=port_no,json=portNo,proto3" json:"port_no,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` } @@ -1354,7 +1354,7 @@ func (*InterfaceInfo) Descriptor() ([]byte, []int) { return file_protos_faucetconfrpc_faucetconfrpc_proto_rawDescGZIP(), []int{25} } -func (x *InterfaceInfo) GetPortNo() int32 { +func (x *InterfaceInfo) GetPortNo() uint32 { if x != nil { return x.PortNo } @@ -1671,6 +1671,270 @@ func (*DelDpsReply) Descriptor() ([]byte, []int) { return file_protos_faucetconfrpc_faucetconfrpc_proto_rawDescGZIP(), []int{31} } +type GetDpNamesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetDpNamesRequest) Reset() { + *x = GetDpNamesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_protos_faucetconfrpc_faucetconfrpc_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDpNamesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDpNamesRequest) ProtoMessage() {} + +func (x *GetDpNamesRequest) ProtoReflect() protoreflect.Message { + mi := &file_protos_faucetconfrpc_faucetconfrpc_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDpNamesRequest.ProtoReflect.Descriptor instead. +func (*GetDpNamesRequest) Descriptor() ([]byte, []int) { + return file_protos_faucetconfrpc_faucetconfrpc_proto_rawDescGZIP(), []int{32} +} + +type GetDpNamesReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DpName []string `protobuf:"bytes,1,rep,name=dp_name,json=dpName,proto3" json:"dp_name,omitempty"` +} + +func (x *GetDpNamesReply) Reset() { + *x = GetDpNamesReply{} + if protoimpl.UnsafeEnabled { + mi := &file_protos_faucetconfrpc_faucetconfrpc_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDpNamesReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDpNamesReply) ProtoMessage() {} + +func (x *GetDpNamesReply) ProtoReflect() protoreflect.Message { + mi := &file_protos_faucetconfrpc_faucetconfrpc_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDpNamesReply.ProtoReflect.Descriptor instead. +func (*GetDpNamesReply) Descriptor() ([]byte, []int) { + return file_protos_faucetconfrpc_faucetconfrpc_proto_rawDescGZIP(), []int{33} +} + +func (x *GetDpNamesReply) GetDpName() []string { + if x != nil { + return x.DpName + } + return nil +} + +type GetDpIDsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetDpIDsRequest) Reset() { + *x = GetDpIDsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_protos_faucetconfrpc_faucetconfrpc_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDpIDsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDpIDsRequest) ProtoMessage() {} + +func (x *GetDpIDsRequest) ProtoReflect() protoreflect.Message { + mi := &file_protos_faucetconfrpc_faucetconfrpc_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDpIDsRequest.ProtoReflect.Descriptor instead. +func (*GetDpIDsRequest) Descriptor() ([]byte, []int) { + return file_protos_faucetconfrpc_faucetconfrpc_proto_rawDescGZIP(), []int{34} +} + +type GetDpIDsReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DpId []uint64 `protobuf:"varint,1,rep,packed,name=dp_id,json=dpId,proto3" json:"dp_id,omitempty"` +} + +func (x *GetDpIDsReply) Reset() { + *x = GetDpIDsReply{} + if protoimpl.UnsafeEnabled { + mi := &file_protos_faucetconfrpc_faucetconfrpc_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDpIDsReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDpIDsReply) ProtoMessage() {} + +func (x *GetDpIDsReply) ProtoReflect() protoreflect.Message { + mi := &file_protos_faucetconfrpc_faucetconfrpc_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDpIDsReply.ProtoReflect.Descriptor instead. +func (*GetDpIDsReply) Descriptor() ([]byte, []int) { + return file_protos_faucetconfrpc_faucetconfrpc_proto_rawDescGZIP(), []int{35} +} + +func (x *GetDpIDsReply) GetDpId() []uint64 { + if x != nil { + return x.DpId + } + return nil +} + +type GetAclNamesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AclName []string `protobuf:"bytes,1,rep,name=acl_name,json=aclName,proto3" json:"acl_name,omitempty"` +} + +func (x *GetAclNamesRequest) Reset() { + *x = GetAclNamesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_protos_faucetconfrpc_faucetconfrpc_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAclNamesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAclNamesRequest) ProtoMessage() {} + +func (x *GetAclNamesRequest) ProtoReflect() protoreflect.Message { + mi := &file_protos_faucetconfrpc_faucetconfrpc_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAclNamesRequest.ProtoReflect.Descriptor instead. +func (*GetAclNamesRequest) Descriptor() ([]byte, []int) { + return file_protos_faucetconfrpc_faucetconfrpc_proto_rawDescGZIP(), []int{36} +} + +func (x *GetAclNamesRequest) GetAclName() []string { + if x != nil { + return x.AclName + } + return nil +} + +type GetAclNamesReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AclName []string `protobuf:"bytes,1,rep,name=acl_name,json=aclName,proto3" json:"acl_name,omitempty"` +} + +func (x *GetAclNamesReply) Reset() { + *x = GetAclNamesReply{} + if protoimpl.UnsafeEnabled { + mi := &file_protos_faucetconfrpc_faucetconfrpc_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAclNamesReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAclNamesReply) ProtoMessage() {} + +func (x *GetAclNamesReply) ProtoReflect() protoreflect.Message { + mi := &file_protos_faucetconfrpc_faucetconfrpc_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAclNamesReply.ProtoReflect.Descriptor instead. +func (*GetAclNamesReply) Descriptor() ([]byte, []int) { + return file_protos_faucetconfrpc_faucetconfrpc_proto_rawDescGZIP(), []int{37} +} + +func (x *GetAclNamesReply) GetAclName() []string { + if x != nil { + return x.AclName + } + return nil +} + var File_protos_faucetconfrpc_faucetconfrpc_proto protoreflect.FileDescriptor var file_protos_faucetconfrpc_faucetconfrpc_proto_rawDesc = []byte{ @@ -1791,7 +2055,7 @@ var file_protos_faucetconfrpc_faucetconfrpc_proto_rawDesc = []byte{ 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x5e, 0x0a, 0x0d, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, - 0x0a, 0x07, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x07, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, @@ -1825,96 +2089,126 @@ var file_protos_faucetconfrpc_faucetconfrpc_proto_rawDesc = []byte{ 0x32, 0x18, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x0d, 0x0a, 0x0b, - 0x44, 0x65, 0x6c, 0x44, 0x70, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x32, 0xe6, 0x0a, 0x0a, 0x10, - 0x46, 0x61, 0x75, 0x63, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x12, 0x5f, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x69, 0x6c, - 0x65, 0x12, 0x26, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x69, - 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x66, 0x61, 0x75, 0x63, - 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, - 0x00, 0x12, 0x5f, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x69, - 0x6c, 0x65, 0x12, 0x26, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, - 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x66, 0x61, 0x75, - 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, - 0x72, 0x6f, 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x2a, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, - 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x46, 0x72, 0x6f, 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, - 0x5f, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, - 0x12, 0x26, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, - 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x64, 0x50, - 0x6f, 0x72, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, - 0x12, 0x68, 0x0a, 0x10, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x69, - 0x72, 0x72, 0x6f, 0x72, 0x12, 0x29, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, - 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x6f, - 0x72, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x27, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x69, 0x72, - 0x72, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x0f, 0x43, 0x6c, - 0x65, 0x61, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x28, 0x2e, + 0x44, 0x65, 0x6c, 0x44, 0x70, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x13, 0x0a, 0x11, 0x47, + 0x65, 0x74, 0x44, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x2a, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x44, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x64, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x11, 0x0a, 0x0f, + 0x47, 0x65, 0x74, 0x44, 0x70, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x24, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x44, 0x70, 0x49, 0x44, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x12, 0x13, 0x0a, 0x05, 0x64, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, + 0x04, 0x64, 0x70, 0x49, 0x64, 0x22, 0x2f, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, + 0x63, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x63, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2d, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x63, 0x6c, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x63, + 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, + 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0xeb, 0x0c, 0x0a, 0x10, 0x46, 0x61, 0x75, 0x63, 0x65, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x5f, 0x0a, 0x0d, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x26, 0x2e, 0x66, 0x61, + 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x0d, 0x53, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x26, 0x2e, 0x66, + 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, + 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x11, + 0x44, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x46, 0x69, 0x6c, + 0x65, 0x12, 0x2a, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x72, + 0x6f, 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, - 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, - 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, - 0x00, 0x12, 0x56, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x6c, 0x12, - 0x23, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x6c, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, - 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x41, - 0x63, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x0d, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x6c, 0x12, 0x26, 0x2e, 0x66, 0x61, 0x75, - 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x2e, 0x44, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x46, 0x69, + 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x0d, 0x41, 0x64, 0x64, + 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x26, 0x2e, 0x66, 0x61, 0x75, + 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x41, 0x64, + 0x64, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x6f, 0x72, 0x74, - 0x41, 0x63, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x0a, 0x53, 0x65, - 0x74, 0x50, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x6c, 0x12, 0x23, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, - 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x50, - 0x6f, 0x72, 0x74, 0x41, 0x63, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, - 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x22, 0x00, 0x12, 0x65, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x44, 0x70, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x66, 0x61, 0x63, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, - 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x44, 0x70, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x26, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x69, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x68, 0x0a, 0x10, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x29, + 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x69, 0x72, 0x72, + 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x66, 0x61, 0x75, 0x63, + 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x0f, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x50, 0x6f, 0x72, + 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x28, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, + 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, + 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x26, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x69, + 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x0a, 0x41, + 0x64, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x6c, 0x12, 0x23, 0x2e, 0x66, 0x61, 0x75, 0x63, + 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x64, + 0x50, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, + 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x6c, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x6f, 0x72, + 0x74, 0x41, 0x63, 0x6c, 0x12, 0x26, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, + 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x6f, + 0x72, 0x74, 0x41, 0x63, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x66, + 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x6c, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x41, + 0x63, 0x6c, 0x12, 0x23, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, + 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6f, + 0x72, 0x74, 0x41, 0x63, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x0f, + 0x53, 0x65, 0x74, 0x44, 0x70, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x12, + 0x28, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x44, 0x70, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, - 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x09, 0x47, 0x65, 0x74, - 0x44, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, - 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x70, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x66, 0x61, 0x75, - 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x47, 0x65, - 0x74, 0x44, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x65, - 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x44, 0x70, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, - 0x73, 0x12, 0x28, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x44, 0x70, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, - 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x66, 0x61, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x66, 0x61, 0x75, 0x63, + 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, + 0x44, 0x70, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x44, 0x70, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x22, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, + 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x70, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x44, + 0x70, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x44, 0x70, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, - 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x44, 0x70, 0x73, 0x12, - 0x1f, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x44, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1d, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x44, 0x70, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, - 0x00, 0x12, 0x71, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x69, - 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x2c, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, - 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x52, - 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, - 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x6d, - 0x6f, 0x74, 0x65, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x22, 0x00, 0x42, 0x14, 0x5a, 0x12, 0x2e, 0x3b, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, - 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, + 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x44, 0x70, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, + 0x4a, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x44, 0x70, 0x73, 0x12, 0x1f, 0x2e, 0x66, 0x61, 0x75, 0x63, + 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, + 0x44, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x66, 0x61, 0x75, + 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x65, + 0x6c, 0x44, 0x70, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x13, 0x53, + 0x65, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, + 0x72, 0x74, 0x12, 0x2c, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d, + 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2a, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x69, 0x72, + 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x56, + 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x44, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x66, + 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x47, 0x65, 0x74, 0x44, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x21, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x44, 0x70, 0x49, + 0x44, 0x73, 0x12, 0x21, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x70, 0x49, 0x44, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, + 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x70, 0x49, 0x44, + 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41, + 0x63, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, + 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, + 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, + 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x22, 0x00, 0x42, 0x14, 0x5a, 0x12, 0x2e, 0x3b, 0x66, 0x61, 0x75, 0x63, 0x65, 0x74, 0x63, + 0x6f, 0x6e, 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1929,7 +2223,7 @@ func file_protos_faucetconfrpc_faucetconfrpc_proto_rawDescGZIP() []byte { return file_protos_faucetconfrpc_faucetconfrpc_proto_rawDescData } -var file_protos_faucetconfrpc_faucetconfrpc_proto_msgTypes = make([]protoimpl.MessageInfo, 32) +var file_protos_faucetconfrpc_faucetconfrpc_proto_msgTypes = make([]protoimpl.MessageInfo, 38) var file_protos_faucetconfrpc_faucetconfrpc_proto_goTypes = []interface{}{ (*GetConfigFileRequest)(nil), // 0: faucetconfserver.GetConfigFileRequest (*GetConfigFileReply)(nil), // 1: faucetconfserver.GetConfigFileReply @@ -1963,6 +2257,12 @@ var file_protos_faucetconfrpc_faucetconfrpc_proto_goTypes = []interface{}{ (*DelDpInterfacesReply)(nil), // 29: faucetconfserver.DelDpInterfacesReply (*DelDpsRequest)(nil), // 30: faucetconfserver.DelDpsRequest (*DelDpsReply)(nil), // 31: faucetconfserver.DelDpsReply + (*GetDpNamesRequest)(nil), // 32: faucetconfserver.GetDpNamesRequest + (*GetDpNamesReply)(nil), // 33: faucetconfserver.GetDpNamesReply + (*GetDpIDsRequest)(nil), // 34: faucetconfserver.GetDpIDsRequest + (*GetDpIDsReply)(nil), // 35: faucetconfserver.GetDpIDsReply + (*GetAclNamesRequest)(nil), // 36: faucetconfserver.GetAclNamesRequest + (*GetAclNamesReply)(nil), // 37: faucetconfserver.GetAclNamesReply } var file_protos_faucetconfrpc_faucetconfrpc_proto_depIdxs = []int32{ 20, // 0: faucetconfserver.SetDpInterfaces.interface_config:type_name -> faucetconfserver.SetInterface @@ -1985,22 +2285,28 @@ var file_protos_faucetconfrpc_faucetconfrpc_proto_depIdxs = []int32{ 28, // 17: faucetconfserver.FaucetConfServer.DelDpInterfaces:input_type -> faucetconfserver.DelDpInterfacesRequest 30, // 18: faucetconfserver.FaucetConfServer.DelDps:input_type -> faucetconfserver.DelDpsRequest 6, // 19: faucetconfserver.FaucetConfServer.SetRemoteMirrorPort:input_type -> faucetconfserver.SetRemoteMirrorPortRequest - 1, // 20: faucetconfserver.FaucetConfServer.GetConfigFile:output_type -> faucetconfserver.GetConfigFileReply - 3, // 21: faucetconfserver.FaucetConfServer.SetConfigFile:output_type -> faucetconfserver.SetConfigFileReply - 5, // 22: faucetconfserver.FaucetConfServer.DelConfigFromFile:output_type -> faucetconfserver.DelConfigFromFileReply - 9, // 23: faucetconfserver.FaucetConfServer.AddPortMirror:output_type -> faucetconfserver.AddPortMirrorReply - 11, // 24: faucetconfserver.FaucetConfServer.RemovePortMirror:output_type -> faucetconfserver.RemovePortMirrorReply - 13, // 25: faucetconfserver.FaucetConfServer.ClearPortMirror:output_type -> faucetconfserver.ClearPortMirrorReply - 17, // 26: faucetconfserver.FaucetConfServer.AddPortAcl:output_type -> faucetconfserver.AddPortAclReply - 19, // 27: faucetconfserver.FaucetConfServer.RemovePortAcl:output_type -> faucetconfserver.RemovePortAclReply - 15, // 28: faucetconfserver.FaucetConfServer.SetPortAcl:output_type -> faucetconfserver.SetPortAclReply - 23, // 29: faucetconfserver.FaucetConfServer.SetDpInterfaces:output_type -> faucetconfserver.SetDpInterfacesReply - 27, // 30: faucetconfserver.FaucetConfServer.GetDpInfo:output_type -> faucetconfserver.GetDpInfoReply - 29, // 31: faucetconfserver.FaucetConfServer.DelDpInterfaces:output_type -> faucetconfserver.DelDpInterfacesReply - 31, // 32: faucetconfserver.FaucetConfServer.DelDps:output_type -> faucetconfserver.DelDpsReply - 7, // 33: faucetconfserver.FaucetConfServer.SetRemoteMirrorPort:output_type -> faucetconfserver.SetRemoteMirrorPortReply - 20, // [20:34] is the sub-list for method output_type - 6, // [6:20] is the sub-list for method input_type + 32, // 20: faucetconfserver.FaucetConfServer.GetDpNames:input_type -> faucetconfserver.GetDpNamesRequest + 34, // 21: faucetconfserver.FaucetConfServer.GetDpIDs:input_type -> faucetconfserver.GetDpIDsRequest + 36, // 22: faucetconfserver.FaucetConfServer.GetAclNames:input_type -> faucetconfserver.GetAclNamesRequest + 1, // 23: faucetconfserver.FaucetConfServer.GetConfigFile:output_type -> faucetconfserver.GetConfigFileReply + 3, // 24: faucetconfserver.FaucetConfServer.SetConfigFile:output_type -> faucetconfserver.SetConfigFileReply + 5, // 25: faucetconfserver.FaucetConfServer.DelConfigFromFile:output_type -> faucetconfserver.DelConfigFromFileReply + 9, // 26: faucetconfserver.FaucetConfServer.AddPortMirror:output_type -> faucetconfserver.AddPortMirrorReply + 11, // 27: faucetconfserver.FaucetConfServer.RemovePortMirror:output_type -> faucetconfserver.RemovePortMirrorReply + 13, // 28: faucetconfserver.FaucetConfServer.ClearPortMirror:output_type -> faucetconfserver.ClearPortMirrorReply + 17, // 29: faucetconfserver.FaucetConfServer.AddPortAcl:output_type -> faucetconfserver.AddPortAclReply + 19, // 30: faucetconfserver.FaucetConfServer.RemovePortAcl:output_type -> faucetconfserver.RemovePortAclReply + 15, // 31: faucetconfserver.FaucetConfServer.SetPortAcl:output_type -> faucetconfserver.SetPortAclReply + 23, // 32: faucetconfserver.FaucetConfServer.SetDpInterfaces:output_type -> faucetconfserver.SetDpInterfacesReply + 27, // 33: faucetconfserver.FaucetConfServer.GetDpInfo:output_type -> faucetconfserver.GetDpInfoReply + 29, // 34: faucetconfserver.FaucetConfServer.DelDpInterfaces:output_type -> faucetconfserver.DelDpInterfacesReply + 31, // 35: faucetconfserver.FaucetConfServer.DelDps:output_type -> faucetconfserver.DelDpsReply + 7, // 36: faucetconfserver.FaucetConfServer.SetRemoteMirrorPort:output_type -> faucetconfserver.SetRemoteMirrorPortReply + 33, // 37: faucetconfserver.FaucetConfServer.GetDpNames:output_type -> faucetconfserver.GetDpNamesReply + 35, // 38: faucetconfserver.FaucetConfServer.GetDpIDs:output_type -> faucetconfserver.GetDpIDsReply + 37, // 39: faucetconfserver.FaucetConfServer.GetAclNames:output_type -> faucetconfserver.GetAclNamesReply + 23, // [23:40] is the sub-list for method output_type + 6, // [6:23] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name 6, // [6:6] is the sub-list for extension extendee 0, // [0:6] is the sub-list for field type_name @@ -2396,6 +2702,78 @@ func file_protos_faucetconfrpc_faucetconfrpc_proto_init() { return nil } } + file_protos_faucetconfrpc_faucetconfrpc_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDpNamesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protos_faucetconfrpc_faucetconfrpc_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDpNamesReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protos_faucetconfrpc_faucetconfrpc_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDpIDsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protos_faucetconfrpc_faucetconfrpc_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDpIDsReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protos_faucetconfrpc_faucetconfrpc_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAclNamesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protos_faucetconfrpc_faucetconfrpc_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAclNamesReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2403,7 +2781,7 @@ func file_protos_faucetconfrpc_faucetconfrpc_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_protos_faucetconfrpc_faucetconfrpc_proto_rawDesc, NumEnums: 0, - NumMessages: 32, + NumMessages: 38, NumExtensions: 0, NumServices: 1, }, @@ -2443,6 +2821,9 @@ type FaucetConfServerClient interface { DelDpInterfaces(ctx context.Context, in *DelDpInterfacesRequest, opts ...grpc.CallOption) (*DelDpInterfacesReply, error) DelDps(ctx context.Context, in *DelDpsRequest, opts ...grpc.CallOption) (*DelDpsReply, error) SetRemoteMirrorPort(ctx context.Context, in *SetRemoteMirrorPortRequest, opts ...grpc.CallOption) (*SetRemoteMirrorPortReply, error) + GetDpNames(ctx context.Context, in *GetDpNamesRequest, opts ...grpc.CallOption) (*GetDpNamesReply, error) + GetDpIDs(ctx context.Context, in *GetDpIDsRequest, opts ...grpc.CallOption) (*GetDpIDsReply, error) + GetAclNames(ctx context.Context, in *GetAclNamesRequest, opts ...grpc.CallOption) (*GetAclNamesReply, error) } type faucetConfServerClient struct { @@ -2579,6 +2960,33 @@ func (c *faucetConfServerClient) SetRemoteMirrorPort(ctx context.Context, in *Se return out, nil } +func (c *faucetConfServerClient) GetDpNames(ctx context.Context, in *GetDpNamesRequest, opts ...grpc.CallOption) (*GetDpNamesReply, error) { + out := new(GetDpNamesReply) + err := c.cc.Invoke(ctx, "/faucetconfserver.FaucetConfServer/GetDpNames", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *faucetConfServerClient) GetDpIDs(ctx context.Context, in *GetDpIDsRequest, opts ...grpc.CallOption) (*GetDpIDsReply, error) { + out := new(GetDpIDsReply) + err := c.cc.Invoke(ctx, "/faucetconfserver.FaucetConfServer/GetDpIDs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *faucetConfServerClient) GetAclNames(ctx context.Context, in *GetAclNamesRequest, opts ...grpc.CallOption) (*GetAclNamesReply, error) { + out := new(GetAclNamesReply) + err := c.cc.Invoke(ctx, "/faucetconfserver.FaucetConfServer/GetAclNames", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // FaucetConfServerServer is the server API for FaucetConfServer service. type FaucetConfServerServer interface { GetConfigFile(context.Context, *GetConfigFileRequest) (*GetConfigFileReply, error) @@ -2595,6 +3003,9 @@ type FaucetConfServerServer interface { DelDpInterfaces(context.Context, *DelDpInterfacesRequest) (*DelDpInterfacesReply, error) DelDps(context.Context, *DelDpsRequest) (*DelDpsReply, error) SetRemoteMirrorPort(context.Context, *SetRemoteMirrorPortRequest) (*SetRemoteMirrorPortReply, error) + GetDpNames(context.Context, *GetDpNamesRequest) (*GetDpNamesReply, error) + GetDpIDs(context.Context, *GetDpIDsRequest) (*GetDpIDsReply, error) + GetAclNames(context.Context, *GetAclNamesRequest) (*GetAclNamesReply, error) } // UnimplementedFaucetConfServerServer can be embedded to have forward compatible implementations. @@ -2643,6 +3054,15 @@ func (*UnimplementedFaucetConfServerServer) DelDps(context.Context, *DelDpsReque func (*UnimplementedFaucetConfServerServer) SetRemoteMirrorPort(context.Context, *SetRemoteMirrorPortRequest) (*SetRemoteMirrorPortReply, error) { return nil, status.Errorf(codes.Unimplemented, "method SetRemoteMirrorPort not implemented") } +func (*UnimplementedFaucetConfServerServer) GetDpNames(context.Context, *GetDpNamesRequest) (*GetDpNamesReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDpNames not implemented") +} +func (*UnimplementedFaucetConfServerServer) GetDpIDs(context.Context, *GetDpIDsRequest) (*GetDpIDsReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDpIDs not implemented") +} +func (*UnimplementedFaucetConfServerServer) GetAclNames(context.Context, *GetAclNamesRequest) (*GetAclNamesReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAclNames not implemented") +} func RegisterFaucetConfServerServer(s *grpc.Server, srv FaucetConfServerServer) { s.RegisterService(&_FaucetConfServer_serviceDesc, srv) @@ -2900,6 +3320,60 @@ func _FaucetConfServer_SetRemoteMirrorPort_Handler(srv interface{}, ctx context. return interceptor(ctx, in, info, handler) } +func _FaucetConfServer_GetDpNames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDpNamesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FaucetConfServerServer).GetDpNames(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/faucetconfserver.FaucetConfServer/GetDpNames", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FaucetConfServerServer).GetDpNames(ctx, req.(*GetDpNamesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FaucetConfServer_GetDpIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDpIDsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FaucetConfServerServer).GetDpIDs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/faucetconfserver.FaucetConfServer/GetDpIDs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FaucetConfServerServer).GetDpIDs(ctx, req.(*GetDpIDsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FaucetConfServer_GetAclNames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAclNamesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FaucetConfServerServer).GetAclNames(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/faucetconfserver.FaucetConfServer/GetAclNames", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FaucetConfServerServer).GetAclNames(ctx, req.(*GetAclNamesRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _FaucetConfServer_serviceDesc = grpc.ServiceDesc{ ServiceName: "faucetconfserver.FaucetConfServer", HandlerType: (*FaucetConfServerServer)(nil), @@ -2960,6 +3434,18 @@ var _FaucetConfServer_serviceDesc = grpc.ServiceDesc{ MethodName: "SetRemoteMirrorPort", Handler: _FaucetConfServer_SetRemoteMirrorPort_Handler, }, + { + MethodName: "GetDpNames", + Handler: _FaucetConfServer_GetDpNames_Handler, + }, + { + MethodName: "GetDpIDs", + Handler: _FaucetConfServer_GetDpIDs_Handler, + }, + { + MethodName: "GetAclNames", + Handler: _FaucetConfServer_GetAclNames_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "protos/faucetconfrpc/faucetconfrpc.proto", diff --git a/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc_client.py b/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc_client.py index c1ec2db2..4539b735 100755 --- a/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc_client.py +++ b/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc_client.py @@ -3,6 +3,7 @@ """Manage FAUCET config files via RPC (client).""" import argparse +import inspect from faucetconfrpc.faucetconfrpc_client_lib import FaucetConfRpcClient @@ -10,6 +11,12 @@ class ClientError(Exception): """Exceptions for client.""" +def get_attributes(cls): + """Get available RPCs via attrs""" + boring = dir(type('dummy', (object,), {})) + return [item for item in inspect.getmembers(cls) if item[0] not in boring] + + def main(): """Instantiate client and call it.""" parser = argparse.ArgumentParser() @@ -23,10 +30,10 @@ def main(): '--cacert', help='CA public cert', action='store', default='ca.crt') parser.add_argument( - '--port', help='port to serve rpc requests', action='store', + '--port', help='port of rpc server', action='store', default=59999, type=int) parser.add_argument( - '--host', help='host address to serve rpc requests', + '--host', help='host address of rpc server', default='localhost') parser.add_argument( 'commands', type=str, nargs='+', @@ -34,6 +41,14 @@ def main(): args = parser.parse_args() server_addr = '%s:%u' % (args.host, args.port) client = FaucetConfRpcClient(args.key, args.cert, args.cacert, server_addr) + + if args.commands[0] == 'list_rpcs': + attributes = get_attributes(client) + for attribute in attributes: + if not attribute[0].startswith('_'): + print(attribute[0]) + return + command = getattr(client, args.commands[0], None) if not command: raise ClientError('no such rpc: %s' % args.commands[0]) diff --git a/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc_client_lib.py b/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc_client_lib.py index 9ff8d75c..2d6d98fd 100644 --- a/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc_client_lib.py +++ b/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc_client_lib.py @@ -18,8 +18,8 @@ def __init__(self, client_key, client_cert, ca_cert, server_addr): ('certificate_chain', client_cert), ('private_key', client_key))} client_creds = grpc.ssl_channel_credentials(**client_cred_args) - self.channel = grpc.secure_channel(server_addr, client_creds) - self.stub = faucetconfrpc_pb2_grpc.FaucetConfServerStub(self.channel) + self._channel = grpc.secure_channel(server_addr, client_creds) + self._stub = faucetconfrpc_pb2_grpc.FaucetConfServerStub(self._channel) @staticmethod def _call(rpc, params): @@ -31,7 +31,7 @@ def _call(rpc, params): def get_config_file(self, config_filename=None): """Get a YAML config file.""" - response = self._call(self.stub.GetConfigFile, faucetconfrpc_pb2.GetConfigFileRequest( + response = self._call(self._stub.GetConfigFile, faucetconfrpc_pb2.GetConfigFileRequest( config_filename=config_filename)) if response is not None: return yaml.safe_load(response.config_yaml) @@ -42,7 +42,7 @@ def set_config_file(self, config_yaml, config_filename=None, merge=True, """Set a YAML config file.""" if isinstance(config_yaml, dict): config_yaml = yaml.dump(config_yaml) - return self._call(self.stub.SetConfigFile, faucetconfrpc_pb2.SetConfigFileRequest( + return self._call(self._stub.SetConfigFile, faucetconfrpc_pb2.SetConfigFileRequest( config_filename=config_filename, config_yaml=config_yaml, merge=merge, @@ -52,46 +52,46 @@ def del_config_from_file(self, config_yaml_keys, config_filename=None): """Delete a key from YAML config file.""" if isinstance(config_yaml_keys, list): config_yaml_keys = yaml.dump(config_yaml_keys) - return self._call(self.stub.DelConfigFromFile, faucetconfrpc_pb2.DelConfigFromFileRequest( + return self._call(self._stub.DelConfigFromFile, faucetconfrpc_pb2.DelConfigFromFileRequest( config_filename=config_filename, config_yaml_keys=config_yaml_keys)) def add_port_mirror(self, dp_name, port_no, mirror_port_no): """Add port mirroring.""" - return self._call(self.stub.AddPortMirror, faucetconfrpc_pb2.AddPortMirrorRequest( + return self._call(self._stub.AddPortMirror, faucetconfrpc_pb2.AddPortMirrorRequest( dp_name=dp_name, port_no=port_no, mirror_port_no=mirror_port_no)) def remove_port_mirror(self, dp_name, port_no, mirror_port_no): """Remove port mirroring.""" - return self._call(self.stub.RemovePortMirror, faucetconfrpc_pb2.RemovePortMirrorRequest( + return self._call(self._stub.RemovePortMirror, faucetconfrpc_pb2.RemovePortMirrorRequest( dp_name=dp_name, port_no=port_no, mirror_port_no=mirror_port_no)) def clear_port_mirror(self, dp_name, mirror_port_no): """Clear all mirroring on port.""" - return self._call(self.stub.ClearPortMirror, faucetconfrpc_pb2.ClearPortMirrorRequest( + return self._call(self._stub.ClearPortMirror, faucetconfrpc_pb2.ClearPortMirrorRequest( dp_name=dp_name, mirror_port_no=mirror_port_no)) def add_port_acl(self, dp_name, port_no, acl): """Add port ACL.""" - return self._call(self.stub.AddPortAcl, faucetconfrpc_pb2.AddPortAclRequest( + return self._call(self._stub.AddPortAcl, faucetconfrpc_pb2.AddPortAclRequest( dp_name=dp_name, port_no=port_no, acl=acl)) def set_port_acls(self, dp_name, port_no, acls): """Set port ACL.""" - return self._call(self.stub.SetPortAcl, faucetconfrpc_pb2.SetPortAclRequest( + return self._call(self._stub.SetPortAcl, faucetconfrpc_pb2.SetPortAclRequest( dp_name=dp_name, port_no=port_no, acls=acls)) def remove_port_acl(self, dp_name, port_no, acl=None): """Remove port ACL.""" if acl: - return self._call(self.stub.RemovePortAcl, faucetconfrpc_pb2.RemovePortAclRequest( + return self._call(self._stub.RemovePortAcl, faucetconfrpc_pb2.RemovePortAclRequest( dp_name=dp_name, port_no=port_no, acl=acl)) - return self._call(self.stub.RemovePortAcl, faucetconfrpc_pb2.RemovePortAclRequest( + return self._call(self._stub.RemovePortAcl, faucetconfrpc_pb2.RemovePortAclRequest( dp_name=dp_name, port_no=port_no, acl=acl)) def get_dp_info(self, dp_name=''): """Get DP info.""" - return self._call(self.stub.GetDpInfo, faucetconfrpc_pb2.GetDpInfoRequest( + return self._call(self._stub.GetDpInfo, faucetconfrpc_pb2.GetDpInfoRequest( dp_name=dp_name)) def set_dp_interfaces(self, dp_interfaces_requests=None): @@ -106,7 +106,7 @@ def set_dp_interfaces(self, dp_interfaces_requests=None): interfaces_request = dp_request.interface_config.add() interfaces_request.port_no = port_no interfaces_request.config_yaml = config_yaml - return self._call(self.stub.SetDpInterfaces, request) + return self._call(self._stub.SetDpInterfaces, request) def del_dp_interfaces(self, dp_interfaces_requests=None, delete_empty_dp=False): """Delete DP interfaces.""" @@ -120,7 +120,7 @@ def del_dp_interfaces(self, dp_interfaces_requests=None, delete_empty_dp=False): for port_no in dp_interfaces: interfaces_request = dp_request.interfaces.add() interfaces_request.port_no = port_no - return self._call(self.stub.DelDpInterfaces, request) + return self._call(self._stub.DelDpInterfaces, request) def del_dps(self, dps): """Delete DPs.""" @@ -128,7 +128,7 @@ def del_dps(self, dps): for dp_name in dps: dp_request = request.interfaces_config.add() # pylint: disable=no-member dp_request.name = dp_name - return self._call(self.stub.DelDps, request) + return self._call(self._stub.DelDps, request) def set_remote_mirror_port(self, dp_name='', port_no=0, tunnel_vid=0, # pylint: disable=too-many-arguments remote_dp_name='', remote_port_no=''): @@ -139,4 +139,19 @@ def set_remote_mirror_port(self, dp_name='', port_no=0, tunnel_vid=0, # pylint: request.tunnel_vid = tunnel_vid request.remote_dp_name = remote_dp_name request.remote_port_no = remote_port_no - return self._call(self.stub.SetRemoteMirrorPort, request) + return self._call(self._stub.SetRemoteMirrorPort, request) + + def get_dp_names(self): + """Get a list of DP names.""" + request = faucetconfrpc_pb2.GetDpNamesRequest() + return self._call(self._stub.GetDpNames, request) + + def get_dp_ids(self): + """Get a list of DP IDs.""" + request = faucetconfrpc_pb2.GetDpIDsRequest() + return self._call(self._stub.GetDpIDs, request) + + def get_acl_names(self): + """Get a list of ACL names.""" + request = faucetconfrpc_pb2.GetAclNamesRequest() + return self._call(self._stub.GetAclNames, request) diff --git a/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc_pb2.py b/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc_pb2.py index c2d065d4..e5ed34aa 100644 --- a/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc_pb2.py +++ b/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc_pb2.py @@ -18,7 +18,7 @@ package='faucetconfserver', syntax='proto3', serialized_options=b'Z\022.;faucetconfserver', - serialized_pb=b'\n!faucetconfrpc/faucetconfrpc.proto\x12\x10\x66\x61ucetconfserver\"/\n\x14GetConfigFileRequest\x12\x17\n\x0f\x63onfig_filename\x18\x01 \x01(\t\")\n\x12GetConfigFileReply\x12\x13\n\x0b\x63onfig_yaml\x18\x01 \x01(\t\"q\n\x14SetConfigFileRequest\x12\x17\n\x0f\x63onfig_filename\x18\x01 \x01(\t\x12\x13\n\x0b\x63onfig_yaml\x18\x02 \x01(\t\x12\r\n\x05merge\x18\x03 \x01(\x08\x12\x1c\n\x14\x64\x65l_config_yaml_keys\x18\x04 \x01(\t\"\x14\n\x12SetConfigFileReply\"M\n\x18\x44\x65lConfigFromFileRequest\x12\x17\n\x0f\x63onfig_filename\x18\x01 \x01(\t\x12\x18\n\x10\x63onfig_yaml_keys\x18\x02 \x01(\t\"\x18\n\x16\x44\x65lConfigFromFileReply\"\x82\x01\n\x1aSetRemoteMirrorPortRequest\x12\x0f\n\x07\x64p_name\x18\x01 \x01(\t\x12\x0f\n\x07port_no\x18\x02 \x01(\r\x12\x12\n\ntunnel_vid\x18\x03 \x01(\r\x12\x16\n\x0eremote_dp_name\x18\x04 \x01(\t\x12\x16\n\x0eremote_port_no\x18\x05 \x01(\r\"\x1a\n\x18SetRemoteMirrorPortReply\"P\n\x14\x41\x64\x64PortMirrorRequest\x12\x0f\n\x07\x64p_name\x18\x01 \x01(\t\x12\x0f\n\x07port_no\x18\x02 \x01(\r\x12\x16\n\x0emirror_port_no\x18\x03 \x01(\r\"\x14\n\x12\x41\x64\x64PortMirrorReply\"S\n\x17RemovePortMirrorRequest\x12\x0f\n\x07\x64p_name\x18\x01 \x01(\t\x12\x0f\n\x07port_no\x18\x02 \x01(\r\x12\x16\n\x0emirror_port_no\x18\x03 \x01(\r\"\x17\n\x15RemovePortMirrorReply\"A\n\x16\x43learPortMirrorRequest\x12\x0f\n\x07\x64p_name\x18\x01 \x01(\t\x12\x16\n\x0emirror_port_no\x18\x02 \x01(\r\"\x16\n\x14\x43learPortMirrorReply\"C\n\x11SetPortAclRequest\x12\x0f\n\x07\x64p_name\x18\x01 \x01(\t\x12\x0f\n\x07port_no\x18\x02 \x01(\r\x12\x0c\n\x04\x61\x63ls\x18\x03 \x01(\t\"\x11\n\x0fSetPortAclReply\"B\n\x11\x41\x64\x64PortAclRequest\x12\x0f\n\x07\x64p_name\x18\x01 \x01(\t\x12\x0f\n\x07port_no\x18\x02 \x01(\r\x12\x0b\n\x03\x61\x63l\x18\x03 \x01(\t\"\x11\n\x0f\x41\x64\x64PortAclReply\"E\n\x14RemovePortAclRequest\x12\x0f\n\x07\x64p_name\x18\x01 \x01(\t\x12\x0f\n\x07port_no\x18\x02 \x01(\r\x12\x0b\n\x03\x61\x63l\x18\x03 \x01(\t\"\x14\n\x12RemovePortAclReply\"4\n\x0cSetInterface\x12\x0f\n\x07port_no\x18\x01 \x01(\r\x12\x13\n\x0b\x63onfig_yaml\x18\x02 \x01(\t\"\\\n\x0fSetDpInterfaces\x12\x0f\n\x07\x64p_name\x18\x01 \x01(\t\x12\x38\n\x10interface_config\x18\x02 \x03(\x0b\x32\x1e.faucetconfserver.SetInterface\"V\n\x16SetDpInterfacesRequest\x12<\n\x11interfaces_config\x18\x01 \x03(\x0b\x32!.faucetconfserver.SetDpInterfaces\"\x16\n\x14SetDpInterfacesReply\"<\n\x10GetDpInfoRequest\x12\x0f\n\x07\x64p_name\x18\x01 \x01(\t\x12\x17\n\x0f\x63onfig_filename\x18\x02 \x01(\t\"C\n\rInterfaceInfo\x12\x0f\n\x07port_no\x18\x01 \x01(\x05\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\"o\n\x06\x44pInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x64p_id\x18\x02 \x01(\x04\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x33\n\ninterfaces\x18\x04 \x03(\x0b\x32\x1f.faucetconfserver.InterfaceInfo\"7\n\x0eGetDpInfoReply\x12%\n\x03\x64ps\x18\x01 \x03(\x0b\x32\x18.faucetconfserver.DpInfo\"f\n\x16\x44\x65lDpInterfacesRequest\x12\x33\n\x11interfaces_config\x18\x01 \x03(\x0b\x32\x18.faucetconfserver.DpInfo\x12\x17\n\x0f\x64\x65lete_empty_dp\x18\x02 \x01(\x08\"\x16\n\x14\x44\x65lDpInterfacesReply\"D\n\rDelDpsRequest\x12\x33\n\x11interfaces_config\x18\x01 \x03(\x0b\x32\x18.faucetconfserver.DpInfo\"\r\n\x0b\x44\x65lDpsReply2\xe6\n\n\x10\x46\x61ucetConfServer\x12_\n\rGetConfigFile\x12&.faucetconfserver.GetConfigFileRequest\x1a$.faucetconfserver.GetConfigFileReply\"\x00\x12_\n\rSetConfigFile\x12&.faucetconfserver.SetConfigFileRequest\x1a$.faucetconfserver.SetConfigFileReply\"\x00\x12k\n\x11\x44\x65lConfigFromFile\x12*.faucetconfserver.DelConfigFromFileRequest\x1a(.faucetconfserver.DelConfigFromFileReply\"\x00\x12_\n\rAddPortMirror\x12&.faucetconfserver.AddPortMirrorRequest\x1a$.faucetconfserver.AddPortMirrorReply\"\x00\x12h\n\x10RemovePortMirror\x12).faucetconfserver.RemovePortMirrorRequest\x1a\'.faucetconfserver.RemovePortMirrorReply\"\x00\x12\x65\n\x0f\x43learPortMirror\x12(.faucetconfserver.ClearPortMirrorRequest\x1a&.faucetconfserver.ClearPortMirrorReply\"\x00\x12V\n\nAddPortAcl\x12#.faucetconfserver.AddPortAclRequest\x1a!.faucetconfserver.AddPortAclReply\"\x00\x12_\n\rRemovePortAcl\x12&.faucetconfserver.RemovePortAclRequest\x1a$.faucetconfserver.RemovePortAclReply\"\x00\x12V\n\nSetPortAcl\x12#.faucetconfserver.SetPortAclRequest\x1a!.faucetconfserver.SetPortAclReply\"\x00\x12\x65\n\x0fSetDpInterfaces\x12(.faucetconfserver.SetDpInterfacesRequest\x1a&.faucetconfserver.SetDpInterfacesReply\"\x00\x12S\n\tGetDpInfo\x12\".faucetconfserver.GetDpInfoRequest\x1a .faucetconfserver.GetDpInfoReply\"\x00\x12\x65\n\x0f\x44\x65lDpInterfaces\x12(.faucetconfserver.DelDpInterfacesRequest\x1a&.faucetconfserver.DelDpInterfacesReply\"\x00\x12J\n\x06\x44\x65lDps\x12\x1f.faucetconfserver.DelDpsRequest\x1a\x1d.faucetconfserver.DelDpsReply\"\x00\x12q\n\x13SetRemoteMirrorPort\x12,.faucetconfserver.SetRemoteMirrorPortRequest\x1a*.faucetconfserver.SetRemoteMirrorPortReply\"\x00\x42\x14Z\x12.;faucetconfserverb\x06proto3' + serialized_pb=b'\n!faucetconfrpc/faucetconfrpc.proto\x12\x10\x66\x61ucetconfserver\"/\n\x14GetConfigFileRequest\x12\x17\n\x0f\x63onfig_filename\x18\x01 \x01(\t\")\n\x12GetConfigFileReply\x12\x13\n\x0b\x63onfig_yaml\x18\x01 \x01(\t\"q\n\x14SetConfigFileRequest\x12\x17\n\x0f\x63onfig_filename\x18\x01 \x01(\t\x12\x13\n\x0b\x63onfig_yaml\x18\x02 \x01(\t\x12\r\n\x05merge\x18\x03 \x01(\x08\x12\x1c\n\x14\x64\x65l_config_yaml_keys\x18\x04 \x01(\t\"\x14\n\x12SetConfigFileReply\"M\n\x18\x44\x65lConfigFromFileRequest\x12\x17\n\x0f\x63onfig_filename\x18\x01 \x01(\t\x12\x18\n\x10\x63onfig_yaml_keys\x18\x02 \x01(\t\"\x18\n\x16\x44\x65lConfigFromFileReply\"\x82\x01\n\x1aSetRemoteMirrorPortRequest\x12\x0f\n\x07\x64p_name\x18\x01 \x01(\t\x12\x0f\n\x07port_no\x18\x02 \x01(\r\x12\x12\n\ntunnel_vid\x18\x03 \x01(\r\x12\x16\n\x0eremote_dp_name\x18\x04 \x01(\t\x12\x16\n\x0eremote_port_no\x18\x05 \x01(\r\"\x1a\n\x18SetRemoteMirrorPortReply\"P\n\x14\x41\x64\x64PortMirrorRequest\x12\x0f\n\x07\x64p_name\x18\x01 \x01(\t\x12\x0f\n\x07port_no\x18\x02 \x01(\r\x12\x16\n\x0emirror_port_no\x18\x03 \x01(\r\"\x14\n\x12\x41\x64\x64PortMirrorReply\"S\n\x17RemovePortMirrorRequest\x12\x0f\n\x07\x64p_name\x18\x01 \x01(\t\x12\x0f\n\x07port_no\x18\x02 \x01(\r\x12\x16\n\x0emirror_port_no\x18\x03 \x01(\r\"\x17\n\x15RemovePortMirrorReply\"A\n\x16\x43learPortMirrorRequest\x12\x0f\n\x07\x64p_name\x18\x01 \x01(\t\x12\x16\n\x0emirror_port_no\x18\x02 \x01(\r\"\x16\n\x14\x43learPortMirrorReply\"C\n\x11SetPortAclRequest\x12\x0f\n\x07\x64p_name\x18\x01 \x01(\t\x12\x0f\n\x07port_no\x18\x02 \x01(\r\x12\x0c\n\x04\x61\x63ls\x18\x03 \x01(\t\"\x11\n\x0fSetPortAclReply\"B\n\x11\x41\x64\x64PortAclRequest\x12\x0f\n\x07\x64p_name\x18\x01 \x01(\t\x12\x0f\n\x07port_no\x18\x02 \x01(\r\x12\x0b\n\x03\x61\x63l\x18\x03 \x01(\t\"\x11\n\x0f\x41\x64\x64PortAclReply\"E\n\x14RemovePortAclRequest\x12\x0f\n\x07\x64p_name\x18\x01 \x01(\t\x12\x0f\n\x07port_no\x18\x02 \x01(\r\x12\x0b\n\x03\x61\x63l\x18\x03 \x01(\t\"\x14\n\x12RemovePortAclReply\"4\n\x0cSetInterface\x12\x0f\n\x07port_no\x18\x01 \x01(\r\x12\x13\n\x0b\x63onfig_yaml\x18\x02 \x01(\t\"\\\n\x0fSetDpInterfaces\x12\x0f\n\x07\x64p_name\x18\x01 \x01(\t\x12\x38\n\x10interface_config\x18\x02 \x03(\x0b\x32\x1e.faucetconfserver.SetInterface\"V\n\x16SetDpInterfacesRequest\x12<\n\x11interfaces_config\x18\x01 \x03(\x0b\x32!.faucetconfserver.SetDpInterfaces\"\x16\n\x14SetDpInterfacesReply\"<\n\x10GetDpInfoRequest\x12\x0f\n\x07\x64p_name\x18\x01 \x01(\t\x12\x17\n\x0f\x63onfig_filename\x18\x02 \x01(\t\"C\n\rInterfaceInfo\x12\x0f\n\x07port_no\x18\x01 \x01(\r\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\"o\n\x06\x44pInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x64p_id\x18\x02 \x01(\x04\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x33\n\ninterfaces\x18\x04 \x03(\x0b\x32\x1f.faucetconfserver.InterfaceInfo\"7\n\x0eGetDpInfoReply\x12%\n\x03\x64ps\x18\x01 \x03(\x0b\x32\x18.faucetconfserver.DpInfo\"f\n\x16\x44\x65lDpInterfacesRequest\x12\x33\n\x11interfaces_config\x18\x01 \x03(\x0b\x32\x18.faucetconfserver.DpInfo\x12\x17\n\x0f\x64\x65lete_empty_dp\x18\x02 \x01(\x08\"\x16\n\x14\x44\x65lDpInterfacesReply\"D\n\rDelDpsRequest\x12\x33\n\x11interfaces_config\x18\x01 \x03(\x0b\x32\x18.faucetconfserver.DpInfo\"\r\n\x0b\x44\x65lDpsReply\"\x13\n\x11GetDpNamesRequest\"\"\n\x0fGetDpNamesReply\x12\x0f\n\x07\x64p_name\x18\x01 \x03(\t\"\x11\n\x0fGetDpIDsRequest\"\x1e\n\rGetDpIDsReply\x12\r\n\x05\x64p_id\x18\x01 \x03(\x04\"&\n\x12GetAclNamesRequest\x12\x10\n\x08\x61\x63l_name\x18\x01 \x03(\t\"$\n\x10GetAclNamesReply\x12\x10\n\x08\x61\x63l_name\x18\x01 \x03(\t2\xeb\x0c\n\x10\x46\x61ucetConfServer\x12_\n\rGetConfigFile\x12&.faucetconfserver.GetConfigFileRequest\x1a$.faucetconfserver.GetConfigFileReply\"\x00\x12_\n\rSetConfigFile\x12&.faucetconfserver.SetConfigFileRequest\x1a$.faucetconfserver.SetConfigFileReply\"\x00\x12k\n\x11\x44\x65lConfigFromFile\x12*.faucetconfserver.DelConfigFromFileRequest\x1a(.faucetconfserver.DelConfigFromFileReply\"\x00\x12_\n\rAddPortMirror\x12&.faucetconfserver.AddPortMirrorRequest\x1a$.faucetconfserver.AddPortMirrorReply\"\x00\x12h\n\x10RemovePortMirror\x12).faucetconfserver.RemovePortMirrorRequest\x1a\'.faucetconfserver.RemovePortMirrorReply\"\x00\x12\x65\n\x0f\x43learPortMirror\x12(.faucetconfserver.ClearPortMirrorRequest\x1a&.faucetconfserver.ClearPortMirrorReply\"\x00\x12V\n\nAddPortAcl\x12#.faucetconfserver.AddPortAclRequest\x1a!.faucetconfserver.AddPortAclReply\"\x00\x12_\n\rRemovePortAcl\x12&.faucetconfserver.RemovePortAclRequest\x1a$.faucetconfserver.RemovePortAclReply\"\x00\x12V\n\nSetPortAcl\x12#.faucetconfserver.SetPortAclRequest\x1a!.faucetconfserver.SetPortAclReply\"\x00\x12\x65\n\x0fSetDpInterfaces\x12(.faucetconfserver.SetDpInterfacesRequest\x1a&.faucetconfserver.SetDpInterfacesReply\"\x00\x12S\n\tGetDpInfo\x12\".faucetconfserver.GetDpInfoRequest\x1a .faucetconfserver.GetDpInfoReply\"\x00\x12\x65\n\x0f\x44\x65lDpInterfaces\x12(.faucetconfserver.DelDpInterfacesRequest\x1a&.faucetconfserver.DelDpInterfacesReply\"\x00\x12J\n\x06\x44\x65lDps\x12\x1f.faucetconfserver.DelDpsRequest\x1a\x1d.faucetconfserver.DelDpsReply\"\x00\x12q\n\x13SetRemoteMirrorPort\x12,.faucetconfserver.SetRemoteMirrorPortRequest\x1a*.faucetconfserver.SetRemoteMirrorPortReply\"\x00\x12V\n\nGetDpNames\x12#.faucetconfserver.GetDpNamesRequest\x1a!.faucetconfserver.GetDpNamesReply\"\x00\x12P\n\x08GetDpIDs\x12!.faucetconfserver.GetDpIDsRequest\x1a\x1f.faucetconfserver.GetDpIDsReply\"\x00\x12Y\n\x0bGetAclNames\x12$.faucetconfserver.GetAclNamesRequest\x1a\".faucetconfserver.GetAclNamesReply\"\x00\x42\x14Z\x12.;faucetconfserverb\x06proto3' ) @@ -892,7 +892,7 @@ fields=[ _descriptor.FieldDescriptor( name='port_no', full_name='faucetconfserver.InterfaceInfo.port_no', index=0, - number=1, type=5, cpp_type=1, label=1, + number=1, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -1127,6 +1127,178 @@ serialized_end=1895, ) + +_GETDPNAMESREQUEST = _descriptor.Descriptor( + name='GetDpNamesRequest', + full_name='faucetconfserver.GetDpNamesRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1897, + serialized_end=1916, +) + + +_GETDPNAMESREPLY = _descriptor.Descriptor( + name='GetDpNamesReply', + full_name='faucetconfserver.GetDpNamesReply', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='dp_name', full_name='faucetconfserver.GetDpNamesReply.dp_name', index=0, + number=1, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1918, + serialized_end=1952, +) + + +_GETDPIDSREQUEST = _descriptor.Descriptor( + name='GetDpIDsRequest', + full_name='faucetconfserver.GetDpIDsRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1954, + serialized_end=1971, +) + + +_GETDPIDSREPLY = _descriptor.Descriptor( + name='GetDpIDsReply', + full_name='faucetconfserver.GetDpIDsReply', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='dp_id', full_name='faucetconfserver.GetDpIDsReply.dp_id', index=0, + number=1, type=4, cpp_type=4, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1973, + serialized_end=2003, +) + + +_GETACLNAMESREQUEST = _descriptor.Descriptor( + name='GetAclNamesRequest', + full_name='faucetconfserver.GetAclNamesRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='acl_name', full_name='faucetconfserver.GetAclNamesRequest.acl_name', index=0, + number=1, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2005, + serialized_end=2043, +) + + +_GETACLNAMESREPLY = _descriptor.Descriptor( + name='GetAclNamesReply', + full_name='faucetconfserver.GetAclNamesReply', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='acl_name', full_name='faucetconfserver.GetAclNamesReply.acl_name', index=0, + number=1, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2045, + serialized_end=2081, +) + _SETDPINTERFACES.fields_by_name['interface_config'].message_type = _SETINTERFACE _SETDPINTERFACESREQUEST.fields_by_name['interfaces_config'].message_type = _SETDPINTERFACES _DPINFO.fields_by_name['interfaces'].message_type = _INTERFACEINFO @@ -1165,6 +1337,12 @@ DESCRIPTOR.message_types_by_name['DelDpInterfacesReply'] = _DELDPINTERFACESREPLY DESCRIPTOR.message_types_by_name['DelDpsRequest'] = _DELDPSREQUEST DESCRIPTOR.message_types_by_name['DelDpsReply'] = _DELDPSREPLY +DESCRIPTOR.message_types_by_name['GetDpNamesRequest'] = _GETDPNAMESREQUEST +DESCRIPTOR.message_types_by_name['GetDpNamesReply'] = _GETDPNAMESREPLY +DESCRIPTOR.message_types_by_name['GetDpIDsRequest'] = _GETDPIDSREQUEST +DESCRIPTOR.message_types_by_name['GetDpIDsReply'] = _GETDPIDSREPLY +DESCRIPTOR.message_types_by_name['GetAclNamesRequest'] = _GETACLNAMESREQUEST +DESCRIPTOR.message_types_by_name['GetAclNamesReply'] = _GETACLNAMESREPLY _sym_db.RegisterFileDescriptor(DESCRIPTOR) GetConfigFileRequest = _reflection.GeneratedProtocolMessageType('GetConfigFileRequest', (_message.Message,), { @@ -1391,6 +1569,48 @@ }) _sym_db.RegisterMessage(DelDpsReply) +GetDpNamesRequest = _reflection.GeneratedProtocolMessageType('GetDpNamesRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETDPNAMESREQUEST, + '__module__' : 'faucetconfrpc.faucetconfrpc_pb2' + # @@protoc_insertion_point(class_scope:faucetconfserver.GetDpNamesRequest) + }) +_sym_db.RegisterMessage(GetDpNamesRequest) + +GetDpNamesReply = _reflection.GeneratedProtocolMessageType('GetDpNamesReply', (_message.Message,), { + 'DESCRIPTOR' : _GETDPNAMESREPLY, + '__module__' : 'faucetconfrpc.faucetconfrpc_pb2' + # @@protoc_insertion_point(class_scope:faucetconfserver.GetDpNamesReply) + }) +_sym_db.RegisterMessage(GetDpNamesReply) + +GetDpIDsRequest = _reflection.GeneratedProtocolMessageType('GetDpIDsRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETDPIDSREQUEST, + '__module__' : 'faucetconfrpc.faucetconfrpc_pb2' + # @@protoc_insertion_point(class_scope:faucetconfserver.GetDpIDsRequest) + }) +_sym_db.RegisterMessage(GetDpIDsRequest) + +GetDpIDsReply = _reflection.GeneratedProtocolMessageType('GetDpIDsReply', (_message.Message,), { + 'DESCRIPTOR' : _GETDPIDSREPLY, + '__module__' : 'faucetconfrpc.faucetconfrpc_pb2' + # @@protoc_insertion_point(class_scope:faucetconfserver.GetDpIDsReply) + }) +_sym_db.RegisterMessage(GetDpIDsReply) + +GetAclNamesRequest = _reflection.GeneratedProtocolMessageType('GetAclNamesRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETACLNAMESREQUEST, + '__module__' : 'faucetconfrpc.faucetconfrpc_pb2' + # @@protoc_insertion_point(class_scope:faucetconfserver.GetAclNamesRequest) + }) +_sym_db.RegisterMessage(GetAclNamesRequest) + +GetAclNamesReply = _reflection.GeneratedProtocolMessageType('GetAclNamesReply', (_message.Message,), { + 'DESCRIPTOR' : _GETACLNAMESREPLY, + '__module__' : 'faucetconfrpc.faucetconfrpc_pb2' + # @@protoc_insertion_point(class_scope:faucetconfserver.GetAclNamesReply) + }) +_sym_db.RegisterMessage(GetAclNamesReply) + DESCRIPTOR._options = None @@ -1400,8 +1620,8 @@ file=DESCRIPTOR, index=0, serialized_options=None, - serialized_start=1898, - serialized_end=3280, + serialized_start=2084, + serialized_end=3727, methods=[ _descriptor.MethodDescriptor( name='GetConfigFile', @@ -1529,6 +1749,33 @@ output_type=_SETREMOTEMIRRORPORTREPLY, serialized_options=None, ), + _descriptor.MethodDescriptor( + name='GetDpNames', + full_name='faucetconfserver.FaucetConfServer.GetDpNames', + index=14, + containing_service=None, + input_type=_GETDPNAMESREQUEST, + output_type=_GETDPNAMESREPLY, + serialized_options=None, + ), + _descriptor.MethodDescriptor( + name='GetDpIDs', + full_name='faucetconfserver.FaucetConfServer.GetDpIDs', + index=15, + containing_service=None, + input_type=_GETDPIDSREQUEST, + output_type=_GETDPIDSREPLY, + serialized_options=None, + ), + _descriptor.MethodDescriptor( + name='GetAclNames', + full_name='faucetconfserver.FaucetConfServer.GetAclNames', + index=16, + containing_service=None, + input_type=_GETACLNAMESREQUEST, + output_type=_GETACLNAMESREPLY, + serialized_options=None, + ), ]) _sym_db.RegisterServiceDescriptor(_FAUCETCONFSERVER) diff --git a/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc_pb2_grpc.py b/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc_pb2_grpc.py index 5e463dce..c770cf1d 100644 --- a/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc_pb2_grpc.py +++ b/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc_pb2_grpc.py @@ -85,6 +85,21 @@ def __init__(self, channel): request_serializer=faucetconfrpc_dot_faucetconfrpc__pb2.SetRemoteMirrorPortRequest.SerializeToString, response_deserializer=faucetconfrpc_dot_faucetconfrpc__pb2.SetRemoteMirrorPortReply.FromString, ) + self.GetDpNames = channel.unary_unary( + '/faucetconfserver.FaucetConfServer/GetDpNames', + request_serializer=faucetconfrpc_dot_faucetconfrpc__pb2.GetDpNamesRequest.SerializeToString, + response_deserializer=faucetconfrpc_dot_faucetconfrpc__pb2.GetDpNamesReply.FromString, + ) + self.GetDpIDs = channel.unary_unary( + '/faucetconfserver.FaucetConfServer/GetDpIDs', + request_serializer=faucetconfrpc_dot_faucetconfrpc__pb2.GetDpIDsRequest.SerializeToString, + response_deserializer=faucetconfrpc_dot_faucetconfrpc__pb2.GetDpIDsReply.FromString, + ) + self.GetAclNames = channel.unary_unary( + '/faucetconfserver.FaucetConfServer/GetAclNames', + request_serializer=faucetconfrpc_dot_faucetconfrpc__pb2.GetAclNamesRequest.SerializeToString, + response_deserializer=faucetconfrpc_dot_faucetconfrpc__pb2.GetAclNamesReply.FromString, + ) class FaucetConfServerServicer(object): @@ -176,6 +191,24 @@ def SetRemoteMirrorPort(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def GetDpNames(self, request, context): + """Missing associated documentation comment in .proto file""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetDpIDs(self, request, context): + """Missing associated documentation comment in .proto file""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAclNames(self, request, context): + """Missing associated documentation comment in .proto file""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_FaucetConfServerServicer_to_server(servicer, server): rpc_method_handlers = { @@ -249,6 +282,21 @@ def add_FaucetConfServerServicer_to_server(servicer, server): request_deserializer=faucetconfrpc_dot_faucetconfrpc__pb2.SetRemoteMirrorPortRequest.FromString, response_serializer=faucetconfrpc_dot_faucetconfrpc__pb2.SetRemoteMirrorPortReply.SerializeToString, ), + 'GetDpNames': grpc.unary_unary_rpc_method_handler( + servicer.GetDpNames, + request_deserializer=faucetconfrpc_dot_faucetconfrpc__pb2.GetDpNamesRequest.FromString, + response_serializer=faucetconfrpc_dot_faucetconfrpc__pb2.GetDpNamesReply.SerializeToString, + ), + 'GetDpIDs': grpc.unary_unary_rpc_method_handler( + servicer.GetDpIDs, + request_deserializer=faucetconfrpc_dot_faucetconfrpc__pb2.GetDpIDsRequest.FromString, + response_serializer=faucetconfrpc_dot_faucetconfrpc__pb2.GetDpIDsReply.SerializeToString, + ), + 'GetAclNames': grpc.unary_unary_rpc_method_handler( + servicer.GetAclNames, + request_deserializer=faucetconfrpc_dot_faucetconfrpc__pb2.GetAclNamesRequest.FromString, + response_serializer=faucetconfrpc_dot_faucetconfrpc__pb2.GetAclNamesReply.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'faucetconfserver.FaucetConfServer', rpc_method_handlers) @@ -484,3 +532,51 @@ def SetRemoteMirrorPort(request, faucetconfrpc_dot_faucetconfrpc__pb2.SetRemoteMirrorPortReply.FromString, options, channel_credentials, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetDpNames(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/faucetconfserver.FaucetConfServer/GetDpNames', + faucetconfrpc_dot_faucetconfrpc__pb2.GetDpNamesRequest.SerializeToString, + faucetconfrpc_dot_faucetconfrpc__pb2.GetDpNamesReply.FromString, + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetDpIDs(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/faucetconfserver.FaucetConfServer/GetDpIDs', + faucetconfrpc_dot_faucetconfrpc__pb2.GetDpIDsRequest.SerializeToString, + faucetconfrpc_dot_faucetconfrpc__pb2.GetDpIDsReply.FromString, + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetAclNames(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/faucetconfserver.FaucetConfServer/GetAclNames', + faucetconfrpc_dot_faucetconfrpc__pb2.GetAclNamesRequest.SerializeToString, + faucetconfrpc_dot_faucetconfrpc__pb2.GetAclNamesReply.FromString, + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc_server.py b/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc_server.py index 0f51a02a..fd993c51 100755 --- a/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc_server.py +++ b/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/faucetconfrpc_server.py @@ -86,7 +86,7 @@ def _validate_faucet_config(self, config_dir): raise InvalidConfigError('no DPs defined') return dps_conf except InvalidConfigError as err: - raise _ServerError(err) + raise _ServerError('Invalid config: %s' % err) # pylint: disable=raise-missing-from def _validate_config_tree(self, config_filename, config_yaml): with tempfile.TemporaryDirectory() as tmpdir: @@ -112,14 +112,14 @@ def _yaml_parse(config_yaml_str): try: return yaml.safe_load(config_yaml_str) except (yaml.constructor.ConstructorError, yaml.parser.ParserError) as err: - raise _ServerError('YAML error: %s' % err) + raise _ServerError(f'YAML error: {err}') # pylint: disable=raise-missing-from def _get_config_file(self, config_filename): try: with open(self._validate_filename(config_filename)) as config_file: return self._yaml_parse(config_file.read()) except (FileNotFoundError, PermissionError) as err: - raise _ServerError(err) + raise _ServerError(f'Error: {err}') # pylint: disable=raise-missing-from def _replace_config_file(self, config_filename, config_yaml, config_dir=None): if config_dir is None: @@ -145,7 +145,7 @@ def _set_config_file(self, config_filename, config_yaml, merge, del_yaml_keys=No self._validate_config_tree(config_filename, new_config_yaml) self._replace_config_file(config_filename, new_config_yaml) except (FileNotFoundError, PermissionError, _ServerError) as err: - raise _ServerError(err) + raise _ServerError('Cannot set FAUCET config: %s' % err) # pylint: disable=raise-missing-from def _del_keys_from_yaml(self, config_yaml_keys, new_config_yaml): config_yaml_keys = self._yaml_parse(config_yaml_keys) @@ -168,7 +168,7 @@ def _del_config_from_file(self, config_filename, config_yaml_keys): self._validate_config_tree(config_filename, new_config_yaml) self._replace_config_file(config_filename, new_config_yaml) except (KeyError, ValueError, _ServerError) as err: - raise _ServerError(err) + raise _ServerError(f'Unable to find key in the config: {err}') # pylint: disable=raise-missing-from def GetConfigFile(self, request, context): # pylint: disable=invalid-name """Return existing file contents as YAML string.""" @@ -495,6 +495,48 @@ def set_remote_mirror_port(): return self.request_wrapper( set_remote_mirror_port, request, context, default_reply) + def GetDpNames(self, request, context): # pylint: disable=invalid-name + + default_reply = faucetconfrpc_pb2.GetDpNamesReply() + + def get_dp_names(): + config_filename = self.default_config + config_yaml = self._get_config_file(config_filename) + dp_names = config_yaml['dps'].keys() + default_reply.dp_name[:] = dp_names # pylint: disable=no-member + return default_reply + + return self.request_wrapper( + get_dp_names, request, context, default_reply) + + def GetDpIDs(self, request, context): # pylint: disable=invalid-name + + default_reply = faucetconfrpc_pb2.GetDpIDsReply() + + def get_dp_ids(): + config_filename = self.default_config + config_yaml = self._get_config_file(config_filename) + dp_names = [dp['dp_id'] for dp in config_yaml['dps'].values()] + default_reply.dp_id[:] = dp_names # pylint: disable=no-member + return default_reply + + return self.request_wrapper( + get_dp_ids, request, context, default_reply) + + def GetAclNames(self, request, context): # pylint: disable=invalid-name + + default_reply = faucetconfrpc_pb2.GetAclNamesReply() + + def get_acl_names(): + config_filename = self.default_config + config_yaml = self._get_config_file(config_filename) + acl_names = config_yaml.get('acls', {}).keys() + default_reply.acl_name[:] = acl_names # pylint: disable=no-member + return default_reply + + return self.request_wrapper( + get_acl_names, request, context, default_reply) + def serve(): """Start server and serve requests.""" diff --git a/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/generate_pb_grpc.sh b/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/generate_pb_grpc.sh index 8da7125b..beac88cc 100755 --- a/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/generate_pb_grpc.sh +++ b/vendor/github.com/iqtlabs/faucetconfrpc/faucetconfrpc/generate_pb_grpc.sh @@ -1,4 +1,5 @@ -#!/bin/sh +#!/bin/bash +set -e protoc protos/faucetconfrpc/faucetconfrpc.proto --go_out=plugins=grpc:. -python -m grpc_tools.protoc -Iprotos protos/faucetconfrpc/faucetconfrpc.proto --python_out=.. --grpc_python_out=.. +python3 -m grpc_tools.protoc -Iprotos protos/faucetconfrpc/faucetconfrpc.proto --python_out=.. --grpc_python_out=.. diff --git a/vendor/github.com/kare/base62/.gitignore b/vendor/github.com/kare/base62/.gitignore new file mode 100644 index 00000000..1c54432e --- /dev/null +++ b/vendor/github.com/kare/base62/.gitignore @@ -0,0 +1,4 @@ +/base62.test +/bench.txt +/mem.out +/cpu.out diff --git a/vendor/github.com/kare/base62/.travis.yml b/vendor/github.com/kare/base62/.travis.yml new file mode 100644 index 00000000..570441ef --- /dev/null +++ b/vendor/github.com/kare/base62/.travis.yml @@ -0,0 +1,6 @@ +language: go +go_import_path: kkn.fi/base62 +script: make test +go: + - 1.13 + - tip diff --git a/vendor/github.com/kare/base62/LICENSE b/vendor/github.com/kare/base62/LICENSE new file mode 100644 index 00000000..ab999a30 --- /dev/null +++ b/vendor/github.com/kare/base62/LICENSE @@ -0,0 +1,28 @@ + +Copyright (c) 2017, Kare Nuorteva +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/kare/base62/Makefile b/vendor/github.com/kare/base62/Makefile new file mode 100644 index 00000000..845215bd --- /dev/null +++ b/vendor/github.com/kare/base62/Makefile @@ -0,0 +1,39 @@ + +IMPORT_PATH := kkn.fi/base62 +NAME := base62 + +GOMETALINTER := $(GOPATH)/bin/gometalinter + +.PHONY: test +test: + go test -v $(IMPORT_PATH) + +.PHONY: clean +clean: + @rm -f cpu.out mem.out bench.txt $(NAME).test + +$(NAME).test: + go test -c + +benchmark: $(NAME).test + ./$(NAME).test -test.bench=. -test.count=5 | tee bench.txt + +mem.out: + go test -v -benchmem -memprofile=mem.out -run=^$$ -bench=. + +mem-profile: mem.out + go tool pprof -alloc_space $(NAME).test mem.out + +cpu.out: + go test -v -cpuprofile=cpu.out -run=^$$ -bench=. + +cpu-profile: cpu.out + go tool pprof $(NAME).test cpu.out + +.PHONY: lint +lint: $(GOMETALINTER) + gometalinter ./... + +$(GOMETALINTER): + go get -u github.com/alecthomas/gometalinter + gometalinter --install diff --git a/vendor/github.com/kare/base62/README.md b/vendor/github.com/kare/base62/README.md new file mode 100644 index 00000000..efd55b65 --- /dev/null +++ b/vendor/github.com/kare/base62/README.md @@ -0,0 +1,21 @@ + +# Base62 encoding and decoding + +[![Build Status](https://travis-ci.org/kare/base62.svg?branch=master)](https://travis-ci.org/kare/base62) +[![GoDoc](https://godoc.org/kkn.fi/base62?status.svg)](https://godoc.org/kkn.fi/base62) + +## Installation + go get kkn.fi/base62 + +### Requirements +* Go 1.13 + +## Contributing +Pull requests are welcome. For major changes, please open an issue first +to discuss what you would like to change. + +Please make sure to update tests as appropriate. + +## License + +BSD-3-Clause. See [LICENSE](LICENSE) for details. diff --git a/vendor/github.com/kare/base62/base62.go b/vendor/github.com/kare/base62/base62.go new file mode 100644 index 00000000..914c4731 --- /dev/null +++ b/vendor/github.com/kare/base62/base62.go @@ -0,0 +1,42 @@ +// Package base62 implements base62 encoder and decoder. +package base62 + +import ( + "fmt" + "math" + "strings" +) + +const ( + alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" + base = int64(len(alphabet)) +) + +// Encode decoded integer to base62 string. +func Encode(n int64) string { + if n == 0 { + return "0" + } + + b := make([]byte, 0, 512) + for n > 0 { + r := math.Mod(float64(n), float64(base)) + n /= base + b = append([]byte{alphabet[int(r)]}, b...) + } + return string(b) +} + +// Decode a base62 encoded string to int. +// Returns an error if input s is not valid base62 literal [0-9a-zA-Z]. +func Decode(s string) (int64, error) { + var r int64 + for _, c := range []byte(s) { + i := strings.IndexByte(alphabet, c) + if i < 0 { + return 0, fmt.Errorf("unexpected character %c in base62 literal", c) + } + r = base*r + int64(i) + } + return r, nil +} diff --git a/vendor/github.com/kare/base62/go.mod b/vendor/github.com/kare/base62/go.mod new file mode 100644 index 00000000..5244eb72 --- /dev/null +++ b/vendor/github.com/kare/base62/go.mod @@ -0,0 +1,3 @@ +module kkn.fi/base62 + +go 1.13