X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FIM.git;a=blobdiff_plain;f=models%2Fyang%2Fmano-types.yang;h=eb38ec29529889c5b053fc939f144a0019f03103;hp=654fcbb49c4f96e09e81b6cfb792e8e55e685b43;hb=HEAD;hpb=14ac7418d9804040bf5af0e2b032b0262332532b diff --git a/models/yang/mano-types.yang b/models/yang/mano-types.yang index 654fcbb..d1cbb86 100644 --- a/models/yang/mano-types.yang +++ b/models/yang/mano-types.yang @@ -20,15 +20,15 @@ module mano-types { - namespace "urn:ietf:params:xml:ns:yang:nfvo:mano-types"; + namespace "urn:etsi:osm:yang:mano-types"; prefix "manotypes"; import ietf-inet-types { prefix "inet"; } - import rw-project { - prefix "rw-project"; + import osm-project { + prefix "osm-project"; } revision 2017-02-08 { @@ -78,6 +78,12 @@ module mano-types type string; } + leaf data-type { + description + "Data type associated with the value."; + type manotypes:parameter-data-type; + } + leaf value { description "Value associated with the name."; @@ -170,7 +176,7 @@ module mano-types description "Name of the configuration primitive."; type string; - mandatory "true"; + mandatory true; } leaf user-defined-script { @@ -215,35 +221,69 @@ module mano-types } - grouping vca-relationships { - container vca-relationships { - list relation { - description "List of relations between VCA componets."; + grouping vca-relations { + list relation { + description "List of relations between elements in this descriptor."; + key "name"; + + leaf name { + description + "Name of the relation."; + + type string; + } - key "requires provides"; + 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 requires { + leaf id { description - "Name of the required relation."; + "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 provides { + leaf endpoint { description - "Name of the provided relation."; + "Endpoint name defining the relation."; type string; } } } } - grouping vca-configuration { + grouping vca-metrics { description - "Information about the VNF or VDU configuration. Note: - If the NS contains multiple instances of the - same VNF or VDU, each instance could have a different - configuration."; + "Information about the VNF or VDU metrics"; + list metrics { + description "List of VCA related metrics"; + key "name"; + leaf name { + description + "Name of the metric, as defined in the Juju charm."; + type string; + } + leaf execution-environment-ref { + description + "Leaf reference to the particular execution environment getting that metric"; + type leafref { + path "../../execution-environment-list/id"; + } + } + leaf execution-environment-metric { + description + "Metric in the execution environment referenced by execution-environment-ref"; + type string; + } + } + } // END - grouping vca-metrics + grouping configuration-method { choice config-method { description "Defines the configuration method for the VNF or VDU."; @@ -277,10 +317,138 @@ module mano-types type boolean; default true; } - uses manotypes:vca-relationships; + leaf cloud { + description + "Type of cloud where the charm will be deployed. It only + applies to proxy charms (not native)"; + type enumeration { + enum lxd; + enum k8s; + } + default lxd; + } + } + } + + case execution-environment-list { + description + "List of Execution Environments to configure or monitor VNF or VDU."; + list execution-environment-list { + key "id"; + leaf id { + description "Execution environment identifier."; + type string; + } + choice execution-environment-model { + description "Execution environment model (juju, helm-chart)"; + case juju { + description + "Interact with the VNF or xDU 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; + } + leaf cloud { + description + "Type of cloud where the charm will be deployed. It only + applies to proxy charms (not native)"; + type enumeration { + enum lxd; + enum k8s; + } + default lxd; + } + } + } + case helm-chart { + description + "Interact with the VNF or xDU through Helm."; + leaf helm-chart { + description + "Helm chart that models the execution environment, in any of the following ways: + - / + - + - + - + "; + type string; + } + leaf helm-version { + description + "Helm version to use for this helm-chart, v3 by default"; + type enumeration { + enum v3; + } + default v3; + } + } + } + leaf metric-service { + description + "Service name in the execution environment. For helm charts, it will be + the name of the kubernetes service used by the exporter to expose metrics + to the OSM collector. + "; + type string; + } + leaf connection-point-ref { + description + "String representing a leaf reference to the particular external connection point + This field should match /vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id/vnfd:connection-point/vnfd:name + "; + type string; + // type leafref { + // path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id/vnfd:connection-point/vnfd:name"; + // } + } + } + } + + } + } + + grouping vca-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; } } } + } // END - grouping vca-config-access + + grouping vca-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 manotypes:configuration-method; list config-primitive { description @@ -294,6 +462,21 @@ module mano-types type string; } + leaf execution-environment-ref { + description + "Leaf reference to the particular execution environment"; + type leafref { + path "../../execution-environment-list/id"; + } + } + + leaf execution-environment-primitive { + description + "Name of the primitive in the execution enviroment. If not explicit, + the leaf 'name' will be used as the name of the primitive."; + type string; + } + list parameter { description "List of parameters to the config primitive."; @@ -323,10 +506,18 @@ module mano-types case primitive-definition { leaf name { description - "Name of the configuration primitive."; + "Name of the configuration primitive in the execution environment."; type string; } + leaf execution-environment-ref { + description + "Leaf reference to the particular execution environment"; + type leafref { + path "../../execution-environment-list/id"; + } + } + uses primitive-parameter-value; leaf user-defined-script { @@ -337,20 +528,56 @@ module mano-types } } } + + 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 in the execution environment."; + type string; + } + + leaf execution-environment-ref { + description + "Leaf reference to the particular execution environment"; + type leafref { + path "../../execution-environment-list/id"; + } + } + + uses primitive-parameter-value; + + leaf user-defined-script { + description + "A user defined script."; + type string; + } + } + uses manotypes:vca-metrics; + } // END - grouping vca-configuration typedef virtual-link-type { description "Type of virtual link - ELAN: A multipoint service connecting a set of VNFs - ELINE: For a simple point to point connection - // between a VNF and the existing network. + ELAN: A multipoint service connecting a set of elements + ELINE: A point-to-point service connecting two elements + L3: A service providing either Layer-3 visibility (IP) between + VDUs/VNFs or explicit interconnection between two ELAN VLDs."; // ETREE: A multipoint service connecting one or // more roots and a set of leaves, but // preventing inter-leaf communication."; type enumeration { enum ELAN; enum ELINE; + enum L3; // enum ETREE; } } @@ -622,6 +849,61 @@ module mano-types } } + typedef nfvi-metric-type { + description "Type of NFVI metric to be monitored"; + type enumeration { + enum cpu_utilization; + enum average_memory_utilization; + enum disk_read_ops; + enum disk_write_ops; + enum disk_read_bytes; + enum disk_write_bytes; + enum packets_sent; + enum packets_received; + enum packets_in_dropped; + enum packets_out_dropped; + } + } + + typedef scaling-trigger { + type enumeration { + enum pre-scale-in { + value 1; + } + enum post-scale-in { + value 2; + } + enum pre-scale-out { + value 3; + } + enum post-scale-out { + value 4; + } + } + } + + typedef scaling-policy-type { + type enumeration { + enum manual { + value 1; + } + enum automatic { + value 2; + } + } + } + + typedef scaling-criteria-operation { + type enumeration { + enum AND { + value 1; + } + enum OR { + value 2; + } + } + } + grouping vm-flavor { container vm-flavor { leaf vcpu-count { @@ -644,12 +926,12 @@ module mano-types } } //grouping vm-flavor - grouping vm-flavor-name { - leaf vm-flavor-name { - description "flavor name to be used while creating vm using cloud account"; - type string; - } - } + grouping vm-flavor-name { + leaf vm-flavor-name { + description "flavor name to be used while creating vm using cloud account"; + type string; + } + } grouping vswitch-epa { container vswitch-epa { @@ -778,7 +1060,6 @@ module mano-types } } - leaf om-cpu-model-string { description "OpenMANO CPU model string"; type string; @@ -792,6 +1073,7 @@ module mano-types type string; } } + } } @@ -823,47 +1105,76 @@ module mano-types } } - leaf cpu-pinning-policy { - description - "CPU pinning policy describes association - between virtual CPUs in guest and the - physical CPUs in the host. - DEDICATED : Virtual CPUs are pinned to - physical CPUs - SHARED : Multiple VMs may share the - same physical CPUs. - ANY : Any policy is acceptable for the VM"; - type enumeration { - enum DEDICATED; - enum SHARED; - enum ANY; + choice cpu-policy { + case cpu-pinning { + leaf cpu-pinning-policy { + description + "CPU pinning policy describes association + between virtual CPUs in guest and the + physical CPUs in the host. + DEDICATED : Virtual CPUs are pinned to + physical CPUs + SHARED : Multiple VMs may share the + same physical CPUs. + ANY : Any policy is acceptable for the VM"; + type enumeration { + enum DEDICATED; + enum SHARED; + enum ANY; + } + default "ANY"; + } + leaf cpu-thread-pinning-policy { + description + "CPU thread pinning policy describes how to + place the guest CPUs when the host supports + hyper threads: + AVOID : Avoids placing a guest on a host + with threads. + SEPARATE: Places vCPUs on separate cores, + and avoids placing two vCPUs on + two threads of same core. + ISOLATE : Places each vCPU on a different core, + and places no vCPUs from a different + guest on the same core. + PREFER : Attempts to place vCPUs on threads + of the same core."; + type enumeration { + enum AVOID; + enum SEPARATE; + enum ISOLATE; + enum PREFER; + } + } } - default "ANY"; - } - leaf cpu-thread-pinning-policy { - description - "CPU thread pinning policy describes how to - place the guest CPUs when the host supports - hyper threads: - AVOID : Avoids placing a guest on a host - with threads. - SEPARATE: Places vCPUs on separate cores, - and avoids placing two vCPUs on - two threads of same core. - ISOLATE : Places each vCPU on a different core, - and places no vCPUs from a different - guest on the same core. - PREFER : Attempts to place vCPUs on threads - of the same core."; - type enumeration { - enum AVOID; - enum SEPARATE; - enum ISOLATE; - enum PREFER; + case cpu-quota { + container cpu-quota { + description "CPU quota describes the CPU resource allocation policy. + Limit and Reserve values are defined in MHz"; + uses allocation-properties; + } } } + container mem-quota { + description "Memory quota describes the memory resource allocation policy. + Limit and Reserve values are defined in MB"; + uses allocation-properties; + } + + container disk-io-quota { + description "Disk IO quota describes the disk IO operations resource allocation policy. + Limit and Reserve values are defined in IOPS"; + uses allocation-properties; + } + + container vif-quota { + description "Virtual interfaces quota describes the virtual interface bandwidth resource allocation policy. + Limit and Reserve values are defined in Mbps"; + uses allocation-properties; + } + list pcie-device { description "List of pcie passthrough devices."; @@ -998,6 +1309,27 @@ module mano-types } } + grouping allocation-properties { + leaf limit { + description "Defines the maximum allocation. The value 0 indicates that usage is not limited. + This parameter ensures that the instance never uses more than the defined amount of resource."; + type uint64; + } + + leaf reserve { + description "Defines the guaranteed minimum reservation. + If needed, the machine will definitely get allocated the reserved amount of resources."; + type uint64; + } + + leaf shares { + description "Number of shares allocated. + Specifies the proportional weighted share for the domain. + If this element is omitted, the service defaults to the OS provided defaults"; + type uint64; + } + } + grouping provider-network { container provider-network { description "Container for the provider network."; @@ -1016,109 +1348,7 @@ module mano-types } } - grouping ns-service-primitive { - list service-primitive { - description - "Network service level service primitives."; - - key "name"; - - leaf name { - description - "Name of the service primitive."; - type string; - } - - list parameter { - description - "List of parameters for the service primitive."; - - key "name"; - uses manotypes:primitive-parameter; - } - - list parameter-group { - description - "Grouping of parameters which are logically grouped in UI"; - key "name"; - - leaf name { - description - "Name of the parameter group"; - type string; - } - - list parameter { - description - "List of parameters for the service primitive."; - key "name"; - uses manotypes:primitive-parameter; - } - - leaf mandatory { - description "Is this parameter group mandatory"; - type boolean; - default true; - } - } - - list vnf-primitive-group { - description - "List of service primitives grouped by VNF."; - - key "member-vnf-index-ref"; - leaf member-vnf-index-ref { - description - "Reference to member-vnf within constituent-vnfds"; - type uint64; - } - - leaf vnfd-id-ref { - description - "A reference to a vnfd. This is a - leafref to path: - ../../../../nsd:constituent-vnfd - + [nsd:id = current()/../nsd:id-ref] - + /nsd:vnfd-id-ref - NOTE: An issue with confd is preventing the - use of xpath. Seems to be an issue with leafref - to leafref, whose target is in a different module. - Once that is resolved this will switched to use - leafref"; - - type string; - } - - leaf vnfd-name { - description - "Name of the VNFD"; - type string; - } - - list primitive { - key "index"; - - leaf index { - description "Index of this primitive"; - type uint32; - } - - leaf name { - description "Name of the primitive in the VNF primitive "; - type string; - } - } - } - - leaf user-defined-script { - description - "A user defined script."; - type string; - } - } - } - - grouping monitoring-param { + grouping http-endpoints { list http-endpoint { description "List of http endpoints to be used by monitoring params"; @@ -1179,52 +1409,16 @@ module mano-types } } } - - list monitoring-param { - description - "List of monitoring parameters at the network service level"; - key id; - leaf id { - type string; - } - - leaf name { - type string; - } - - leaf http-endpoint-ref { - type leafref { - path "../../http-endpoint/path"; - } - } - - leaf json-query-method { - type json-query-method; - default "NAMEKEY"; - } - - container json-query-params { - leaf json-path { - description - "The jsonpath to use to extract value from JSON structure"; - type string; - } - leaf object-path { - description - "The objectpath to use to extract value from JSON structure"; - type string; - } - } - - uses monitoring-param-ui-data; - uses monitoring-param-value; - - } } grouping monitoring-param-aggregation { typedef aggregation-type { - description "aggregation-type"; + description + "aggregation-type, indicates the way to aggregate monitoring-params + (e.g. how to aggregate CPU utilisation of all VNFs belonging to the + same VNF group identified by member-vnf-index; or how to aggregate + memory utilisation of all VDUs belonging to the same VDU group + identified by vdu id)"; type enumeration { enum AVERAGE; enum MINIMUM; @@ -1730,28 +1924,23 @@ module mano-types } } - typedef alarm-operation-type { + typedef relational-operation-type { description - "The relational operator used to define whether an alarm - should be triggered in certain scenarios, such as if the - metric statistic goes above or below a specified value."; + "The relational operator used to define whether an alarm, + scaling event, etc. should be triggered in certain scenarios, + such as if the metric statistic goes above or below a specified + value."; type enumeration { enum GE; // greater than or equal enum LE; // less than or equal enum GT; // greater than enum LT; // less than enum EQ; // equal + enum NE; // not equal } } - grouping alarm { - leaf alarm-id { - description - "This field is reserved for the identifier assigned by the VIM provider"; - - type string; - } - + grouping alarm-properties { leaf name { description "A human readable string to identify the alarm"; type string; @@ -1814,11 +2003,6 @@ module mano-types type alarm-severity-type; } - leaf metric { - description "The metric to be tracked by this alarm."; - type alarm-metric-type; - } - leaf statistic { description "The type of metric statistic that is tracked by this alarm"; type alarm-statistic-type; @@ -1829,7 +2013,7 @@ module mano-types "The relational operator used to define whether an alarm should be triggered in certain scenarios, such as if the metric statistic goes above or below a specified value."; - type alarm-operation-type; + type relational-operation-type; } leaf value { @@ -2120,7 +2304,7 @@ module mano-types grouping supplemental-boot-data { description "Grouping for custom vim data"; container supplemental-boot-data { - uses manotypes:config-file; +// uses manotypes:config-file; leaf boot-data-drive { description "Some VIMs implement additional drives to host config-files or meta-data"; type boolean; @@ -2188,7 +2372,7 @@ module mano-types description "Project to which this belongs"; type leafref { - path "/rw-project:project/rw-project:name"; + path "/osm-project:project/osm-project:name"; } } }