XML API: Do we need to specify "localhost.localdomain" in the Device entry name? Why can we leave Device entry name as blank?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

XML API: Do we need to specify "localhost.localdomain" in the Device entry name? Why can we leave Device entry name as blank?

L1 Bithead

Scenario: While reading the 10.1 Guide and XML API guide, I see:


Questions:

  • When do we need to specify the name of the device entry? (e.g. 'localhost.localdomain')
    • Is this value consistent across all Panorama versions?
  • By leaving it blank, does the value default to something? I don't think this is the case, as xpath should represent a path to an object.
    • I tried leaving the Device entry name as blank when doing Operation mode (see example), the update is successful. However, the update is applied to the wrong path, resulting in no effect on Panoroma UI.

 

Your help is much appreciated.

1 accepted solution

Accepted Solutions

L5 Sessionator

Hi @HermanEdwards, the best way to validate anything with 100% conclusive proof is to export/backup the XML config file and look at it in a text editor/viewer. Here you will be able to see the configuration elements.

Certainly in recent PAN-OS releases (per screenshot below for Panorama, where I have collapsed a lot of the lines of XML config), a large amount of config lives under the devices/entry[@name='localhost.localdomain'] element, including Device Groups, Templates and stacks, Log Collectors, etc etc.

 

Screenshot 2022-03-04 at 12.07.45.png

 

In non-Panorama, therefore NGFW directly, it is slightly different, but still has the localhost.localdomain: 

 

Screenshot 2022-03-04 at 12.20.23.png

 

So to your questions:

When do we need to specify the name of the device entry? (e.g. 'localhost.localdomain') - Always
Is this value consistent across all Panorama versions? - Yes
By leaving it blank, does the value default to something?  - No

 

Hope that helps?

Help the community: "Like" helpful comments, and click "Accept as Solution" if you found your answer 🙂

View solution in original post

1 REPLY 1

L5 Sessionator

Hi @HermanEdwards, the best way to validate anything with 100% conclusive proof is to export/backup the XML config file and look at it in a text editor/viewer. Here you will be able to see the configuration elements.

Certainly in recent PAN-OS releases (per screenshot below for Panorama, where I have collapsed a lot of the lines of XML config), a large amount of config lives under the devices/entry[@name='localhost.localdomain'] element, including Device Groups, Templates and stacks, Log Collectors, etc etc.

 

Screenshot 2022-03-04 at 12.07.45.png

 

In non-Panorama, therefore NGFW directly, it is slightly different, but still has the localhost.localdomain: 

 

Screenshot 2022-03-04 at 12.20.23.png

 

So to your questions:

When do we need to specify the name of the device entry? (e.g. 'localhost.localdomain') - Always
Is this value consistent across all Panorama versions? - Yes
By leaving it blank, does the value default to something?  - No

 

Hope that helps?

Help the community: "Like" helpful comments, and click "Accept as Solution" if you found your answer 🙂
  • 1 accepted solution
  • 3848 Views
  • 1 replies
  • 0 Likes
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 LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!