oxidized 0.32.0 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.md +42 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
- data/.github/ISSUE_TEMPLATE/support-request.md +36 -0
- data/.github/workflows/publishdocker.yml +35 -16
- data/.github/workflows/ruby.yml +0 -6
- data/.gitignore +1 -0
- data/.rubocop.yml +5 -5
- data/.rubocop_todo.yml +5 -31
- data/CHANGELOG.md +60 -0
- data/CONTRIBUTING.md +10 -7
- data/Dockerfile +37 -64
- data/README.md +4 -95
- data/Rakefile +8 -9
- data/docs/Configuration.md +139 -27
- data/docs/Docker.md +240 -0
- data/docs/Issues.md +17 -0
- data/docs/Model-Notes/EatonNetwork.md +18 -0
- data/docs/Model-Notes/HPEAruba.md +3 -2
- data/docs/Release.md +21 -3
- data/docs/Supported-OS-Types.md +3 -0
- data/docs/Troubleshooting.md +6 -1
- data/extra/rest_client.rb +1 -1
- data/lib/oxidized/config/vars.rb +18 -14
- data/lib/oxidized/config.rb +3 -1
- data/lib/oxidized/core.rb +26 -5
- data/lib/oxidized/input/http.rb +1 -1
- data/lib/oxidized/model/aos7.rb +3 -0
- data/lib/oxidized/model/eatonnetwork.rb +65 -0
- data/lib/oxidized/model/fortios.rb +3 -3
- data/lib/oxidized/model/ingate.rb +47 -0
- data/lib/oxidized/model/ios.rb +1 -0
- data/lib/oxidized/model/netgear.rb +6 -0
- data/lib/oxidized/model/powerconnect.rb +32 -11
- data/lib/oxidized/model/srosmd.rb +1 -1
- data/lib/oxidized/model/unifiap.rb +142 -0
- data/lib/oxidized/output/git.rb +82 -32
- data/lib/oxidized/output/gitcrypt.rb +3 -0
- data/lib/oxidized/version.rb +6 -4
- data/lib/oxidized/worker.rb +2 -5
- data/lib/refinements.rb +2 -0
- data/oxidized.gemspec +19 -11
- metadata +41 -63
- data/examples/podman-compose/Makefile +0 -103
- data/examples/podman-compose/README.md +0 -94
- data/examples/podman-compose/docker-compose.yml +0 -30
- data/examples/podman-compose/gitserver/.gitignore +0 -1
- data/examples/podman-compose/gitserver/Dockerfile +0 -14
- data/examples/podman-compose/model-simulation/Dockerfile-model +0 -13
- data/examples/podman-compose/model-simulation/asternos.sh +0 -36
- data/examples/podman-compose/oxidized-config/.gitignore +0 -10
- data/examples/podman-compose/oxidized-config/config +0 -46
- data/examples/podman-compose/oxidized-config/config_csv-file +0 -46
- data/examples/podman-compose/oxidized-config/config_csv-gitserver +0 -56
- data/examples/podman-compose/oxidized-config/router.db +0 -1
- data/examples/podman-compose/oxidized-ssh/.gitignore +0 -1
- data/examples/podman-compose/oxidized-ssh/README.md +0 -14
data/lib/oxidized/output/git.rb
CHANGED
@@ -64,8 +64,8 @@ module Oxidized
|
|
64
64
|
# Returns the configuration of group/node_name
|
65
65
|
#
|
66
66
|
# #fetch is called by Nodes#fetch
|
67
|
-
# Nodes#fetch creates a new Output object each time, so
|
68
|
-
#
|
67
|
+
# Nodes#fetch creates a new Output object each time, so it not easy
|
68
|
+
# to cache the repo index in memory. But as we keep the repo index up
|
69
69
|
# to date on disk in #update_repo, we can read it from disk instead of
|
70
70
|
# rebuilding it each time.
|
71
71
|
def fetch(node, group)
|
@@ -79,29 +79,13 @@ module Oxidized
|
|
79
79
|
'node not found'
|
80
80
|
end
|
81
81
|
|
82
|
-
# give a hash of all oid
|
82
|
+
# give a hash of all oid revisions for the given node, and the date of
|
83
|
+
# the commit.
|
84
|
+
#
|
85
|
+
# Called by Nodes#version
|
83
86
|
def version(node, group)
|
84
|
-
|
85
|
-
|
86
|
-
repo = Rugged::Repository.new repo
|
87
|
-
walker = Rugged::Walker.new(repo)
|
88
|
-
walker.sorting(Rugged::SORT_DATE)
|
89
|
-
walker.push(repo.head.target.oid)
|
90
|
-
i = -1
|
91
|
-
tab = []
|
92
|
-
walker.each do |commit|
|
93
|
-
# Diabled rubocop because the suggested .empty? does not work here.
|
94
|
-
next if commit.diff(paths: [path]).size.zero? # rubocop:disable Style/ZeroLengthPredicate
|
95
|
-
|
96
|
-
hash = {}
|
97
|
-
hash[:date] = commit.time.to_s
|
98
|
-
hash[:oid] = commit.oid
|
99
|
-
hash[:author] = commit.author
|
100
|
-
hash[:message] = commit.message
|
101
|
-
tab[i += 1] = hash
|
102
|
-
end
|
103
|
-
walker.reset
|
104
|
-
tab
|
87
|
+
repo_path, node_path = yield_repo_and_path(node, group)
|
88
|
+
self.class.hash_list(node_path, repo_path)
|
105
89
|
rescue StandardError
|
106
90
|
'node not found'
|
107
91
|
end
|
@@ -143,6 +127,79 @@ module Oxidized
|
|
143
127
|
'no diffs'
|
144
128
|
end
|
145
129
|
|
130
|
+
# Return the list of oids for node_path in the repository repo_path
|
131
|
+
def self.hash_list(node_path, repo_path)
|
132
|
+
update_cache(repo_path)
|
133
|
+
@gitcache[repo_path][:nodes][node_path] || []
|
134
|
+
end
|
135
|
+
|
136
|
+
# Update @gitcache, a class instance variable, ensuring persistence
|
137
|
+
# by saving the cache independently of object instances
|
138
|
+
def self.update_cache(repo_path)
|
139
|
+
# initialize our cache as a class instance variable
|
140
|
+
@gitcache ||= {}
|
141
|
+
# When single_repo == false, we have multiple repositories
|
142
|
+
unless @gitcache[repo_path]
|
143
|
+
@gitcache[repo_path] = {}
|
144
|
+
@gitcache[repo_path][:nodes] = {}
|
145
|
+
@gitcache[repo_path][:last_commit] = nil
|
146
|
+
end
|
147
|
+
|
148
|
+
repo = Rugged::Repository.new repo_path
|
149
|
+
|
150
|
+
walker = Rugged::Walker.new(repo)
|
151
|
+
walker.sorting(Rugged::SORT_DATE)
|
152
|
+
walker.push(repo.head.target.oid)
|
153
|
+
|
154
|
+
# We store the commits into a temporary cache. It will be prepended
|
155
|
+
# to @gitcache to preserve the order of the commits.
|
156
|
+
cache = {}
|
157
|
+
walker.each do |commit|
|
158
|
+
if commit.oid == @gitcache[repo_path][:last_commit]
|
159
|
+
# we have reached the last cached commit, so we're done
|
160
|
+
break
|
161
|
+
end
|
162
|
+
|
163
|
+
commit.diff.each_delta do |delta|
|
164
|
+
next unless delta.added? || delta.modified?
|
165
|
+
|
166
|
+
hash = {}
|
167
|
+
# We keep :date for reverse compatibility on oxidized-web <= 0.15.1
|
168
|
+
hash[:date] = commit.time.to_s
|
169
|
+
# date as a Time instance for more flexibility in oxidized-web
|
170
|
+
hash[:time] = commit.time
|
171
|
+
hash[:oid] = commit.oid
|
172
|
+
hash[:author] = commit.author
|
173
|
+
hash[:message] = commit.message
|
174
|
+
|
175
|
+
filename = delta.new_file[:path]
|
176
|
+
if cache[filename]
|
177
|
+
cache[filename].append hash
|
178
|
+
else
|
179
|
+
cache[filename] = [hash]
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
cache.each_pair do |filename, hashlist|
|
185
|
+
if @gitcache[repo_path][:nodes][filename]
|
186
|
+
# using the splat operator (*) should be OK as hashlist should
|
187
|
+
# not be very big when working on deltas
|
188
|
+
@gitcache[repo_path][:nodes][filename].prepend(*hashlist)
|
189
|
+
else
|
190
|
+
@gitcache[repo_path][:nodes][filename] = hashlist
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
# Store the most recent commit
|
195
|
+
@gitcache[repo_path][:last_commit] = repo.head.target.oid
|
196
|
+
end
|
197
|
+
|
198
|
+
# Currently only used in unit tests
|
199
|
+
def self.clear_cache
|
200
|
+
@gitcache = nil
|
201
|
+
end
|
202
|
+
|
146
203
|
private
|
147
204
|
|
148
205
|
def yield_repo_and_path(node, group)
|
@@ -181,14 +238,7 @@ module Oxidized
|
|
181
238
|
end
|
182
239
|
end
|
183
240
|
|
184
|
-
# Uploads data into file in the repo
|
185
|
-
#
|
186
|
-
# @param [String] file: the file to save the configuration to
|
187
|
-
# @param [String] data: the configuration to save
|
188
|
-
# @param [Rugged::Repository] repo: the git repository to use
|
189
|
-
#
|
190
|
-
# If Oxidized.config.output.git.single_repo = false (which is the default),
|
191
|
-
# there will one repository for each group.
|
241
|
+
# Uploads data into file in the repository repo
|
192
242
|
#
|
193
243
|
# update_repo caches the index on disk. An index is usually used in a
|
194
244
|
# working directory and not in a bare repository, which confuses users.
|
@@ -114,7 +114,10 @@ module Oxidized
|
|
114
114
|
tab = []
|
115
115
|
walker.each do |commit|
|
116
116
|
hash = {}
|
117
|
+
# We keep :date for reverse compatibility on oxidized-web <= 0.15.1
|
117
118
|
hash[:date] = commit.date.to_s
|
119
|
+
# date as a Time instance for more flexibility in oxidized-web
|
120
|
+
hash[:time] = commit.date
|
118
121
|
hash[:oid] = commit.objectish
|
119
122
|
hash[:author] = commit.author
|
120
123
|
hash[:message] = commit.message
|
data/lib/oxidized/version.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Oxidized
|
2
|
-
VERSION = '0.
|
3
|
-
VERSION_FULL = '0.
|
4
|
+
VERSION = '0.33.0'
|
5
|
+
VERSION_FULL = '0.33.0'
|
4
6
|
def self.version_set
|
5
7
|
version_full = %x(git describe --tags).chop rescue ""
|
6
8
|
version = %x(git describe --tags --abbrev=0).chop rescue ""
|
@@ -12,8 +14,8 @@ module Oxidized
|
|
12
14
|
const_set(:VERSION, version)
|
13
15
|
const_set(:VERSION_FULL, version_full)
|
14
16
|
file = File.readlines(__FILE__)
|
15
|
-
file[
|
16
|
-
file[
|
17
|
+
file[3] = " VERSION = '%s'\n" % VERSION
|
18
|
+
file[4] = " VERSION_FULL = '%s'\n" % VERSION_FULL
|
17
19
|
File.write(__FILE__, file.join)
|
18
20
|
end
|
19
21
|
end
|
data/lib/oxidized/worker.rb
CHANGED
@@ -101,11 +101,8 @@ module Oxidized
|
|
101
101
|
end
|
102
102
|
|
103
103
|
def cycle_finished?
|
104
|
-
|
105
|
-
|
106
|
-
else
|
107
|
-
@jobs_done.positive? && (@jobs_done % @nodes.count).zero?
|
108
|
-
end
|
104
|
+
@jobs_done > @nodes.count ||
|
105
|
+
(@jobs_done.positive? && (@jobs_done % @nodes.count).zero?)
|
109
106
|
end
|
110
107
|
|
111
108
|
def run_done_hook
|
data/lib/refinements.rb
CHANGED
@@ -27,7 +27,9 @@ module Refinements
|
|
27
27
|
# sets @cmd and @name unless @name is already set
|
28
28
|
def process_cmd(command)
|
29
29
|
@cmd = command
|
30
|
+
# rubocop:disable Naming/MemoizedInstanceVariableName
|
30
31
|
@name ||= @cmd.to_s.strip.gsub(/\s+/, '_') # what to do when command is proc? #to_s seems ghetto
|
32
|
+
# rubocop:enable Naming/MemoizedInstanceVariableName
|
31
33
|
end
|
32
34
|
|
33
35
|
# Initializes the String instance variables from another String instance
|
data/oxidized.gemspec
CHANGED
@@ -12,7 +12,6 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.homepage = 'http://github.com/ytti/oxidized'
|
13
13
|
s.summary = 'feeble attempt at rancid'
|
14
14
|
s.description = 'software to fetch configuration from network devices and store them'
|
15
|
-
s.rubyforge_project = s.name
|
16
15
|
s.files = %x(git ls-files -z).split("\x0").reject { |f| f.match(/^(test|spec|features)\//) }
|
17
16
|
s.executables = %w[oxidized]
|
18
17
|
s.require_path = 'lib'
|
@@ -21,7 +20,18 @@ Gem::Specification.new do |s|
|
|
21
20
|
|
22
21
|
s.required_ruby_version = '>= 3.1'
|
23
22
|
|
24
|
-
|
23
|
+
# Gemspec strategy
|
24
|
+
#
|
25
|
+
# For dependency and optional dependencies, we try to set the minimal
|
26
|
+
# dependency lower than the Ubuntu Noble or Debian Bookworm package version,
|
27
|
+
# so that native packages can be used.
|
28
|
+
# We limit the maximal version so that dependabot can warn about new versions
|
29
|
+
# and we can test them before activating them in Oxidized.
|
30
|
+
#
|
31
|
+
# development dependencies are set to the latest minor version of a library
|
32
|
+
# and updated after having tested them
|
33
|
+
|
34
|
+
s.add_dependency 'asetus', '~> 0.4'
|
25
35
|
s.add_dependency 'bcrypt_pbkdf', '~> 1.0'
|
26
36
|
s.add_dependency 'ed25519', '~> 1.2'
|
27
37
|
s.add_dependency 'net-ftp', '~> 0.2'
|
@@ -35,20 +45,18 @@ Gem::Specification.new do |s|
|
|
35
45
|
s.add_dependency 'slop', '~> 4.6'
|
36
46
|
|
37
47
|
s.add_development_dependency 'bundler', '~> 2.2'
|
38
|
-
s.add_development_dependency 'git', '
|
48
|
+
s.add_development_dependency 'git', '>= 2.0', '<=3.0'
|
39
49
|
s.add_development_dependency 'minitest', '~> 5.25.4'
|
40
50
|
s.add_development_dependency 'mocha', '~> 2.1'
|
41
51
|
s.add_development_dependency 'pry', '~> 0.15.0'
|
42
52
|
s.add_development_dependency 'rake', '~> 13.0'
|
43
|
-
s.add_development_dependency 'rubocop', '~> 1.
|
44
|
-
s.add_development_dependency 'rubocop-minitest', '~> 0.
|
45
|
-
s.add_development_dependency 'rubocop-rake', '~> 0.
|
46
|
-
s.add_development_dependency 'rubocop-sequel', '~> 0.
|
53
|
+
s.add_development_dependency 'rubocop', '~> 1.74.0'
|
54
|
+
s.add_development_dependency 'rubocop-minitest', '~> 0.37.0'
|
55
|
+
s.add_development_dependency 'rubocop-rake', '~> 0.7.0'
|
56
|
+
s.add_development_dependency 'rubocop-sequel', '~> 0.4.0'
|
47
57
|
s.add_development_dependency 'simplecov', '~> 0.22.0'
|
48
|
-
s.add_development_dependency 'simplecov-cobertura', '~> 2.1.0'
|
49
|
-
s.add_development_dependency 'simplecov-html', '~> 0.13.1'
|
50
58
|
|
51
59
|
# Dependencies on optional libraries, used for unit tests & development
|
52
|
-
s.add_development_dependency 'oxidized-web', '
|
53
|
-
s.add_development_dependency 'sequel', '
|
60
|
+
s.add_development_dependency 'oxidized-web', '~> 0.16'
|
61
|
+
s.add_development_dependency 'sequel', '>= 5.63.0', '<= 5.90.0'
|
54
62
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oxidized
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.33.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Saku Ytti
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2025-
|
13
|
+
date: 2025-03-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: asetus
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '0.
|
21
|
+
version: '0.4'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - "~>"
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: '0.
|
28
|
+
version: '0.4'
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: bcrypt_pbkdf
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -198,16 +198,22 @@ dependencies:
|
|
198
198
|
name: git
|
199
199
|
requirement: !ruby/object:Gem::Requirement
|
200
200
|
requirements:
|
201
|
-
- - "
|
201
|
+
- - ">="
|
202
|
+
- !ruby/object:Gem::Version
|
203
|
+
version: '2.0'
|
204
|
+
- - "<="
|
202
205
|
- !ruby/object:Gem::Version
|
203
|
-
version: '
|
206
|
+
version: '3.0'
|
204
207
|
type: :development
|
205
208
|
prerelease: false
|
206
209
|
version_requirements: !ruby/object:Gem::Requirement
|
207
210
|
requirements:
|
208
|
-
- - "
|
211
|
+
- - ">="
|
209
212
|
- !ruby/object:Gem::Version
|
210
|
-
version: '2'
|
213
|
+
version: '2.0'
|
214
|
+
- - "<="
|
215
|
+
- !ruby/object:Gem::Version
|
216
|
+
version: '3.0'
|
211
217
|
- !ruby/object:Gem::Dependency
|
212
218
|
name: minitest
|
213
219
|
requirement: !ruby/object:Gem::Requirement
|
@@ -270,56 +276,56 @@ dependencies:
|
|
270
276
|
requirements:
|
271
277
|
- - "~>"
|
272
278
|
- !ruby/object:Gem::Version
|
273
|
-
version: 1.
|
279
|
+
version: 1.74.0
|
274
280
|
type: :development
|
275
281
|
prerelease: false
|
276
282
|
version_requirements: !ruby/object:Gem::Requirement
|
277
283
|
requirements:
|
278
284
|
- - "~>"
|
279
285
|
- !ruby/object:Gem::Version
|
280
|
-
version: 1.
|
286
|
+
version: 1.74.0
|
281
287
|
- !ruby/object:Gem::Dependency
|
282
288
|
name: rubocop-minitest
|
283
289
|
requirement: !ruby/object:Gem::Requirement
|
284
290
|
requirements:
|
285
291
|
- - "~>"
|
286
292
|
- !ruby/object:Gem::Version
|
287
|
-
version: 0.
|
293
|
+
version: 0.37.0
|
288
294
|
type: :development
|
289
295
|
prerelease: false
|
290
296
|
version_requirements: !ruby/object:Gem::Requirement
|
291
297
|
requirements:
|
292
298
|
- - "~>"
|
293
299
|
- !ruby/object:Gem::Version
|
294
|
-
version: 0.
|
300
|
+
version: 0.37.0
|
295
301
|
- !ruby/object:Gem::Dependency
|
296
302
|
name: rubocop-rake
|
297
303
|
requirement: !ruby/object:Gem::Requirement
|
298
304
|
requirements:
|
299
305
|
- - "~>"
|
300
306
|
- !ruby/object:Gem::Version
|
301
|
-
version: 0.
|
307
|
+
version: 0.7.0
|
302
308
|
type: :development
|
303
309
|
prerelease: false
|
304
310
|
version_requirements: !ruby/object:Gem::Requirement
|
305
311
|
requirements:
|
306
312
|
- - "~>"
|
307
313
|
- !ruby/object:Gem::Version
|
308
|
-
version: 0.
|
314
|
+
version: 0.7.0
|
309
315
|
- !ruby/object:Gem::Dependency
|
310
316
|
name: rubocop-sequel
|
311
317
|
requirement: !ruby/object:Gem::Requirement
|
312
318
|
requirements:
|
313
319
|
- - "~>"
|
314
320
|
- !ruby/object:Gem::Version
|
315
|
-
version: 0.
|
321
|
+
version: 0.4.0
|
316
322
|
type: :development
|
317
323
|
prerelease: false
|
318
324
|
version_requirements: !ruby/object:Gem::Requirement
|
319
325
|
requirements:
|
320
326
|
- - "~>"
|
321
327
|
- !ruby/object:Gem::Version
|
322
|
-
version: 0.
|
328
|
+
version: 0.4.0
|
323
329
|
- !ruby/object:Gem::Dependency
|
324
330
|
name: simplecov
|
325
331
|
requirement: !ruby/object:Gem::Requirement
|
@@ -335,61 +341,39 @@ dependencies:
|
|
335
341
|
- !ruby/object:Gem::Version
|
336
342
|
version: 0.22.0
|
337
343
|
- !ruby/object:Gem::Dependency
|
338
|
-
name:
|
339
|
-
requirement: !ruby/object:Gem::Requirement
|
340
|
-
requirements:
|
341
|
-
- - "~>"
|
342
|
-
- !ruby/object:Gem::Version
|
343
|
-
version: 2.1.0
|
344
|
-
type: :development
|
345
|
-
prerelease: false
|
346
|
-
version_requirements: !ruby/object:Gem::Requirement
|
347
|
-
requirements:
|
348
|
-
- - "~>"
|
349
|
-
- !ruby/object:Gem::Version
|
350
|
-
version: 2.1.0
|
351
|
-
- !ruby/object:Gem::Dependency
|
352
|
-
name: simplecov-html
|
344
|
+
name: oxidized-web
|
353
345
|
requirement: !ruby/object:Gem::Requirement
|
354
346
|
requirements:
|
355
347
|
- - "~>"
|
356
348
|
- !ruby/object:Gem::Version
|
357
|
-
version: 0.
|
349
|
+
version: '0.16'
|
358
350
|
type: :development
|
359
351
|
prerelease: false
|
360
352
|
version_requirements: !ruby/object:Gem::Requirement
|
361
353
|
requirements:
|
362
354
|
- - "~>"
|
363
355
|
- !ruby/object:Gem::Version
|
364
|
-
version: 0.
|
356
|
+
version: '0.16'
|
365
357
|
- !ruby/object:Gem::Dependency
|
366
|
-
name:
|
358
|
+
name: sequel
|
367
359
|
requirement: !ruby/object:Gem::Requirement
|
368
360
|
requirements:
|
369
361
|
- - ">="
|
370
362
|
- !ruby/object:Gem::Version
|
371
|
-
version:
|
363
|
+
version: 5.63.0
|
364
|
+
- - "<="
|
365
|
+
- !ruby/object:Gem::Version
|
366
|
+
version: 5.90.0
|
372
367
|
type: :development
|
373
368
|
prerelease: false
|
374
369
|
version_requirements: !ruby/object:Gem::Requirement
|
375
370
|
requirements:
|
376
371
|
- - ">="
|
377
372
|
- !ruby/object:Gem::Version
|
378
|
-
version:
|
379
|
-
-
|
380
|
-
name: sequel
|
381
|
-
requirement: !ruby/object:Gem::Requirement
|
382
|
-
requirements:
|
383
|
-
- - "~>"
|
384
|
-
- !ruby/object:Gem::Version
|
385
|
-
version: 5.88.0
|
386
|
-
type: :development
|
387
|
-
prerelease: false
|
388
|
-
version_requirements: !ruby/object:Gem::Requirement
|
389
|
-
requirements:
|
390
|
-
- - "~>"
|
373
|
+
version: 5.63.0
|
374
|
+
- - "<="
|
391
375
|
- !ruby/object:Gem::Version
|
392
|
-
version: 5.
|
376
|
+
version: 5.90.0
|
393
377
|
description: software to fetch configuration from network devices and store them
|
394
378
|
email:
|
395
379
|
- saku@ytti.fi
|
@@ -401,6 +385,9 @@ extensions: []
|
|
401
385
|
extra_rdoc_files: []
|
402
386
|
files:
|
403
387
|
- ".codeclimate.yml"
|
388
|
+
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
389
|
+
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
390
|
+
- ".github/ISSUE_TEMPLATE/support-request.md"
|
404
391
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
405
392
|
- ".github/dependabot.yml"
|
406
393
|
- ".github/workflows/codeql.yml"
|
@@ -423,6 +410,7 @@ files:
|
|
423
410
|
- docs/Configuration.md
|
424
411
|
- docs/Creating-Models.md
|
425
412
|
- docs/DeviceSimulation.md
|
413
|
+
- docs/Docker.md
|
426
414
|
- docs/Hooks.md
|
427
415
|
- docs/Issues.md
|
428
416
|
- docs/Model-Notes/ADVA.md
|
@@ -432,6 +420,7 @@ files:
|
|
432
420
|
- docs/Model-Notes/Comware.md
|
433
421
|
- docs/Model-Notes/Cumulus.md
|
434
422
|
- docs/Model-Notes/EOS.md
|
423
|
+
- docs/Model-Notes/EatonNetwork.md
|
435
424
|
- docs/Model-Notes/FSOS.md
|
436
425
|
- docs/Model-Notes/FortiOS.md
|
437
426
|
- docs/Model-Notes/HPEAruba.md
|
@@ -459,20 +448,6 @@ files:
|
|
459
448
|
- docs/Sources.md
|
460
449
|
- docs/Supported-OS-Types.md
|
461
450
|
- docs/Troubleshooting.md
|
462
|
-
- examples/podman-compose/Makefile
|
463
|
-
- examples/podman-compose/README.md
|
464
|
-
- examples/podman-compose/docker-compose.yml
|
465
|
-
- examples/podman-compose/gitserver/.gitignore
|
466
|
-
- examples/podman-compose/gitserver/Dockerfile
|
467
|
-
- examples/podman-compose/model-simulation/Dockerfile-model
|
468
|
-
- examples/podman-compose/model-simulation/asternos.sh
|
469
|
-
- examples/podman-compose/oxidized-config/.gitignore
|
470
|
-
- examples/podman-compose/oxidized-config/config
|
471
|
-
- examples/podman-compose/oxidized-config/config_csv-file
|
472
|
-
- examples/podman-compose/oxidized-config/config_csv-gitserver
|
473
|
-
- examples/podman-compose/oxidized-config/router.db
|
474
|
-
- examples/podman-compose/oxidized-ssh/.gitignore
|
475
|
-
- examples/podman-compose/oxidized-ssh/README.md
|
476
451
|
- extra/auto-reload-config.runit
|
477
452
|
- extra/device2yaml.rb
|
478
453
|
- extra/gitdiff-msteams.sh
|
@@ -571,6 +546,7 @@ files:
|
|
571
546
|
- lib/oxidized/model/dlink.rb
|
572
547
|
- lib/oxidized/model/dlinknextgen.rb
|
573
548
|
- lib/oxidized/model/dnos.rb
|
549
|
+
- lib/oxidized/model/eatonnetwork.rb
|
574
550
|
- lib/oxidized/model/eciapollo.rb
|
575
551
|
- lib/oxidized/model/edgecos.rb
|
576
552
|
- lib/oxidized/model/edgeos.rb
|
@@ -605,6 +581,7 @@ files:
|
|
605
581
|
- lib/oxidized/model/hpmsm.rb
|
606
582
|
- lib/oxidized/model/ibos.rb
|
607
583
|
- lib/oxidized/model/icotera.rb
|
584
|
+
- lib/oxidized/model/ingate.rb
|
608
585
|
- lib/oxidized/model/ios.rb
|
609
586
|
- lib/oxidized/model/iosxe.rb
|
610
587
|
- lib/oxidized/model/iosxr.rb
|
@@ -680,6 +657,7 @@ files:
|
|
680
657
|
- lib/oxidized/model/trango.rb
|
681
658
|
- lib/oxidized/model/truenas.rb
|
682
659
|
- lib/oxidized/model/ucs.rb
|
660
|
+
- lib/oxidized/model/unifiap.rb
|
683
661
|
- lib/oxidized/model/uplinkolt.rb
|
684
662
|
- lib/oxidized/model/viptela.rb
|
685
663
|
- lib/oxidized/model/voltaire.rb
|
@@ -1,103 +0,0 @@
|
|
1
|
-
# Make sure these targets always run
|
2
|
-
.PHONY: help rights clean-rights
|
3
|
-
|
4
|
-
help:
|
5
|
-
@: $(info $(HELP))
|
6
|
-
|
7
|
-
rights:
|
8
|
-
podman unshare chown -R 30000:30000 oxidized-config oxidized-ssh
|
9
|
-
podman unshare chown -R 30001 gitserver/repo.git
|
10
|
-
|
11
|
-
clean-rights:
|
12
|
-
podman unshare chown -R 0:0 *
|
13
|
-
|
14
|
-
start: gitserver-createrepo rights images
|
15
|
-
if [ -f oxidized-config/config ]; then \
|
16
|
-
podman-compose -p oxidized up ; \
|
17
|
-
else { \
|
18
|
-
echo "\n########\noxidized-config/config does not exist"; \
|
19
|
-
echo "create one or copy an example in the folder"; \
|
20
|
-
} fi
|
21
|
-
|
22
|
-
run: start
|
23
|
-
|
24
|
-
stop:
|
25
|
-
podman-compose -p oxidized down
|
26
|
-
$(MAKE) clean-rights
|
27
|
-
|
28
|
-
start-local:
|
29
|
-
if [ -f oxidized-config/config.local ]; then \
|
30
|
-
cp oxidized-config/config.local oxidized-config/config; \
|
31
|
-
else \
|
32
|
-
echo "\n########\noxidized-config/config.local does not exist"; \
|
33
|
-
fi
|
34
|
-
$(MAKE) start
|
35
|
-
|
36
|
-
stop-local: stop
|
37
|
-
if [ -f oxidized-config/config.local ]; then \
|
38
|
-
git checkout -- oxidized-config/config; \
|
39
|
-
else \
|
40
|
-
echo "\n########\noxidized-config/config.local does not exist"; \
|
41
|
-
fi
|
42
|
-
|
43
|
-
# creates a container image for the model simulation
|
44
|
-
model-image:
|
45
|
-
podman image exists local/model || \
|
46
|
-
podman build -t local/model -f model-simulation/Dockerfile-model .
|
47
|
-
|
48
|
-
model-clean:
|
49
|
-
podman rmi local/model
|
50
|
-
|
51
|
-
# creates a container image for gitserver
|
52
|
-
gitserver-image:
|
53
|
-
podman image exists local/gitserver || \
|
54
|
-
podman build -t local/gitserver gitserver/
|
55
|
-
|
56
|
-
# create the repo repo.git inside the gitserver mapped volume
|
57
|
-
gitserver-createrepo: clean-rights
|
58
|
-
if [ ! -d gitserver/repo.git ]; then \
|
59
|
-
git init --bare gitserver/repo.git; \
|
60
|
-
fi
|
61
|
-
|
62
|
-
gitserver-clean:
|
63
|
-
podman rmi local/gitserver
|
64
|
-
rm -rf gitserver/repo.git
|
65
|
-
|
66
|
-
gitserver-getkey:
|
67
|
-
podman exec --user oxidized -t oxidized_oxidized_1 sh -c "ssh-keyscan gitserver > /home/oxidized/.ssh/known_hosts"
|
68
|
-
|
69
|
-
# build all helper containter images
|
70
|
-
images: model-image gitserver-image oxidized-image
|
71
|
-
|
72
|
-
# build the oxidized image from the curent repository
|
73
|
-
oxidized-image:
|
74
|
-
podman build -t oxidized:`git describe --tags` -t oxidized:latest ../../
|
75
|
-
|
76
|
-
# removes the oxidized image
|
77
|
-
oxidized-image-clean:
|
78
|
-
podman rmi local/oxidized
|
79
|
-
|
80
|
-
# run evey clean line, even if the previous fails
|
81
|
-
clean:
|
82
|
-
-$(MAKE) stop-local
|
83
|
-
-$(MAKE) model-clean
|
84
|
-
-$(MAKE) gitserver-clean
|
85
|
-
-$(MAKE) oxidized-image-clean
|
86
|
-
|
87
|
-
define HELP
|
88
|
-
make help - This help
|
89
|
-
make rights - Change the rights of mapped folders for the users inside
|
90
|
-
the container
|
91
|
-
make clean-rights - Revert the rights of mapped folders to the local user
|
92
|
-
make start - Start the pod with all containers (alias - make run)
|
93
|
-
You can interrupt with Ctrl-C, but make sure you run
|
94
|
-
'make stop' to realy stop the container
|
95
|
-
make stop - Stop the pod
|
96
|
-
make start-local - Starts the pod with the local configuration
|
97
|
-
oxidized-config/config.local
|
98
|
-
make stop-local - Stops the pod and restores
|
99
|
-
oxidized-config/config from git
|
100
|
-
make gitserver-getkey - stores the public key of the gitserver into
|
101
|
-
oxidized-ssh/known_hosts (the pod must be running)
|
102
|
-
make clean - reverts everything to its original state
|
103
|
-
endef
|