Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor module #208

Merged
merged 4 commits into from
Aug 24, 2017
Merged

Refactor module #208

merged 4 commits into from
Aug 24, 2017

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Aug 21, 2017

Before the major refactoring commits there are 3 cleanup commits.

  • Add typing to katello::repo so it'll be in line with the other subclasses. Not strictly needed, but doesn't hurt either.
  • Use puppet-qpid 3.0.0 qpid::queue. This leads to easier to read code since it's more concise and automatically adds dependencies behind the scenes.
  • Remove the unused $log_dir variable. Since 3085e0b it's no longer used.

This rewrites large parts of the module. The main goal is to split init.pp into several classes that each describe a part of the stack. This is then composed in init.pp where additional chaining is applied. While it doesn't add parameters to choose the composition, it does open the path to it.

It also relies more on using puppet-foreman. This means $config_dir is removed in favor of $foreman::plugin_config_dir. Additionally it uses Foreman::rake as chaining rather than the internal Execs. Similarly it now notifies the tasks instead of the Service.

All classes use explicit parameters in the local scope and have their own specs.

ekohl added 3 commits August 21, 2017 00:48
This is essentially the same code but more concise.
This variable is unsued since 3085e0b.
This rewrites large parts of the module. The main goal is to split
init.pp into several classes that each describe a part of the stack.
This is then composed in init.pp where additional chaining is applied.
While it doesn't add parameters to choose the composition, it does open
the path to it.

It also relies more on using puppet-foreman. This means $config_dir is
removed in favor of $foreman::plugin_config_dir. Additionally it uses
Foreman::rake as chaining rather than the internal Execs. Similarly it
now notifies the tasks instead of the Service.

All classes use explicit parameters in the local scope and have their
own specs.
@ekohl ekohl force-pushed the split-classes-v4 branch from fc8a2d1 to 6476f28 Compare August 21, 2017 13:07
@ekohl ekohl merged commit 6476f28 into theforeman:master Aug 24, 2017
@ekohl ekohl deleted the split-classes-v4 branch August 24, 2017 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants