diff options
-rw-r--r-- | gobgp/cmd/policy.go | 6 | ||||
-rw-r--r-- | gobgp/cmd/vrf.go | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gobgp/cmd/policy.go b/gobgp/cmd/policy.go index 7e9a1464..6b3fcb85 100644 --- a/gobgp/cmd/policy.go +++ b/gobgp/cmd/policy.go @@ -547,6 +547,12 @@ func showStatement(args []string) error { m = append(m, p) } } + if globalOpts.Quiet { + for _, s := range m { + fmt.Println(s.Name) + } + return nil + } for _, s := range m { printStatement(0, s) } diff --git a/gobgp/cmd/vrf.go b/gobgp/cmd/vrf.go index d1863e03..5548e756 100644 --- a/gobgp/cmd/vrf.go +++ b/gobgp/cmd/vrf.go @@ -61,6 +61,12 @@ func showVrfs() error { fmt.Println(string(j)) return nil } + if globalOpts.Quiet { + for _, v := range vrfs { + fmt.Println(v.Name) + } + return nil + } lines := make([][]string, 0, len(vrfs)) for _, v := range vrfs { name := v.Name |