-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 12/03/2013 04:47 PM, Pavel Březina wrote:
Hi, I have chosen an OpenLMI topic for my diploma thesis [1]. The goal of this thesis is to create an OpenLMI provider that would bring remote control over SSSD [2].
So far I have started by creating a simple provider, that provides one class called LMI_Test, with string field called Value. I'd like to provide getter and setter for Value, but I can't find a way how to change internal state of LMI_Test via a method call. Is it even possible/recommended? Or are methods supposed to manipulate with the object just in read-only manner? Can you give me some guidance please?
You can find the provider in my repository (branch wip): git://fedorapeople.org/home/fedora/pbrezina/public_git/openlmi_test.git
Thank you.
Regards, Pavel Březina.
[1] https://thesis-managementsystem.rhcloud.com/topic/show/10/create-openlmi-pro...
Hi,
for every class, there already are "setters" and "getters" defined. They are called ModifyInstance() and GetInstance(). These are so called intrinsic methods, and all you have to do is implement them.
If you want to set Value from your method, you would first have to get an instance of LMI_Test (that is, call GetInstance()) in the method code, then modify Value and call ModifyInstance().
Some useful information:
http://www.openlmi.org/ -- project's main info site with all the docs
https://git.fedorahosted.org/cgit/openlmi-networking.git/ -- network providers
https://git.fedorahosted.org/cgit/openlmi-providers.git/ -- smaller providers
Note: From [1], if "Restarting SSSD" means restarting the sssd service via system means (e.g. systemctl on Fedora), that is probably already implemented in the Service provider (see openlmi-providers).
Also, I cloned your repository, but I can't see any branches but master.
I hope I could help,
- -- Jan Synacek Software Engineer, Red Hat