{"record":{"id":"d1c4ef3ddcb6817e","repo":"theforeman/foreman","slug":"unable-to-perform-boot-bmc-operation","errorCode":null,"errorMessage":"Unable to perform boot BMC operation","messagePattern":"Unable to perform boot BMC operation","errorType":"exception","errorClass":"ProxyAPI::ProxyException","httpStatus":null,"severity":"error","filePath":"app/services/proxy_api/bmc.rb","lineNumber":43,"sourceCode":"\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\n          raise NoMethodError\n        end\n      else\n        raise NoMethodError\n      end\n    rescue NoMethodError => e\n      raise e\n    rescue => e\n      raise ProxyException.new(url, e, N_(\"Unable to perform boot BMC operation\"))\n    end\n\n    # Perform a power operation on the bmc device\n    def power(args)\n      # get \"/bmc/:host/chassis/power/:action\"\n      # put \"/bmc/:host/chassis/power/:action\"\n      case args[:action]\n      when \"on?\", \"off?\", \"status\"\n        args[:action].chop! if args[:action].include?('?')\n        full_path_as_hash = bmc_url_for_get('power', args[:action])\n        response = parse(get(full_path_as_hash[:path], query: full_path_as_hash[:query]))\n        response.is_a?(Hash) ? response['result'] : response\n      when \"on\", \"off\", \"cycle\", \"soft\", \"reboot\", \"reset\"\n        res = parse put(with_provider(args), bmc_url_for('power', args[:action]))\n        res && (res['result'] == true || res['result'] == \"#{@target}: ok\\n\")\n      else\n        raise NoMethodError\n      end","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/theforeman/foreman/blob/6b05625475cfe6aac31a88f8c8ee6e62e4efe620/app/services/proxy_api/bmc.rb#L25-L61","documentation":"Error \"Unable to perform boot BMC operation\" thrown in theforeman/foreman.","triggerScenarios":"Thrown at app/services/proxy_api/bmc.rb:43 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"}