Re: Questions regarding the WBEM/CIM XSDs

J B <[email protected]>
Newsgroups gmane.network.open-pegasus.general
Message-ID <[email protected]>
Sorry, meant to send to the group:

BTW, here are three generated valid instance documents, as validated
against the XSD:


<?xml version="1.0" encoding="UTF-8"?>
<ns1:CIM_OperatingSystem
xmlns:ns1="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_OperatingSystem"
 xmlns:ns2="http://schemas.dmtf.org/wbem/wscim/1/common"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_OperatingSystem
file:/Users/jmbirchfield/Desktop/ws/standards/dmtf/schema/2.24.1/final/cim_schema_2.24.1Final-XSDClasses/wbem/wscim/1/cim-schema/2/CIM_OperatingSystem.xsd">
   <ns1:AvailableRequestedStates>2</ns1:AvailableRequestedStates>
   <ns1:AvailableRequestedStates>2</ns1:AvailableRequestedStates>
   <ns1:CSCreationClassName>CSCreationClassName0</ns1:CSCreationClassName>
   <ns1:CSName>CSName0</ns1:CSName>
   <ns1:Caption>Caption0</ns1:Caption>
   <ns1:CommunicationStatus>0</ns1:CommunicationStatus>
   <ns1:CreationClassName>CreationClassName0</ns1:CreationClassName>
   <ns1:CurrentTimeZone>-1</ns1:CurrentTimeZone>
   <ns1:Description>Description0</ns1:Description>
   <ns1:DetailedStatus>0</ns1:DetailedStatus>
   <ns1:Distributed>false</ns1:Distributed>
   <ns1:ElementName>ElementName0</ns1:ElementName>
   <ns1:EnabledDefault>2</ns1:EnabledDefault>
   <ns1:EnabledState>0</ns1:EnabledState>
   <ns1:FreePhysicalMemory>50</ns1:FreePhysicalMemory>
   <ns1:FreeSpaceInPagingFiles>50</ns1:FreeSpaceInPagingFiles>
   <ns1:FreeVirtualMemory>50</ns1:FreeVirtualMemory>
   <ns1:HealthState>0</ns1:HealthState>
   <ns1:InstallDate>
       <ns2:Datetime>2006-05-04T18:13:51.0Z</ns2:Datetime>
   </ns1:InstallDate>
   <ns1:InstanceID>InstanceID0</ns1:InstanceID>
   <ns1:LastBootUpTime>
       <ns2:Datetime>2006-05-04T18:13:51.0Z</ns2:Datetime>
   </ns1:LastBootUpTime>
   <ns1:LocalDateTime>
       <ns2:Time>01:01:01.001</ns2:Time>
   </ns1:LocalDateTime>
   <ns1:MaxNumberOfProcesses>214748364</ns1:MaxNumberOfProcesses>
   <ns1:MaxProcessMemorySize>50</ns1:MaxProcessMemorySize>
   <ns1:MaxProcessesPerUser>214748364</ns1:MaxProcessesPerUser>
   <ns1:Name>Name0</ns1:Name>
   <ns1:NumberOfLicensedUsers>214748364</ns1:NumberOfLicensedUsers>
   <ns1:NumberOfProcesses>214748364</ns1:NumberOfProcesses>
   <ns1:NumberOfUsers>214748364</ns1:NumberOfUsers>
   <ns1:OSType>0</ns1:OSType>
   <ns1:OperatingStatus>0</ns1:OperatingStatus>
   <ns1:OperationalStatus>0</ns1:OperationalStatus>
   <ns1:OperationalStatus>0</ns1:OperationalStatus>
   <ns1:OtherEnabledState>OtherEnabledState0</ns1:OtherEnabledState>
   <ns1:OtherTypeDescription>OtherTypeDescription0</ns1:OtherTypeDescription>
   <ns1:PrimaryStatus>0</ns1:PrimaryStatus>
   <ns1:RequestedState>0</ns1:RequestedState>
   <ns1:SizeStoredInPagingFiles>50</ns1:SizeStoredInPagingFiles>
   <ns1:Status>OK</ns1:Status>
   <ns1:StatusDescriptions>StatusDescriptions0</ns1:StatusDescriptions>
   <ns1:StatusDescriptions>StatusDescriptions1</ns1:StatusDescriptions>
   <ns1:TimeOfLastStateChange>
       <ns2:Time>01:01:01.001</ns2:Time>
   </ns1:TimeOfLastStateChange>
   <ns1:TotalSwapSpaceSize>50</ns1:TotalSwapSpaceSize>
   <ns1:TotalVirtualMemorySize>50</ns1:TotalVirtualMemorySize>
   <ns1:TotalVisibleMemorySize>50</ns1:TotalVisibleMemorySize>
   <ns1:TransitioningToState>0</ns1:TransitioningToState>
   <ns1:Version>Version0</ns1:Version>
   <ns2:CIM_DateTime>CIM_DateTime0</ns2:CIM_DateTime>
   <ns2:CIM_DateTime>CIM_DateTime1</ns2:CIM_DateTime>
</ns1:CIM_OperatingSystem>

