by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 30 2019 20:11
  • Jan 30 2019 17:40
    vitalisator commented #1696
  • Jan 30 2019 17:00
    starrsl commented #1693
  • Jan 30 2019 12:09
    FlochonR edited #1700
  • Jan 30 2019 12:09
    FlochonR opened #1700
  • Jan 30 2019 09:43
    tomicke commented #1699
  • Jan 30 2019 06:46
    pedjaj edited #1698
  • Jan 30 2019 06:44
    codecov-io commented #1698
  • Jan 30 2019 06:43
    codecov-io commented #1698
  • Jan 30 2019 06:43
    codecov-io commented #1698
  • Jan 30 2019 06:43
    codecov-io commented #1698
  • Jan 30 2019 06:42
    codecov-io commented #1698
  • Jan 30 2019 06:42
    codecov-io commented #1698
  • Jan 30 2019 06:41
    codecov-io commented #1698
  • Jan 30 2019 06:41
    pedjaj synchronize #1698
  • Jan 29 2019 22:24
    Packets-n-Python commented #1287
  • Jan 29 2019 22:23
    Packets-n-Python commented #1287
  • Jan 29 2019 16:03
    tomicke edited #1699
  • Jan 29 2019 16:02
    tomicke edited #1699
  • Jan 29 2019 16:01
    tomicke edited #1699
ytti
@ytti
but regexp sees
zaits07
@zaits07
i just look ruby code and can't uderstand (i musg say i am noobie in ruby) how 'expect' implemented for 'Net::Telnet'
zaits07
@zaits07
this is method definition, yes? but where from it called?
ah, soory
    def expect(regex)
      @telnet.oxidized_expect expect: regex, timeout: @timeout
    end
aneeq009
@aneeq009

yes want to have all config files in single directory in a single repo. currently with my configuration files are stored depending on device groups.

output:
default: git
git:
single_repo: true
user: oxidized
email: oxidized@oxidized.local
repo: /opt/oxidized/configs.git

ytti
@ytti
you'd need to change source code for that, as explained we don't guarantee node names to be unique
so we cannot store them in single directory as general case
ytti
@ytti
it wouldn't be a lot of owrk to introduce like
git:
groups: flat|directory|repository
but flat would of course only do the right thing if groups don't have overlapping names
samotelf
@samotelf
hello, I had setup oxidized successfuly with file output.
However since im interested in versioning, i guess ill have to use git
should i use gitlab or can I setup a gitlab internally?
aneeq009
@aneeq009
yes, was trying to change path under yield_repo_and_path def from "#{group}/#{node.name}" to "/#{node.name}" but not successful, not a ruby user.
@samotelf you can use git locally to enable version
zaits07
@zaits07
@ytti this code
https://github.com/ytti/oxidized/blob/48d8d8736d38351e8a25ed23504bb3443a01579c/lib/oxidized/input/telnet.rb#L83
called for telnet input while login process, but not while 'cmd'
ytti
@ytti
zaits07, i think i've broken that
zaits07, it probably worked here
zaits07, actually unsure if it has ever worked in telnet, because it's not hookable
hmps
zaits07, yeah we had sat some point 'model.expects line'
ytti
@ytti
oh we still have it
hmm
zaits07, problem is, once we made our own method oxidized_expect
zaits07, instead of overwriting waitfor, which @telnet.cmd uses
zaits07, we stopped honouring expects, as stock waitfor does not
so yeah that commit broke it
zaits07, unsure if it coudl be fixed as easily as aliasiasing oxidized_expect as waitfor
zaits07, alias :waitfor :oxidized_expect
to again rewrite the stock waitfor, which @telnet.cmd calls
or then implement our own version of #cmd which calls oxidized_expect
zaits07
@zaits07
ytti many thanks you
just what do you think, what will require less coding? may be implement other input model for os spawned telnet with piped input and output? or this will be overwork?
ytti
@ytti
try alias :waitfor :oxidized_expect
if that works, that's least effort
zaits07
@zaits07
thanks! i will try
zaits07
@zaits07
@ytti sorry, where i should place alias :waitfor :oxidized_expect code?
i place it in telnet.rb after oxidized_expect method definition before last end
https://github.com/ytti/oxidized/blob/48d8d8736d38351e8a25ed23504bb3443a01579c/lib/oxidized/input/telnet.rb#L115
and i have crash
wrong argument type nil (expected Regexp) [TypeError]
--------------------------------------------------
/home/oxidized/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/oxidized-0.28.0/lib/oxidized/input/telnet.rb:110:in `match'
line 110 was my second try
ytti
@ytti
zaits07, after oxidized_expect has been defined
should it rewrited as
match = expects.nil? ? nil : expects.find { |re| line.match re }
samotelf
@samotelf
good morning, any idea how to backup a switch with no cli mode?
HPE OfficeConnect Switch 1820
zaits07
@zaits07
according switch docs it can backuped via http
so you can try 'http' input in oxidize
sorry, but i never tried it