<?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 Null while getting retention using Zephyr API in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Null-while-getting-retention-using-Zephyr-API/m-p/429556#M3187</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the snaplock get file retention function using the Vserver API (manageontap-9.8P3.jar) and added the string function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code below that was used in the existing 7-mode API (manageontap-5.2.2.jar) was added.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;string retentionTime =xo.getchlidContent("retantion-time");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;However, null phenomenon occurs when using the function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When using Vserver API (manageontap-9.8P3.jar), is there any code that can replace the code below?&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;string retentionTime =xo.getchlidContent("retantion-time");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Attach log - It is okay to be exposed as a test environment&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;public Object getFileRetention(NetAppVo netAppVo) {&lt;BR /&gt;boolean success = false;&lt;BR /&gt;NaElement xo = null;&lt;BR /&gt;NaServer naSvr = null;&lt;BR /&gt;try {&lt;BR /&gt;String targetPath = netAppVo.getRootDir()+netAppVo.getWormPath();&lt;/P&gt;&lt;P&gt;naSvr = this.getNaServer(netAppVo, false);&lt;/P&gt;&lt;P&gt;NaElement retentionInfo = null;&lt;/P&gt;&lt;P&gt;if(netAppVo.isCheckOs()) {&lt;BR /&gt;/* =================================================================================== */&lt;BR /&gt;/* 신규 API */&lt;BR /&gt;retentionInfo = new NaElement("snaplock-get-file-retention");&lt;BR /&gt;NaElement xi = new NaElement("desired-attributes");&lt;BR /&gt;retentionInfo.addChildElem(xi);&lt;BR /&gt;NaElement xi1 = new NaElement("snaplock-file-retention-info");&lt;BR /&gt;xi.addChildElem(xi1);&lt;BR /&gt;xi1.addNewChild("file",targetPath);&lt;BR /&gt;xi1.addNewChild("formatted-retention-time","&amp;lt;formatted-retention-time&amp;gt;");&lt;BR /&gt;xi1.addNewChild("is-wraparound","&amp;lt;is-wraparound&amp;gt;");&lt;BR /&gt;xi1.addNewChild("retention-time","&amp;lt;retention-time&amp;gt;");&lt;BR /&gt;xi1.addNewChild("vserver",netAppVo.getServerName());&lt;BR /&gt;retentionInfo.addNewChild("file",targetPath);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* =================================================================================== */&lt;BR /&gt;} else {&lt;BR /&gt;/* =================================================================================== */&lt;BR /&gt;/* 기존 API */&lt;BR /&gt;retentionInfo = new NaElement("file-get-snaplock-retention-time");&lt;BR /&gt;retentionInfo.addNewChild("path", targetPath);&lt;BR /&gt;/* =================================================================================== */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;xo = naSvr.invokeElem(retentionInfo);&lt;BR /&gt;System.out.println("result NaElement : " + xo.toPrettyString(""));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;String retentionTime = xo.getChildContent("retention-time");&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;// String retentionTime = getRetentionSecond(netAppVo.getRetention());&lt;BR /&gt;System.out.println("Get Retention Time : " + retentionTime);&lt;BR /&gt;if(retentionTime != null) {&lt;BR /&gt;success = true;&lt;BR /&gt;}&lt;BR /&gt;} catch(NaProtocolException e) {&lt;BR /&gt;e.printStackTrace();&lt;BR /&gt;} catch(NaAuthenticationException e) {&lt;BR /&gt;e.printStackTrace();&lt;BR /&gt;} catch (NaAPIFailedException e) {&lt;BR /&gt;e.printStackTrace();&lt;BR /&gt;} catch (IOException e) {&lt;BR /&gt;e.printStackTrace();&lt;BR /&gt;} catch (Exception e) {&lt;BR /&gt;e.printStackTrace();&lt;BR /&gt;} finally {&lt;BR /&gt;if(naSvr!=null) {&lt;BR /&gt;naSvr.close();&lt;BR /&gt;}&lt;BR /&gt;}&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[root@localhost shell]# sh getRet.sh&lt;BR /&gt;=================================================&lt;BR /&gt;Netapp File Get Retention Process Start...&lt;BR /&gt;=================================================&lt;BR /&gt;localPath : /wormtest/NetAppSDK/shell&lt;BR /&gt;resouce : ../conf/config.properties&lt;BR /&gt;Properties : {}&lt;BR /&gt;properties loading...&lt;BR /&gt;Check OS [7-Mode : false, Vserver : true] : true&lt;BR /&gt;Server Name : svm01&lt;BR /&gt;Server IP : xxx.xxx.xxx.xxx&lt;BR /&gt;Server Port : 443&lt;BR /&gt;Login User : netappadmin&lt;BR /&gt;Login User Password : xxxxxxxx&lt;BR /&gt;Source Path : ../temp/test.tif&lt;BR /&gt;Target Worm Logical Path : /Nmdata01/vol1/test01&lt;BR /&gt;Worm Root Directory(Physical) : /vol&lt;BR /&gt;Set Retention(yyyymmddhhmiss) : 20291124235900&lt;BR /&gt;Proccess Start ...&lt;BR /&gt;Netapp Get File Retention&lt;BR /&gt;result NaElement : &amp;lt;results status='passed'&amp;gt;&lt;BR /&gt;&amp;lt;attributes&amp;gt;&lt;BR /&gt;&amp;lt;snaplock-file-retention-info&amp;gt;&lt;BR /&gt;&amp;lt;file&amp;gt;/vol/Nmdata01/vol1/test01&amp;lt;/file&amp;gt;&lt;BR /&gt;&amp;lt;formatted-retention-time&amp;gt;Sat Nov 24 14:59:00 GMT 2029&amp;lt;/formatted-retention-time&amp;gt;&lt;BR /&gt;&amp;lt;is-wraparound&amp;gt;false&amp;lt;/is-wraparound&amp;gt;&lt;BR /&gt;&amp;lt;retention-time&amp;gt;1890226740&amp;lt;/retention-time&amp;gt;&lt;BR /&gt;&amp;lt;vserver&amp;gt;svm01&amp;lt;/vserver&amp;gt;&lt;BR /&gt;&amp;lt;/snaplock-file-retention-info&amp;gt;&lt;BR /&gt;&amp;lt;/attributes&amp;gt;&lt;BR /&gt;&amp;lt;/results&amp;gt;&lt;/P&gt;&lt;P&gt;Get Retention Time : &lt;FONT color="#FF0000"&gt;null&lt;/FONT&gt;&lt;BR /&gt;result : false&lt;BR /&gt;Proccess Ended ...&lt;BR /&gt;[Procssing Time] : 0.479&lt;BR /&gt;=================================================&lt;BR /&gt;Netapp File Get Retention Process finished !!!&lt;BR /&gt;=================================================&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks..&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 10:08:20 GMT</pubDate>
    <dc:creator>HeehyeonLee</dc:creator>
    <dc:date>2025-06-04T10:08:20Z</dc:date>
    <item>
      <title>Null while getting retention using Zephyr API</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Null-while-getting-retention-using-Zephyr-API/m-p/429556#M3187</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the snaplock get file retention function using the Vserver API (manageontap-9.8P3.jar) and added the string function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code below that was used in the existing 7-mode API (manageontap-5.2.2.jar) was added.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;string retentionTime =xo.getchlidContent("retantion-time");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;However, null phenomenon occurs when using the function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When using Vserver API (manageontap-9.8P3.jar), is there any code that can replace the code below?&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;string retentionTime =xo.getchlidContent("retantion-time");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Attach log - It is okay to be exposed as a test environment&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;public Object getFileRetention(NetAppVo netAppVo) {&lt;BR /&gt;boolean success = false;&lt;BR /&gt;NaElement xo = null;&lt;BR /&gt;NaServer naSvr = null;&lt;BR /&gt;try {&lt;BR /&gt;String targetPath = netAppVo.getRootDir()+netAppVo.getWormPath();&lt;/P&gt;&lt;P&gt;naSvr = this.getNaServer(netAppVo, false);&lt;/P&gt;&lt;P&gt;NaElement retentionInfo = null;&lt;/P&gt;&lt;P&gt;if(netAppVo.isCheckOs()) {&lt;BR /&gt;/* =================================================================================== */&lt;BR /&gt;/* 신규 API */&lt;BR /&gt;retentionInfo = new NaElement("snaplock-get-file-retention");&lt;BR /&gt;NaElement xi = new NaElement("desired-attributes");&lt;BR /&gt;retentionInfo.addChildElem(xi);&lt;BR /&gt;NaElement xi1 = new NaElement("snaplock-file-retention-info");&lt;BR /&gt;xi.addChildElem(xi1);&lt;BR /&gt;xi1.addNewChild("file",targetPath);&lt;BR /&gt;xi1.addNewChild("formatted-retention-time","&amp;lt;formatted-retention-time&amp;gt;");&lt;BR /&gt;xi1.addNewChild("is-wraparound","&amp;lt;is-wraparound&amp;gt;");&lt;BR /&gt;xi1.addNewChild("retention-time","&amp;lt;retention-time&amp;gt;");&lt;BR /&gt;xi1.addNewChild("vserver",netAppVo.getServerName());&lt;BR /&gt;retentionInfo.addNewChild("file",targetPath);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* =================================================================================== */&lt;BR /&gt;} else {&lt;BR /&gt;/* =================================================================================== */&lt;BR /&gt;/* 기존 API */&lt;BR /&gt;retentionInfo = new NaElement("file-get-snaplock-retention-time");&lt;BR /&gt;retentionInfo.addNewChild("path", targetPath);&lt;BR /&gt;/* =================================================================================== */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;xo = naSvr.invokeElem(retentionInfo);&lt;BR /&gt;System.out.println("result NaElement : " + xo.toPrettyString(""));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;String retentionTime = xo.getChildContent("retention-time");&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;// String retentionTime = getRetentionSecond(netAppVo.getRetention());&lt;BR /&gt;System.out.println("Get Retention Time : " + retentionTime);&lt;BR /&gt;if(retentionTime != null) {&lt;BR /&gt;success = true;&lt;BR /&gt;}&lt;BR /&gt;} catch(NaProtocolException e) {&lt;BR /&gt;e.printStackTrace();&lt;BR /&gt;} catch(NaAuthenticationException e) {&lt;BR /&gt;e.printStackTrace();&lt;BR /&gt;} catch (NaAPIFailedException e) {&lt;BR /&gt;e.printStackTrace();&lt;BR /&gt;} catch (IOException e) {&lt;BR /&gt;e.printStackTrace();&lt;BR /&gt;} catch (Exception e) {&lt;BR /&gt;e.printStackTrace();&lt;BR /&gt;} finally {&lt;BR /&gt;if(naSvr!=null) {&lt;BR /&gt;naSvr.close();&lt;BR /&gt;}&lt;BR /&gt;}&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[root@localhost shell]# sh getRet.sh&lt;BR /&gt;=================================================&lt;BR /&gt;Netapp File Get Retention Process Start...&lt;BR /&gt;=================================================&lt;BR /&gt;localPath : /wormtest/NetAppSDK/shell&lt;BR /&gt;resouce : ../conf/config.properties&lt;BR /&gt;Properties : {}&lt;BR /&gt;properties loading...&lt;BR /&gt;Check OS [7-Mode : false, Vserver : true] : true&lt;BR /&gt;Server Name : svm01&lt;BR /&gt;Server IP : xxx.xxx.xxx.xxx&lt;BR /&gt;Server Port : 443&lt;BR /&gt;Login User : netappadmin&lt;BR /&gt;Login User Password : xxxxxxxx&lt;BR /&gt;Source Path : ../temp/test.tif&lt;BR /&gt;Target Worm Logical Path : /Nmdata01/vol1/test01&lt;BR /&gt;Worm Root Directory(Physical) : /vol&lt;BR /&gt;Set Retention(yyyymmddhhmiss) : 20291124235900&lt;BR /&gt;Proccess Start ...&lt;BR /&gt;Netapp Get File Retention&lt;BR /&gt;result NaElement : &amp;lt;results status='passed'&amp;gt;&lt;BR /&gt;&amp;lt;attributes&amp;gt;&lt;BR /&gt;&amp;lt;snaplock-file-retention-info&amp;gt;&lt;BR /&gt;&amp;lt;file&amp;gt;/vol/Nmdata01/vol1/test01&amp;lt;/file&amp;gt;&lt;BR /&gt;&amp;lt;formatted-retention-time&amp;gt;Sat Nov 24 14:59:00 GMT 2029&amp;lt;/formatted-retention-time&amp;gt;&lt;BR /&gt;&amp;lt;is-wraparound&amp;gt;false&amp;lt;/is-wraparound&amp;gt;&lt;BR /&gt;&amp;lt;retention-time&amp;gt;1890226740&amp;lt;/retention-time&amp;gt;&lt;BR /&gt;&amp;lt;vserver&amp;gt;svm01&amp;lt;/vserver&amp;gt;&lt;BR /&gt;&amp;lt;/snaplock-file-retention-info&amp;gt;&lt;BR /&gt;&amp;lt;/attributes&amp;gt;&lt;BR /&gt;&amp;lt;/results&amp;gt;&lt;/P&gt;&lt;P&gt;Get Retention Time : &lt;FONT color="#FF0000"&gt;null&lt;/FONT&gt;&lt;BR /&gt;result : false&lt;BR /&gt;Proccess Ended ...&lt;BR /&gt;[Procssing Time] : 0.479&lt;BR /&gt;=================================================&lt;BR /&gt;Netapp File Get Retention Process finished !!!&lt;BR /&gt;=================================================&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks..&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 10:08:20 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Null-while-getting-retention-using-Zephyr-API/m-p/429556#M3187</guid>
      <dc:creator>HeehyeonLee</dc:creator>
      <dc:date>2025-06-04T10:08:20Z</dc:date>
    </item>
  </channel>
</rss>

