Error: "Invalid Syntax" when loading partial config in Panorama
15496
Created On 12/02/19 17:43 PM - Last Modified 07/03/20 02:19 AM
Symptom
Getting "Invalid Syntax" error when loading partial config with a device group name which includes spaces [US West].
# load config partial mode merge from-xpath devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1'] /address to-xpath /config/devices/entry[@name='localhost.localdomain']/device-group/entry[@name='US West']/address from fw1-config.xml Invalid syntax.
Environment
- Panorama.
- PAN-OS 8.1 and above.
Cause
The error is due to a space in the device group name.
Resolution
Add double quotes when specifying the xpaths the 'from-xpath' and 'to-xpath' parameters of the load command.
> configure
# load config partial mode [append|merge|replace] from-xpath "<path-to-src>" to-xpath "<path-to-dst>" from <filename>
Example :
#load config partial mode merge from-xpath "devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/address" to-xpath "/config/devices/entry[@name='localhost.localdomain']/device-group/entry[@name='US West']/address" from fw1-config.xml Config loaded from fw1-config.xmlNote: Change the names of configuration to match your setup.
Additional Information
Also refer
KB article: How to Load Config Partial
Documentation: Load a Partial Firewall Configuration into Panorama