Skip to content

Commit

Permalink
Merge pull request #18 from slankdev/work
Browse files Browse the repository at this point in the history
Improve Completion
  • Loading branch information
slankdev committed May 10, 2024
2 parents 3c1b089 + fff6e07 commit 671ded9
Show file tree
Hide file tree
Showing 16 changed files with 1,082 additions and 210 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
test:
go test ./... -count=1 -v
test-summary:
go test ./... -count=1 -v -json \
| jq '. | select(.Action == "fail") | select(.Test != null) | .Test' -r
godoc:
godoc -http=:6060
generate:
Expand Down
20 changes: 20 additions & 0 deletions cheatsheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,26 @@ https://pkg.go.dev/github.com/openconfig/goyang/pkg/yang#pkg-constants
0x13 19 Yunion
```

## FRR mgmtd cli

ok
```
mgmt set-config /frr-routing:routing/control-plane-protocols/control-plane-protocol[type='frr-staticd:staticd'][name='staticd'][vrf='default'] {}
```

ng
```
mgmt set-config /frr-routing:routing/control-plane-protocols/control-plane-protocol[type='staticd'][name='staticd'][vrf='default'] {}
```

full snippet
```
mgmt set-config /frr-routing:routing/control-plane-protocols/control-plane-protocol[type='frr-staticd:staticd'][name='staticd'][vrf='default'] {}
mgmt set-config /frr-routing:routing/control-plane-protocols/control-plane-protocol[type='frr-staticd:staticd'][name='staticd'][vrf='default']/frr-staticd:staticd/route-list[prefix='1.1.1.1/32'][afi-safi='frr-routing:ipv4-unicast'] {}
mgmt set-config /frr-routing:routing/control-plane-protocols/control-plane-protocol[type='frr-staticd:staticd'][name='staticd'][vrf='default']/frr-staticd:staticd/route-list[prefix='1.1.1.1/32'][afi-safi='frr-routing:ipv4-unicast']/path-list[table-id='0'][distance='1'] {}
mgmt set-config /frr-routing:routing/control-plane-protocols/control-plane-protocol[type='frr-staticd:staticd'][name='staticd'][vrf='default']/frr-staticd:staticd/route-list[prefix='1.1.1.1/32'][afi-safi='frr-routing:ipv4-unicast']/path-list[table-id='0'][distance='1']/frr-nexthops/nexthop[nh-type='blackhole'][vrf='default'][gateway=''][interface='(null)'] {}
```

## Developer Makefile

```
Expand Down
8 changes: 4 additions & 4 deletions pkg/vtyang/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ func TestBasicEvalCli01(t *testing.T) {
"eval-cli values items item2 hoge fuga",
"eval-cli values items item2 hoge fuga des",
"eval-cli values crypto",
"eval-cli values crypto de",
"eval-cli values crypto des3",
"eval-cli values crypto main:de",
"eval-cli values crypto main:des3",
},
})
}
Expand Down Expand Up @@ -184,7 +184,7 @@ func TestXpathParse2(t *testing.T) {
"set values month-str January",
"set values decimal -0.22",
"set values bool false",
"set values crypto des3",
"set values crypto main:des3",
"commit",
"quit",
"show running-config",
Expand All @@ -203,7 +203,7 @@ func TestXpathParse2(t *testing.T) {
"set values month-str December",
"set values decimal 3.14",
"set values bool true",
"set values crypto aes",
"set values crypto main:aes",
"commit",
"quit",
"show running-config",
Expand Down
Loading

0 comments on commit 671ded9

Please sign in to comment.