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:

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: 

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:

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:

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:

Wiki constraints:  In the introduction section it was noted that the correct usage of this stereotype in the "Applied Stereotypes" column of a class attribute would be, for example "OpenModelAttribute.support=MANDATORY". Though not specifically a constraint, none of the other properties of the OpenModelAttribute stereotype appear to be used in the wiki. One could consider using these properties if needed.

 Lifecycle Stereotypes

It was noted in the introduction that each phase in the lifecycle of a UML artifact is represented by its own stereotype. The possible stereotypes that can be used to represent the various lifecycle phases are as follows:

One and only one lifecycle state has to be associated to every UML artifact. It is recommended that every new UML artifact is initially annotated with the “Experimental” lifecycle stereotype.

Wiki constraints:

The associated state machine is as follows:


Example of GenDoc Output

The purpose of showing an example from a GenDoc output of the Papyrus model is to show how GenDoc currently captures all the applied stereotypes in comparison to how they are captured on the wiki. It is intended to show how stereotypes are applied to UML artifacts and how possibly the wiki model pages could be improved to take better advantage of the existing stereotypes.

The example below shows a snippet of the HomingGroup class as is currently defined in the Vnf sub-model.

Note in particular that the class HomingGroup has 3 stereotypes applied to it: OnapModelLifecycle, OpenModelClass, and Experimental. The class has an attribute (of many) called homingStrategy that has 2 stereotypes applied to it: OpenModelAttribute and OpenModelLifecycle. The fact that there are only 3 OpenModelAttribute properties listed is simply because GenDoc was configured to output only those 3 and not the rest of them to save space. It can be configured to output all the properties, if desired.

                  

Homing Group

Homing selects what cloud selection strategy will be used.  HomingGroup is used to determine where VNF's within a given group are placed with respect to a service component.  Homing strategy is as follows: Colocation - members of the group share the same cloud region (VIM Domain) isolation - members of the group do not share the same cloud region.


Applied stereotypes:



Attribute Name

Type

Mult.

Stereotypes

Description

homingStrategy

HomingStrategy

1

OpenModelAttribute

  •  isInvariant: false
  • valueRange: no range constraint
  • support:  MANDATORY

OnapModelLifecycle

  • state:  INPUT

The homing strategy can be one of the following:  Exclusivity - Resources within the cloud region are exclusive to the group  Inclusively - Resources are co-located in the same cloud-region. Diversity - Resources are geo-diverse ( cannot be co-located).





.