Make sure, that sblim-cmpi-base package (in Fedora) is installed and particular
providers are registered. This package installs Linux_* classes and providers
that are reguired by some of OpenLMI profiles.

If you don't want this dependency, you can just refer to CIM_ComputerSystem
which should be instrumented by your cimom alone.

Michal
On 19.7.2013 07:04, George varghese wrote:
It is solved when I removed the implmented qualifier from mof file. 
In mof file have another class with association of Linux_ComputerSystem class.


/******************************************************************************
 * Software inventory associations
 */
[Association]
class GK_HostedSoftwareCollection : CIM_HostedCollection {

  [Override("Antecedent")]
  Linux_ComputerSystem REF Antecedent;

  [Override("Dependent")]
  GK_SystemSoftwareCollection REF Dependent;

};

Then I trying to create provider files using konkret. I got the following error.

$konkret -m GK_Software.mof -s GK_SoftwareIdentity GK_SoftwareIdentity
Using: /usr/share/sfcb/CIM//CIM_Schema.mof
error: GK_Software.mof(238): class referred to by ref "Antecedent" is undefined: "Linux_ComputerSystem"

How to resolve this. 

Regards,
George





On Thu, Jul 18, 2013 at 6:53 PM, Michal Minář <miminar@redhat.com> wrote:
You may safely remove the Implemented qualifier from your properties.
This qualifier is registered with cimoms by installation of openlmi-providers.
You can find it in openlmi-providers/mof/05_LMI_Qualifiers.mof in git repository.
It is used in OpenLMI providers just for introspection and tracking of what we
implement and what not.

If you want to use it, you need to register mentioned file with broker before you
register your providers, that use it.

Best regards,
Michal


On 18.7.2013 13:34, George varghese wrote:
I have added only one class in my mof file.

See one class in mof file as below,

class GK_SoftwareIdentity : CIM_SoftwareIdentity {

    [Implemented(true), Override("InstanceID"), Description(
        "Unique identifier for installed or available package."
        " It's composed of OrgID and LocalID separated by ':',  where"
        " <OrgID> is GK and LocalID is PKG:<PKG_NEVRA>. <PKG_NEVRA>"
        " is a string representing rpm package. Letters in NEVRA stand"
        " for name, epoch, version, release and architecture.")]
    string InstanceID;

    [Implemented(true), Override("Caption"), Description("Package's summary.")]
    string Caption;

    [Implemented(true), Override("Classifications")]
    uint16 Classifications[];

    [Implemented(true), Override("Description"), Description(
        "Package's description.")]
    string Description;

    [Implemented(true), Override("ElementName"), Description(
        "Package's NEVRA string. That is also part of InstanceID.")]
    string ElementName;

    [Implemented(true), Override("InstallDate")]
    datetime InstallDate;

    [Implemented(true), Override("IsEntity")]
    boolean IsEntity;

    [Implemented(true), Override("Name"), Description(
        "Name of package. This does not uniquely identify package"
        " installed on computer system.")]
    string Name;

    [Implemented(true), Override("TargetTypes")]
    string TargetTypes[];

    [Implemented(true), Override("VersionString"), Description(
        "Package's EVRA, in format: "
        "<epoch>:<version>-<release>.<architecture>")]
    string VersionString;

    [Implemented(true), Description("Package's epoch.")]
    uint32 Epoch;

    [Implemented(true), Description("Package's version.")]
    string Version;

    [Implemented(true), Description("Package's release.")]
    string Release;

    [Implemented(true), Description("Package's architecture.")]
    string Architecture;

};

Then I trying to create skelton code using konkretCMPI,

I export KONKRET_SCHEMA_DIR as /usr/share/sfcb/CIM/.

then I trying to generate code,

$konkret -m GK_Software.mof -s GK_SoftwareIdentity GK_SoftwareIdentity

I got the following error,

Using: /usr/share/sfcb/CIM//CIM_Schema.mof
error: GK_Software.mof(6): undefined qualifier: "Implemented"

What is the releavance of "Implemented" tag here.

How to resolve this issue. 



On Thu, Jul 18, 2013 at 3:07 PM, Ales Ledvinka <aledvink@redhat.com> wrote:
Hello,

First step is what suggested Jan to resolve the errors
during konkret skeleton generation you described.

Then if you experience further errors during compilation:
The konkret does not owerwrite any existing file.
So from the the very first run that produced error you might
have inconsistent contents from before the mof change.
Retry running konkret in empty directory untill you resolve
all the errors. Then take the list of files generated and
clean up or merge in case you changed the files in your original
project.

----- Original Message -----
From: "Jan Synacek" <jsynacek@redhat.com>
To: openlmi-devel@lists.fedorahosted.org
Sent: Thursday, July 18, 2013 10:07:14 AM
Subject: Re: undefined Linux_ComputerSystem class

On 07/17/2013 01:48 PM, George varghese wrote:
> Hi,
>
> I have trying to implement software update provider using OpenLMI. I have
> requirement to implement firmware update using this provider. Right now the
> implementation of software update in python. I don't know this language
> very well. So I trying to implement it in C language.
>
> For this purpose I had reused the mof file of openlmi software. I have just
> renamed LMI to GK. Then trying to create skeleton provider source in c
> using konkret. Due to some error its not possible. I have removed
> [Implemented(true), Override("CommunicationStatus")]
> due the error. error is these symbols are undefined. I don't its relevance
> here.
> Then I faced another error is undefined "Linux_ComputerSystem" class. This
> mof file exists in same path.
>
>
> How to resolve this issue?
>
> Regards,
> George

Hi George,

I suggest that you should read the OpenLMI wiki at [1], especially [2].
What you probably want is to specify the KONKRET_SCHEMA_DIR environment variable
(for example you can set it to /usr/share/mof/cim-current/ to include all the
system classes' definitions).

[1] https://fedorahosted.org/openlmi/
[2] https://fedorahosted.org/openlmi/wiki/ProviderTutorialImplementationC

--
Jan Synacek
Software Engineer, Red Hat
_______________________________________________
openlmi-devel mailing list
openlmi-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/openlmi-devel
_______________________________________________
openlmi-devel mailing list
openlmi-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/openlmi-devel



_______________________________________________
openlmi-devel mailing list
openlmi-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/openlmi-devel


_______________________________________________
openlmi-devel mailing list
openlmi-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/openlmi-devel




_______________________________________________
openlmi-devel mailing list
openlmi-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/openlmi-devel