LinkedInAttic / simoorg

Failure inducer framework
https://github.com/linkedin/simoorg/blob/master/docs/user_guide.md
Apache License 2.0
190 stars 45 forks source link

ShellScriptHandler plugin does not conform to base class interface #7

Open srikanth-viswanathan opened 8 years ago

srikanth-viswanathan commented 8 years ago

The declaration of execute_command in BaseHandler is:

        def execute_command(self):

However, the ShellScriptHandler overrides it as:

    def execute_command(self, script, arguments):

atropos.py also assumes this interface:

        handler_class = getattr(handler_module, handler_name)
        handler = handler_class(self.config_dir, target,
                                self.logger_instance, verbose=True)
        handler.authenticate()
        command_status, command_output, command_error = \
            handler.execute_command(coordinate, arguments)

I think atropos.py is meant to use the base class interface to remove the assumption that every handler has a "coordinate". Let me know if you accept patches and I'll work on this.

MayureshGharat commented 8 years ago

This LGTM. You can sure submit a PR and we can go from there.