<?xml version="1.0" encoding="UTF-8"?>
<ns1:CIM_ComputerSystem
xmlns:ns1="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem"
 xmlns:ns2="http://schemas.dmtf.org/wbem/wscim/1/common"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem
file:/Users/jmbirchfield/Desktop/ws/standards/dmtf/schema/2.24.1/final/cim_schema_2.24.1Final-XSDClasses/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem.xsd">
   <ns1:AvailableRequestedStates>2</ns1:AvailableRequestedStates>
   <ns1:AvailableRequestedStates>2</ns1:AvailableRequestedStates>
   <ns1:Caption>Caption0</ns1:Caption>
   <ns1:CommunicationStatus>0</ns1:CommunicationStatus>
   <ns1:CreationClassName>CreationClassName0</ns1:CreationClassName>
   <ns1:Dedicated>0</ns1:Dedicated>
   <ns1:Dedicated>0</ns1:Dedicated>
   <ns1:Description>Description0</ns1:Description>
   <ns1:DetailedStatus>0</ns1:DetailedStatus>
   <ns1:ElementName>ElementName0</ns1:ElementName>
   <ns1:EnabledDefault>2</ns1:EnabledDefault>
   <ns1:EnabledState>0</ns1:EnabledState>
   <ns1:HealthState>0</ns1:HealthState>
   <ns1:IdentifyingDescriptions>IdentifyingDescriptions0</ns1:IdentifyingDescriptions>
   <ns1:IdentifyingDescriptions>IdentifyingDescriptions1</ns1:IdentifyingDescriptions>
   <ns1:InstallDate>
       <ns2:CIM_DateTime>CIM_DateTime0</ns2:CIM_DateTime>
   </ns1:InstallDate>
   <ns1:InstanceID>InstanceID0</ns1:InstanceID>
   <ns1:Name>Name0</ns1:Name>
   <ns1:NameFormat>Other</ns1:NameFormat>
   <ns1:OperatingStatus>0</ns1:OperatingStatus>
   <ns1:OperationalStatus>0</ns1:OperationalStatus>
   <ns1:OperationalStatus>0</ns1:OperationalStatus>
   <ns1:OtherDedicatedDescriptions>OtherDedicatedDescriptions0</ns1:OtherDedicatedDescriptions>
   <ns1:OtherDedicatedDescriptions>OtherDedicatedDescriptions1</ns1:OtherDedicatedDescriptions>
   <ns1:OtherEnabledState>OtherEnabledState0</ns1:OtherEnabledState>
   <ns1:OtherIdentifyingInfo>OtherIdentifyingInfo0</ns1:OtherIdentifyingInfo>
   <ns1:OtherIdentifyingInfo>OtherIdentifyingInfo1</ns1:OtherIdentifyingInfo>
   <ns1:PowerManagementCapabilities>0</ns1:PowerManagementCapabilities>
   <ns1:PowerManagementCapabilities>0</ns1:PowerManagementCapabilities>
   <ns1:PrimaryOwnerContact>PrimaryOwnerContact0</ns1:PrimaryOwnerContact>
   <ns1:PrimaryOwnerName>PrimaryOwnerName0</ns1:PrimaryOwnerName>
   <ns1:PrimaryStatus>0</ns1:PrimaryStatus>
   <ns1:RequestedState>0</ns1:RequestedState>
   <ns1:ResetCapability>1</ns1:ResetCapability>
   <ns1:Roles>Roles0</ns1:Roles>
   <ns1:Roles>Roles1</ns1:Roles>
   <ns1:Status>OK</ns1:Status>
   <ns1:StatusDescriptions>StatusDescriptions0</ns1:StatusDescriptions>
   <ns1:StatusDescriptions>StatusDescriptions1</ns1:StatusDescriptions>
   <ns1:TimeOfLastStateChange>
       <ns2:Time>01:01:01.001</ns2:Time>
   </ns1:TimeOfLastStateChange>
   <ns1:TransitioningToState>0</ns1:TransitioningToState>
   <ns2:CIM_DateTime>CIM_DateTime1</ns2:CIM_DateTime>
   <ns2:CIM_DateTime>CIM_DateTime2</ns2:CIM_DateTime>
</ns1:CIM_ComputerSystem>

<?xml version="1.0" encoding="UTF-8"?>
<ns1:CIM_InstalledOS
xmlns:ns1="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_InstalledOS"
 xmlns:ns2="http://schemas.dmtf.org/wbem/wscim/1/common"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_InstalledOS
