oxidized 0.32.1 → 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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +42 -0
  3. data/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
  4. data/.github/ISSUE_TEMPLATE/support-request.md +36 -0
  5. data/.github/workflows/publishdocker.yml +35 -16
  6. data/.gitignore +1 -0
  7. data/.rubocop.yml +0 -2
  8. data/.rubocop_todo.yml +5 -31
  9. data/CHANGELOG.md +54 -2
  10. data/CONTRIBUTING.md +10 -7
  11. data/Dockerfile +37 -64
  12. data/README.md +4 -95
  13. data/Rakefile +8 -9
  14. data/docs/Configuration.md +139 -27
  15. data/docs/Docker.md +240 -0
  16. data/docs/Issues.md +17 -0
  17. data/docs/Model-Notes/EatonNetwork.md +18 -0
  18. data/docs/Model-Notes/HPEAruba.md +3 -2
  19. data/docs/Release.md +5 -3
  20. data/docs/Supported-OS-Types.md +3 -0
  21. data/docs/Troubleshooting.md +6 -1
  22. data/extra/rest_client.rb +1 -1
  23. data/lib/oxidized/config/vars.rb +18 -14
  24. data/lib/oxidized/config.rb +3 -1
  25. data/lib/oxidized/core.rb +26 -5
  26. data/lib/oxidized/input/http.rb +1 -1
  27. data/lib/oxidized/model/aos7.rb +3 -0
  28. data/lib/oxidized/model/eatonnetwork.rb +65 -0
  29. data/lib/oxidized/model/fortios.rb +3 -3
  30. data/lib/oxidized/model/ingate.rb +47 -0
  31. data/lib/oxidized/model/ios.rb +1 -0
  32. data/lib/oxidized/model/netgear.rb +6 -0
  33. data/lib/oxidized/model/powerconnect.rb +31 -10
  34. data/lib/oxidized/model/srosmd.rb +1 -1
  35. data/lib/oxidized/model/unifiap.rb +142 -0
  36. data/lib/oxidized/output/git.rb +82 -32
  37. data/lib/oxidized/output/gitcrypt.rb +3 -0
  38. data/lib/oxidized/version.rb +6 -4
  39. data/lib/oxidized/worker.rb +2 -5
  40. data/lib/refinements.rb +2 -0
  41. data/oxidized.gemspec +5 -6
  42. metadata +30 -30
  43. data/examples/podman-compose/Makefile +0 -103
  44. data/examples/podman-compose/README.md +0 -94
  45. data/examples/podman-compose/docker-compose.yml +0 -30
  46. data/examples/podman-compose/gitserver/.gitignore +0 -1
  47. data/examples/podman-compose/gitserver/Dockerfile +0 -14
  48. data/examples/podman-compose/model-simulation/Dockerfile-model +0 -13
  49. data/examples/podman-compose/model-simulation/asternos.sh +0 -36
  50. data/examples/podman-compose/oxidized-config/.gitignore +0 -10
  51. data/examples/podman-compose/oxidized-config/config +0 -46
  52. data/examples/podman-compose/oxidized-config/config_csv-file +0 -46
  53. data/examples/podman-compose/oxidized-config/config_csv-gitserver +0 -56
  54. data/examples/podman-compose/oxidized-config/router.db +0 -1
  55. data/examples/podman-compose/oxidized-ssh/.gitignore +0 -1
  56. data/examples/podman-compose/oxidized-ssh/README.md +0 -14
@@ -1,6 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Oxidized
2
- VERSION = '0.32.1'.freeze
3
- VERSION_FULL = '0.32.1'.freeze
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[1] = " VERSION = '%s'.freeze\n" % VERSION
16
- file[2] = " VERSION_FULL = '%s'.freeze\n" % VERSION_FULL
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
@@ -101,11 +101,8 @@ module Oxidized
101
101
  end
102
102
 
103
103
  def cycle_finished?
104
- if @jobs_done > @nodes.count
105
- true
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'
@@ -46,18 +45,18 @@ Gem::Specification.new do |s|
46
45
  s.add_dependency 'slop', '~> 4.6'
47
46
 
48
47
  s.add_development_dependency 'bundler', '~> 2.2'
49
- s.add_development_dependency 'git', '~> 2'
48
+ s.add_development_dependency 'git', '>= 2.0', '<=3.0'
50
49
  s.add_development_dependency 'minitest', '~> 5.25.4'
51
50
  s.add_development_dependency 'mocha', '~> 2.1'
52
51
  s.add_development_dependency 'pry', '~> 0.15.0'
53
52
  s.add_development_dependency 'rake', '~> 13.0'
