karimra / gnmic

gNMIc is a gNMI CLI client and collector
https://gnmic.kmrd.dev
Apache License 2.0
216 stars 32 forks source link

can't invoke gnmic 0.5.0 without a config file #225

Closed hellt closed 3 years ago

hellt commented 3 years ago

@karimra we have a regression in 0.5.0 it seems:

0.4.3

❯ gnmic prompt --log --debug --config /dev/null
2020/11/25 21:51:59 version=0.4.3, commit=6d3605c, date=2020-11-10T09:47:23Z, gitURL=https://github.com/karimra/gnmic, docs=https://gnmic.kmrd.dev
gnmic 2020/11/25 21:51:59.133614 /home/runner/work/gnmic/gnmic/cmd/root.go:116: using config file /dev/null
gnmic 2020/11/25 21:51:59.133674 /home/runner/work/gnmic/gnmic/cmd/root.go:125: config file:
gnmic>

0.5.0

❯ gnmic prompt --log --debug --config /dev/null
2020/11/25 21:52:14 version=0.5.0, commit=7b8095d, date=2020-11-25T11:02:56Z, gitURL=https://github.com/karimra/gnmic, docs=https://gnmic.kmrd.dev
gnmic 2020/11/25 21:52:14.964617 /home/runner/work/gnmic/gnmic/cmd/root.go:119: using config file /dev/null
gnmic 2020/11/25 21:52:14.964671 /home/runner/work/gnmic/gnmic/cmd/root.go:128: config file:
Error: failed getting targets config: unexpected targets format, got: <nil>
LukeCage commented 3 years ago

Is there a work-around so that I can get my client to work again, in the meantime, @hellt or @karimra?

Thanks.

Luke

karimra commented 3 years ago

@LukeCage, you can create a file ~/gnmic.yaml with address: router_addr:port and run gnmic without -a | --address you can also use any file name/location and reference it with gnmic --config /path/to/file when running your cmds.

LukeCage commented 3 years ago

Thanks, @hellt ...

That works. Please let me know when this bug is fixed.

Luke.

hellt commented 3 years ago

@LukeCage please try the newly released 0.5.1

LukeCage commented 3 years ago

Hi @helt,

So far, gnmic seems to working without the problem I sited last week but there is an inelegance in the display of "gnmic prompt" that did not exist before. After issuing a command and pressing enter, right after providing the credentials for the account and before the data is streamed, the prompt options are displayed.

This is disruptive to the display of information that is of value/importance and it interferes with the use of the screen size that is available to display the data. Never happened before.

The menu of options should not be displayed until the "gnmi prompt shell" is broken.

I have provided a screen shot for your review.

Thanks,

Luke.

image

image

helt commented 3 years ago

@LukeCage I guess you mean @hellt , not @helt (thats me) :)

LukeCage commented 3 years ago

Sorry @helt. I beg your pardon ... Yes. I meant to reference @hellt.

karimra commented 3 years ago

@LukeCage can you open another issue to track this? as this is unrelated to the original issue topic. No need to rewrite the whole thing, just reference this issue. Thanks