summaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/zebra/safi_string.go
diff options
context:
space:
mode:
authorHitoshi Irino <irino@sfc.wide.ad.jp>2020-04-25 22:06:21 +0900
committerHitoshi Irino <irino@sfc.wide.ad.jp>2020-04-26 07:43:50 +0900
commitcf572bc5fc4647ea675c8a3482d80d181f62c66c (patch)
treeb50bc6a682c801062ffe19a198b05ddc743a84ee /internal/pkg/zebra/safi_string.go
parentf11b9c7afb198dd6bfea9a167f41a62569f24756 (diff)
Refactoring Zebra and supporting frr7.3
- Change const values to camel case from snake case to make zero golint's warnigns - Introduce convert functions (toEach, toCommon) between the newest version to older versions - Merge code about decode nexthop to reduce lines of code - Add frr7.3 statemet in allowable software for config - Rename and Update generated file by stringer
Diffstat (limited to 'internal/pkg/zebra/safi_string.go')
-rw-r--r--internal/pkg/zebra/safi_string.go35
1 files changed, 27 insertions, 8 deletions
diff --git a/internal/pkg/zebra/safi_string.go b/internal/pkg/zebra/safi_string.go
index c8d469e4..9adc4ac5 100644
--- a/internal/pkg/zebra/safi_string.go
+++ b/internal/pkg/zebra/safi_string.go
@@ -1,17 +1,36 @@
-// Code generated by "stringer -type=SAFI"; DO NOT EDIT.
+// Code generated by "stringer -type=Safi"; DO NOT EDIT.
package zebra
import "strconv"
-const _SAFI_name = "FRR_ZAPI5_SAFI_UNICASTFRR_ZAPI5_SAFI_MULTICASTFRR_ZAPI5_SAFI_MPLS_VPNFRR_ZAPI5_SAFI_ENCAPFRR_ZAPI5_SAFI_EVPNFRR_ZAPI5_SAFI_LABELED_UNICASTFRR_ZAPI5_SAFI_FLOWSPECFRR_ZAPI5_SAFI_MAX"
+func _() {
+ // An "invalid array index" compiler error signifies that the constant values have changed.
+ // Re-run the stringer command to generate them again.
+ var x [1]struct{}
+ _ = x[safiUnspec-0]
+ _ = x[SafiUnicast-1]
+ _ = x[safiMulticast-2]
+ _ = x[safiMplsVpn-3]
+ _ = x[safiEncap-4]
+ _ = x[safiEvpn-5]
+ _ = x[safiLabeledUnicast-6]
+ _ = x[safiFlowspec-7]
+ _ = x[safiMax-8]
+ _ = x[zapi4SafiMplsVpn-3]
+ _ = x[zapi3SafiMplsVpn-4]
+ _ = x[zapi4SafiEncap-5]
+ _ = x[zapi4SafiEvpn-6]
+ _ = x[zapi3SafiEncap-7]
+}
+
+const _Safi_name = "safiUnspecSafiUnicastsafiMulticastsafiMplsVpnsafiEncapsafiEvpnsafiLabeledUnicastsafiFlowspecsafiMax"
-var _SAFI_index = [...]uint8{0, 22, 46, 69, 89, 108, 138, 161, 179}
+var _Safi_index = [...]uint8{0, 10, 21, 34, 45, 54, 62, 80, 92, 99}
-func (i SAFI) String() string {
- i -= 1
- if i >= SAFI(len(_SAFI_index)-1) {
- return "SAFI(" + strconv.FormatInt(int64(i+1), 10) + ")"
+func (i Safi) String() string {
+ if i >= Safi(len(_Safi_index)-1) {
+ return "Safi(" + strconv.FormatInt(int64(i), 10) + ")"
}
- return _SAFI_name[_SAFI_index[i]:_SAFI_index[i+1]]
+ return _Safi_name[_Safi_index[i]:_Safi_index[i+1]]
}