54
- s.add_development_dependency 'rubocop', '~> 1.72.0'
53
+ s.add_development_dependency 'rubocop', '~> 1.74.0'
55
54
  s.add_development_dependency 'rubocop-minitest', '~> 0.37.0'
56
55
  s.add_development_dependency 'rubocop-rake', '~> 0.7.0'
57
- s.add_development_dependency 'rubocop-sequel', '~> 0.3.3'
56
+ s.add_development_dependency 'rubocop-sequel', '~> 0.4.0'
58
57
  s.add_development_dependency 'simplecov', '~> 0.22.0'
59
58
 
60
59
  # Dependencies on optional libraries, used for unit tests & development
61
- s.add_development_dependency 'oxidized-web', '>= 0.15.0'
62
- s.add_development_dependency 'sequel', '>= 5.63.0', '<= 5.89.0'
60
+ s.add_development_dependency 'oxidized-web', '~> 0.16'
61
+ s.add_development_dependency 'sequel', '>= 5.63.0', '<= 5.90.0'
63
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.32.1
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-02-20 00:00:00.000000000 Z
13
+ date: 2025-03-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: asetus
@@ -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: '2'
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
+ - - ">="
212
+ - !ruby/object:Gem::Version
213
+ version: '2.0'
214
+ - - "<="
209
215
  - !ruby/object:Gem::Version
210
- version: '2'
216
+ version: '3.0'
211
217
  - !ruby/object:Gem::Dependency
212
218
  name: minitest
213
219
  requirement: !ruby/object:Gem::Requirement
@@ -270,14 +276,14 @@ dependencies:
270
276
  requirements:
271
277
  - - "~>"
272
278
  - !ruby/object:Gem::Version
273
- version: 1.72.0
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.72.0
286
+ version: 1.74.0
281
287
  - !ruby/object:Gem::Dependency
282
288
  name: rubocop-minitest
283
289
  requirement: !ruby/object:Gem::Requirement
@@ -312,14 +318,14 @@ dependencies:
312
318
  requirements:
313
319
  - - "~>"
314
320
  - !ruby/object:Gem::Version
315
- version: 0.3.3
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.3.3
328
+ version: 0.4.0
323
329
  - !ruby/object:Gem::Dependency
324
330
  name: simplecov
325
331
  requirement: !ruby/object:Gem::Requirement
@@ -338,16 +344,16 @@ dependencies:
338
344
  name: oxidized-web
339
345
  requirement: !ruby/object:Gem::Requirement
340
346
  requirements:
341
- - - ">="
347
+ - - "~>"
342
348
  - !ruby/object:Gem::Version
343
- version: 0.15.0
349
+ version: '0.16'
344
350
  type: :development
345
351
  prerelease: false
346
352
  version_requirements: !ruby/object:Gem::Requirement
347
353
  requirements:
348
- - - ">="
354
+ - - "~>"
349
355
  - !ruby/object:Gem::Version
350
- version: 0.15.0
356
+ version: '0.16'
351
357
  - !ruby/object:Gem::Dependency
352
358
  name: sequel
353
359
  requirement: !ruby/object:Gem::Requirement
@@ -357,7 +363,7 @@ dependencies:
357
363
  version: 5.63.0
358
364
  - - "<="
359
365
  - !ruby/object:Gem::Version
360
- version: 5.89.0
366
+ version: 5.90.0
361
367
  type: :development
362
368
  prerelease: false
363
369
  version_requirements: !ruby/object:Gem::Requirement
@@ -367,7 +373,7 @@ dependencies:
367
373
  version: 5.63.0
368
374
  - - "<="
369
375
  - !ruby/object:Gem::Version
370
- version: 5.89.0
376
+ version: 5.90.0
371
377
  description: software to fetch configuration from network devices and store them
372
378
  email:
373
379
  - saku@ytti.fi
@@ -379,6 +385,9 @@ extensions: []
379
385
  extra_rdoc_files: []
380
386
  files:
381
387
  - ".codeclimate.yml"
388
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
389
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
390
+ - ".github/ISSUE_TEMPLATE/support-request.md"
382
391
  - ".github/PULL_REQUEST_TEMPLATE.md"
383
392
  - ".github/dependabot.yml"
384
393
  - ".github/workflows/codeql.yml"
@@ -401,6 +410,7 @@ files:
401
410
  - docs/Configuration.md
402
411
  - docs/Creating-Models.md
403
412
  - docs/DeviceSimulation.md
413
+ - docs/Docker.md
404
414
  - docs/Hooks.md
405
415
  - docs/Issues.md
