[sysrepo-devel] rpc lock and unlock

Joan Landry JoLandry at advaoptical.com
Tue Aug 2 14:29:37 UTC 2016


I do not see a command to allow permission to lock a datastore.

I am able to edit the yang model so the permissions on it are 666 - but I think this is not the same as permissions for locking the data store.

The command I am trying to execute is
<rpc>
  <lock>
    <target>
      <candidate/>
  </target>
</lock>
</rpc>




From: Rastislav Szabó [mailto:rastislav.szabo at pantheon.tech]
Sent: Tuesday, August 02, 2016 10:04 AM
To: Joan Landry <JoLandry at advaoptical.com>; sysrepo-devel at sysrepo.org
Subject: Re: rpc lock and unlock


Hi,



yes, lock and unlock should work. Check whether the user connecting to the NETCONF server has write permissions to the model you are trying to lock (sysrepoctl -l), as well as whether Netopeer2 and sysrepod are running under root privileges.



As for the non-netconf interfaces that need to control the locks: cannot these just lock the datastore using

sr_lock_datastore or sr_lock_module API when they are modifying the config? I don't see the use case for callback notifications upon lock and unlock, but if you think that it would be helpful, we can consider it. Could you please be a little bit more specific how they would be supposed to be used?



Thanks,

Rastislav



________________________________
From: Joan Landry <JoLandry at advaoptical.com<mailto:JoLandry at advaoptical.com>>
Sent: Tuesday, August 2, 2016 3:54 PM
To: sysrepo-devel at sysrepo.org<mailto:sysrepo-devel at sysrepo.org>
Subject: [sysrepo-devel] rpc lock and unlock

Do you know if rpc-lock and unlock are supported as I get error when I try to lock any of the data stores.
    <error-message
      xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="en">Locking datastore candidate by session 1 failed (Operation not authorized).</error-message>

Also, Is there a way to register for a callback on a lock and unlock to allow the device system level control over locking the config as there might be a non netconf interface that is modifying the config as well.

Thanks,
Joan
RastislavSzabó
Senior Software Engineer

Sídlo / Mlynské Nivy 56 / 821 05 Bratislava / Slovakia
R&D centrum / Janka Kráľa 9 /  974 01 Banská Bystrica / Slovakia
+421 918 462 530 / rastislav.szabo at pantheon.tech<mailto:rastislav.szabo at pantheon.tech>
reception: +421 2 206 65 114 / www.pantheon.sk<http://www.pantheon.sk>

[logo]


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sysrepo.org/archives/sysrepo-devel/attachments/20160802/8bd68410/attachment.html>


More information about the sysrepo-devel mailing list