#5 Treating qualifier inheritance of CreateClass

backlog
open
sfcb (22)
Function
2013-05-31
2009-05-21
No

The following CIM-XML gets some problems;

(1) The values of "Abstract" and "Association" are not evaluated.
They are assumed TRUE when "Abstract", "Association" and "Indication" are specified.
(2) QualifierDeclaration is not checked to inherit.
(2.1) When a SuperClass has "Abstract=TRUE", then new Class also has "Abstract=TRUE".
However, the "Abstract" qualifier has declaration of "TOSUBCLASS=FALSE", no inherit "Abstract" is correct.
(2.2) "Description" qualifier has declaration of "TOSUBCLASS=TRUE" and "OVERRIDABLE=TRUE".
"Version" qualifier has declaration of "TOSUBCLASS=FALSE" and "OVERRIDABLE=TRUE" (It is valid when "TOSUBCLASS=TRUE").
But the Description and Version cannot be override by new value.
(3) So I sometimes met segfault of classname in this test, I add strdup of classname when putting into hashtable in classProvider.c.

This time, my proposal is bigger then previous proposals.
But I checked these only Ubuntu. If there are any problems, please let me know.

In addition, mofc/backend_sfcb.c is patched in my proposal to compile sfcb, but mofc is not tested.

<?xml version="1.0" encoding="utf-8"?>
<CIM CIMVERSION="2.0" DTDVERSION="2.0">
<MESSAGE ID="4197" PROTOCOLVERSION="1.0">
<SIMPLEREQ>
<IMETHODCALL NAME="CreateClass">
<LOCALNAMESPACEPATH>
<NAMESPACE NAME="root"/>
<NAMESPACE NAME="interop"/>
</LOCALNAMESPACEPATH>
<IPARAMVALUE NAME="NewClass">
<CLASS NAME="CIM_Indication2" SUPERCLASS="CIM_Indication">
<QUALIFIER NAME="Abstract" TYPE="boolean">
<VALUE>FALSE</VALUE>
</QUALIFIER>
<QUALIFIER NAME="Association" TYPE="boolean">
<VALUE>FALSE</VALUE>
</QUALIFIER>
<QUALIFIER NAME="Version" TYPE="string">
<VALUE>2.8.0</VALUE>
</QUALIFIER>
<QUALIFIER NAME="Description" TYPE="string">
<VALUE>For CIM_Indication2 test</VALUE>
</QUALIFIER>
<PROPERTY NAME="IndicationIdentifier" TYPE="string">
<QUALIFIER NAME="Description" TYPE="string">
<VALUE>IndicationIdentifier description for CIM_Indication2 test</VALUE>
</QUALIFIER>
</PROPERTY>
</CLASS>
</IPARAMVALUE>
</IMETHODCALL>
</SIMPLEREQ>
</MESSAGE>
</CIM>