406
416
  - docs/Model-Notes/ADVA.md
@@ -410,6 +420,7 @@ files:
410
420
  - docs/Model-Notes/Comware.md
411
421
  - docs/Model-Notes/Cumulus.md
412
422
  - docs/Model-Notes/EOS.md
423
+ - docs/Model-Notes/EatonNetwork.md
413
424
  - docs/Model-Notes/FSOS.md
414
425
  - docs/Model-Notes/FortiOS.md
415
426
  - docs/Model-Notes/HPEAruba.md
@@ -437,20 +448,6 @@ files:
437
448
  - docs/Sources.md
438
449
  - docs/Supported-OS-Types.md
439
450
  - docs/Troubleshooting.md
440
- - examples/podman-compose/Makefile
441
- - examples/podman-compose/README.md
442
- - examples/podman-compose/docker-compose.yml
443
- - examples/podman-compose/gitserver/.gitignore
444
- - examples/podman-compose/gitserver/Dockerfile
445
- - examples/podman-compose/model-simulation/Dockerfile-model
446
- - examples/podman-compose/model-simulation/asternos.sh
447
- - examples/podman-compose/oxidized-config/.gitignore
448
- - examples/podman-compose/oxidized-config/config
449
- - examples/podman-compose/oxidized-config/config_csv-file
450
- - examples/podman-compose/oxidized-config/config_csv-gitserver
451
- - examples/podman-compose/oxidized-config/router.db
452
- - examples/podman-compose/oxidized-ssh/.gitignore
453
- - examples/podman-compose/oxidized-ssh/README.md
454
451
  - extra/auto-reload-config.runit
455
452
  - extra/device2yaml.rb
456
453
  - extra/gitdiff-msteams.sh
@@ -549,6 +546,7 @@ files:
549
546
  - lib/oxidized/model/dlink.rb
550
547
  - lib/oxidized/model/dlinknextgen.rb
551
548
  - lib/oxidized/model/dnos.rb
549
+ - lib/oxidized/model/eatonnetwork.rb
552
550
  - lib/oxidized/model/eciapollo.rb
553
551
  - lib/oxidized/model/edgecos.rb
554
552
  - lib/oxidized/model/edgeos.rb
@@ -583,6 +581,7 @@ files:
583
581
  - lib/oxidized/model/hpmsm.rb
584
582
  - lib/oxidized/model/ibos.rb
585
583
  - lib/oxidized/model/icotera.rb
584
+ - lib/oxidized/model/ingate.rb
586
585
  - lib/oxidized/model/ios.rb
587
586
  - lib/oxidized/model/iosxe.rb
588
587
  - lib/oxidized/model/iosxr.rb
@@ -658,6 +657,7 @@ files:
658
657
  - lib/oxidized/model/trango.rb
659
658
  - lib/oxidized/model/truenas.rb
660
659
  - lib/oxidized/model/ucs.rb
660
+ - lib/oxidized/model/unifiap.rb
661
661
  - lib/oxidized/model/uplinkolt.rb
662
662
  - lib/oxidized/model/viptela.rb
663
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
@@ -1,94 +0,0 @@
1
- # Running Oxidized with podman-compose
2
- This example demonstrates running Oxidized within an OCI container using
3
- podman-compose. It’s actively used in Oxidized development to validate the
4
- container’s functionality and to simulate potential issues.
5
-
6
- While this example uses podman and podman-compose, it should also be compatible
7
- with docker, as podman supports docker’s CLI.
8
-
9
- To make this example work seamlessly, a simulated network device is included.
10
- The asternos model is used here for simplicity, as it requires minimal commands
11
- to implement. The simulated output doesn’t replicate real device responses but
12
- provides changing lines over time to test Oxidized’s functionality.
13
-
14
-
15
- The example also provides a Git server to test the interaction with it.
16
-
17
- # Run the example
18
- > :warning: the example builds local containers and will require at least 2 GB
19
- > of disk space along with some CPU and time during the first run.
20
-
21
- To start the example, simply run `make start`. Ensure you have installed the
22
- necessary [dependencies](#dependencies) before.
23
-
24
- To stop, press `CTRL-C` or run `make stop` in a separate shell. If you exit
25
- with `CTRL-C`, make sure to run `make stop` afterward to properly clean up the
26
- environment.
27
-
28
- ## Running Environment
29
- This example of oxidized with podman-compose is running on Debian
30
- Bookworm (Version 12). It should work with few adaptations on any Linux
31
- box running podman, and maybe also with docker.
32
-
33
- ## Dependencies
34
- To get started, install the required packages on your Debian system:
35
- ```shell
36
- sudo apt install podman containers-storage podman-compose make
37
- ```
38
-
39
- Ensure Podman is using the overlay driver for image storage.
40
- Without this driver, Podman may save every container layer separately rather
41
- than only the changes, which can quickly consume disk space.
42
-
43
- This issue can occur if podman was run before installing the
44
- `container-storage` package.
45
-
46
- ```shell
47
- podman info | grep graphDriverName
48
- ```
49
-
50
- You should get this reply
51
- ```shell
52
- graphDriverName: overlay
53
- ```
54
-
55
- If not, the quick way I found to solve it is to delete `~/.local/share/containers/`.
56
- Beware - this will delete **all** your containers!
57
-
58
- ## Adapting to your needs
59
- Feel free to customize this setup as you wish! You may want to edit
60
- `docker-compose.yml` to remove any containers simulating specific components.
61
-
62
- ## Use your own oxidized configuration in the git repository
63
- When developing oxidized or testing the container, you may want to use a custom
64
- configuration. This can be done by saving it under `oxidized-config/config.local`
65
-
66
- `make start-local` will recognize the local configuration and copy it to
67
- `oxidized-config/config` before starting the container.
68
-
69
- You should stop the container with `make stop-local` in order to restore the
70
- original configuration from the git repository.
71
-
72
- In the folder `oxidized-config/, you will also find some example configs,
73
- for example `config_csv-gitserver`. To use them, just copy the file to `config`.
74
-
75
- ## Git server public keys
76
- To enable Oxidized to access the Git server, you'll need to retrieve the
77
- servers' public SSH keys and store them under `oxidized-ssh/known_hosts`.
78
- Without this, you will encounter the following error:
79
-
80
- ```
81
- ERROR -- : Hook push_to_remote (#<GithubRepo:0x00007f4cff47d918>) failed (#<Rugged::SshError: invalid or unknown remote ssh hostkey>) for event :post_store
82
- ```
83
-
84
- While the container environment is running (`make start`), open a separate shell
85
- and run:
86
- ```
87
- make gitserver-getkey
88
- ```
89
-
90
- You do not need to restart the container environment; Oxidized will
91
- automatically use the key the next time it pushes to the remote Git repository.
92
-
93
-
94
-
@@ -1,30 +0,0 @@
1
- services:
2
- oxidized:
3
- # Choose the image that you want to test
4
- # image: docker.io/oxidized/oxidized:0.30.1
5
- # image: docker.io/oxidized/oxidized:latest
6
- # local/oxidized is build by "make oxidized-image" and "make run"
7
- image: local/oxidized
8
- ports:
9
- - 127.0.0.1:8042:8888/tcp
10
- environment:
11
- # Reload hosts list once per day
12
- CONFIG_RELOAD_INTERVAL: 86400
13
- # Needed when you push to a remote git repository
14
- OXIDIZED_SSH_PASSPHRASE: xxxxPassphasexxxx
15
- volumes:
16
- - ./oxidized-config:/home/oxidized/.config/oxidized
17
- - ./oxidized-ssh:/home/oxidized/.ssh
18
-
19
- # This is a simulated network device for the example to work out of the box
20
- asternos-device:
21
- image: localhost/local/model
22
- volumes:
23
- - ./model-simulation/asternos.sh:/home/oxidized/.profile
24
- - ./model-simulation/asternos.sh:/home/admin/.profile
25
-
26
- # This is a gitserver to push our configs
27
- gitserver:
28
- image: localhost/local/gitserver
29
- volumes:
30
- - ./gitserver/repo.git:/home/git/repo.git
@@ -1 +0,0 @@
1
- repo.git
@@ -1,14 +0,0 @@
1
- FROM docker.io/phusion/baseimage:noble-1.0.0
2
-
3
- # Use baseimage-docker's init system.
4
- CMD ["/sbin/my_init"]
5
-
6
- # enable ssh
7
- RUN rm -f /etc/service/sshd/down
8
- RUN /etc/my_init.d/00_regen_ssh_host_keys.sh
9
-
10
- # Add user for the gitserver. The password is "git"
11
- RUN useradd -m git -p '$6$32WDb0LTFyQkLffy$u15COVx7CQ4tgp4JT4DO4LJ96q/jwFSpuZC3WrllNQDNa6nW1LhJKW9rLV57ak3rj9Ln./aRA85jzeof1B0Gi1' -s /bin/bash -u 30001
12
-
13
- # And install git
14
- RUN install_clean git
@@ -1,13 +0,0 @@
1
- FROM docker.io/phusion/baseimage:noble-1.0.0
2
-
3
- # Use baseimage-docker's init system.
4
- CMD ["/sbin/my_init"]
5
-
6
- # enable ssh
7
- RUN rm -f /etc/service/sshd/down
8
- RUN /etc/my_init.d/00_regen_ssh_host_keys.sh
9
-
10
- # Add users to login. The password is "oxidized"
11
- RUN useradd -m oxidized -p '$y$j9T$UoDYxDiE.8iBGmoaD/acn1$kVvYvoEIJdKUmIKFVBRYKLIVzmEBP1RKrCM6Vfx.V55' -s /bin/bash
12
- RUN useradd -m admin -p '$y$j9T$UoDYxDiE.8iBGmoaD/acn1$kVvYvoEIJdKUmIKFVBRYKLIVzmEBP1RKrCM6Vfx.V55' -s /bin/bash
13
-
@@ -1,36 +0,0 @@
1
- # if running bash
2
- if [ -n "$BASH_VERSION" ]; then
3
- # include .bashrc if it exists
4
- if [ -f "$HOME/.bashrc" ]; then
5
- . "$HOME/.bashrc"
6
- fi
7
- fi
8
-
9
- # Display a MOTD
10
- cat << EOF
11
- This is the welcome message of this device
12
- it is muliline
13
- End of the MOTD
14
- EOF
15
-
16
- function show() {
17
- if [ "$*" == "version" ]; then
18
- echo "Version 1.2.3"
19
- # Make the output change over time
20
- date
21
- elif [ "$*" == "runningconfiguration all" ]; then
22
- cat << EOF
23
- ! begin of the configuration
24
- ! this is the running config
25
- !
26
- I have no idea how a configuration in asternos looks like ;-)
27
- !
28
- ! End of the Configuration
29
- EOF
30
- else
31
- echo "command 'show $*' not implemented"
32
- fi
33
- }
34
-
35
- PS1="asternos$"
36
-
@@ -1,10 +0,0 @@
1
- # Ignore local configurations, which will override the git config
2
- config.local
3
- router.db.local
4
-
5
- # Ignore logs, retrieved configs...
6
- pid
7
- configs/
8
- crash
9
- logs/
10
- oxidized.git/
@@ -1,46 +0,0 @@
1
- ---
2
- username: oxidized
3
- password: oxidized
4
- resolve_dns: true
5
- interval: 3600
6
- use_syslog: false
7
- debug: false
8
- threads: 30
9
- use_max_threads: true
10
- timeout: 20
11
- retries: 3
12
- prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
13
- rest: 0.0.0.0:8888
14
- next_adds_job: false
15
- vars: {}
16
- groups: {}
17
- group_map: {}
18
- models: {}
19
- pid: "~/.config/oxidized/pid"
20
- crash:
21
- directory: "~/.config/oxidized/crashes"
22
- hostnames: false
23
- stats:
24
- history_size: 10
25
- input:
26
- default: ssh
27
- debug: false
28
- ssh:
29
- secure: false
30
- ftp:
31
- passive: true
32
- utf8_encoded: true
33
- output:
34
- default: file
35
- file:
36
- directory: "~/.config/oxidized/configs/"
37
- source:
38
- default: csv
39
- csv:
40
- file: "~/.config/oxidized/router.db"
41
- delimiter: !ruby/regexp /:/
42
- map:
43
- name: 0
44
- model: 1
45
- ip: 2
46
- gpg: false
@@ -1,46 +0,0 @@
1
- ---
2
- username: oxidized
3
- password: oxidized
4
- resolve_dns: true
5
- interval: 3600
6
- use_syslog: false
7
- debug: false
8
- threads: 30
9
- use_max_threads: true
10
- timeout: 20
11
- retries: 3
12
- prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
13
- rest: 0.0.0.0:8888
14
- next_adds_job: false
15
- vars: {}
16
- groups: {}
17
- group_map: {}
18
- models: {}
19
- pid: "~/.config/oxidized/pid"
20
- crash:
21
- directory: "~/.config/oxidized/crashes"
22
- hostnames: false
23
- stats:
24
- history_size: 10
25
- input:
26
- default: ssh
27
- debug: false
28
- ssh:
29
- secure: false
30
- ftp:
31
- passive: true
32
- utf8_encoded: true
33
- output:
34
- default: file
35
- file:
36
- directory: "~/.config/oxidized/configs/"
37
- source:
38
- default: csv
39
- csv:
40
- file: "~/.config/oxidized/router.db"
41
- delimiter: !ruby/regexp /:/
42
- map:
43
- name: 0
44
- model: 1
45
- ip: 2
46
- gpg: false