<?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: Update L3 Firewall Rules | Error takes 2 positional arguments but 3 were given in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/update-l3-firewall-rules-error-takes-2-positional-arguments-but/m-p/5437955#M6006</link>
    <description>&lt;P&gt;Can you share the full code please?&lt;/P&gt;&lt;P&gt;It's very generic error.&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jul 2024 00:41:24 GMT</pubDate>
    <dc:creator>aleabrahao</dc:creator>
    <dc:date>2024-07-16T00:41:24Z</dc:date>
    <item>
      <title>Update L3 Firewall Rules | Error takes 2 positional arguments but 3 were given</title>
      <link>https://community.cisco.com/t5/network-platform-api/update-l3-firewall-rules-error-takes-2-positional-arguments-but/m-p/5437954#M6005</link>
      <description>&lt;P&gt;Hi All, &lt;/P&gt;&lt;P&gt;  I'm reading the firewall rules from a network and trying to push them to another network, getting error &lt;/P&gt;&lt;P&gt;TypeError: Appliance.updateNetworkApplianceFirewallL3FirewallRules() takes 2 positional arguments but 3 were given&lt;/P&gt;&lt;P&gt;My code is simply below, the &lt;SPAN&gt;fw_rules&lt;/SPAN&gt;  result in the dict with 1000+ rules &lt;/P&gt;&lt;P&gt;# Reading the rules &lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;fw_rules&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;  &lt;/SPAN&gt;&lt;SPAN&gt;dashboard&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;appliance&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;getNetworkApplianceFirewallL3FirewallRules&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;net_id&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;# Pushing the rule to another network &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;response&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;dashboard&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;appliance&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;updateNetworkApplianceFirewallL3FirewallRules&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;                    &lt;/SPAN&gt;&lt;SPAN&gt;network_id&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;fw_rules&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 16 Jul 2024 00:12:04 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/update-l3-firewall-rules-error-takes-2-positional-arguments-but/m-p/5437954#M6005</guid>
      <dc:creator>AhmedALJAWAD44875</dc:creator>
      <dc:date>2024-07-16T00:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Update L3 Firewall Rules | Error takes 2 positional arguments but 3 were given</title>
      <link>https://community.cisco.com/t5/network-platform-api/update-l3-firewall-rules-error-takes-2-positional-arguments-but/m-p/5437955#M6006</link>
      <description>&lt;P&gt;Can you share the full code please?&lt;/P&gt;&lt;P&gt;It's very generic error.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 00:41:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/update-l3-firewall-rules-error-takes-2-positional-arguments-but/m-p/5437955#M6006</guid>
      <dc:creator>aleabrahao</dc:creator>
      <dc:date>2024-07-16T00:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Update L3 Firewall Rules | Error takes 2 positional arguments but 3 were given</title>
      <link>https://community.cisco.com/t5/network-platform-api/update-l3-firewall-rules-error-takes-2-positional-arguments-but/m-p/5437956#M6007</link>
      <description>&lt;P&gt;Use this instead&lt;/P&gt;&lt;PRE class="lia-code-sample language-markup"&gt;&lt;CODE&gt;# Pushing the rule to another network 
 
response = dashboard.appliance.updateNetworkApplianceFirewallL3FirewallRules(
                    network_id,
                    rules = fw_rules
)
 &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jul 2024 05:05:26 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/update-l3-firewall-rules-error-takes-2-positional-arguments-but/m-p/5437956#M6007</guid>
      <dc:creator>Rasmus Hoffmann Birkelund</dc:creator>
      <dc:date>2024-07-16T05:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: Update L3 Firewall Rules | Error takes 2 positional arguments but 3 were given</title>
      <link>https://community.cisco.com/t5/network-platform-api/update-l3-firewall-rules-error-takes-2-positional-arguments-but/m-p/5437957#M6008</link>
      <description>&lt;P&gt;I think (not sure) they might need to drop the last rule - the implicit allow rule.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 07:39:32 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/update-l3-firewall-rules-error-takes-2-positional-arguments-but/m-p/5437957#M6008</guid>
      <dc:creator>Philip D'Ath</dc:creator>
      <dc:date>2024-07-16T07:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Update L3 Firewall Rules | Error takes 2 positional arguments but 3 were given</title>
      <link>https://community.cisco.com/t5/network-platform-api/update-l3-firewall-rules-error-takes-2-positional-arguments-but/m-p/5437958#M6009</link>
      <description>&lt;P&gt;That's definitely not unlikely that the default rule in the end should be popped. (Although I'd expect the API to be able to handle that rule, but that's another story..)&lt;/P&gt;&lt;P&gt;However, then I'd expect a different error than the python error. If memory serves me right, I think it would fail within the REST call itself, and not a positional error in the function call.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 09:55:14 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/update-l3-firewall-rules-error-takes-2-positional-arguments-but/m-p/5437958#M6009</guid>
      <dc:creator>Rasmus Hoffmann Birkelund</dc:creator>
      <dc:date>2024-07-16T09:55:14Z</dc:date>
    </item>
  </channel>
</rss>