Discussion

  • Shigeyoshi Hashi

    So it is needed more improvement to pass following CIM-XML.
    I posted 2794712_QualifierInheritance3.patch.

    CIM-XML to test. 2794712_QualifierInheritance3.patch pass it.
    <?xml version="1.0" encoding="utf-8"?>
    <CIM CIMVERSION="2.0" DTDVERSION="2.0">
    <MESSAGE ID="4136" PROTOCOLVERSION="1.0">
    <SIMPLEREQ>
    <IMETHODCALL NAME="CreateClass">
    <LOCALNAMESPACEPATH>
    <NAMESPACE NAME="root"/>
    <NAMESPACE NAME="interop"/>
    </LOCALNAMESPACEPATH>
    <IPARAMVALUE NAME="NewClass">
    <CLASS NAME="CIM_Test" SUPERCLASS="CIM_EnabledLogicalElement">
    <QUALIFIER NAME="Abstract" TYPE="boolean">
    <VALUE>FALSE</VALUE>
    </QUALIFIER>
    <QUALIFIER NAME="Version" TYPE="string">
    <VALUE>2.9.0</VALUE>
    </QUALIFIER>
    <QUALIFIER NAME="Description" TYPE="string">
    <VALUE>Description String.</VALUE>
    </QUALIFIER>
    <PROPERTY NAME="ElementName" TYPE="string">
    <QUALIFIER NAME="Description" TYPE="string">
    <VALUE>Element Name Description.</VALUE>
    </QUALIFIER>
    </PROPERTY>
    <PROPERTY NAME="Description" TYPE="string">
    <QUALIFIER NAME="Description" TYPE="string">
    <VALUE></VALUE>
    </QUALIFIER>
    </PROPERTY>
    <PROPERTY NAME="Caption" TYPE="string">
    <QUALIFIER NAME="Description" TYPE="string">
    <VALUE></VALUE>
    </QUALIFIER>
    <QUALIFIER NAME="MaxLen" TYPE="uint32">
    <VALUE>128</VALUE>
    </QUALIFIER>
    </PROPERTY>
    <PROPERTY NAME="InstallDate" TYPE="datetime">
    <QUALIFIER NAME="Description" TYPE="string">
    <VALUE>A only</VALUE>
    </QUALIFIER>
    <QUALIFIER NAME="MappingStrings" TYPE="string">
    <VALUE.ARRAY>
    <VALUE></VALUE>
    </VALUE.ARRAY>
    </QUALIFIER>
    </PROPERTY>
    <PROPERTY NAME="Name" TYPE="string">
    <QUALIFIER NAME="Description" TYPE="string">
    <VALUE>The Name property defines the label by which the object is known. When subclassed, the Name property can be overridden to be a Key property.</VALUE>
    </QUALIFIER>
    <QUALIFIER NAME="MaxLen" TYPE="uint32">
    <VALUE>10240</VALUE>
    </QUALIFIER>
    </PROPERTY>
    <PROPERTY.ARRAY NAME="OperationalStatus" TYPE="uint16">
    <QUALIFIER NAME="Description" TYPE="string">
    <VALUE>Indicates.</VALUE>
    </QUALIFIER>
    <QUALIFIER NAME="ValueMap" TYPE="string">
    <VALUE.ARRAY>
    <VALUE>0</VALUE>
    <VALUE>2</VALUE>
    <VALUE>4</VALUE>
    <VALUE>6</VALUE>
    <VALUE>8</VALUE>
    <VALUE>10</VALUE>
    <VALUE>12</VALUE>
    <VALUE>14</VALUE>
    <VALUE>16</VALUE>
    <VALUE>18</VALUE>
    <VALUE>..</VALUE>
    <VALUE>0x8000..</VALUE>
    </VALUE.ARRAY>
    </QUALIFIER>
    <QUALIFIER NAME="Values" TYPE="string">
    <VALUE.ARRAY>
    <VALUE>Unknown</VALUE>
    <VALUE>OK</VALUE>
    <VALUE>Stressed</VALUE>
    <VALUE>Error</VALUE>
    <VALUE>Starting</VALUE>
    <VALUE>Stopped</VALUE>
    <VALUE>No Contact</VALUE>
    <VALUE>Aborted</VALUE>
    <VALUE>Supporting Entity in Error</VALUE>
    <VALUE>Power Mode</VALUE>
    <VALUE>DMTF Reserved</VALUE>
    <VALUE>Vendor Reserved</VALUE>
    </VALUE.ARRAY>
    </QUALIFIER>
    <QUALIFIER NAME="ArrayType" TYPE="string">
    <VALUE>Indexed</VALUE>
    </QUALIFIER>
    <QUALIFIER NAME="ModelCorrespondence" TYPE="string">
    <VALUE.ARRAY>
    </VALUE.ARRAY>
    </QUALIFIER>
    </PROPERTY.ARRAY>
    <PROPERTY.ARRAY NAME="StatusDescriptions" TYPE="string">
    <QUALIFIER NAME="Description" TYPE="string">
    <VALUE>Strings describing the various OperationalStatus array values. For example, if "Stopping" is the value assigned to OperationalStatus, then this property may contain an explanation as to why an object is being stopped. Note that entries in this array are correlated with those at the same array index in OperationalStatus.</VALUE>
    </QUALIFIER>
    <QUALIFIER NAME="ArrayType" TYPE="string">
    <VALUE>Indexed</VALUE>
    </QUALIFIER>
    <QUALIFIER NAME="ModelCorrespondence" TYPE="string">
    <VALUE.ARRAY>
    <VALUE>CIM_ManagedSystemElement.OperationalStatus</VALUE>
    </VALUE.ARRAY>
    </QUALIFIER>
    </PROPERTY.ARRAY>
    <PROPERTY NAME="Status" TYPE="string">
    <QUALIFIER NAME="Deprecated" TYPE="string">
    <VALUE.ARRAY>
    <VALUE>CIM_ManagedSystemElement.OperationalStatus</VALUE>
    </VALUE.ARRAY>
    </QUALIFIER>
    <QUALIFIER NAME="Description" TYPE="string">
    <VALUE>A string indicating the current status of the object. Various operational and non-operational statuses are defined. This property is deprecated in lieu of OperationalStatus, which includes the same semantics in its enumeration. This change is made for 3 reasons: 1) Status is more correctly defined as an array. This overcomes the limitation of describing status via a single value, when it is really a multi-valued property (for example, an element may be OK AND Stopped. 2) A MaxLen of 10 is too restrictive and leads to unclear enumerated values. And, 3) The change to a uint16 data type was discussed when CIM V2.0 was defined. However, existing V1.0 implementations used the string property and did not want to modify their code. Therefore, Status was grandfathered into the Schema. Use of the Deprecated qualifier allows the maintenance of the existing property, but also permits an improved definition using OperationalStatus.</VALUE>
    </QUALIFIER>
    <QUALIFIER NAME="ValueMap" TYPE="string">
    <VALUE.ARRAY>
    <VALUE>OK1</VALUE>
    <VALUE>Error2</VALUE>
    <VALUE>Degraded3</VALUE>
    <VALUE>Unknown4</VALUE>
    <VALUE>Pred Fail5</VALUE>
    <VALUE>Starting6</VALUE>
    <VALUE>Stopping7</VALUE>
    <VALUE>Service8</VALUE>
    <VALUE>Stressed9</VALUE>
    <VALUE>NonRecover10</VALUE>
    <VALUE>No Contact11</VALUE>
    <VALUE>Lost Comm12</VALUE>
    <VALUE>Stopped13</VALUE>
    </VALUE.ARRAY>
    </QUALIFIER>
    <QUALIFIER NAME="MaxLen" TYPE="uint32">
    <VALUE>100</VALUE>
    </QUALIFIER>
    </PROPERTY>
    <PROPERTY NAME="EnabledState" TYPE="uint16">
    <QUALIFIER NAME="Description" TYPE="string">
    <VALUE>Zero only</VALUE>
    </QUALIFIER>
    <QUALIFIER NAME="ValueMap" TYPE="string">
    <VALUE.ARRAY>
    <VALUE>0</VALUE>
    </VALUE.ARRAY>
    </QUALIFIER>
    <QUALIFIER NAME="Values" TYPE="string">
    <VALUE.ARRAY>
    <VALUE>Unknown</VALUE>
    </VALUE.ARRAY>
    </QUALIFIER>
    <QUALIFIER NAME="ModelCorrespondence" TYPE="string">
    <VALUE.ARRAY>
    <VALUE>CIM_EnabledLogicalElement.OtherEnabledState1</VALUE>
    <VALUE>CIM_EnabledLogicalElement.OtherEnabledState2</VALUE>
    <VALUE>CIM_EnabledLogicalElement.OtherEnabledState3</VALUE>
    </VALUE.ARRAY>
    </QUALIFIER>
    <VALUE>5</VALUE>
    </PROPERTY>
    <PROPERTY NAME="OtherEnabledState" TYPE="string">
    <QUALIFIER NAME="Description" TYPE="string">
    <VALUE>A string describing the element's enabled/disabled state when the EnabledState property is set to 1 ("Other"). This property MUST be set to NULL when EnabledState is any value other than 1.</VALUE>
    </QUALIFIER>
    <QUALIFIER NAME="ModelCorrespondence" TYPE="string">
    <VALUE.ARRAY>
    <VALUE>CIM_EnabledLogicalElement.EnabledState</VALUE>
    </VALUE.ARRAY>
    </QUALIFIER>
    </PROPERTY>
    <PROPERTY NAME="RequestedState" TYPE="uint16">
    <QUALIFIER NAME="Description" TYPE="string">
    <VALUE>RequestedState is an integer enumeration indicating the last requested or desired state for the element. The actual state of the element is represented by EnabledState. This property is provided to compare the last requested and current enabled/disabled states. Note that when EnabledState is set to 5 ("Not Applicable"), then this property has no meaning. By default, the element's RequestedState is 5 ("No Change"). Refer to the EnabledState's property Description for explanations of the values in the RequestedState enumeration. \n\nIt should be noted that there are two new values in RequestedState that build on the statuses of EnabledState. These are "Reboot" (10) and "Reset" (11). The former, Reboot, refers to doing a "Shut Down" and then moving to an "Enabled" state. The latter, Reset, indicates that the element is first "Disabled" and then "Enabled". The distinction between requesting "Shut Down" and "Disabled" should also be noted. The former, Shut Down, requests an orderly transition to the Disabled state, and MAY involve removing power, to completely erase any existing state. The latter, the Disabled state, requests an immediate disabling of the element, such that it will not execute or accept any commands or processing requests. \n\nThis property is set as the result of a method invocation (such as Start or StopService on CIM_Service), or may be overridden and defined as WRITEable in a subclass. The method approach is considered superior to a WRITEable property, since it allows an explicit invocation of the operation and the return of a result code.</VALUE>
    </QUALIFIER>
    <QUALIFIER NAME="ValueMap" TYPE="string">
    <VALUE.ARRAY>
    <VALUE>2</VALUE>
    <VALUE>3</VALUE>
    <VALUE>4</VALUE>
    <VALUE>5</VALUE>
    <VALUE>6</VALUE>
    <VALUE>7</VALUE>
    <VALUE>8</VALUE>
    <VALUE>9</VALUE>
    <VALUE>10</VALUE>
    <VALUE>11</VALUE>
    <VALUE>..</VALUE>
    <VALUE>32768..65535</VALUE>
    </VALUE.ARRAY>
    </QUALIFIER>
    <QUALIFIER NAME="Values" TYPE="string">
    <VALUE.ARRAY>
    <VALUE>Enabled</VALUE>
    <VALUE>Disabled</VALUE>
    <VALUE>Shut Down</VALUE>
    <VALUE>No Change</VALUE>
    <VALUE>Offline</VALUE>
    <VALUE>Test</VALUE>
    <VALUE>Deferred</VALUE>
    <VALUE>Quiesce</VALUE>
    <VALUE>Reboot</VALUE>
    <VALUE>Reset</VALUE>
    <VALUE>DMTF Reserved</VALUE>
    <VALUE>Vendor Reserved</VALUE>
    </VALUE.ARRAY>
    </QUALIFIER>
    <QUALIFIER NAME="ModelCorrespondence" TYPE="string">
    <VALUE.ARRAY>
    <VALUE>CIM_EnabledLogicalElement.EnabledState</VALUE>
    </VALUE.ARRAY>
    </QUALIFIER>
    <VALUE>5</VALUE>
    </PROPERTY>
    <PROPERTY NAME="EnabledDefault" TYPE="uint16">
    <QUALIFIER NAME="Write" TYPE="boolean">
    <VALUE>FALSE</VALUE>
    </QUALIFIER>
    <QUALIFIER NAME="Description" TYPE="string">
    <VALUE>Cannot write?.</VALUE>
    </QUALIFIER>
    <QUALIFIER NAME="ValueMap" TYPE="string">
    <VALUE.ARRAY>
    <VALUE>2</VALUE>
    <VALUE>3</VALUE>
    <VALUE>5</VALUE>
    <VALUE>6</VALUE>
    <VALUE>7</VALUE>
    <VALUE>8..32767</VALUE>
    <VALUE>32768..65535</VALUE>
    </VALUE.ARRAY>
    </QUALIFIER>
    <QUALIFIER NAME="Values" TYPE="string">
    <VALUE.ARRAY>
    <VALUE>Enabled</VALUE>
    <VALUE>Disabled</VALUE>
    <VALUE>Not Applicable</VALUE>
    <VALUE>Enabled but Offline</VALUE>
    <VALUE>No Default</VALUE>
    <VALUE>DMTF Reserved</VALUE>
    <VALUE>Vendor Reserved</VALUE>
    </VALUE.ARRAY>
    </QUALIFIER>
    <VALUE>2</VALUE>
    </PROPERTY>
    <PROPERTY NAME="TimeOfLastStateChange" TYPE="datetime">
    <QUALIFIER NAME="Description" TYPE="string">
    <VALUE>The date/time when the element's EnabledState last changed. If the state of the element has not changed and this property is populated, then it MUST be set to a 0 interval value. If a state change was requested, but rejected or not yet processed, the property MUST NOT be updated.</VALUE>
    </QUALIFIER>
    </PROPERTY>
    </CLASS>
    </IPARAMVALUE>
    </IMETHODCALL>
    </SIMPLEREQ>
    </MESSAGE>
    </CIM>

     
  • Chris Buccella

    Chris Buccella - 2013-02-12
    • component: --> sfcb
     
  • Chris Buccella

    Chris Buccella - 2013-02-12
     
  • Chris Buccella

    Chris Buccella - 2013-02-21

    Ticket moved from /p/sblim/bugs/1599/

    Can't be converted:

    • _component: sfcb
    • _milestone: Function
    • _priority: 5
     
  • Michael Chase-Salerno

    • category: --> Function
    • milestone: Function --> 1.4.5
     
  • Chris Buccella

    Chris Buccella - 2013-05-31
    • Release: 1.4.5 --> backlog
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks