Working with CIM Ellen Stokes stokeseus ibm com
Working with CIM Ellen Stokes stokese@us. ibm. com 14 October 2002 GGF 6 / CGS-WG 1
Agenda • CIM refresher • Managed Object Format (MOF) – What is MOF – Working with MOF • • Model guidance Extending the CIM schema Using a CIMOM Mapping CIM to other representations – XML – LDAP 14 October 2002 GGF 6 / CGS-WG 2
CIM Refresher • CIM is one of the approaches in the industry for enabling the management of real world managed objects • 4 pieces – – Modeling language and syntax (MOF – Managed Object Format Management schema (core, common, extension) Protocol to encapsulate syntax and schema (XML/HTTP) Compliance document, but no test suites • CIM object managers (CIMOM) are implementations, but not part of the CIM standard – The Open Group’s Pegasus project is producing a CIMOM reference implementation jointly with DMTF Interop WG • API for CIMOM access by applications (by The Open Group) 14 October 2002 GGF 6 / CGS-WG 3
Managed Object Format (MOF) Modeling Language & Syntax • Meta schema is formal definition of the model – Terms are defined to express model, usage, and semantics – Constructs • class (abstract, concrete, association), property, method • qualifiers, references, initializers, instance declarations • compiler directives (locale & namespace info) • Managed Object Format (MOF) is the language used to describe management information – http: //www. dmtf. org/standards/documents/CIM/DSP 0004. pdf – Textual form – Derived from IDL (Interface Definition Language) from The Open Group – Can be encoded in Unicode (UCS-2) or UTF-8 14 October 2002 GGF 6 / CGS-WG 4
Managed. Element (in MOF) // ================================= // Managed. Element // ================================= [Abstract, Version ("2. 7. 0"), Description ( "Managed. Element is an abstract class that provides a common " "superclass (or top of the inheritance tree) for the " "non-association classes in the CIM Schema. ") ] class CIM_Managed. Element { [Max. Len (64), Description ( "The Caption property is a short textual description (one-" "line string) of the object. ") ] string Caption; [Description ( "The Description property provides a textual description of " "the object. ") ] string Description; [Description ( " A user-friendly name for the object. This property allows " "each instance to define a user-friendly name IN ADDITION TO its " "key properties/identity data, and description information. n" " Note that Managed. System. Element's Name property is also defined " "as a user-friendly name. But, it is often subclassed to be a " "Key. It is not reasonable that the same property can convey " "both identity and a user friendly name, without inconsistencies. " "Where Name exists and is not a Key (such as for instances of " "Logical. Device), the same information MAY be present in both " "the Name and Element. Name properties. ") ] string Element. Name; }; 14 October 2002 GGF 6 / CGS-WG 5
Working with MOF • MOF is text • No tools available to help create MOF – Disregard the MOF Editor located at the tools URL below – it doesn’t work • Use your favorite text editor • Read the CIM spec; look at examples • Use the existing CIM schema as template for developing your schema • Use a MOF compiler to check for syntax errors (Intel CIM compatibility checker) – http: //www. dmtf. org/standards/cimtools. php • CIM certification test suite beta release (use same tools URL above) 14 October 2002 GGF 6 / CGS-WG 6
Model Guidance • Understand what’s already modeled – Mostly at structural, device, and OS levels – Current schema doesn’t do cluster and distributed environments justice • Model managed/manageability information; if it’s not useful for management, then don’t model it • Remember CIM normalizes everything (small pieces) and defines relationships between all the pieces; follow suit • Don’t assume that your schema automatically subclasses from managed. Element (the root of all CIM schema) just because you’re developing a new schema – Reuse, subclass from, and integrate with existing schema elements • Use a UML tool to do schema design – Visualization helps to show your new schema fits with existing CIM schema • Above all, there is no right or wrong way – modeling is an art! 14 October 2002 GGF 6 / CGS-WG 7
Extending the CIM Schema • Subclass from existing schema – CIM provides basic building blocks, for example, there is job schema from which the job submission interface model can be derived • Reuse properties • Integrate with existing models – May require changes to existing schema – Try to limit to no changes, but if changes needed, use the ‘deprecated’ qualifier to indicate how changed • Use the existing qualifiers: – ‘experimental’ to delineate what new and may change until firm – ‘version’ to indicate from CIM version this new schema is built • Qualifiers provide a way to introduce additional semantics – But beware, other systems will ignore these extensions if they don’t recognize them (but won’t crater system) • Don’t add new data types – this breaks CIM compatibility – Can sometimes add new data type by introducing a new qualifier, for example, octetstring, to further qualify the format of a string property 14 October 2002 GGF 6 / CGS-WG 8
Management Environment Management Application CIM/HTTP Operations HTTP Server CIM Object Manager … provider Provider interface Schema + instance repository Pegasus, SNIA Resources 14 October 2002 GGF 6 / CGS-WG 9
Using a CIMOM • Download Pegasus and follow instructions • http: //www. opengroup. org/pegasus 14 October 2002 GGF 6 / CGS-WG 10
Mapping: CIM to XML • A Metaschema Mapping in which the XML schema is used to describe the CIM metaschema, and both CIM classes and instances are valid XML documents for that schema. – CIM DTD is used to describe in a generic fashion the notion of a CIM class or instance. CIM element names are mapped to XML attribute or element values, rather than XML element names. – MOF is encapsulated in XML so there is no additional work to describe new/changed CIM schema in XML. • CIM/XML spec – http: //www. dmtf. org/standards/documents/CIM/DSP 0202. pdf • Example CIM/XML – http: //www. dmtf. org/standards/cim_schema_v 27. php and locate link for xml representation of CIMv 2. 7 • Tool to generate XML representation – <Obtain where ? ? ? > 14 October 2002 GGF 6 / CGS-WG 11
Mapping: CIM to LDAP • http: //www. dmtf. org/standards/documents/ DEN/DSP 0100. pdf • Not one-size-fits-all, but rather a set of guidelines / alternatives / strategies for mapping CIM to LDAP – Classes – Associations – Data types 14 October 2002 GGF 6 / CGS-WG 12
- Slides: 12