Bump versions by x.y.(z+1)
[unimgr.git] / presto-api / src / main / yang / onf-core-network-module.yang
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
7  */
8 module onf-core-network-module {
9   namespace "urn:onf:core-network-module";
10   prefix onf-cn;
11
12   import onf-core-network-types {
13     prefix onf-cnt;
14   }
15
16   import onf-core-specs {
17     prefix onf-cs;
18   }
19
20   import network-topology {
21     prefix nt;
22   }
23
24   revision 2016-06-30 {
25   }
26
27   container forwarding-constructs {
28     list forwarding-construct {
29       key 'uuid';
30
31       leaf uuid {
32         type string;
33       }
34
35       uses G_ForwardingConstruct;
36     }
37   }
38
39   grouping G_ForwardingConstruct {
40     leaf layerProtocolName {
41       type onf-cnt:LayerProtocolName;
42       description "The layerProtocol at which the FC enables potential for forwarding.";
43     }
44     leaf-list lowerLevelFc {
45       description "An FC object supports a recursive aggregation relationship such that the internal construction
46 of an FC can be exposed as multiple lower level FC objects (partitioning).  Aggregation is used
47 as for the FD to allow changes in hierarchy.
48 ";
49       ordered-by system;
50       type leafref {
51         path '/forwarding-constructs/forwarding-construct/uuid';
52       }
53     }
54     list fcRoute {
55       description "An FC object can have zero or more routes, each of which is defined as a list of lower level FC
56 objects describing the flow across the network.";
57       key 'uuid';
58       config true;
59       ordered-by system;
60       uses G_FcRoute;
61     }
62     list fcPort {
63       description "The association of the FC to LTPs is made via FcPorts (essentially the ports of the FC).";
64       key 'topology node tp';
65       config true;
66       uses G_FcPort;
67       min-elements 2;
68     }
69     container fcSpec {
70       uses onf-cs:G_FcSpec;
71       description "References the specification that describes the capability and internal structure of of the FC
72 (e.g. The arrangement of switches for a particular instance is described by a referenced
73 FcSpec).  The specification allows interpretation of FcPort role and switch configurations etc.";
74     }
75     leaf forwardingDirection {
76       type onf-cnt:ForwardingDirection;
77       description "The directionality of the ForwardingConstruct.  Is applicable to simple ForwardingConstructs
78 where all FcPorts are BIDIRECTIONAL (the ForwardingConstruct will be BIDIRECTIONAL) or
79 UNIDIRECTIONAL (the ForwardingConstruct will be UNIDIRECTIONAL).  Is not present in more complex
80 cases.";
81     }
82   }
83
84   grouping G_FcRoute {
85     leaf uuid {
86       type string;
87     }
88     leaf-list fc {
89       description "The list of FCs describing the route of an FC.";
90       ordered-by system;
91       type leafref {
92         path '/onf-cn:forwarding-constructs/onf-cn:forwarding-construct/onf-cn:uuid';
93       }
94       min-elements 2;
95     }
96   }
97
98   grouping G_FcPort {
99     uses onf-cs:ltp-ref;
100     leaf role {
101       type onf-cnt:PortRole;
102       description "Each FcPort of the FC has a role (e.g., working, protection, protected, symmetric, hub, spoke,
103 leaf, root) in the context of the FC with respect to the FC function.";
104     }
105     leaf fcPortDirection {
106       type onf-cnt:PortDirection;
107       description "The orientation of defined flow at the FcPort.";
108     }
109   }
110
111   augment "/nt:network-topology/nt:topology/nt:node/nt:termination-point" {
112     container ltp-attrs {
113       uses G_LogicalTerminationPoint;
114     }
115   }
116
117   grouping G_LogicalTerminationPoint {
118     list lpList {
119       description "Ordered list of LayerProtocols that this LTP is comprised of where the first entry in the list is the lowest server layer (e.g. physical)";
120       key 'uuid';
121       config true;
122       leaf uuid {
123         type string;
124       }
125       uses G_LayerProtocol;
126     }
127     container ltpSpec {
128       uses onf-cs:G_LtpSpec;
129       description "The specification of the LTP defines internal structure of the LTP.  The specification allows
130 interpretation of organisation of LPs making up the LTP and also identifies which inter-LTP
131 associations are valid.";
132     }
133     leaf ltpDirection {
134       type onf-cnt:TerminationDirection;
135       description "The overall directionality of the LTP.
136 - A BIDIRECTIONAL LTP must have at least some LPs that are BIDIRECTIONAL but may also have some SINK and/or SOURCE LPs.
137 - A SINK LTP can only contain SINK LPs
138 - A SOURCE LTP can only contain SOURCE LPs";
139     }
140   }
141
142   grouping G_LayerProtocol {
143     leaf layerProtocolName {
144       type onf-cnt:LayerProtocolName;
145       description "Indicate the specific layer-protocol described by the LayerProtocol entity.";
146     }
147     container lpSpec {
148       uses onf-cs:G_LayerProtocolSpec;
149       description "The LpSpec identifies the internal structure of the LP explaining internal flexibilities, degree
150 of termination and degree of adaptation on both client and server side.";
151     }
152     leaf configuredClientCapacity {
153       type string;
154       description "Provides a summarized view of the client capacity that is configurable for use.  Note the cleint
155 LTP association should provide all necessary detail hence this attribute is questionable.";
156     }
157     leaf lpDirection {
158       type onf-cnt:TerminationDirection;
159       description "The overall directionality of the LP.
160 - A BIDIRECTIONAL LP will have some SINK and/or SOURCE flowss.
161 - A SINK LP can only contain elements with SINK flows or CONTRA_DIRECTION_SOURCE flows
162 - A SOURCE LP can only contain SOURCE flows or CONTRA_DIRECTION_SINK flows";
163     }
164     leaf terminationState {
165       type string;
166       description "Indicates whether the layer is terminated and if so how.";
167     }
168   }
169
170 }