<?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 Re: Adding log forwarding profiles and profile match lists and actions with pan-os-python API in Panorama Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/panorama-discussions/adding-log-forwarding-profiles-and-profile-match-lists-and/m-p/569697#M2045</link>
    <description>&lt;P&gt;I figured it out, just took a while for the object hierarchy to sink in:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;obj=LogForwardingProfile("LFP1")&lt;BR /&gt;obj.add(LogForwardingProfileMatchList(name="Rule1",filter="All Logs",log_type="traffic",send_to_panorama="True"))&lt;BR /&gt;dg.add(obj)&lt;BR /&gt;obj.create()&lt;/P&gt;</description>
    <pubDate>Wed, 13 Dec 2023 13:34:06 GMT</pubDate>
    <dc:creator>GM001</dc:creator>
    <dc:date>2023-12-13T13:34:06Z</dc:date>
    <item>
      <title>Adding log forwarding profiles and profile match lists and actions with pan-os-python API</title>
      <link>https://live.paloaltonetworks.com/t5/panorama-discussions/adding-log-forwarding-profiles-and-profile-match-lists-and/m-p/569591#M2044</link>
      <description>&lt;P&gt;Anyone have any examples of adding log forwarding profiles with match lists and actions using the pan-os-python API?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a sample that has me stuck:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;from panos.panorama import Panorama, DeviceGroup&lt;BR /&gt;from panos.objects import LogForwardingProfile,LogForwardingProfileMatchList,LogForwardingProfileMatchListAction&lt;BR /&gt;pano = Panorama(hostname='xxx', api_key='api_key-here')&lt;BR /&gt;dg = DeviceGroup("Test1")&lt;BR /&gt;pano.add(dg)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;obj=LogForwardingProfile("LFP1")&lt;BR /&gt;dg.add(obj)&lt;BR /&gt;obj.create()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That creates the new log forwarding profile, but then how do I attach the match lists and match list actions to the new profile?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 02:19:02 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/panorama-discussions/adding-log-forwarding-profiles-and-profile-match-lists-and/m-p/569591#M2044</guid>
      <dc:creator>GM001</dc:creator>
      <dc:date>2023-12-13T02:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: Adding log forwarding profiles and profile match lists and actions with pan-os-python API</title>
      <link>https://live.paloaltonetworks.com/t5/panorama-discussions/adding-log-forwarding-profiles-and-profile-match-lists-and/m-p/569697#M2045</link>
      <description>&lt;P&gt;I figured it out, just took a while for the object hierarchy to sink in:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;obj=LogForwardingProfile("LFP1")&lt;BR /&gt;obj.add(LogForwardingProfileMatchList(name="Rule1",filter="All Logs",log_type="traffic",send_to_panorama="True"))&lt;BR /&gt;dg.add(obj)&lt;BR /&gt;obj.create()&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 13:34:06 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/panorama-discussions/adding-log-forwarding-profiles-and-profile-match-lists-and/m-p/569697#M2045</guid>
      <dc:creator>GM001</dc:creator>
      <dc:date>2023-12-13T13:34:06Z</dc:date>
    </item>
  </channel>
</rss>

