Sha256: a84075068ebc91954e352d8b03f1cbf546f94cbd2070a53d71a199a7466b1233

Contents?: true

Size: 566 Bytes

Versions: 15

Compression:

Stored size: 566 Bytes

Contents

module ForemanDiscovery::NodeAPI
  # legacy /reboot call direct
  class PowerLegacyDirectService < NodeResource
    def initialize(args)
      super args
      raise ArgumentError, "Legacy direct service only supports http scheme" if scheme != 'http'
      raise ArgumentError, "Legacy direct service only supports port 8443" if port != 8443
      Foreman::Deprecation.deprecation_warning("1.11", "Discovery legacy API will be removed, use the new Power API")
    end

    def reboot
      ::ProxyAPI::BMC.new(:url => url).power :action => "cycle"
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
foreman_discovery-9.1.5 app/services/foreman_discovery/node_api/power_legacy_direct_service.rb
foreman_discovery-9.1.4 app/services/foreman_discovery/node_api/power_legacy_direct_service.rb
foreman_discovery-9.1.3 app/services/foreman_discovery/node_api/power_legacy_direct_service.rb
foreman_discovery-9.1.2 app/services/foreman_discovery/node_api/power_legacy_direct_service.rb
foreman_discovery-9.1.1 app/services/foreman_discovery/node_api/power_legacy_direct_service.rb
foreman_discovery-9.1.0 app/services/foreman_discovery/node_api/power_legacy_direct_service.rb
foreman_discovery-9.0.0 app/services/foreman_discovery/node_api/power_legacy_direct_service.rb
foreman_discovery-8.0.1 app/services/foreman_discovery/node_api/power_legacy_direct_service.rb
foreman_discovery-8.0.0 app/services/foreman_discovery/node_api/power_legacy_direct_service.rb
foreman_discovery-7.0.1 app/services/foreman_discovery/node_api/power_legacy_direct_service.rb
foreman_discovery-7.0.0 app/services/foreman_discovery/node_api/power_legacy_direct_service.rb
foreman_discovery-6.0.0 app/services/foreman_discovery/node_api/power_legacy_direct_service.rb
foreman_discovery-5.0.2 app/services/foreman_discovery/node_api/power_legacy_direct_service.rb
foreman_discovery-5.0.1 app/services/foreman_discovery/node_api/power_legacy_direct_service.rb
foreman_discovery-5.0.0 app/services/foreman_discovery/node_api/power_legacy_direct_service.rb