<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic pan-os-python - how to view Static ARP mappings within a Layer3Subinterface? in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/pan-os-python-how-to-view-static-arp-mappings-within-a/m-p/529922#M3310</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Using the Python panos module, I have succeeded in printing info about &lt;FONT face="courier new,courier"&gt;Layer3Subinterface&lt;/FONT&gt; objects that are children of an &lt;FONT face="courier new,courier"&gt;AggregateInterface&lt;/FONT&gt; object:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from panos.firewall import Firewall
from panos import network


fw = Firewall(hostname="1.2.3.4", api_username="test", api_password="REDACTED",
    port=443, timeout=5, interval=3)
agg_ifaces = network.AggregateInterface().refreshall(fw)

for i in agg_ifaces:
    print(i.about())
# the above prints out a dict showing a single AggregateInterface named 'ae1'

ae1 = network.AggregateInterface(name='ae1')
fw.add(ae1)
sub = network.Layer3Subinterface.refreshall(ae1)

# print info about all L3 Sub Interfaces of 'ae1'
for s in sub:
    print(s.about())
# the above prints out dicts containing info about VLAN tags, ip ranges, and subinterface names&lt;/LI-CODE&gt;&lt;P&gt;Below is an example of a L3 Sub interface returned from the above:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;{'tag': 10,
 'ip': ['192.168.64.1/22'],
 'ipv6_enabled': None,
 'management_profile': 'ping_only',
 'mtu': None,
 'adjust_tcp_mss': False,
 'netflow_profile': 'Netflow_Profile',
 'comment': 'internal 1',
 'ipv4_mss_adjust': None,
 'ipv6_mss_adjust': None,
 'enable_dhcp': None,
 'create_dhcp_default_route': None,
 'dhcp_default_route_metric': None,
 'decrypt_forward': None,
 'name': 'ae1.10'}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Now I want to print out all the Static ARP mappings that are children of the 'ae1.10' &lt;FONT face="courier new,courier"&gt;Layer3Subinterface&lt;/FONT&gt; object. In the Firewall's Web UI -&amp;gt; "Network" tab -&amp;gt; "DHCP" menu, I can see lots of Reservations complete with IP address and MAC address. In the &lt;A href="https://pan-os-python.readthedocs.io/en/latest/module-network.html#configuration-tree-diagram" target="_self"&gt;Configuration Tree diagram&lt;/A&gt; from the panos network module docs, &lt;FONT face="courier new,courier"&gt;network.Arp()&lt;/FONT&gt; objects can be children of &lt;FONT face="courier new,courier"&gt;AggregateInterface&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;VlanInterface&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;EthernetInterface&lt;/FONT&gt;, and &lt;FONT face="courier new,courier"&gt;Layer3Subinterface&lt;/FONT&gt;. I tried the following to print info on all the &lt;FONT face="courier new,courier"&gt;network.Arp()&lt;/FONT&gt; objects within L3Subinterface 'ae1.10':&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;l3subint_ae1_10 = network.Layer3Subinterface(name='ae1.10')
fw.add(l3subint_ae1_10)
arp_list = network.Arp.refreshall(l3subint_ae1_10)
for a in arp_list:
    print(a.about())&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The snippet above returns nothing, however, and arp_list is just an empty list. Just in case the Static ARP mappings were children of some other parent object (like AggregateInterface) I tried listing network.Arp objects under 'ae1' but still come up empty. I can also verify that this firewall does not have any VlanInterface objects and that EthernetInterface is set to Aggregate Mode for "ae1".&lt;/P&gt;&lt;P&gt;Could someone help me understand why I'm able to see Layer3Subinterface objects under AggregateInterface but I can't seem to find any network.Arp objects under these parent objects?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
    <pubDate>Sun, 05 Feb 2023 14:56:38 GMT</pubDate>
    <dc:creator>archjun3d</dc:creator>
    <dc:date>2023-02-05T14:56:38Z</dc:date>
    <item>
      <title>pan-os-python - how to view Static ARP mappings within a Layer3Subinterface?</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/pan-os-python-how-to-view-static-arp-mappings-within-a/m-p/529922#M3310</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Using the Python panos module, I have succeeded in printing info about &lt;FONT face="courier new,courier"&gt;Layer3Subinterface&lt;/FONT&gt; objects that are children of an &lt;FONT face="courier new,courier"&gt;AggregateInterface&lt;/FONT&gt; object:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from panos.firewall import Firewall
