ytti/oxidized · error · Oxidized::OxidizedError
Could not generate PanOS API key: #{msg}
Error message
Could not generate PanOS API key: #{msg} What it means
Error "Could not generate PanOS API key: #{msg}" thrown in ytti/oxidized.
Source
Thrown at lib/oxidized/model/panos_api.rb:39
# Callback function for getting the configuration file.
cfg_cb = lambda do
url_param = URI.encode_www_form(
user: @node.auth[:username],
password: @node.auth[:password],
type: 'keygen'
)
kg_r = get_http "/api?#{url_param}"
# Parse the XML API response for the keygen request.
kg_x = Nokogiri::XML(kg_r)
# Check if keygen was successful. If not we'll throw an error.
status = kg_x.xpath('//response/@status').first
if status.to_s != 'success'
msg = kg_x.xpath('//response/result/msg').text
raise Oxidized::OxidizedError, "Could not generate PanOS API key: #{msg}"
end
# If we reach here, keygen was successful, so get the API key
# out of the keygen XML response.
apikey = kg_x.xpath('//response/result/key').text.to_s
# Now that we have the API key, we can request a configuration
# export.
url_param = URI.encode_www_form(
key: apikey,
category: 'configuration',
type: 'export'
)
cfg = get_http "/api?#{url_param}"
# The configuration export is in XML format. Unfortunately,
# it's just one long line of XML that's not especially humanView on GitHub (pinned to 687ed4262d)
When it happens
Trigger: Thrown at lib/oxidized/model/panos_api.rb:39 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ytti/oxidized@687ed4262d (2026-08-23).
Data as JSON: /api/errors/d0b2a5387e10394a.
Report an issue: GitHub.