{"record":{"id":"581499fc17fb081b","repo":"theforeman/foreman","slug":"unable-to-get-bmc-providers","errorCode":null,"errorMessage":"Unable to get BMC providers","messagePattern":"Unable to get BMC providers","errorType":"exception","errorClass":"ProxyAPI::ProxyException","httpStatus":null,"severity":"error","filePath":"app/services/proxy_api/bmc.rb","lineNumber":16,"sourceCode":"module ProxyAPI\n  class BMC < ProxyAPI::Resource\n    SUPPORTED_BOOT_DEVICES = %w[disk cdrom pxe bios]\n\n    def initialize(args)\n      @target = args[:host_ip].presence || args[:fqdn].presence || '127.0.0.1'\n      @url = args[:url] + \"/bmc\"\n      @provider = args[:bmc_provider]\n      super args\n    end\n\n    # gets a list of supported providers\n    def providers\n      parse get(\"providers\")\n    rescue => e\n      raise ProxyException.new(url, e, N_(\"Unable to get BMC providers\"))\n    end\n\n    # gets a list of supported providers installed on the proxy\n    def providers_installed\n      parse get(\"providers/installed\")\n    rescue => e\n      raise ProxyException.new(url, e, N_(\"Unable to get installed BMC providers\"))\n    end\n\n    # Perform a boot operation on the bmc device\n    def boot(args)\n      # valid additional arguments args[:reboot] = true|false, args[:persistent] = true|false\n      #  put \"/bmc/:host/chassis/config/?:function?/?:action?\" do\n      case args[:function]\n      when \"bootdevice\"\n        if SUPPORTED_BOOT_DEVICES.include?(args[:device])\n          parse put(with_provider(args), bmc_url_for('config', \"#{args[:function]}/#{args[:device]}\"))\n        else","sourceCodeStart":1,"sourceCodeEnd":34,"githubUrl":"https://github.com/theforeman/foreman/blob/6b05625475cfe6aac31a88f8c8ee6e62e4efe620/app/services/proxy_api/bmc.rb#L1-L34","documentation":"Error \"Unable to get BMC providers\" thrown in theforeman/foreman.","triggerScenarios":"Thrown at app/services/proxy_api/bmc.rb:16 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6b05625475cfe6aac31a88f8c8ee6e62e4efe620","analyzedAt":"2026-08-23T17:46:34.094Z","schemaVersion":2},"datasetVersion":"2026-08-23T21:17:23.414Z"}