X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FIM.git;a=blobdiff_plain;f=models%2Fyang%2Fmano-types.yang;h=7784d5c37e7b9994c5e86d6de6888ff8de34f656;hp=654fcbb49c4f96e09e81b6cfb792e8e55e685b43;hb=25fa538e051d06cfa4c3f23dc6617d090211cfcf;hpb=045066f62131d3aa9d0deccabf6ddb884e732ae1;ds=sidebyside diff --git a/models/yang/mano-types.yang b/models/yang/mano-types.yang index 654fcbb..7784d5c 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."; @@ -237,13 +243,21 @@ module mano-types } } - 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; + } + } + } // END - grouping vca-metrics + grouping configuration-method { choice config-method { description "Defines the configuration method for the VNF or VDU."; @@ -281,6 +295,25 @@ module mano-types } } } + } + + grouping ns-configuration { + description + "Information about NS configuration. Note: + In the future this should be equivalent to vca-configuration + grouping."; + + uses manotypes:configuration-method; + } + + grouping vca-configuration { + 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."; + + uses manotypes:configuration-method; list config-primitive { description @@ -337,6 +370,32 @@ 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."; + type string; + } + + 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 { @@ -622,6 +681,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 +758,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 +892,6 @@ module mano-types } } - leaf om-cpu-model-string { description "OpenMANO CPU model string"; type string; @@ -792,6 +905,7 @@ module mano-types type string; } } + } } @@ -823,47 +937,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 +1141,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."; @@ -1070,7 +1234,7 @@ module mano-types leaf member-vnf-index-ref { description "Reference to member-vnf within constituent-vnfds"; - type uint64; + type string; } leaf vnfd-id-ref { @@ -1118,7 +1282,7 @@ module mano-types } } - grouping monitoring-param { + grouping http-endpoints { list http-endpoint { description "List of http endpoints to be used by monitoring params"; @@ -1179,52 +1343,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,11 +1858,12 @@ 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 @@ -1744,14 +1873,7 @@ module mano-types } } - 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 +1936,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 +1946,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 +2237,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 +2305,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"; } } }