Share via


Model

Applies To: System Center 2012 - Service Manager

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

A management pack model consists of classes, properties, relationships, enumerations, and type projections. With these, you can describe new types of data or how portions of data relate to each other. The model from one management pack can also be extended by another model or serve as the basis for a new model.

Classes

A class declares an object. This object represents something you want to describe and possibly track. A class can be based on an existing class or it can be a new class. A class can also be a faux class that only exists to extend an existing class, not to create a new class. Here are the types of classes you can create:

  • Normal
    A normal class is an ordinary class that is not an abstract class or an extension class. Normal classes can have instances created, configured, and committed to the data store.
  • Abstract
    A class declared as abstract cannot create any actual instances. The only purpose of an abstract class is to be inherited by other classes. The abstract class type is frequently referred to as a base class.
  • Extension
    An extension class will append all the properties defined in it to the base class that it references.

Object-Oriented Concepts

The well-known concepts of object-oriented (OO) programming apply to the model-class for a management pack. The class type in the management pack should be treated like an OO entity. The object can be defined, instantiated, extended, or even changed.

Properties

A property on a class defines a single piece of information about that class. For example, to describe a chair through a class, you might use properties like: color, leg count, and height. A property describes the type of value it will contain. It is important to specify the correct type for the property. The property for the number of legs on the chair should be an integer type, not a string type. For more information about the types of properties you can use, see Type.

A property can be associated with a default value. A property can also be declared as a key property for a class. A key property identifies a specific instance of a class. More than one property can be declared as a key property. However, the combination of all key properties for the class instance must remain unique as compared to other class instances. Key properties cannot have default values associated with them and a value must be supplied before the instance can be committed.

Instancing

The objects defined by classes and relationships do not actually exist until they are created as actual instances. An instance of a class or relationship is created, configured, and committed to Service Manager. For example, if we have a chair class, we know how to make chairs. But no chairs have been made yet. Once we create and commit an instance of the chair, we now have an actual instance of a chair. From one class we can create many instances. For more information, see Instance Manipulation.

Relationships

Relationships enable class object instances to be associated with each other. Relationships can be established between specific instances of the same or different management pack classes. Every relationship has a source and a target of the same class type. A relationship object only defines how a relationship instance looks. When the actual relationship instance is created, the source and target of the relationship are set to instances of their respective class types. The relationship can then be committed, which links the source and target together.

Enumerations

Enumerations provide a mechanism to group specific flags together. A flag represents the status of something. Each enumeration defines its identifier, which becomes its value. Enumerations can be defined in a hierarchal manner. Each enumeration can designate another enumeration as its parent. When this parent-child relationship is formed, all the children of a parent represent the possible values of the parent. When used on a class property, the property type is set to the parent enumeration, and the value of that property can only be one of the child enumerations of the parent.

Because an enumeration can specify its parent, enumerations can be attached to other enumerations that are declared in a different management pack. This provides the ability to extend any enumeration with other values. For example, take a class from another management pack that exposes an enumeration property. If you wanted more values to select from when you are setting that property, you could add enumeration values to that property’s enumeration type. You could extend the possible values of that property by declaring your own enumeration’s parent to be of the same type of enumeration the property uses. The possible values of that property would contain all the original child enumerations, and the ones that you declared.

See Also

Concepts

Management Pack
Instance Manipulation
Subscription and Workflow
Modeling Overview

Other Resources

Architecture Concepts