<?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: Having Error While Updating Switchport API in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/having-error-while-updating-switchport-api/m-p/5423709#M3896</link>
    <description>&lt;P&gt;Remove all null entries. I just had to do this for a client.&lt;/P&gt;&lt;P&gt;If you want to whack it in Python:&lt;/P&gt;&lt;PRE class="lia-code-sample language-markup"&gt;&lt;CODE&gt;empties = []
for key, value in port.items():
    if value == None:
        empties.append(key)
for item in empties:
    try:
        port.pop(item)
    except:
        print(f"Couldn't pop {item}")
putSwitchport(arg_apikey, arg_serial, port, switchportNum, shard)&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 21 Oct 2019 13:33:30 GMT</pubDate>
    <dc:creator>Nash</dc:creator>
    <dc:date>2019-10-21T13:33:30Z</dc:date>
    <item>
      <title>Having Error While Updating Switchport API</title>
      <link>https://community.cisco.com/t5/network-platform-api/having-error-while-updating-switchport-api/m-p/5423705#M3892</link>
      <description>&lt;P&gt;&lt;FONT&gt;I have been trying to update a switch port with the following json file however is keep giving me a error.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;{"name": "Test1", "tags": "null", "enabled": true, "poeEnabled": true, "type": "access", "vlan": 10, "voiceVlan": null, "allowedVlans": "all", "isolationEnabled": false, "rstpEnabled": true, "stpGuard": "disabled", "accessPolicyNumber": null, "linkNegotiation": "Auto negotiate", "portScheduleId": null, "udld": "Alert only", "macWhitelist": ["34:56:fe:ce:8e:b0", "34:56:fe:ce:8e:b1"] }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;BR /&gt;Only one of access policy, MAC whitelist and Sticky whitelist may be specified&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;MAC whitelist and Sticky whitelist may be specified&lt;/FONT&gt; but there no field of this two field in the data model&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Any advise is welcome&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 07:26:06 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/having-error-while-updating-switchport-api/m-p/5423705#M3892</guid>
      <dc:creator>Paxson</dc:creator>
      <dc:date>2019-10-21T07:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Having Error While Updating Switchport API</title>
      <link>https://community.cisco.com/t5/network-platform-api/having-error-while-updating-switchport-api/m-p/5423706#M3893</link>
      <description>&lt;P&gt;&lt;STRIKE&gt;Isn't it called "stickyMacWhitelist" instead of "macWhitelist"?&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;See in the example in the docs here:&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;&lt;A href="https://documenter.getpostman.com/view/7928889/SVmsVg6K?version=latest#d3edbb74-e6f6-4dc2-99f7-a62897bc4e94" target="_blank" rel="noopener nofollow noreferrer"&gt;https://documenter.getpostman.com/view/7928889/SVmsVg6K?version=latest#d3edbb74-e6f6-4dc2-99f7-a62897bc4e94&lt;/A&gt;&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;Edit: Both are actually valid options.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 09:00:04 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/having-error-while-updating-switchport-api/m-p/5423706#M3893</guid>
      <dc:creator>BrechtSchamp</dc:creator>
      <dc:date>2019-10-21T09:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Having Error While Updating Switchport API</title>
      <link>https://community.cisco.com/t5/network-platform-api/having-error-while-updating-switchport-api/m-p/5423707#M3894</link>
      <description>&lt;P&gt;Both fieldname have been tested however it still give the same error for us to select one of those 2 access policy&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 09:53:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/having-error-while-updating-switchport-api/m-p/5423707#M3894</guid>
      <dc:creator>Paxson</dc:creator>
      <dc:date>2019-10-21T09:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Having Error While Updating Switchport API</title>
      <link>https://community.cisco.com/t5/network-platform-api/having-error-while-updating-switchport-api/m-p/5423708#M3895</link>
      <description>&lt;P&gt;Try removing the &lt;SPAN&gt;"accessPolicyNumber": null line.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 11:00:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/having-error-while-updating-switchport-api/m-p/5423708#M3895</guid>
      <dc:creator>BrechtSchamp</dc:creator>
      <dc:date>2019-10-21T11:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Having Error While Updating Switchport API</title>
      <link>https://community.cisco.com/t5/network-platform-api/having-error-while-updating-switchport-api/m-p/5423709#M3896</link>
      <description>&lt;P&gt;Remove all null entries. I just had to do this for a client.&lt;/P&gt;&lt;P&gt;If you want to whack it in Python:&lt;/P&gt;&lt;PRE class="lia-code-sample language-markup"&gt;&lt;CODE&gt;empties = []
for key, value in port.items():
    if value == None:
        empties.append(key)
for item in empties:
    try:
        port.pop(item)
    except:
        print(f"Couldn't pop {item}")
putSwitchport(arg_apikey, arg_serial, port, switchportNum, shard)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Oct 2019 13:33:30 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/having-error-while-updating-switchport-api/m-p/5423709#M3896</guid>
      <dc:creator>Nash</dc:creator>
      <dc:date>2019-10-21T13:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Having Error While Updating Switchport API</title>
      <link>https://community.cisco.com/t5/network-platform-api/having-error-while-updating-switchport-api/m-p/5423710#M3897</link>
      <description>&lt;P&gt;BTW, after discussing this with &lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/1965"&gt;@BrechtSchamp&lt;/A&gt; I realized I forgot to say - if you need to _set_ a field as null, make sure it's specifically included.&lt;/P&gt;&lt;P&gt;But if it's already null and will remain null, you can remove the key:value pair.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 13:06:32 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/having-error-while-updating-switchport-api/m-p/5423710#M3897</guid>
      <dc:creator>Nash</dc:creator>
      <dc:date>2019-10-22T13:06:32Z</dc:date>
    </item>
  </channel>
</rss>

