<?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 NAD fields via API in Network Access Control</title>
    <link>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4030624#M453912</link>
    <description>&lt;P&gt;No, I'm not aware if that is possible. You might have to open a TAC case to get confirmation from the development engineers if there is a way to do that.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Feb 2020 03:07:50 GMT</pubDate>
    <dc:creator>Greg Gibbs</dc:creator>
    <dc:date>2020-02-17T03:07:50Z</dc:date>
    <item>
      <title>Update NAD fields via API</title>
      <link>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4029170#M453909</link>
      <description>&lt;P&gt;*Seeking assistance with p3*&lt;/P&gt;
&lt;P&gt;Currently working through an automation project that utilizes DNAC and ISE APIs.&amp;nbsp; The objective is to onboard an SDA edge node to our fabric via python &amp;amp; APIs.&amp;nbsp; The phases are as follows:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;p1: Add device to inventory (Add Device) --Completed&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;p2: Assign to site (Assign Device To Site) --Completed&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;p3: *Update ISE NAD location &amp;amp; group (utilizing ISE APIs) --Almost completed&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;p4: Join to fabric (Add edge device in SDA Fabric)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;p5: Update interfaces for user device &amp;amp; closed auth (Add Port assignment for user device in SDA Fabric)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I am wondering if there is a way to simply just update the NAD fields in ISE that I wish to update without having to pass all fields to ensure information passed via pxgrid from DNAC to ISE once device is added to site is not changed to null/deleted.&amp;nbsp; All I wish to update are the Device location &amp;amp; device type (for policy reasons).&amp;nbsp; Is there syntax to pass for the required fields that will not overwrite or delete information gathered from DNAC (for example coa port or radius shared secret)?&amp;nbsp; I would prefer to not have to populate the json data with specific info and just leave it blank so it is unchanged.&amp;nbsp; However,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I tried "" and that deletes the info received from DNAC.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 17:57:01 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4029170#M453909</guid>
      <dc:creator>Mike.Cifelli</dc:creator>
      <dc:date>2020-02-13T17:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Update NAD fields via API</title>
      <link>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4029354#M453910</link>
      <description>&lt;P&gt;Using the Update (PUT) method, it looks like the following fields are required at a minimum. I found that updating the Location and Type values using this API call did not affect the settings in the RADIUS section. You might have to test the same if you have the SNMP, TACACS+ and/or TrustSec settings enabled for the network device.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;{&lt;BR /&gt;"NetworkDevice" : {&lt;BR /&gt;"id" : "123456789",&lt;BR /&gt;"name" : "testnad1",&lt;BR /&gt;"description" : "example nad",&lt;BR /&gt;"profileName" : "Cisco",&lt;BR /&gt;"coaPort" : 1700,&lt;BR /&gt;"NetworkDeviceIPList" : [ {&lt;BR /&gt;"ipaddress" : "1.1.1.1",&lt;BR /&gt;"mask" : 32&lt;BR /&gt;} ],&lt;BR /&gt;"NetworkDeviceGroupList" : [ "Location#All Locations#Location2", "Device Type#All Device Types#Type2" ]&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Greg&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 21:34:51 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4029354#M453910</guid>
      <dc:creator>Greg Gibbs</dc:creator>
      <dc:date>2020-02-13T21:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Update NAD fields via API</title>
      <link>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4029878#M453911</link>
      <description>Thanks for the reply.  I have been testing to essentially figure out how not to affect the DNAC populated information.  I am pretty close to getting what I want.  The unfortunate part is I think I have to get the end user to input the NAD "name" during execution of the script.  Are you aware of a way to have the "name" field in the json data to not modify the DNAC populated name of the device without appending or statically entering a name?  I would prefer to not have the end user required to enter in device name during script execution.</description>
      <pubDate>Fri, 14 Feb 2020 14:44:13 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4029878#M453911</guid>
      <dc:creator>Mike.Cifelli</dc:creator>
      <dc:date>2020-02-14T14:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Update NAD fields via API</title>
      <link>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4030624#M453912</link>
      <description>&lt;P&gt;No, I'm not aware if that is possible. You might have to open a TAC case to get confirmation from the development engineers if there is a way to do that.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 03:07:50 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4030624#M453912</guid>
      <dc:creator>Greg Gibbs</dc:creator>
      <dc:date>2020-02-17T03:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: Update NAD fields via API</title>
      <link>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4033473#M558201</link>
      <description>&lt;P&gt;I agreed with Greg. However, why not taking the name input from the user, doing a search, and populating it with the existing name instead of using the input for the update request?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 04:28:25 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4033473#M558201</guid>
      <dc:creator>hslai</dc:creator>
      <dc:date>2020-02-21T04:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Update NAD fields via API</title>
      <link>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4033678#M558210</link>
      <description>I have a TAC case open at the moment to see if there is another way.  My thinking is that I could extract the last two octets from the entered IP address and append that.  Our naming convention essentially looks something like this:&lt;BR /&gt;abcdefgh&amp;lt;S0&amp;gt;&amp;lt;last two octets&amp;gt;&lt;BR /&gt;S0 = edge node&lt;BR /&gt;Last two octets depict building number and edge node number.  However, right now as I work on the IP extraction idea the code prompts user for site code (S0 + last two octets) and the device IP so that I can find the NAD ID in ISE db.</description>
      <pubDate>Fri, 21 Feb 2020 13:42:15 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4033678#M558210</guid>
      <dc:creator>Mike.Cifelli</dc:creator>
      <dc:date>2020-02-21T13:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Update NAD fields via API</title>
      <link>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4034401#M558262</link>
      <description>&lt;P&gt;Yeah. That would be the way to go -- derived the name from the existing data.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Feb 2020 20:06:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4034401#M558262</guid>
      <dc:creator>hslai</dc:creator>
      <dc:date>2020-02-23T20:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: Update NAD fields via API</title>
      <link>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4034771#M558283</link>
      <description>Yeah I have not gained much traction from TAC on this concern so here is the current code snippet to achieve what I was looking to do:&lt;BR /&gt;def ise_nad_update(IP_ADDR):&lt;BR /&gt;&lt;BR /&gt;    NAD_NAME = raw_input("Enter the Edge node site ID: ")&lt;BR /&gt;    if len(NAD_NAME) &amp;gt; 5:&lt;BR /&gt;        print"**********************************************************"&lt;BR /&gt;        print "Error!Must be less than 5 char &amp;amp; in SDA Site ID format"&lt;BR /&gt;        print "*********************************************************"&lt;BR /&gt;        sys.exit()&lt;BR /&gt;&lt;BR /&gt;    while True:&lt;BR /&gt;        loc = ["BLDG 1", " BLDG 2", " BLDG 3", " BLDG 4", " BLDG 5"]&lt;BR /&gt;        LOC = raw_input("Enter the building location: ")&lt;BR /&gt;        if len(LOC) &amp;lt;= 4 and LOC in loc:&lt;BR /&gt;            break        &lt;BR /&gt;        else:        &lt;BR /&gt;            print "Please enter a Campus location(309, 300, 510, 602)"&lt;BR /&gt;            continue&lt;BR /&gt;    while True:&lt;BR /&gt;        own = ["owner1", "owner2", "owner3"]&lt;BR /&gt;        OWNER = raw_input("Enter NAD owner: ").upper()&lt;BR /&gt;        if len(OWNER) &amp;lt;= 6 and OWNER in own:&lt;BR /&gt;            break&lt;BR /&gt;        else:&lt;BR /&gt;            print "Please enter proper owner of asset(joe, sally, mike)"&lt;BR /&gt;            continue&lt;BR /&gt;&lt;BR /&gt;    print "Grabbing NAD ID from ISE database"    &lt;BR /&gt;    &lt;BR /&gt;    for i in tqdm(range(2)):&lt;BR /&gt;        sleep(5) &lt;BR /&gt;        print "*****************"&lt;BR /&gt;    API_DEVICE = "https://&amp;lt;ISEFQDN&amp;gt;:9060/ers/config/networkdevice?filter=ipaddress.EQ." + IP_ADDR&lt;BR /&gt;    API_ERS_USER = "&amp;lt;user&amp;gt;","&amp;lt;password&amp;gt;"&lt;BR /&gt;    HEADERS = {&lt;BR /&gt;        'Accept': "application/json",&lt;BR /&gt;        'Content-Type': "application/json",&lt;BR /&gt;}&lt;BR /&gt;    r = requests.get(url=API_DEVICE, auth=API_ERS_USER, headers=HEADERS, verify=True) &lt;BR /&gt;    temp = r.text&lt;BR /&gt;    nad_id = json.loads(temp)&lt;BR /&gt;    for nad in nad_id['SearchResult']['resources']:&lt;BR /&gt;        temp2 = nad['id']&lt;BR /&gt;        print "ISE NAD ID:" + temp2&lt;BR /&gt;        print "Getting ready to update the NAD in ISE"    &lt;BR /&gt;    &lt;BR /&gt;    print "**********************"&lt;BR /&gt;    print "ISE Request", r.reason&lt;BR /&gt;    print "**********************"&lt;BR /&gt;    API_DATA = {&lt;BR /&gt;    "NetworkDevice": {&lt;BR /&gt;        "id": temp2,&lt;BR /&gt;        "name": "&amp;lt;SITE NAME&amp;gt;" + NAD_NAME,&lt;BR /&gt;        "profileName": "Cisco",&lt;BR /&gt;        "coaPort": "1700",&lt;BR /&gt;&lt;BR /&gt;    "authenticationSettings" : {&lt;BR /&gt;    },&lt;BR /&gt;    "snmpsettings" : {&lt;BR /&gt;      "pollingInterval" : 3600,&lt;BR /&gt;      "linkTrapQuery" : "false",&lt;BR /&gt;      "macTrapQuery" : "false",&lt;BR /&gt;},&lt;BR /&gt;    "trustsecsettings" : {&lt;BR /&gt;      "deviceAuthenticationSettings" : {&lt;BR /&gt;},&lt;BR /&gt;      "sgaNotificationAndUpdates" : {&lt;BR /&gt;        "downlaodEnvironmentDataEveryXSeconds" : 86400,&lt;BR /&gt;        "downlaodPeerAuthorizationPolicyEveryXSeconds" : 86400,&lt;BR /&gt;        "reAuthenticationEveryXSeconds" : 86400,&lt;BR /&gt;        "downloadSGACLListsEveryXSeconds" : 86400,&lt;BR /&gt;        "otherSGADevicesToTrustThisDevice" : "true",&lt;BR /&gt;        "sendConfigurationToDevice" : "true",&lt;BR /&gt;        "sendConfigurationToDeviceUsing" : "ENABLE_USING_COA",&lt;BR /&gt;        "coaSourceHost" : "&amp;lt;ISE PSN&amp;gt;",&lt;BR /&gt;},&lt;BR /&gt;      "deviceConfigurationDeployment" : {&lt;BR /&gt;        "includeWhenDeployingSGTUpdates" : "true",   &lt;BR /&gt;    }&lt;BR /&gt;},&lt;BR /&gt;    "NetworkDeviceIPList": [&lt;BR /&gt;      {&lt;BR /&gt;        "ipaddress": IP_ADDR,&lt;BR /&gt;        "mask": 32,&lt;BR /&gt;    }&lt;BR /&gt;],&lt;BR /&gt;    "NetworkDeviceGroupList": [&lt;BR /&gt;        "Location#All Locations#" + LOC,&lt;BR /&gt;        "Device Type#All Device Types#SDA#" + OWNER,&lt;BR /&gt;        "IPSEC#Is IPSEC Device#No",&lt;BR /&gt;            ]&lt;BR /&gt;        }&lt;BR /&gt;    }&lt;BR /&gt;&lt;BR /&gt;    API_DEVICE = "https://&amp;lt;ISE FQDN&amp;gt;:9060/ers/config/networkdevice/" + temp2 &lt;BR /&gt;    API_ERS_USER = "&amp;lt;user&amp;gt;","&amp;lt;password&amp;gt;"&lt;BR /&gt;    r = requests.put(url=API_DEVICE, auth=API_ERS_USER, json=API_DATA, verify=True) &lt;BR /&gt;    print r.text&lt;BR /&gt;    print "***************"&lt;BR /&gt;    print "ISE Request", r.reason&lt;BR /&gt;    print "***************"&lt;BR /&gt;    sys.exit()&lt;BR /&gt;I pass IP_ADDR from another function.  Then ask the user for building, owner, and the site id which then gets appended to 'name' so that I do not overwrite the NAD name obtained from DNAC via pxgrid.  Thank you all.</description>
      <pubDate>Mon, 24 Feb 2020 15:54:01 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4034771#M558283</guid>
      <dc:creator>Mike.Cifelli</dc:creator>
      <dc:date>2020-02-24T15:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Update NAD fields via API</title>
      <link>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4037610#M558455</link>
      <description>FYSA&lt;BR /&gt;Per TAC: There is no way to perform an update of a network device and not include a name field in your syntax.  &lt;BR /&gt;I have asked to file an enhancement request to make the name field not required, and rely on the ID of the NAD.</description>
      <pubDate>Fri, 28 Feb 2020 16:41:11 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4037610#M558455</guid>
      <dc:creator>Mike.Cifelli</dc:creator>
      <dc:date>2020-02-28T16:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Update NAD fields via API</title>
      <link>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4038618#M558497</link>
      <description>FYSA&lt;BR /&gt;Enhancement request: CSCvt24887</description>
      <pubDate>Mon, 02 Mar 2020 14:54:17 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/update-nad-fields-via-api/m-p/4038618#M558497</guid>
      <dc:creator>Mike.Cifelli</dc:creator>
      <dc:date>2020-03-02T14:54:17Z</dc:date>
    </item>
  </channel>
</rss>

