{"record":{"id":"1542fbaf159fbc1b","repo":"theforeman/foreman","slug":"parameter-name-is-not-set-in-host-host-enc-o","errorCode":null,"errorMessage":"Parameter %{name} is not set in host %{host} ENC output, resolving failed on step %{step}","messagePattern":"Parameter %(.+?) is not set in host %(.+?) ENC output, resolving failed on step %(.+?)","errorType":"exception","errorClass":"HostENCParamUndefined","httpStatus":null,"severity":"error","filePath":"app/services/foreman/renderer/scope/macros/host_template.rb","lineNumber":27,"sourceCode":"          apipie :class do\n            name 'Host related macros'\n            sections only: %w[all provisioning partition_tables]\n          end\n\n          apipie :method, \"Allows to retrieve parameters from host's ENC\" do\n            list :path, 'List of strings representing path to a parameter to be returned'\n            raises error: HostENCParamUndefined, desc: \"when the parameter is not set in host's ENC output\"\n            returns one_of: [Hash, Object], desc: 'The value of a parameter or a key=value object with all information from ENC'\n            example \"host_enc('parameters', 'enable-puppet7') #=> true\"\n            example 'host_enc #=> {\"parameters\"=>{...}'\n          end\n          def host_enc(*path)\n            check_host\n            return enc if path.compact.empty?\n            path.reduce(enc) do |e, step|\n              e.fetch(step)\n            rescue KeyError\n              raise HostENCParamUndefined.new(name: path, step: step, host: host)\n            end\n          end\n\n          apipie :method, 'Allows to retrieve a parameter set on host' do\n            required :param_name, String, desc: 'name of the parameter'\n            optional :default, Object, desc: 'value to be returned if the parameter is not set on host'\n            returns Object, desc: 'Host parameter or default value'\n            example \"host_param('systemLocale') #=> 'en-US'\"\n            example \"host_param('partitioning-method', 'regular') #=> 'regular'\"\n          end\n          def host_param(param_name, default = nil)\n            check_host\n            host.host_param(param_name) || default\n          end\n\n          apipie :method, 'Allows to retrieve a parameter set on host' do\n            required :param_name, String, desc: 'name of the parameter'\n            raises error: HostParamUndefined, desc: 'when the parameter with provided name does not exist'","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/theforeman/foreman/blob/6b05625475cfe6aac31a88f8c8ee6e62e4efe620/app/services/foreman/renderer/scope/macros/host_template.rb#L9-L45","documentation":"Error \"Parameter %{name} is not set in host %{host} ENC output, resolving failed on step %{step}\" thrown in theforeman/foreman.","triggerScenarios":"Thrown at app/services/foreman/renderer/scope/macros/host_template.rb:27 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"}