Class: HammerCLIKatelloBridge::KatelloCommand
- Inherits:
-
HammerCLI::AbstractCommand
- Object
- HammerCLI::AbstractCommand
- HammerCLIKatelloBridge::KatelloCommand
- Defined in:
- lib/hammer_cli_katello_bridge.rb
Class Attribute Summary collapse
-
.command_prefix ⇒ Object
Returns the value of attribute command_prefix.
Instance Method Summary collapse
Class Attribute Details
.command_prefix ⇒ Object
Returns the value of attribute command_prefix.
12 13 14 |
# File 'lib/hammer_cli_katello_bridge.rb', line 12 def command_prefix @command_prefix end |
Instance Method Details
#execute ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/hammer_cli_katello_bridge.rb', line 17 def execute katello_params = .select { |k,v| k != 'dry_run' } safe_params = katello_params.map do |k,v| if v.is_a?(TrueClass) param = "--#{k}" else param = "--#{k}='%s'" % v.gsub("'","\\\\'") end param end katello [self.class.command_prefix] + safe_params 0 end |