-
Notifications
You must be signed in to change notification settings - Fork 99
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
Consolr updates #412
Consolr updates #412
Conversation
LGTM |
4a058fa
to
116406e
Compare
|
||
def verify node | ||
Net::Ping::External.new(node.ipmi.address).ping? | ||
end |
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.
[picky] whitespace
IMO there should be some way to force using a particular runner. |
Very nice. 👍 |
Added support for |
This LGTM |
Can you also add unit tests before merging? |
9ad212a
to
f19d8c8
Compare
In order to support more tools than ipmitool in consolr, I'd like to modularize it a bit. As you can see here, I've moved all the ipmitool-related code in to a class called
Consolr::Runners::Ipmitool
. The command loads one or more runners dynamically from the config, and chooses the first one that reports it can run on a given node (meaning the runner'scan_run?
method returns true).An example use case could be an environment with mixed Openstack VMs and bare metal servers. An openstack runner would then handle all the VM assets and the ipmitool runner all the bare metal assets. This way, you can easily customize consolr to new tools by writing a
Consolr::Runners::Yourtool
class and then installing it in whichever way you prefer.In order to maintain backwards compatibility I've made the ipmitool runner the default if no runners are specified in the config.
Finally, I'm adding an option (
-S
, or--status
) which just returns the power status of the assets because it seemed like something that would be useful :)@tumblr/collins