load config partial - from local file to security ruleset

Reply
L1 Bithead

load config partial - from local file to security ruleset

First issue:

I am trying to get load config partial working from local file , address objects , address groups, service groups and security and NAT rules, to local firewall.  

 

I am used to doing load config partial on PANORAMA to device groups..  but not local file to local FW..  cant quite pin down the API XML format, even when looking on local API.. 

 

 

I know the xpath below is incorrect , but any advice on how to fix, would be greatly appreciated.  maybe a cheat sheet to reference for each section (address objects, add. groups, services, service groups, policies, nat policies..)

 

load config partial from MT-asdfkjh.xml from-xpath /config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']rulebase to-xpath /config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/post-rulebase/security mode merge

 

Second question:

any issues with version 9.0.4 ?  Or is there a more stable version currently?

 

Third question:

trying to use migration tool to set app ID on rules? Or create quickly app id rules above the service rules?

 

Thanks, 

T

Highlighted
L4 Transporter

Re: load config partial - from local file to security ruleset

@achrist_2019 You had some mistakes in the xpath. It should be: 

 

load config partial from-xpath /config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security to-xpath /config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security from MT-asdfkjh.xml

 

Also note that in PanOS9 for some strange reason (looks like a bug to me) you have to put "from file" statement at the end of the command.

 

L1 Bithead

Re: load config partial - from local file to security ruleset

Thank you BatD this worked like a charm.  If you don't mind, how did you find this in the XML API ? I am not able to locate the security portion, or address objects, services.. etc... not seeing where that is..

L1 Bithead

Re: load config partial - from local file to security ruleset

well how about that, I just figured it out.. thanks man.  Have a super weekend!

 

Annotation 2019-10-25 205455.png

 

 load config partial from-xpath /config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/address to-xpath /config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/address from MT-asdfkljh.xml

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the Live Community as a whole!

The Live Community thanks you for your participation!