X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=models%2Fplugins%2Fyang%2Fmano-types.yang;h=601bdac4240dca7879b3499cdd539b0b12c7ff1e;hb=9ad945aab0b5a992e1df860bede8ecc9b143470e;hp=ec3d583fa022770ff91093deadac02cb9c8bbd92;hpb=ed3a5315de9460a81dc2adff6840b5206717017f;p=osm%2FSO.git diff --git a/models/plugins/yang/mano-types.yang b/models/plugins/yang/mano-types.yang index ec3d583f..601bdac4 100644 --- a/models/plugins/yang/mano-types.yang +++ b/models/plugins/yang/mano-types.yang @@ -1,7 +1,7 @@ /* * - * Copyright 2016 RIFT.IO Inc + * Copyright 2016-2017 RIFT.IO Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,6 +31,15 @@ module mano-types prefix "rwpb"; } + import rw-project { + prefix "rw-project"; + } + + revision 2017-02-08 { + description + "Update model to support projects."; + } + revision 2015-04-23 { description "Initial revision. This YANG file defines @@ -40,12 +49,13 @@ module mano-types "Derived from earlier versions of base YANG files"; } - typedef meta-data-type { - type enumeration { - enum STRING; - enum JSON; + typedef package-type { + description "Type of descriptor being on-boarded"; + type enumeration { + enum NSD; + enum VNFD; + } } - } typedef parameter-data-type { type enumeration { @@ -118,6 +128,32 @@ module mano-types } } + grouping ui-primitive-group { + 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; + } + } + } grouping image-properties { leaf image { @@ -140,6 +176,37 @@ module mano-types type string; } } + grouping initial-config { + leaf seq { + description + "Sequence number for the configuration primitive."; + type uint64; + } + + leaf name { + description + "Name of the configuration primitive."; + type string; + mandatory "true"; + } + + leaf user-defined-script { + description + "A user defined script."; + type string; + } + + list parameter { + key "name"; + leaf name { + type string; + } + + leaf value { + type string; + } + } + } grouping vnf-configuration { container vnf-configuration { @@ -289,30 +356,9 @@ module mano-types list initial-config-primitive { rwpb:msg-new InitialConfigPrimitive; description - "Initial set of configuration primitives."; + "Initial 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; - } - - list parameter { - key "name"; - leaf name { - type string; - } - - leaf value { - type string; - } - } + uses initial-config; } leaf config-template { @@ -1003,108 +1049,6 @@ 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 resovled 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 { list http-endpoint { description @@ -1137,7 +1081,7 @@ module mano-types type string; } - leaf polling_interval_secs { + leaf polling-interval-secs { description "The HTTP polling interval in seconds"; type uint8; default 2; @@ -1180,9 +1124,11 @@ module mano-types } leaf http-endpoint-ref { - type leafref { - path "../../http-endpoint/path"; - } + // TODO (Philip): Fix this + // type leafref { + // path "../../http-endpoint/path"; + // } + type string; } leaf json-query-method { @@ -2032,9 +1978,9 @@ module mano-types } } - grouping custom-config-files { + grouping config-file { description "Grouping for files needed to be mounted into an additional drive"; - list custom-config-files { + list config-file { description "List of configuration files to be written on an additional drive"; key "source"; @@ -2049,37 +1995,12 @@ module mano-types } } - grouping custom-meta-data { - description "Grouping for instance-specific meta data"; - list custom-meta-data { - description - "List of meta-data to be associated with the instance"; - key "name"; - leaf name { - description "Name of the meta-data parameter"; - type string; - } - - leaf data-type { - description "Data-type the meta-data parameter"; - type manotypes:meta-data-type; - default "STRING"; - } - - leaf value { - description "Value of the meta-data parameter"; - type string; - } - } - } - - grouping custom-boot-data { + grouping supplemental-boot-data { description "Grouping for custom vim data"; - container custom-boot-data { - uses manotypes:custom-config-files; - uses manotypes:custom-meta-data; - leaf custom-drive { - description "Some VIMs implement custom drives to host custom-files or meta-data"; + container supplemental-boot-data { + uses manotypes:config-file; + leaf boot-data-drive { + description "Some VIMs implement additional drives to host config-files or meta-data"; type boolean; default false; } @@ -2117,49 +2038,38 @@ module mano-types uses image-properties; } - case volume { - leaf volume-ref { - description "Reference for pre-existing volume in VIM"; - type string; - } - } } - container boot-params { - leaf boot-volume { - description "This flag indicates if this is boot volume or not"; - type boolean; - } - leaf boot-priority { - description "Boot priority associated with volume"; - type int32; + leaf device-bus { + description "Type of disk-bus on which this disk is exposed to guest"; + type enumeration { + enum ide; + enum usb; + enum virtio; + enum scsi; } } - container guest-params { - description "Guest virtualization parameter associated with volume"; - - leaf device_bus { - description "Type of disk-bus on which this disk is exposed to guest"; - type enumeration { - enum ide; - enum usb; - enum virtio; - enum scsi; - } - } - - leaf device_type { - description "The type of device as exposed to guest"; - type enumeration { + leaf device-type { + description "The type of device as exposed to guest"; + type enumeration { enum disk; enum cdrom; enum floppy; enum lun; - } } + } + + } - uses custom-meta-data; + grouping rpc-project-name { + leaf project-name { + mandatory true; + description + "Project to which this belongs"; + type leafref { + path "/rw-project:project/rw-project:name"; + } } } }