Problem Statement:
Need to provide guidlines for coding the Target path of the «Specify» relationship.
2022-01-21:
In particular, for the root element object class (i.e., red element), the format is actually not “[/<ModelName>:<ClassName>:<navigable association end role name>]” as indicated in the UML guidelines v1.3.03 but it is in the format of “[/<ModelName>:<ClassName>:<name of the RootElement stereotype>]”, e.g.
PtpTlpDefaultDsSpecSpecifiesPtpDefaultDs: /ptp:Ptp:_ptp/ptp:Ptp:_instanceList/ptp:PtpInstance:_defaultDs
PtpTlpPortDsSpecSpecifiesPtpPortDs: /ptp:Ptp:_ptp/ptp:Ptp:_instanceList/ptp:PtpInstance:_portDsList
PtpTlpTcDefaultDsSpecSpecifiesPtpTcDefaultDsPac: /ptp:Ptp:_ptp/ptp:Ptp:_instanceList/ptp:Ptp:_transparentClockDefaultDs
2022-01-28: See 2022-01-28 IISOMI Meeting Minutes #4 for details of discussion
The referencing mechanism used in the target path identifies each element in the path by going one step up the path (hierarchy) to find the referencing attribute from the class that references the class to be identified. This works for all but the root entity (where there is clearly nothing one step up the path hierarchy). This is why an artificial role end was used reference the root entity.
This is conveyed in the <<RootElement>> stereotype as shown above. It is as if a class Context references the TapiContext via a composition with a navigable attribute _context. The class "Context" does not exist in the model. Both the class name "Context" and its reference are derived from the value of the name in the <<RootElement>> Stereotype (i.e., "_context") where the class name is an upper camel form of the string with the "_" removed.
The mechanism should be described more clearly in the modeling guidelines.
Andrea Mazzini Bernd Zeuner: To improve the explanation of target sterotype string content formation by
2022-02-04:
Post call email from Italo:
2022-02-11:
In order to be able to compose the target path of the two «Specify» relationships the class diagram below has been extended with the greyed out "non existing" object class and composition relationships.
Andrea Mazzini will draft rules for the UML Modelling Guidelines for creating the target paths; this is part of the existing action item "Improve explanation of target sterotype string content formation in the UML Guidelines". Discussion will continue in two weeks.
2022-03-04:
Italo Busi presents an UML diagram with abstraction examples and related translations into Yang augment statements.
augment "/tapi-common:context/tapi-connectivity:connectivity-context/tapi-connectivity:connectivity-service/tapi-connectivity:end-point" {
container odu-connectivity-service-end-point-spec {
uses odu-connectivity-service-end-point-spec;
description "none";
}
description "none";
}
Which is then an additional node in the Yang tree:
+--rw context
| ...
+--rw tapi-connectivity:connectivity-context
| +--rw tapi-connectivity:connectivity-service* [uuid]
| | ...
| | +--rw tapi-connectivity:end-point* [local-id]
| | | ...
| | | +--rw tapi-odu:odu-connectivity-service-end-point-spec
| | | | +--rw tapi-odu:odu-csep-common-pac
| | | | | +--rw tapi-odu:odu-type? odu-type
| | | | | +--rw tapi-odu:odu-rate? uint64
| | | | | +--rw tapi-odu:opu-tributary-slot-size? odu-slot-size
| | | | +--rw tapi-odu:odu-csep-ctp-pac
| | | | | +--rw tapi-odu:tributary-port-number? uint64
| | | | | +--rw tapi-odu:tributary-slot-list* uint64
| | | | +--rw tapi-odu:odu-csep-ttp-pac
| | | | +--rw tapi-odu:configured-mapping-type? mapping-type
| | | | +--rw tapi-odu:configured-client-type? tapi-dsr:digital-signal-type
Italo Busi highlights that current translation does not allow distinct labels for the container and for the used class. By always specifying as abstract the augmenting class we may allow both ways.
Post meeting note: Italo Busi provides the updated diagram with a summary of the agreements-
The tree, note the abstract ClassA which is not translated, and abstract ClassC which is forcedly translated by the "presence condition".
+--rw root
+--rw element* [element-key]
+--rw element-key string
+--rw leaf-1? string
+--rw leaf-2? string
+--rw leaf-a-1? string
+--rw leaf-a-2? string
+--rw container-b
| +--rw leaf-b-1? string
| +--rw leaf-b-2? string
+--rw container-c!
| +--rw leaf-c-1? string
| +--rw leaf-c-2? string
+--rw list-d* [key-d]
+--rw key-d string
+--rw leaf-d-1? string
+--rw leaf-d-2? string
module base-model-example {
yang-version 1.1;
namespace "urn:test:base-model-example";
prefix b;
grouping model-root {
list element {
key element-key;
uses model-element;
}
}
grouping model-element {
leaf element-key {
type string;
}
leaf leaf-1 {
type string;
}
leaf leaf-2 {
type string;
}
uses class-a;
container container-b {
uses class-b;
}
container container-c {
presence
"Presence condition";
uses class-c;
}
list list-d {
key key-d;
uses class-d;
}
}
grouping class-a {
leaf leaf-a-1 {
type string;
}
leaf leaf-a-2 {
type string;
}
}
grouping class-b {
leaf leaf-b-1 {
type string;
}
leaf leaf-b-2 {
type string;
}
}
grouping class-c {
leaf leaf-c-1 {
type string;
}
leaf leaf-c-2 {
type string;
}
}
grouping class-d {
leaf key-d {
type string;
}
leaf leaf-d-1 {
type string;
}
leaf leaf-d-2 {
type string;
}
}
container root {
uses model-root;
}
}
augment /b:root/b:element:
+--rw leaf-a-1? string
+--rw leaf-a-2? string
augment /b:root/b:element:
+--rw class-b
+--rw leaf-b-1? string
+--rw leaf-b-2? string
augment /b:root/b:element:
+--rw container-c!
+--rw leaf-c-1? string
+--rw leaf-c-2? string
augment /b:root/b:element:
+--rw list-d* [key-d]
+--rw key-d string
+--rw leaf-d-1? string
+--rw leaf-d-2? string
+--rw root
+--rw element* [element-key]
+--rw element-key string
+--rw leaf-1? string
+--rw leaf-2? string
+--rw leaf-a-1? string
+--rw leaf-a-2? string
+--rw container-b
| +--rw leaf-b-1? string
| +--rw leaf-b-2? string
+--rw container-c!
| +--rw leaf-c-1? string
| +--rw leaf-c-2? string
+--rw list-d* [key-d]
| +--rw key-d string
| +--rw leaf-d-1? string
| +--rw leaf-d-2? string
+--rw a:leaf-a-1? string
+--rw a:leaf-a-2? string
+--rw a:class-b
| +--rw a:leaf-b-1? string
| +--rw a:leaf-b-2? string
+--rw a:container-c!
| +--rw a:leaf-c-1? string
| +--rw a:leaf-c-2? string
+--rw a:list-d* [key-d]
+--rw a:key-d string
+--rw a:leaf-d-1? string
+--rw a:leaf-d-2? string
module augment-model-example {
yang-version 1.1;
namespace "urn:test:augment-model-example";
prefix a;
import base-model-example {
prefix "b";
}
grouping class-a {
leaf leaf-a-1 {
type string;
}
leaf leaf-a-2 {
type string;
}
}
grouping class-b {
leaf leaf-b-1 {
type string;
}
leaf leaf-b-2 {
type string;
}
}
grouping class-c {
container container-c {
presence
"Presence condition";
uses class-c-pac;
}
}
grouping class-c-pac {
leaf leaf-c-1 {
type string;
}
leaf leaf-c-2 {
type string;
}
}
grouping class-d {
leaf key-d {
type string;
}
leaf leaf-d-1 {
type string;
}
leaf leaf-d-2 {
type string;
}
}
augment "/b:root/b:element" {
uses class-a;
}
augment "/b:root/b:element" {
container class-b {
uses class-b;
}
}
augment "/b:root/b:element" {
uses class-c;
}
augment "/b:root/b:element" {
list list-d {
key key-d;
uses class-d;
}
}
}
2022-03-25:
Italo Busi Italo to provide an update to the diagram and propose text for the mapping guidelines.
References
Discussion: