Skip to content

Commit

Permalink
Merge pull request #5 from cobbler/remove-subcomponent
Browse files Browse the repository at this point in the history
fix: remove unused subcomponent
  • Loading branch information
SchoolGuy authored Nov 17, 2023
2 parents 99efd25 + 7e18551 commit 30084fc
Show file tree
Hide file tree
Showing 42 changed files with 1 addition and 236 deletions.
1 change: 0 additions & 1 deletion cobbler/clean.sls
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# vim: ft=sls

include:
- .subcomponent.clean
- .service.clean
- .config.clean
- .package.clean
1 change: 0 additions & 1 deletion cobbler/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ include:
- .package
- .config
- .service
- .subcomponent
2 changes: 0 additions & 2 deletions cobbler/parameters/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ values:
config: '/etc/cobbler'
service:
name: cobbler
subcomponent:
config: '/etc/cobbler-subcomponent-formula.conf'
# Just here for testing
added_in_defaults: defaults_value
winner: defaults
Expand Down
5 changes: 0 additions & 5 deletions cobbler/subcomponent/clean.sls

This file was deleted.

16 changes: 0 additions & 16 deletions cobbler/subcomponent/config/clean.sls

This file was deleted.

27 changes: 0 additions & 27 deletions cobbler/subcomponent/config/file.sls

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions cobbler/subcomponent/config/init.sls

This file was deleted.

5 changes: 0 additions & 5 deletions cobbler/subcomponent/init.sls

This file was deleted.

22 changes: 0 additions & 22 deletions docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,28 +129,6 @@ dependency on ``cobbler.service.clean`` via include list.
This state will remove the cobbler package and has a depency on
``cobbler.config.clean`` via include list.

``cobbler.subcomponent``
^^^^^^^^^^^^^^^^^^^^^^^^

*Meta-state (This is a state that includes other states)*.

This state installs a subcomponent configuration file before
configuring and starting the cobbler service.

``cobbler.subcomponent.config``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This state will configure the cobbler subcomponent and has a
dependency on ``cobbler.config`` via include list.

``cobbler.subcomponent.config.clean``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This state will remove the configuration of the cobbler subcomponent
and reload the cobbler service by a dependency on
``cobbler.service.running`` via include list and ``watch_in``
requisite.

Testing
-------

Expand Down
4 changes: 1 addition & 3 deletions test/integration/default/controls/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
should include(
'"tofs": {"files_switch": ["any/path/can/be/used/here", "id", '\
'"roles", "osfinger", "os", "os_family"], "source_files": '\
'{"cobbler-config-file-file-managed": ["example.tmpl.jinja"], '\
'"cobbler-subcomponent-config-file-file-managed": '\
'["subcomponent-example.tmpl.jinja"]}'
'{"cobbler-config-file-file-managed": ["example.tmpl.jinja"]}}'
)
# rubocop:enable Layout/LineLength
# rubocop:enable Lint/RedundantCopDisableDirective
Expand Down
25 changes: 0 additions & 25 deletions test/integration/default/controls/subcomponent_config.rb

This file was deleted.

4 changes: 0 additions & 4 deletions test/integration/default/files/_mapdata/almalinux-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ values:
rootgroup: root
service:
name: systemd-journald
subcomponent:
config: /etc/cobbler-subcomponent-formula.conf
tofs:
files_switch:
- any/path/can/be/used/here
Expand All @@ -39,6 +37,4 @@ values:
source_files:
cobbler-config-file-file-managed:
- example.tmpl.jinja
cobbler-subcomponent-config-file-file-managed:
- subcomponent-example.tmpl.jinja
winner: pillar
4 changes: 0 additions & 4 deletions test/integration/default/files/_mapdata/amazonlinux-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ values:
rootgroup: root
service:
name: crond
subcomponent:
config: /etc/cobbler-subcomponent-formula.conf
tofs:
files_switch:
- any/path/can/be/used/here
Expand All @@ -39,6 +37,4 @@ values:
source_files:
cobbler-config-file-file-managed:
- example.tmpl.jinja
cobbler-subcomponent-config-file-file-managed:
- subcomponent-example.tmpl.jinja
winner: pillar
4 changes: 0 additions & 4 deletions test/integration/default/files/_mapdata/amazonlinux-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ values:
rootgroup: root
service:
name: systemd-journald
subcomponent:
config: /etc/cobbler-subcomponent-formula.conf
tofs:
files_switch:
- any/path/can/be/used/here
Expand All @@ -39,6 +37,4 @@ values:
source_files:
cobbler-config-file-file-managed:
- example.tmpl.jinja
cobbler-subcomponent-config-file-file-managed:
- subcomponent-example.tmpl.jinja
winner: pillar
4 changes: 0 additions & 4 deletions test/integration/default/files/_mapdata/arch-base-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ values:
rootgroup: root
service:
name: systemd-journald
subcomponent:
config: /etc/cobbler-subcomponent-formula.conf
tofs:
files_switch:
- any/path/can/be/used/here
Expand All @@ -39,6 +37,4 @@ values:
source_files:
cobbler-config-file-file-managed:
- example.tmpl.jinja
cobbler-subcomponent-config-file-file-managed:
- subcomponent-example.tmpl.jinja
winner: pillar
4 changes: 0 additions & 4 deletions test/integration/default/files/_mapdata/centos-6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ values:
rootgroup: root
service:
name: crond
subcomponent:
config: /etc/cobbler-subcomponent-formula.conf
tofs:
files_switch:
- any/path/can/be/used/here
Expand All @@ -39,6 +37,4 @@ values:
source_files:
cobbler-config-file-file-managed:
- example.tmpl.jinja
cobbler-subcomponent-config-file-file-managed:
- subcomponent-example.tmpl.jinja
winner: pillar
4 changes: 0 additions & 4 deletions test/integration/default/files/_mapdata/centos-7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ values:
rootgroup: root
service:
name: systemd-journald
subcomponent:
config: /etc/cobbler-subcomponent-formula.conf
tofs:
files_switch:
- any/path/can/be/used/here
Expand All @@ -39,6 +37,4 @@ values:
source_files:
cobbler-config-file-file-managed:
- example.tmpl.jinja
cobbler-subcomponent-config-file-file-managed:
- subcomponent-example.tmpl.jinja
winner: pillar
4 changes: 0 additions & 4 deletions test/integration/default/files/_mapdata/centos-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ values:
rootgroup: root
service:
name: systemd-journald
subcomponent:
config: /etc/cobbler-subcomponent-formula.conf
tofs:
files_switch:
- any/path/can/be/used/here
Expand All @@ -39,6 +37,4 @@ values:
source_files:
cobbler-config-file-file-managed:
- example.tmpl.jinja
cobbler-subcomponent-config-file-file-managed:
- subcomponent-example.tmpl.jinja
winner: pillar
4 changes: 0 additions & 4 deletions test/integration/default/files/_mapdata/debian-10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ values:
rootgroup: root
service:
name: systemd-journald
subcomponent:
config: /etc/cobbler-subcomponent-formula.conf
tofs:
files_switch:
- any/path/can/be/used/here
Expand All @@ -39,6 +37,4 @@ values:
source_files:
cobbler-config-file-file-managed:
- example.tmpl.jinja
cobbler-subcomponent-config-file-file-managed:
- subcomponent-example.tmpl.jinja
winner: pillar
4 changes: 0 additions & 4 deletions test/integration/default/files/_mapdata/debian-11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ values:
rootgroup: root
service:
name: systemd-journald
subcomponent:
config: /etc/cobbler-subcomponent-formula.conf
tofs:
files_switch:
- any/path/can/be/used/here
Expand All @@ -39,6 +37,4 @@ values:
source_files:
cobbler-config-file-file-managed:
- example.tmpl.jinja
cobbler-subcomponent-config-file-file-managed:
- subcomponent-example.tmpl.jinja
winner: pillar
4 changes: 0 additions & 4 deletions test/integration/default/files/_mapdata/debian-9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ values:
rootgroup: root
service:
name: systemd-journald
subcomponent:
config: /etc/cobbler-subcomponent-formula.conf
tofs:
files_switch:
- any/path/can/be/used/here
Expand All @@ -39,6 +37,4 @@ values:
source_files:
cobbler-config-file-file-managed:
- example.tmpl.jinja
cobbler-subcomponent-config-file-file-managed:
- subcomponent-example.tmpl.jinja
winner: pillar
4 changes: 0 additions & 4 deletions test/integration/default/files/_mapdata/fedora-31.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ values:
rootgroup: root
service:
name: systemd-journald
subcomponent:
config: /etc/cobbler-subcomponent-formula.conf
tofs:
files_switch:
- any/path/can/be/used/here
Expand All @@ -39,6 +37,4 @@ values:
source_files:
cobbler-config-file-file-managed:
- example.tmpl.jinja
cobbler-subcomponent-config-file-file-managed:
- subcomponent-example.tmpl.jinja
winner: pillar
4 changes: 0 additions & 4 deletions test/integration/default/files/_mapdata/fedora-32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ values:
rootgroup: root
service:
name: systemd-journald
subcomponent:
config: /etc/cobbler-subcomponent-formula.conf
tofs:
files_switch:
- any/path/can/be/used/here
Expand All @@ -39,6 +37,4 @@ values:
source_files:
cobbler-config-file-file-managed:
- example.tmpl.jinja
cobbler-subcomponent-config-file-file-managed:
- subcomponent-example.tmpl.jinja
winner: pillar
4 changes: 0 additions & 4 deletions test/integration/default/files/_mapdata/fedora-33.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ values:
rootgroup: root
service:
name: systemd-journald
subcomponent:
config: /etc/cobbler-subcomponent-formula.conf
tofs:
files_switch:
- any/path/can/be/used/here
Expand All @@ -39,6 +37,4 @@ values:
source_files:
cobbler-config-file-file-managed:
- example.tmpl.jinja
cobbler-subcomponent-config-file-file-managed:
- subcomponent-example.tmpl.jinja
winner: pillar
4 changes: 0 additions & 4 deletions test/integration/default/files/_mapdata/fedora-34.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ values:
rootgroup: root
service:
name: systemd-journald
subcomponent:
config: /etc/cobbler-subcomponent-formula.conf
tofs:
files_switch:
- any/path/can/be/used/here
Expand All @@ -39,6 +37,4 @@ values:
source_files:
cobbler-config-file-file-managed:
- example.tmpl.jinja
cobbler-subcomponent-config-file-file-managed:
- subcomponent-example.tmpl.jinja
winner: pillar
Loading

0 comments on commit 30084fc

Please sign in to comment.