| /* |
| Copyright 2020 Whitestack LLC |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| */ |
| |
| module common-augments { |
| yang-version 1.1; |
| namespace "urn:etsi:osm:yang:augments"; |
| prefix "common"; |
| |
| typedef parameter-data-type { |
| type enumeration { |
| enum STRING; |
| enum INTEGER; |
| enum BOOLEAN; |
| } |
| } |
| |
| grouping primitive-parameter-value { |
| list parameter { |
| description |
| "List of parameters to the configuration primitive."; |
| key "name"; |
| leaf name { |
| description |
| "Name of the parameter."; |
| type string; |
| } |
| |
| leaf data-type { |
| description |
| "Data type associated with the value."; |
| type common:parameter-data-type; |
| } |
| |
| leaf value { |
| description |
| "Value associated with the name."; |
| type string; |
| } |
| } |
| } |
| |
| grouping primitive-parameter { |
| leaf name { |
| description |
| "Name of the parameter."; |
| type string; |
| } |
| |
| leaf data-type { |
| description |
| "Data type associated with the name."; |
| type common:parameter-data-type; |
| } |
| |
| leaf mandatory { |
| description |
| "Is this field mandatory"; |
| type boolean; |
| default false; |
| } |
| |
| leaf default-value { |
| description |
| "The default value for this field"; |
| type string; |
| } |
| |
| leaf parameter-pool { |
| description |
| "NSD parameter pool name to use for this parameter"; |
| type string; |
| } |
| |
| leaf read-only { |
| description |
| "The value should be dimmed by the UI. |
| Only applies to parameters with default values."; |
| type boolean; |
| default false; |
| } |
| |
| leaf hidden { |
| description |
| "The value should be hidden by the UI. |
| Only applies to parameters with default values."; |
| type boolean; |
| default false; |
| } |
| } |
| |
| grouping vnfc-relations { |
| list relation { |
| description |
| "List of relations between elements in this descriptor."; |
| key "name"; |
| |
| leaf name { |
| description |
| "Name of the relation."; |
| |
| type string; |
| } |
| |
| list entities { |
| description |
| "List of two elements to be related. |
| Elements to be related are identified by a pair (id, endpoint). |
| The relation will relate (id1, endpoint1) to (id2, endpoint2)."; |
| key "id"; |
| |
| leaf id { |
| description |
| "A string, reference to the element id in the descriptor. |
| It could be a vnfd-id or a vdu-id in a VNFD, |
| or a nsd-id or member-vnf-index in a NSD."; |
| type string; |
| } |
| |
| leaf endpoint { |
| description |
| "Endpoint name defining the relation."; |
| type string; |
| } |
| } |
| } |
| } |
| |
| grouping vnfc-metrics { |
| description |
| "Information about the VNF or VDU metrics"; |
| list metrics { |
| description |
| "List of VNFC related metrics"; |
| key "name"; |
| leaf name { |
| description |
| "Name of the metric, as defined in the Juju charm."; |
| type string; |
| } |
| } |
| } |
| |
| grouping configuration-method { |
| choice config-method { |
| description |
| "Defines the configuration method for the VNF or VDU."; |
| case script { |
| description |
| "Use custom script for configuring the VNF or VDU. |
| This script is executed in the context of |
| Orchestrator (The same system and environment |
| as the Launchpad)."; |
| container script { |
| leaf script-type { |
| description |
| "Script type - currently supported - Scripts confirming to Rift CA plugin"; |
| type enumeration { |
| enum rift; |
| } |
| } |
| } |
| } |
| |
| case juju { |
| description |
| "Configure the VNF or VDU through Juju."; |
| container juju { |
| leaf charm { |
| description |
| "Juju charm to use with the VNF or VDU."; |
| type string; |
| } |
| leaf proxy { |
| description |
| "Is this a proxy charm?"; |
| type boolean; |
| default true; |
| } |
| } |
| } |
| } |
| } |
| |
| grouping vdu-config-access { |
| |
| container config-access { |
| |
| description |
| "Indicates the way to access to the xNF or xDU for VCA configuration. |
| For the moment there is a single way (ssh-access)."; |
| |
| container ssh-access { |
| |
| description |
| "If the xNF requires ssh and this parameter is set, SSH keys |
| will be injected so that VCA can configure the xNF or xDU via ssh."; |
| |
| leaf required { |
| description |
| "whether ssh access is needed or not"; |
| type boolean; |
| default false; |
| } |
| |
| leaf default-user { |
| description |
| "Default user for ssh"; |
| type string; |
| } |
| } |
| } |
| } |
| |
| grouping vnfc-configuration { |
| description |
| "Common information in the descriptors for NS, VNF or VDU configuration. |
| Note: If the NS contains multiple instances of the |
| same VNF or VDU, each instance could have a different |
| configuration."; |
| |
| uses common:configuration-method; |
| |
| list config-primitive { |
| description |
| "List of config primitives supported by the |
| configuration agent for this VNF or VDU."; |
| key "name"; |
| |
| leaf name { |
| description |
| "Name of the config primitive."; |
| type string; |
| } |
| |
| list parameter { |
| description |
| "List of parameters to the config primitive."; |
| key "name"; |
| uses primitive-parameter; |
| } |
| |
| leaf user-defined-script { |
| description |
| "A user defined script. If user defined script is defined, |
| the script will be executed using bash"; |
| type string; |
| } |
| } |
| |
| list initial-config-primitive { |
| description |
| "Initial set of configuration primitives."; |
| key "seq"; |
| leaf seq { |
| description |
| "Sequence number for the configuration primitive."; |
| type uint64; |
| } |
| |
| choice primitive-type { |
| case primitive-definition { |
| leaf name { |
| description |
| "Name of the configuration primitive."; |
| type string; |
| } |
| |
| uses primitive-parameter-value; |
| |
| leaf user-defined-script { |
| description |
| "A user defined script."; |
| type string; |
| } |
| } |
| } |
| } |
| |
| list terminate-config-primitive { |
| description |
| "Terminate set of configuration primitives."; |
| key "seq"; |
| leaf seq { |
| description |
| "Sequence number for the configuration primitive."; |
| type uint64; |
| } |
| leaf name { |
| description |
| "Name of the configuration primitive."; |
| type string; |
| } |
| |
| uses primitive-parameter-value; |
| |
| leaf user-defined-script { |
| description |
| "A user defined script."; |
| type string; |
| } |
| } |
| uses common:vnfc-metrics; |
| } |
| } |