Stereotypes
This page provides guidance on the correct usage of IISOMI and ONAP stereotypes in the model. Not all stereotypes are described. For a full description of IISOMI stereotypes, please refer to the IISOMI Modeling Guidelines listed in the previous page.
Introduction
Stereotypes are the core extension mechanism of the Unified Modeling Language (UML). If you find that you need a modeling construct that isn't in the UML but is similar to something that is, you treat your construct as a stereotype of the UML construct. Stereotypes get "applied" to UML artifacts (like "Class", "Attribute (property)", "Interface", etc.) and are a means to supply additional relevant information to that artifact. Stereotypes are usually shown in text between guillemets, but you can also show them by defining an icon for the stereotype.
Here is an example in Papyrus of stereotypes between guillemets. There are two stereotypes (OpenModelClass and OnapModelLifecycle) "applied" to the class Vnfd.
Stereotypes themselves are defined in "Profiles" that get applied to models. Currently in Papyrus we have two profiles that are applied to the ONAP model:
ONAP_Profile (ONAP specific profile)
OpenModel_Profile (IISOMI profile)
Stereotypes, like classes, may contain a set of attributes, or properties. Here is an example of how the IISOMI "OpenModelAttribute" stereotype is defined in Papyrus. Note the icon with a little "s" to indicate that OpenModelAttribute is a stereotype.
Note also that there is an attribute called "support". This particular attribute means what level of support is required over a management interface. It is further defined below
When defining the "Applied Stereotypes" in a wiki, it is important to note which stereotype is being applied (in this case OpenModelAttribute) and then the value given to a particular attribute, such as "support". Saying the "Applied Stereotypes" is "support=MANDATORY" is not exactly correct. One should say, for example "OpenModelAttribute.support = MANDATORY"
Some stereotypes, such as the IISOMI lifecycle stereotypes, don't have attributes. Here's an example of the "Deprecated" stereotype
This sterotype implies that the UML artifact has been deprecated in the model.
Applying Stereotypes
ONAP Stereotypes
OnapModelLifecycle
There is currently only one ONAP stereotype defined, called OnapModelLifecycle. The definition in the profile looks like this:
It has an attribute called "state" that defines the development lifecycle and is based on an enum LifecycleState. The LifecycleState can take one of the following values:
INPUT Provided as a contribution to the model
DISCUSSION Has been discussed by the model project team
CLEAN Has been agreed upon by the model project team
APPROVED Has been approved by the modelling subcommittee
These correspond to the various phases of development of the artifacts in the ONAP model, as seen currently in the wiki pages. It is used as a means to capture that classification in Papyrus. The "base_Class" and "base_Property" attributes imply that the stereotype can be applied both to a "Class" and an "Attribute".
Wiki Constraints:
As the current wiki division of a model for a given release contains "INPUT", "DISCUSSION", and "CLEAN" pages (note: there is no equivalent APPROVED wiki), there is no need to note this stereotype in the "Applied Stereotypes" column.
The current wiki classification doesn't allow for applying the stereotype to both a Class and an Attribute, whereas in the Papyrus model it does. For example, in the wiki, one can't have a Class that is CLEAN (meaning the team has agreed they want that class in a release), and certain attributes to still be in a DISCUSSION phase (meaning the attribute as currently defined has not been agreed).
IISOMI Stereotypes
As stated in the introduction section, only the IISOMI stereotypes that are currently relevant to ONAP model development are defined.
OpenModelClass
The OpenModelClass stereotype, as the name implies, gets applied to a Class. It is defined as follows:
The definition of the attributes are as follows:
base_Class : Class Implies this stereotype gets applied to a Class
support: SupportQualifier Implies the "support" attribute defines the required support over a management interface and is based on an enum SupportQualifier, which takes one of the following values:
MANDATORY The capability, as referenced by the artifact, shall be supported.
OPTIONAL The capability, as referenced by the artifact, may or may not be supported.
CONDITIONAL-MANDATORY The capability shall be supported under certain conditions, specifically:
When qualified as CM, the capability shall have a corresponding constraint defined in the "condition" attribute. If the specified constraint is met then the capability shall be supported.CONDITIONAL-OPTIONAL The capability may be supported under certain conditions, specifically:
When qualified as CO, the capability shall have a corresponding constraint defined in the "condition" attribute. If the specified constraint is met then the capability may be supported.
condition When the "support" attribute has a value of CONDITIONAL-MANDATORY or CONDITIONAL-OPTIONAL, this specifies the constraint that must be met.
The use of the OpenModelClass stereotype is currently applied by default to every class in Papyrus, with the default "support" being MANDATORY.
Wiki constraints: There is currently no capturing of the OpenModelClass as an "Applied Stereotype" to a Class.
OpenModelAttribute
The OpenModelAttribute stereotype, as the name implies, gets applied to an Attribute of a Class.
It is defined as follows:
As one can see from the many properties in this stereotype, there are multiple additional values that can be defined for an "Attribute". The definition of the properties are as follows:
base_StructuralFeature This is essentially saying it gets applied to an attribute
partOfObjectKey This property indicates if the attribute is part of the object key or not
uniqueSet This property defines if the attribute is part of a set of attrib