oxidized 0.29.0 → 0.29.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +31 -0
- data/.github/workflows/codeql.yml +76 -0
- data/.github/workflows/publishdocker.yml +3 -1
- data/.github/workflows/stale.yml +16 -0
- data/.rubocop_todo.yml +3 -3
- data/CHANGELOG.md +10 -0
- data/Dockerfile +2 -0
- data/README.md +3 -6
- data/docs/Creating-Models.md +14 -15
- data/docs/Ruby-API.md +12 -8
- data/lib/oxidized/model/acmepacket.rb +2 -0
- data/lib/oxidized/model/acos.rb +3 -1
- data/lib/oxidized/model/acsw.rb +2 -0
- data/lib/oxidized/model/adtran.rb +2 -0
- data/lib/oxidized/model/adva.rb +2 -0
- data/lib/oxidized/model/aen.rb +2 -0
- data/lib/oxidized/model/aireos.rb +2 -0
- data/lib/oxidized/model/airfiber.rb +2 -0
- data/lib/oxidized/model/airos.rb +2 -0
- data/lib/oxidized/model/alteonos.rb +2 -0
- data/lib/oxidized/model/alvarion.rb +2 -0
- data/lib/oxidized/model/aos.rb +2 -0
- data/lib/oxidized/model/aos7.rb +2 -0
- data/lib/oxidized/model/aoscx.rb +2 -0
- data/lib/oxidized/model/aosw.rb +3 -1
- data/lib/oxidized/model/apc_aos.rb +2 -0
- data/lib/oxidized/model/arbos.rb +2 -0
- data/lib/oxidized/model/aricentiss.rb +2 -0
- data/lib/oxidized/model/asa.rb +2 -0
- data/lib/oxidized/model/asyncos.rb +2 -0
- data/lib/oxidized/model/audiocodes.rb +2 -0
- data/lib/oxidized/model/audiocodesmp.rb +2 -0
- data/lib/oxidized/model/awplus.rb +2 -0
- data/lib/oxidized/model/axos.rb +2 -0
- data/lib/oxidized/model/bdcom.rb +2 -0
- data/lib/oxidized/model/boss.rb +3 -1
- data/lib/oxidized/model/br6910.rb +2 -0
- data/lib/oxidized/model/c4cmts.rb +2 -0
- data/lib/oxidized/model/cambium.rb +2 -0
- data/lib/oxidized/model/cambiumepmp.rb +2 -0
- data/lib/oxidized/model/casa.rb +2 -0
- data/lib/oxidized/model/catos.rb +2 -0
- data/lib/oxidized/model/ciscoce.rb +2 -0
- data/lib/oxidized/model/cisconga.rb +2 -0
- data/lib/oxidized/model/ciscosma.rb +2 -0
- data/lib/oxidized/model/ciscosmb.rb +2 -0
- data/lib/oxidized/model/ciscovpn3k.rb +2 -0
- data/lib/oxidized/model/cnos.rb +2 -0
- data/lib/oxidized/model/comnetms.rb +2 -0
- data/lib/oxidized/model/comtrol.rb +2 -0
- data/lib/oxidized/model/comware.rb +1 -0
- data/lib/oxidized/model/coriant8600.rb +2 -0
- data/lib/oxidized/model/coriantgroove.rb +2 -0
- data/lib/oxidized/model/corianttmos.rb +2 -0
- data/lib/oxidized/model/cumulus.rb +2 -0
- data/lib/oxidized/model/datacom.rb +2 -0
- data/lib/oxidized/model/dcnos.rb +2 -0
- data/lib/oxidized/model/dellx.rb +2 -0
- data/lib/oxidized/model/dlink.rb +2 -0
- data/lib/oxidized/model/dnos.rb +2 -0
- data/lib/oxidized/model/eciapollo.rb +2 -0
- data/lib/oxidized/model/edgecos.rb +2 -0
- data/lib/oxidized/model/edgeos.rb +2 -0
- data/lib/oxidized/model/edgeswitch.rb +2 -0
- data/lib/oxidized/model/eltex.rb +2 -0
- data/lib/oxidized/model/enterasys.rb +2 -0
- data/lib/oxidized/model/enterasys800.rb +2 -0
- data/lib/oxidized/model/eos.rb +2 -0
- data/lib/oxidized/model/fabricos.rb +2 -0
- data/lib/oxidized/model/fastiron.rb +2 -0
- data/lib/oxidized/model/fiberdriver.rb +2 -0
- data/lib/oxidized/model/firebrick.rb +2 -0
- data/lib/oxidized/model/firelinuxos.rb +2 -0
- data/lib/oxidized/model/firewareos.rb +2 -0
- data/lib/oxidized/model/fortios.rb +2 -0
- data/lib/oxidized/model/fortiwlc.rb +2 -0
- data/lib/oxidized/model/ftos.rb +2 -0
- data/lib/oxidized/model/fujitsupy.rb +2 -0
- data/lib/oxidized/model/gaiaos.rb +2 -0
- data/lib/oxidized/model/gcombnps.rb +2 -0
- data/lib/oxidized/model/grandstream.rb +2 -0
- data/lib/oxidized/model/h3c.rb +2 -0
- data/lib/oxidized/model/hatteras.rb +2 -0
- data/lib/oxidized/model/hios.rb +2 -0
- data/lib/oxidized/model/hirschmann.rb +2 -0
- data/lib/oxidized/model/hpebladesystem.rb +2 -0
- data/lib/oxidized/model/hpemsa.rb +2 -0
- data/lib/oxidized/model/hpmsm.rb +2 -0
- data/lib/oxidized/model/ibos.rb +2 -0
- data/lib/oxidized/model/icotera.rb +2 -0
- data/lib/oxidized/model/ios.rb +2 -0
- data/lib/oxidized/model/iosxr.rb +2 -0
- data/lib/oxidized/model/ipos.rb +2 -0
- data/lib/oxidized/model/ironware.rb +2 -0
- data/lib/oxidized/model/isam.rb +2 -0
- data/lib/oxidized/model/junos.rb +2 -0
- data/lib/oxidized/model/lancom.rb +2 -0
- data/lib/oxidized/model/lenovonos.rb +2 -0
- data/lib/oxidized/model/linksyssrw.rb +2 -0
- data/lib/oxidized/model/linuxgeneric.rb +2 -0
- data/lib/oxidized/model/masteros.rb +2 -0
- data/lib/oxidized/model/mlnxos.rb +2 -0
- data/lib/oxidized/model/model.rb +6 -5
- data/lib/oxidized/model/mtrlrfs.rb +2 -0
- data/lib/oxidized/model/ndms.rb +3 -1
- data/lib/oxidized/model/necix.rb +2 -0
- data/lib/oxidized/model/netgear.rb +2 -0
- data/lib/oxidized/model/netonix.rb +2 -0
- data/lib/oxidized/model/netscaler.rb +2 -0
- data/lib/oxidized/model/nodegrid.rb +2 -0
- data/lib/oxidized/model/nos.rb +2 -0
- data/lib/oxidized/model/nsxconfig.rb +2 -0
- data/lib/oxidized/model/nsxfirewall.rb +2 -0
- data/lib/oxidized/model/nxos.rb +2 -0
- data/lib/oxidized/model/oneos.rb +2 -0
- data/lib/oxidized/model/openbsd.rb +2 -0
- data/lib/oxidized/model/opengear.rb +2 -0
- data/lib/oxidized/model/openwrt.rb +2 -0
- data/lib/oxidized/model/opnsense.rb +2 -0
- data/lib/oxidized/model/os10.rb +2 -0
- data/lib/oxidized/model/outputs.rb +2 -0
- data/lib/oxidized/model/panos.rb +2 -0
- data/lib/oxidized/model/panos_api.rb +2 -0
- data/lib/oxidized/model/pfsense.rb +2 -0
- data/lib/oxidized/model/planet.rb +2 -0
- data/lib/oxidized/model/powerconnect.rb +2 -0
- data/lib/oxidized/model/procurve.rb +2 -0
- data/lib/oxidized/model/purityos.rb +2 -0
- data/lib/oxidized/model/qtech.rb +2 -0
- data/lib/oxidized/model/quantaos.rb +2 -0
- data/lib/oxidized/model/raisecom.rb +2 -0
- data/lib/oxidized/model/routeros.rb +2 -0
- data/lib/oxidized/model/saos.rb +2 -0
- data/lib/oxidized/model/screenos.rb +2 -0
- data/lib/oxidized/model/sgos.rb +2 -0
- data/lib/oxidized/model/siklu.rb +2 -0
- data/lib/oxidized/model/slxos.rb +2 -0
- data/lib/oxidized/model/smartax.rb +2 -0
- data/lib/oxidized/model/smartcs.rb +2 -0
- data/lib/oxidized/model/sonicos.rb +2 -0
- data/lib/oxidized/model/speedtouch.rb +2 -0
- data/lib/oxidized/model/sros.rb +3 -1
- data/lib/oxidized/model/srosmd.rb +2 -0
- data/lib/oxidized/model/stoneos.rb +2 -0
- data/lib/oxidized/model/swos.rb +2 -0
- data/lib/oxidized/model/tdre.rb +2 -0
- data/lib/oxidized/model/telco.rb +2 -0
- data/lib/oxidized/model/tmos.rb +3 -1
- data/lib/oxidized/model/tplink.rb +2 -0
- data/lib/oxidized/model/trango.rb +2 -0
- data/lib/oxidized/model/truenas.rb +2 -0
- data/lib/oxidized/model/ucs.rb +2 -0
- data/lib/oxidized/model/viptela.rb +2 -0
- data/lib/oxidized/model/voltaire.rb +2 -0
- data/lib/oxidized/model/voss.rb +2 -0
- data/lib/oxidized/model/vrp.rb +2 -0
- data/lib/oxidized/model/vyatta.rb +2 -0
- data/lib/oxidized/model/weos.rb +2 -0
- data/lib/oxidized/model/xos.rb +2 -0
- data/lib/oxidized/model/yamaha.rb +2 -0
- data/lib/oxidized/model/zhoneolt.rb +2 -0
- data/lib/oxidized/model/zteolt.rb +2 -0
- data/lib/oxidized/model/zy1308.rb +2 -0
- data/lib/oxidized/model/zynos.rb +2 -0
- data/lib/oxidized/model/zynoscli.rb +2 -0
- data/lib/oxidized/model/zynosgs.rb +2 -0
- data/lib/oxidized/output/git.rb +2 -1
- data/lib/oxidized/version.rb +2 -2
- data/lib/oxidized.rb +1 -1
- data/lib/refinements.rb +43 -0
- metadata +6 -4
- data/.github/no-response.yml +0 -13
- data/lib/oxidized/string.rb +0 -42
data/lib/oxidized/model/dcnos.rb
CHANGED
data/lib/oxidized/model/dellx.rb
CHANGED
data/lib/oxidized/model/dlink.rb
CHANGED
data/lib/oxidized/model/dnos.rb
CHANGED
data/lib/oxidized/model/eltex.rb
CHANGED
data/lib/oxidized/model/eos.rb
CHANGED
data/lib/oxidized/model/ftos.rb
CHANGED
data/lib/oxidized/model/h3c.rb
CHANGED
data/lib/oxidized/model/hios.rb
CHANGED
data/lib/oxidized/model/hpmsm.rb
CHANGED
data/lib/oxidized/model/ibos.rb
CHANGED
data/lib/oxidized/model/ios.rb
CHANGED
data/lib/oxidized/model/iosxr.rb
CHANGED
data/lib/oxidized/model/ipos.rb
CHANGED
data/lib/oxidized/model/isam.rb
CHANGED
data/lib/oxidized/model/junos.rb
CHANGED
data/lib/oxidized/model/model.rb
CHANGED
@@ -3,6 +3,8 @@ require_relative 'outputs'
|
|
3
3
|
|
4
4
|
module Oxidized
|
5
5
|
class Model
|
6
|
+
using Refinements
|
7
|
+
|
6
8
|
include Oxidized::Config::Vars
|
7
9
|
|
8
10
|
class << self
|
@@ -122,14 +124,14 @@ module Oxidized
|
|
122
124
|
|
123
125
|
out = out.b unless Oxidized.config.input.utf8_encoded?
|
124
126
|
self.class.cmds[:all].each do |all_block|
|
125
|
-
out = instance_exec
|
127
|
+
out = instance_exec out, string, &all_block
|
126
128
|
end
|
127
129
|
if vars :remove_secret
|
128
130
|
self.class.cmds[:secret].each do |all_block|
|
129
|
-
out = instance_exec
|
131
|
+
out = instance_exec out, string, &all_block
|
130
132
|
end
|
131
133
|
end
|
132
|
-
out = instance_exec
|
134
|
+
out = instance_exec out, &block if block
|
133
135
|
process_cmd_output out, string
|
134
136
|
end
|
135
137
|
|
@@ -214,8 +216,7 @@ module Oxidized
|
|
214
216
|
private
|
215
217
|
|
216
218
|
def process_cmd_output(output, name)
|
217
|
-
output =
|
218
|
-
output = Oxidized::String.new('') unless output.instance_of?(Oxidized::String)
|
219
|
+
output = String.new('') unless output.instance_of?(String)
|
219
220
|
output.set_cmd(name)
|
220
221
|
output
|
221
222
|
end
|
data/lib/oxidized/model/ndms.rb
CHANGED
data/lib/oxidized/model/necix.rb
CHANGED
data/lib/oxidized/model/nos.rb
CHANGED
data/lib/oxidized/model/nxos.rb
CHANGED
data/lib/oxidized/model/oneos.rb
CHANGED
data/lib/oxidized/model/os10.rb
CHANGED
data/lib/oxidized/model/panos.rb
CHANGED