cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
109
Views
0
Helpful
0
Replies
khgrant
Cisco Employee

Question on committing a transaction to which I have attached.

 

Hello,

 

For a  PoC I have coded an action, in java using an actionpoint. The customer wants to see that we can backup the config of affected devices before and after each transaction.

 

 

The pseudocode for it is below – see attachement for actual code.

 

 

Commit_with_backup()

 

    • Attach to current transaction

    • Validate (I’ve also tried without validate)

    • Use commit dry run to find all affected devices

    • Call actions to make the devices backup their config ‘copy running ftp:://….’

    • Commit transaction

    • Again perform backup of all devices as before.

 

In NSO 4.1.1 I get an internal error during the commit. (did not try with validate)

 

 

In NSO 4.1.2 I get the following exception :

 

 

Caused by: com.tailf.maapi.MaapiException: not allowed for attached transaction

 

        at com.tailf.maapi.MaapiException.mk(MaapiException.java:61)

 

        at com.tailf.maapi.MaapiException.mk(MaapiException.java:50)

 

        at com.tailf.maapi.Maapi.applyTrans(Maapi.java:1220)

 

        at com.tailf.maapi.Maapi.applyTrans(Maapi.java:1145)

 

        at com.example.saveconf.saveconfRFS.commitWithBackup(saveconfRFS.java:84)

 

OR

 

Caused by: com.tailf.maapi.MaapiException: not allowed for attached transaction

 

        at com.tailf.maapi.MaapiException.mk(MaapiException.java:61)

 

        at com.tailf.maapi.MaapiException.mk(MaapiException.java:50)

 

        at com.tailf.maapi.Maapi.validateTrans(Maapi.java:1340)

 

        at com.example.saveconf.saveconfRFS.commitWithBackup(saveconfRFS.java:60)

 

Depending on whether I have the valiadate step commented out or not (I realise validate is also part of commit – so guess this is happening in validate step).

 

 

Is there a different way I can validate/commit this transaction here? I’ve seen no documentation of this limitation, is NSO behaving as expected?

 

Is there anything conceptually wrong with attaching to an existing transaction and validating/committing it in an action?

 

 

Also any help in working around this is much appreciated.

 

For now I will have multiple steps to be called from northbound system or operator i.e.: validate, backup-before-action, commit, backup-after-action, but it would be much better to have a single action.

 

0 REPLIES 0
Create
Recognize Your Peers
Content for Community-Ad