Patterns are the main declarations in the pattern language. They are used to describe the structures of applications, products and other modeled entities, and encapsulate rules about how to identify them. The following sections provide descriptions of the various features of patterns:
Pattern declarations have the form:
pattern name version
The name, version and description are mandatory, for example:
pattern Xvnc 1.0
X VNC server pattern.
Creates one SoftwareInstance per running VNC server.
Pattern version numbers
It is very important that pattern version numbers are correctly specified, so as to avoid unexpected results in the model. Whenever a pattern is modified, its version number should be incremented. If the modification does not change the structure of any data constructed by the pattern, or only non-standard node attributes are changed, the pattern's minor version number should be incremented; if the structure of the model constructed is changed, the major version should be incremented. In particular, if the key attributes of any maintained nodes are changed, the pattern's major version must be incremented.
When a new version of a pattern is uploaded into BMC Atrium Discovery, nodes maintained by the previous version can be affected. On minor pattern version updates, the new pattern becomes the maintainer for the nodes. On a major version update, nodes maintained by the previous version continue to be maintained by the previous pattern; when the older pattern is removed, the nodes it is maintaining are destroyed.
The overview is required. It contains information about the pattern and the entities it creates. It must contain a
tags entry, and can have optional
tags tag_name [ , tag ... ];
Declares tags relating to the pattern. At least one tag must be present. See the section on tags.
overrides pattern_name [ , pattern_name ... ];
Indicates that the pattern overrides one or more other patterns. In that case, the other patterns are disabled.
The named pattern must be previously declared in the file, either with a pattern declaration, or via an import. It makes little sense to override a pattern in the same file, so usually the overridden pattern will be imported. This functionality is used to modify standard TKU patterns in the field.
It is not an error to name a non-existent pattern in an overrides clause.
Since other patterns may rely on the behaviour of the overridden pattern, the overriding pattern should take care to construct the same form of data model as the overridden pattern.
requires pattern_name [ , pattern_name ... ];
Declares that this pattern requires the effects of the other named pattern in some way.
The named pattern must be previously declared in the file, either with a pattern declaration, or via an import. It is most useful to declare requirements for patterns in other files, so usually the required pattern will be imported.