<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi,<br>
    <br>
    according to Profile Registration Profile [1], there are two ways of
    registered profile advertisement:<br>
    <ol>
      <li>Central Class Profile Implementation Advertisement<br>
      </li>
      <li>Scoping Class Profile Implementation Advertisement<br>
      </li>
    </ol>
    <p>Both are mutually exclusive (can not be used together for the
      same profile). From what I've read they have following features:<br>
    </p>
    <ol>
      <li>Central Class</li>
      <ul>
        <li>associates instances of Central Class to instance of
          RegisteredProfile</li>
        <ul>
          <li>every profile has usually different Central Class<br>
          </li>
        </ul>
        <li>pros:</li>
        <ul>
          <li>simple clients</li>
          <ul>
            <li>both generic (operating on CIM_RegisteredProfile) and
              LMI specific clients could use the same algorithm to find
              out, which profiles and versions are installed</li>
            <li>just one call to Associators from particular instance of
              Central Class</li>
          </ul>
          <li>compatible with other providers (from other vendors)
            implementing the same profile</li>
          <ul>
            <li>both can run under the same broker</li>
          </ul>
        </ul>
        <li>cons:</li>
        <ul>
          <li>difficult implementation</li>
          <ul>
            <li>each of our profile would need to implement its own
              implementation of ElementConformsToProfile association
              class</li>
            <li>can not be done generically<br>
            </li>
          </ul>
        </ul>
      </ul>
      <li>Scoping Class</li>
      <ul>
        <li>associates instance of Scoping Class to instance of
          RegisteredProfile</li>
        <ul>
          <li>Scoping Class is practically always CIM_ComputerSystem</li>
          <ul>
            <li>there is just one instance of ScopingClass on particular
              CIMOM</li>
          </ul>
        </ul>
        <li>pros:</li>
        <ul>
          <li>simple implementation</li>
          <ul>
            <li>we can make the registration generic - see below<br>
            </li>
          </ul>
        </ul>
        <li>cons:</li>
        <ul>
          <li>difficulties for generic clients in finding out, which
            profile and version is available</li>
          <ul>
            <li>see section 9.4 in [1]</li>
            <li>this does no apply to OpenLMI specific clients, which
              could enumerate/query just LMI_RegisteredProfile instances<br>
            </li>
          </ul>
          <li>OpenLMI providers would not be compatible with those
            provided by other vendors implementing the same profile</li>
        </ul>
      </ul>
    </ol>
    <p>Me and Jan think that the Scoping Class approach is the right
      way. Here is a proposal for profile registration based on this
      approach:<br>
    </p>
    <ol>
      <li>let's create a file</li>
      <ul>
        <li><tt>/usr/share/openlmi-{providers,network,storage}/LMI_{Software,Network,Storage,...}RegisteredProfiles.json</tt></li>
      </ul>
      <li>with contents (in json) below<br>
      </li>
      <ul>
        <li><tt></tt>
          <p><tt>[ { "RegisteredName" : "Software Inventory"</tt><tt><br>
            </tt><tt>  , "Description" : "OpenLMI implementation of
              Software Inventory DMTF profile"</tt><tt><br>
            </tt><tt>  ,</tt><tt> "RegisteredVersion" </tt><tt>:
              "1.0.1"</tt><tt><br>
            </tt><tt>  , "RegisteredOrganization" : 2</tt><tt><br>
            </tt><tt>  , "RegisteredOrganizationName" : "DMTF"</tt><tt><br>
            </tt><tt>  , "ScopingClass" : "CIM_System"</tt><tt><br>
            </tt><tt>  , "ImplementedFeatures" : null<br>
                , "MajorVersion" : 0</tt><tt><br>
            </tt><tt>  , "MinorVersion" : 9</tt><tt><br>
            </tt><tt>  , "RevisionNumber" : 1</tt><tt><br>
            </tt><tt>  , "ReferencedProfiles" : [</tt><tt><br>
            </tt><tt>      { "ClassName" : "CIM_RegisteredProfile"</tt><tt><br>
            </tt><tt>      , "InstanceID": "</tt><tt>DMTF+Profile
              Registration+1.0.0"</tt><tt><br>
            </tt><tt>      </tt><tt>}</tt><tt><br>
            </tt><tt>    </tt><tt>]</tt><tt><br>
            </tt><tt>  }</tt><tt><br>
            </tt><tt>]</tt></p>
        </li>
        <li>where</li>
        <ul>
          <li>RegisteredName, RegisteredOrganizationName,
            RegisteredVersion, Description, MajorVersion, MinorVersion
            and RevisionNumber are mandatory</li>
          <li>ScopingClass (string) defaults to Linux_ComputerSystem</li>
          <ul>
            <li>will be associated with instances of
              LMI_ElementConformsToProfile with this very instance of
              LMI_RegisteredProfile</li>
          </ul>
          <li>ImplementedFeatures (array of strings) defaults to null<br>
          </li>
          <li>RegisteredOrganization (uint16) defaults to 2 (DMTF)</li>
          <li>RegisteredOrganizationName (string) will be used to fill <tt>LMI_Registe</tt><tt>redP</tt><tt>rofile::</tt><tt>OtherRegistered</tt><tt>Organization</tt><tt>
            </tt>property if <tt>RegisteredOrganization == 1</tt><br>
          </li>
          <li>ReferencedProfiles defaults to:</li>
          <ul>
            <li><tt>[{ "ClassName" : "CIM_RegisteredProfile",
                "InstanceID": "</tt><tt><span style="color: rgb(0, 0,
                  0); font-family: 'Times New Roman'; font-size: medium;
                  font-style: normal; font-variant: normal; font-weight:
                  normal; letter-spacing: normal; line-height: normal;
                  orphans: auto; text-align: start; text-indent: 0px;
                  text-transform: none; white-space: normal; widows:
                  auto; word-spacing: 0px; -webkit-text-stroke-width:
                  0px; display: inline !important; float: none;">DMTF+Profile
                  Registration+1.0.0"<tt> </tt></span>}]</tt></li>
            <li>may contain arbitrary number of objects</li>
          </ul>
        </ul>
        <li>top-level node is an array - so one file can define more
          profile instances</li>
        <ul>
          <li>for LMI_SoftwareProfile.conf it would be:</li>
          <ul>
            <li>Software Inventory</li>
            <li>Software Update</li>
          </ul>
        </ul>
        <li>we could use yajl library in c implementation for parsing
          (available in RHEL)</li>
      </ul>
      <li>upon rpm installation, this would get registered by symlinking
        this file into directory</li>
      <ul>
        <li><tt>/usr/lib/openlmi/registered_profiles/</tt></li>
      </ul>
      <li>our c provider for LMI_RegisteredProfile would read all files
        in this directory and generate instances such as this (in pseudo
        code):</li>
      <ul>
        <li><tt>instance of LMI_RegisteredProfile {</tt><tt><br>
          </tt><tt>  InstanceID = "LMI:" + RegisteredOrganizationName +
            "+" + RegisteredName + "+" + RegisteredVersion;</tt><tt><br>
          </tt><tt>  AdvertisedTypes = [2];</tt><tt><br>
          </tt><tt>  Caption = "OpenLMI " + RegisteredName + " profile
            implementation";</tt><tt><br>
          </tt><tt>  Description = Description;</tt><tt><br>
          </tt><tt>  RegisteredName = RegisteredName;</tt><tt><br>
          </tt><tt>  RegisteredOrganization = RegisteredOrganization;</tt><tt><br>
          </tt><tt>  RegisteredVersion = "1.0.0";</tt><tt><br>
          </tt><tt>  MajorVersion = MajorVersion;</tt><tt><br>
          </tt><tt>  MinorVersion = MinorVersion;</tt><tt><br>
          </tt><tt>  RevisionNumber = RevisionNumber;</tt><tt><br>
          </tt><tt>  SpecificationType = 2;</tt><tt><br>
          </tt><tt>};</tt></li>
        <li>together with associations of ScopingClass instances to this
          registered profile instance</li>
      </ul>
    </ol>
    <p>Does it make sense? Any other ideas?<br>
    </p>
    <p>Michal<br>
    </p>
    <p>[1]
<a class="moz-txt-link-freetext" href="http://www.dmtf.org/sites/default/files/standards/documents/DSP1033_1.0.0.pdf">http://www.dmtf.org/sites/default/files/standards/documents/DSP1033_1.0.0.pdf</a><br>
    </p>
  </body>
</html>