2 * Copyright (c) 2015 Huawei, Inc. and others. All rights reserved.
\r
4 * This program and the accompanying materials are made available under the
\r
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
\r
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
\r
9 module nemo-template {
\r
12 namespace "urn:opendaylight:params:xml:ns:yang:nemo:template";
\r
13 prefix "nemo-template";
\r
15 import nemo-common {prefix nemo-common;}
\r
16 import nemo-object {prefix nemo-object;}
\r
17 import nemo-operation {prefix nemo-operation;}
\r
19 revision "2015-12-01" {
\r
21 "Initial revision.";
\r
24 grouping template-definition-grouping {
\r
26 "It represents a template definition and its metadata.
\r
27 A template defines a reusable function which could
\r
28 be used many times.";
\r
30 leaf template-name {
\r
32 "A unique name for a template.";
\r
33 type nemo-common:template-name;
\r
37 container abstract-intents {
\r
39 "All abstract intents included in this template.";
\r
41 container abstract-objects {
\r
43 "The element could be operated and managed by users.
\r
44 It includes resources to construct users' virtual networks,
\r
45 and the services in this network. In NEMO project, it is
\r
46 abstracted into node, connection and flow.";
\r
48 list abstract-node {
\r
50 uses nemo-object:node-instance;
\r
53 list abstract-connection {
\r
54 key "connection-id";
\r
55 uses nemo-object:connection-instance;
\r
58 list abstract-flow {
\r
60 uses nemo-object:flow-instance;
\r
64 container abstract-operations {
\r
66 "The operation is to dynamically adjust the behavior of network,
\r
67 and it is applied on objects, that is, node, connection and flow.";
\r
69 list abstract-operation {
\r
71 uses nemo-operation:operation-instance;
\r
75 container abstract-results {
\r
80 list template-parameter {
\r
82 "List all the parameters included in the template. That is,
\r
83 other instance could have different values when instancing the
\r
86 key "parameter-name";
\r
87 leaf parameter-name {
\r
89 "The name of the parameter.";
\r
90 type nemo-common:parameter-name;
\r
94 leaf parameter-value-type {
\r
96 "List all value types could exist in the parameters.";
\r
101 "An string-valued property.";
\r
105 "An integer-valued property.";
\r
109 "An integer-range property.";
\r
116 grouping template-instance-grouping {
\r
118 "A template instance which put specific values in the parameter list.";
\r
120 leaf template-instance-id {
\r
122 "A unique identifier for the template instance.";
\r
123 type nemo-common:template-instance-id;
\r
127 leaf template-instance-name {
\r
129 "A unique name for the template instance.";
\r
130 type nemo-common:template-instance-name;
\r
134 leaf template-name {
\r
136 "The template name instanced by this template instance.";
\r
137 type nemo-common:template-name;
\r
141 list template-parameter {
\r
143 "All specific parameters putted by this instance.";
\r
145 key "parameter-name";
\r
146 leaf parameter-name {
\r
148 "The name of the parameter.";
\r
149 type nemo-common:parameter-name;
\r
153 container parameter-values {
\r
155 "The values for the parameter.";
\r
157 list string-value {
\r
179 container range-value {
\r