-
Notifications
You must be signed in to change notification settings - Fork 30
flush out logical volume support #16
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
Conversation
lib/linux_admin/distro.rb
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this list grows, would it help to alphabetize these, or does it make more sense to keep them in logical groups (i.e. partitioning, mounting, power, volumes, etc.) If logical grouping is better, perhaps comments before each group might help keep the list clear?
@movitto This is still failing on travis, does this pass locally for you? https://travis-ci.org/ManageIQ/linux_admin/builds/9190071 |
Why are there 3 classes (LogicalVolume, PhysicalVolume, VolumeGroup) inside lib/linux_admin/logical_volume.rb? Why not split them out into 3 separate files? |
@chessbyte Oh yeah, I didn't notice that. Totally agree with the one-class-per-file thing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@movitto I just noticed we're subclassing in many places... are we doing that for the methods from Common? If so, can't we just use include/extend to gain that behavior?
Whatever works. Can be easily adjusted in a subsequent formatting patch.
Done
I was passing locally, just forgot to take the different environment on travis into account. Hopefully fixed it in the followup.
Done
Ya we should resolve this once and for all to make it consistent across the board. In general, unless there is reason not too, I prefer including modules as mixins, providing methods on instances w/out disrupting the static class hierarchy. If this sounds reasonable to everyone, it can be implemented in a separate reorg patch. |
The LinuxAdmin::Common was written as subclassing initially because it was complicated to use the mixin when everything was class methods. Now that everything is moving to objects, technically it shouldn't even be a mixin, it should just be another object...in this case, like a utility object. Then when you want to run something you would say something like Common.run or Utils.run or something. |
Rebased |
flush out logical volume support
No description provided.