4 * Copyright 2016-2017 RIFT.IO Inc
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
23 * @file rw-conman.yang
24 * @author Manish Patel
26 * @brief Service Orchestrator configuration yang
31 namespace "http://riftio.com/ns/riftware-1.0/rw-conman";
38 import rw-project-vnfd {
39 prefix "rw-project-vnfd";
42 import rw-project-nsd {
43 prefix "rw-project-nsd";
62 import rw-yang-types {
66 import ietf-inet-types {
70 import ietf-yang-types {
82 import rw-config-agent {
83 prefix "rw-config-agent";
90 import rw-project-mano {
91 prefix "rw-project-mano";
96 "Update model to support projects.";
104 // typedef ro-endpoint-method {
105 // type enumeration {
111 grouping ro-endpoint {
112 // leaf ro-endpoint-method {
113 // description "interface between CM & RO, defaults to netconf";
114 // type ro-endpoint-method;
118 type inet:ip-address;
119 description "IP Address";
123 type inet:port-number;
124 description "Port Number";
128 description "RO endpoint username";
133 description "RO endpoint password";
139 // =================== SHOW ==================
140 typedef record-state {
145 enum cfg-process-failed;
148 enum failed-connection;
158 grouping primitive-parameter {
161 "Name of the parameter.";
167 "Data type associated with the name.";
168 type manotypes:parameter-data-type;
172 description "Is this field mandatory";
178 description "The default value for this field";
182 leaf parameter-pool {
183 description "NSD parameter pool name to use for this parameter";
189 "The value should be dimmed by the UI.
190 Only applies to parameters with default values.";
197 "The value should be hidden by the UI.
198 Only applies to parameters with default values.";
204 description "If this is an output of the primitive execution";
210 grouping vnf-configuration {
211 container vnf-configuration {
213 "Information about the VNF configuration. Note:
214 If the NS contains multiple instances of the
215 same VNF, each instance could have a different
218 choice config-method {
220 "Defines the configuration method for the VNF.";
223 "Use custom script for configuring the VNF.
224 This script is executed in the context of
225 Orchestrator (The same system and environment
230 "Script type - currently supported - Scripts confirming to Rift CA plugin";
240 "Configure the VNF through Juju.";
243 description "Juju charm to use with the VNF.";
250 list config-primitive {
252 "List of config primitives supported by the
253 configuration agent for this VNF.";
258 "Name of the config primitive.";
264 "List of parameters to the config primitive.";
266 uses primitive-parameter;
269 leaf user-defined-script {
271 "A user defined script. If user defined script is defined,
272 the script will be executed using bash";
277 list initial-config-primitive {
279 "Initial set of configuration primitives.";
283 "Sequence number for the configuration primitive.";
287 choice primitive-type {
288 case primitive-definition {
291 "Name of the configuration primitive.";
295 uses manotypes:primitive-parameter-value;
297 leaf user-defined-script {
299 "A user defined script.";
304 leaf config-primitive-ref {
306 "Reference to a config primitive name.
307 NOTE: The config primitive referred should have
308 all the input parameters predefined either
309 with default values or dependency references.";
311 path "../../config-primitive/name";
318 } // END - grouping vnf-configuration
321 // This is also used by RO (Resource Orchestrator) to indicate NSR is ready
322 // It will only fill in IDs
323 augment "/rw-project:project" {
326 description "CM NS & VNF states";
329 description "CM various states";
334 description "List of NS Records";
340 description "NSR name.";
344 description "State of NSR";
348 description "Details of the state of NSR, in case of errors";
353 description "List of VNF Records within NS Record";
359 description "VNFR name.";
363 description "Last known state of this VNFR";
367 container mgmt-interface {
369 type inet:ip-address;
372 type inet:port-number;
378 list connection-point {
381 description "Connection Point name";
385 description "IP address assigned to this connection point";
386 type inet:ip-address;
388 leaf connection-point-id {
393 // Publish the resolved capabilites and dependecies here
394 container config-parameter {
396 "The resolved config parameter for a VNF";
397 list config-parameter-source {
398 description "List of resolved sources";
406 "Name of the source as defined in VNFD";
411 "Resovled value for the source";
414 key "config-primitive-ref";
415 leaf config-primitive-ref {
424 list config-parameter-request {
426 "List of resolved requests for the the VNF";
434 "Name of the request as defined in VNFD";
439 "Resovled value for the request";
442 key "config-primitive-ref";
443 leaf config-primitive-ref {
453 // Resolve the VNF config-primitives and publish it
454 // here. VNFR will use this and update config-primitives
456 uses vnf-configuration;