file:/Users/jmbirchfield/Desktop/ws/standards/dmtf/schema/2.24.1/final/cim_schema_2.24.1Final-XSDClasses/wbem/wscim/1/cim-schema/2/CIM_InstalledOS.xsd">
   <ns1:GroupComponent>
       <ns1:PartComponent>
           <ns1:PrimaryOS>false</ns1:PrimaryOS>
           <ns1:PrimaryOS>false</ns1:PrimaryOS>
       </ns1:PartComponent>
       <ns1:PartComponent>
           <ns1:PrimaryOS>false</ns1:PrimaryOS>
           <ns1:PrimaryOS>false</ns1:PrimaryOS>
       </ns1:PartComponent>
   </ns1:GroupComponent>
   <ns1:PartComponent>
       <ns1:GroupComponent>
           <ns1:PrimaryOS>false</ns1:PrimaryOS>
           <ns1:PrimaryOS>false</ns1:PrimaryOS>
       </ns1:GroupComponent>
       <ns1:GroupComponent>
           <ns1:PrimaryOS>false</ns1:PrimaryOS>
           <ns1:PrimaryOS>false</ns1:PrimaryOS>
       </ns1:GroupComponent>
   </ns1:PartComponent>
</ns1:CIM_InstalledOS>


This is perfectly valid XML according to the XSDs since they leave the
typing of a cimReference wide open and is more inline with how I would
*like* to use the instance XML, referring back to a unique
ComputerSystem, and unique OperatingSystem.  I just don't see exactly
how I would do this.

<?xml version="1.0" encoding="UTF-8"?>
<ns1:CIM_InstalledOS
xmlns:ns1="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_InstalledOS"
 xmlns:ns2="http://schemas.dmtf.org/wbem/wscim/1/common"
 xmlns:ns3="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem"
 xmlns:ns4="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_OperatingSystem"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_InstalledOS
file:/Users/jmbirchfield/Desktop/ws/standards/dmtf/schema/2.24.1/final/cim_schema_2.24.1Final-XSDClasses/wbem/wscim/1/cim-schema/2/CIM_InstalledOS.xsd">
   <ns1:GroupComponent>
       <ns3:CSName>SomeUniqueComputerSystemName</ns3:CSName>
   </ns1:GroupComponent>
   <ns1:PartComponent>
       <ns4:CSName>SomeUniqueOperatingSystemName</ns4:CSName>
   </ns1:PartComponent>
</ns1:CIM_InstalledOS>

On Wed, Oct 6, 2010 at 1:59 PM, J B <[email protected]> wrote:
> I can see that argument, and agree with it.  However, my original
> question is still valid, I think. :)
>
> Without the MOF to guide me, using only the XSDs as a model, how would
> that association even be known?  At least the MOFs are typed and have
> the same UMLPackagePath hint.
> And the definition of a cim:cimReference is wide open:
>
>  <xs:complexType name="cimReference">
>    <xs:sequence>
>      <xs:any namespace="##other" maxOccurs="unbounded" processContents="lax"/>
>    </xs:sequence>
>    <xs:anyAttribute namespace="##any" processContents="lax"/>
>  </xs:complexType>
>
> So I am not even sure what it would point to in an actual instance
> document unless it was meant to be the entire XML instance document of
> an OperatingSystem and a ComputerSystem, which does not make sense to
> me. I would hope that I could create an instance of a ComputerSystem
> and an OperatingSystem independent of the relationship type.
>
> The ultimate goal I have is to generate an RDF model of this and use
> it to capture my data, but I will settle on just better understanding
> and capturing the information in straight XML as defined by the XSDs.
>
> Is there any example of actual instance documents using the XSDs?
>
> Thanks!
>
> Birch
> On Wed, Oct 6, 2010 at 1:50 PM, Kirk Augustin <[email protected]> wrote:
>> I am not aware of any way that a XSD hierarchy can describe an association.
>> An association is a relation, as in a relational database, between 2 other
>> objects.
>> A relation contains instances of 2 other objects, but does not have to exist
>> and is not part of either one.
>> For an XSD to describe a relation, it would have to not have a hierarchical
>> description, but maybe I just don't use XSDs that way.
>>
>> Kirk & Trish Augustin
>> 11821 NW McNamee Rd
>> Portland, OR 97231
>>
>> ________________________________
>> From: J B <[email protected]>
>> To: [email protected]
>> Sent: Wed, October 6, 2010 10:07:39 AM
>> Subject: Questions regarding the WBEM/CIM XSDs
>>
>> In looking over the the WBEM/CIM XSDs, I am puzzled by the use of
>> associations.  As an example, let's take CIM_ComputerSystem and
>> CIM_OperatingSystem.  According to the MOFs, there is an explicit
>> association of InstalledOS(0..*) and RunningOS(1..1).  I would have
>> expected some element in one of the above XSDs to explicitly call out
>> this association, but instead, I see two other XSDs, CIM_InstalledOS
>> and CIM_RunningOS.  I am assuming that the GroupComponent and
>> PartComponent refer to CIM_ComputerSystem and CIM_OperatingSystem,
>> respectively since they are of type cim:cimReference.  But without the
>> benefit of having the MOF and UML diagrams available to me, how in the
>> world would I know this association exists?  I would have expected
>> that the XSDs and the MOFs would ultimately describe the same model,
>> but it does not appear that way.  What exactly would be the value of
>> the cim:cimReference element?
>>
>> So if the above is actually correct, can anyone provide me with a
>> sample XML instance document that shows how to actually tie a
>> CIM_ComputerSystem instance document to a CIM_OperatingSystem instance
>> document together?
>>
>> Thanks!
>> James Birchfield
>>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.