Creating a test provider

Jan Synacek jsynacek at redhat.com
Wed Dec 4 07:29:06 UTC 2013


-----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-provider-for-management-of-the-client-components
>
>  [2] https://fedorahosted.org/sssd

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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJSntm5AAoJEL3BmMJQOtjBLdEP/1H3stQRN0agcyXccmKoWB3w
NFhvYJEjW2JDXvSShcyYa/0QdkGzmFNA80Uqp9574k6uxLEX+2YnBbNQciRRJbU9
Dl4o/vHbnum6H/c3iPKS0q1OrGDg/WulrzTZE+Hr1vjaf6pp9qOGujHc25kGKxyN
3zN97uOcZ8QKPcHoYZsa4TI3eHCwVZxpAdEx4iKA19E59T4t0QoTVgS60Hb7xRk6
jMY4obewKZsnMSlSX+2d/aM/Sj7N9xeu2vCA9IU49IEJF9N6lwj7Omfjjo+UPZvR
FYF7HmybKULQ+5W0eMF0Z6kNCbBrIqxHNI6mHGiScO/Lfs9SsWkuKaw47/sWSR0f
2KtAkrlOImhys7owXz/kXanGSb4/FLwpPi22EIKpAWZoTztbYu4fWE+oVTmzW5QR
npWAzIJUz6D20UGhyFaM8gtT4XEXdho8OWB5uLwTndI0q++7FT1F8aonW0o9MLbI
TeF92BvrTlkwc8Z3UmwjArTnhnEOj/v7sOG/Eq0RPsZtuXfZPIoKvyUP4tbEJwwA
4Wne3AguWZt/nfYll2hM4hFjWVif2qZ3Xe02YbvipFhiB05zG0ub+vphvxzX1tzn
E7K+dw/u9PRxXwqCLXDdjgcrNoiXUh12QECp71rXnAASOQXQf/v7L/tntxbtK2Ap
8a7vXtS1swPQTtrA3VC0
=lqXy
-----END PGP SIGNATURE-----


More information about the openlmi-devel mailing list