I tried to create a simple provider by following the tutorials from
your previous mail.
I was able to register it. But encountered the following error in
TUT_UnixProcess instances.
Would you please point out the mistakes i am doing
CIM_ERR_FAILED: Error initializing CMPI MI TUT_UnixProcess, the
following MI factory function(s) returned an error:
_Generic_Create_InstanceMI, message was: Traceback (most recent call
last):
File "/usr/lib/python2.7/site-packages/cmpi_pywbem_bindings.py", line
446, in get_cmpi_proxy_provider
prox = ExceptionClassWrapper(CMPIProxyProvider(miname, broker, ctx))
File "/usr/lib/python2.7/site-packages/cmpi_pywbem_bindings.py", line
463, in _init_
self.proxy = ProviderProxy(env, provmod)
File "/usr/lib/python2.7/site-packages/pywbem/cim_provider2.py", line
1670, in_init_
self._load_provider_source(logger)
File "/usr/lib/python2.7/site-packages/pywbem/cim_provider2.py", line
1694, in _load_provider_source
fn = imp.find_module(self.provider_module_name, [provdir])
ImportError: No module named TUT_UnixProcess
On Fri, Sep 27, 2013 at 6:47 PM, Jan Safranek <jsafrane(a)redhat.com> wrote:
On 09/27/2013 11:24 AM, Chethan Y wrote:
> Hi,
>
> Please Correct me if i am wrong and let me know if there are any
> suggestions or help. We Are Implementing Nfs Protocol for NAS Head
> profile. As per my understanding
>
> CIM_ManagedElement (Super Class) | CIM_ManagedSystemElement (Sub
> Class) | CIM_LogicalElement | CIM_EnabledLogicalElement |
> | [ CIM_Share ] CIM_Process |
> | [ CIM_FileShare ] CIM_UnixProcess | [ CIM_NfsShare ]
>
> Instances of CIM_Process are running but CIM_Share is not supported.
> So, We need to enable and implement CIM_Share and later on we are
> going to add Nfs protocol for CIM_Nfsshare and CIFS protocol for
> CIM_CIFSshare.
>
> CIM_EnabledLogicalElement is inherited in LMI_Storage-Base.mof Where
> Could i find the CIM_Share file and i am confused in which file
> should i start the implementation ?
MOF files for CIM_* classes are distributed by DMTF and can be
downloaded at
http://dmtf.org/standards/cim/.
In Fedora, you can install cim-schema package, the MOF files are then in
/usr/share/mof/
There is also link to generated HTML docs:
http://schemas.dmtf.org/wbem/cim-html/ ('+' directory denotes all
classes, including Experimental ones).
> And also how to create a new cim class and register it?
You basically choose a CIM class (or LMI one) which you want to inherit
and create new MOF file with an definition of your subclass.
class LMI_NfsShare : CIM_NfsShare {
... new properties / methods go here...
}
You can find plenty of examples in OpenLMI MOF files, actually we just
subclass appropriate CIM class, add our properties/methods there and
inherit as much from the original class as possible.
Regarding registration, provider implementation and debugging, we have
two tutorials how to create a simple provider, see
https://fedorahosted.org/openlmi/wiki/ProviderTutorial and
https://fedorahosted.org/openlmi/wiki/CimProviderHowto.
Jan
--
Thanks,
Hemanth Kumar H C