add target flag to setCmd
@@ -247,6 +247,7 @@ func init() {
setCmd.Flags().StringSliceP("replace-value", "", []string{""}, "set replace request value")
setCmd.Flags().StringP("delimiter", "", ":::", "set update/replace delimiter between path,type,value")
setCmd.Flags().BoolP("print-request", "", false, "print set request as well as the response")
+ setCmd.Flags().StringP("target", "", "", "set request target")
viper.BindPFlag("set-prefix", setCmd.LocalFlags().Lookup("prefix"))
viper.BindPFlag("set-delete", setCmd.LocalFlags().Lookup("delete"))
@@ -260,6 +261,7 @@ func init() {
viper.BindPFlag("set-replace-value", setCmd.LocalFlags().Lookup("replace-value"))
viper.BindPFlag("set-delimiter", setCmd.LocalFlags().Lookup("delimiter"))
viper.BindPFlag("set-print-request", setCmd.LocalFlags().Lookup("print-request"))
+ viper.BindPFlag("set-target", setCmd.LocalFlags().Lookup("target"))
}
func createSetRequest() (*gnmi.SetRequest, error) {
