<?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 How to make DpActionTrans.actionSetTimeout configurable instead of static in NSO Developer Hub Discussions</title>
    <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-to-make-dpactiontrans-actionsettimeout-configurable-instead/m-p/4266895#M5965</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Currently we hard coded the action timeout value(600 sec) in the action class.&amp;nbsp; But we want to make it configurable instead of static.&lt;/P&gt;
&lt;P&gt;@ActionCallback(callPoint = "test", callType = ActionCBType.ACTION)&lt;BR /&gt;public ConfXMLParam[] test(DpActionTrans trans, ConfTag name, ConfObject[] kp, ConfXMLParam[] params)&lt;BR /&gt;throws DpCallbackException {&lt;/P&gt;
&lt;P&gt;trans.actionSetTimeout(600);&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;Any idea how to make it configurable?&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards&lt;BR /&gt;Ramathulasi&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jan 2021 09:33:57 GMT</pubDate>
    <dc:creator>rkudumul</dc:creator>
    <dc:date>2021-01-05T09:33:57Z</dc:date>
    <item>
      <title>How to make DpActionTrans.actionSetTimeout configurable instead of static</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-to-make-dpactiontrans-actionsettimeout-configurable-instead/m-p/4266895#M5965</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Currently we hard coded the action timeout value(600 sec) in the action class.&amp;nbsp; But we want to make it configurable instead of static.&lt;/P&gt;
&lt;P&gt;@ActionCallback(callPoint = "test", callType = ActionCBType.ACTION)&lt;BR /&gt;public ConfXMLParam[] test(DpActionTrans trans, ConfTag name, ConfObject[] kp, ConfXMLParam[] params)&lt;BR /&gt;throws DpCallbackException {&lt;/P&gt;
&lt;P&gt;trans.actionSetTimeout(600);&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;Any idea how to make it configurable?&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards&lt;BR /&gt;Ramathulasi&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 09:33:57 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-to-make-dpactiontrans-actionsettimeout-configurable-instead/m-p/4266895#M5965</guid>
      <dc:creator>rkudumul</dc:creator>
      <dc:date>2021-01-05T09:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to make DpActionTrans.actionSetTimeout configurable instead of static</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-to-make-dpactiontrans-actionsettimeout-configurable-instead/m-p/4268281#M5972</link>
      <description>Hello,&lt;BR /&gt;One way to make it configurable is to add an input parameter to your action. So you alter the yang model for the action adding an  input section like&lt;BR /&gt;input {&lt;BR /&gt;  leaf transaction-timeout {&lt;BR /&gt;      type uint16;&lt;BR /&gt;      default 600;&lt;BR /&gt;      description ‘transaction timeout in seconds’;&lt;BR /&gt;  }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;In your code you have to get the value from the params argument. A java example for a string value is in the NSO installation under&lt;BR /&gt;examples.ncs/getting-started/developing-with-ncs/2-actions&lt;BR /&gt;&lt;BR /&gt;Another possibility would be to store this timeout in cdb, and having the action read it from there. It works if you are not interested in changing it per invocation, but rather just configuring a default value once.&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Jan 2021 09:14:48 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-to-make-dpactiontrans-actionsettimeout-configurable-instead/m-p/4268281#M5972</guid>
      <dc:creator>snovello</dc:creator>
      <dc:date>2021-01-07T09:14:48Z</dc:date>
    </item>
  </channel>
</rss>