from panos import network


fw = Firewall(hostname="1.2.3.4", api_username="test", api_password="REDACTED",
    port=443, timeout=5, interval=3)
agg_ifaces = network.AggregateInterface().refreshall(fw)

for i in agg_ifaces:
    print(i.about())
# the above prints out a dict showing a single AggregateInterface named 'ae1'

ae1 = network.AggregateInterface(name='ae1')
fw.add(ae1)
sub = network.Layer3Subinterface.refreshall(ae1)

# print info about all L3 Sub Interfaces of 'ae1'
for s in sub:
    print(s.about())
# the above prints out dicts containing info about VLAN tags, ip ranges, and subinterface names&lt;/LI-CODE&gt;&lt;P&gt;Below is an example of a L3 Sub interface returned from the above:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;{'tag': 10,
 'ip': ['192.168.64.1/22'],
 'ipv6_enabled': None,
 'management_profile': 'ping_only',
 'mtu': None,
 'adjust_tcp_mss': False,
 'netflow_profile': 'Netflow_Profile',
 'comment': 'internal 1',
 'ipv4_mss_adjust': None,
 'ipv6_mss_adjust': None,
 'enable_dhcp': None,
 'create_dhcp_default_route': None,
 'dhcp_default_route_metric': None,
 'decrypt_forward': None,
 'name': 'ae1.10'}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Now I want to print out all the Static ARP mappings that are children of the 'ae1.10' &lt;FONT face="courier new,courier"&gt;Layer3Subinterface&lt;/FONT&gt; object. In the Firewall's Web UI -&amp;gt; "Network" tab -&amp;gt; "DHCP" menu, I can see lots of Reservations complete with IP address and MAC address. In the &lt;A href="https://pan-os-python.readthedocs.io/en/latest/module-network.html#configuration-tree-diagram" target="_self"&gt;Configuration Tree diagram&lt;/A&gt; from the panos network module docs, &lt;FONT face="courier new,courier"&gt;network.Arp()&lt;/FONT&gt; objects can be children of &lt;FONT face="courier new,courier"&gt;AggregateInterface&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;VlanInterface&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;EthernetInterface&lt;/FONT&gt;, and &lt;FONT face="courier new,courier"&gt;Layer3Subinterface&lt;/FONT&gt;. I tried the following to print info on all the &lt;FONT face="courier new,courier"&gt;network.Arp()&lt;/FONT&gt; objects within L3Subinterface 'ae1.10':&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;l3subint_ae1_10 = network.Layer3Subinterface(name='ae1.10')
fw.add(l3subint_ae1_10)
arp_list = network.Arp.refreshall(l3subint_ae1_10)
for a in arp_list:
    print(a.about())&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The snippet above returns nothing, however, and arp_list is just an empty list. Just in case the Static ARP mappings were children of some other parent object (like AggregateInterface) I tried listing network.Arp objects under 'ae1' but still come up empty. I can also verify that this firewall does not have any VlanInterface objects and that EthernetInterface is set to Aggregate Mode for "ae1".&lt;/P&gt;&lt;P&gt;Could someone help me understand why I'm able to see Layer3Subinterface objects under AggregateInterface but I can't seem to find any network.Arp objects under these parent objects?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Sun, 05 Feb 2023 14:56:38 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/pan-os-python-how-to-view-static-arp-mappings-within-a/m-p/529922#M3310</guid>
      <dc:creator>archjun3d</dc:creator>
      <dc:date>2023-02-05T14:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: pan-os-python - how to view Static ARP mappings within a Layer3Subinterface?</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/pan-os-python-how-to-view-static-arp-mappings-within-a/m-p/530564#M3313</link>
      <description>&lt;P&gt;Do an operational command:&amp;nbsp;&lt;A href="https://pan-os-python.readthedocs.io/en/latest/getting-started.html#operational-commands" target="_blank"&gt;https://pan-os-python.readthedocs.io/en/latest/getting-started.html#operational-commands&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Execute this command:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;show arp ethernet1/24.335&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000ClpnCAC" target="_blank"&gt;https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000ClpnCAC&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 22:59:38 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/pan-os-python-how-to-view-static-arp-mappings-within-a/m-p/530564#M3313</guid>
      <dc:creator>GabrielMontiel</dc:creator>
      <dc:date>2023-02-09T22:59:38Z</dc:date>
    </item>
  </channel>
</rss>

