| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 1 | |
| 2 | /* |
| Adam Israel | cc14dd7 | 2017-06-28 14:31:45 -0400 | [diff] [blame] | 3 | * |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 4 | * Copyright 2016-2017 RIFT.IO Inc |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 5 | * |
| 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 |
| 9 | * |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | * |
| 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. |
| 17 | * |
| 18 | * |
| 19 | */ |
| 20 | |
| 21 | module vnfr |
| 22 | { |
| 23 | namespace "urn:ietf:params:xml:ns:yang:nfvo:vnfr"; |
| 24 | prefix "vnfr"; |
| 25 | |
| 26 | import mano-types { |
| 27 | prefix "manotypes"; |
| 28 | } |
| 29 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 30 | import vnfd-base { |
| 31 | prefix "vnfd-base"; |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 32 | } |
| 33 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 34 | import project-vnfd { |
| 35 | prefix "project-vnfd"; |
| 36 | } |
| 37 | |
| 38 | import project-nsd { |
| 39 | prefix "project-nsd"; |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 40 | } |
| 41 | |
| 42 | import vlr { |
| 43 | prefix "vlr"; |
| 44 | } |
| 45 | |
| 46 | import ietf-yang-types { |
| 47 | prefix "yang"; |
| 48 | } |
| 49 | |
| 50 | import ietf-inet-types { |
| 51 | prefix "inet"; |
| 52 | } |
| 53 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 54 | import rw-project { |
| 55 | prefix "rw-project"; |
| 56 | } |
| 57 | |
| 58 | revision 2017-02-28 { |
| 59 | description |
| 60 | "Update model to support projects."; |
| 61 | } |
| 62 | |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 63 | revision 2015-09-10 { |
| 64 | description |
| 65 | "Initial revision. This YANG file defines |
| 66 | the Virtual Network Function Record (VNFR)"; |
| 67 | reference |
| 68 | "Derived from earlier versions of base YANG files"; |
| 69 | } |
| 70 | |
| Rajesh | 989442e | 2017-10-08 04:13:32 +0000 | [diff] [blame^] | 71 | typedef vdu-operational-status { |
| 72 | type enumeration { |
| 73 | enum init; |
| 74 | enum vm-init-phase; |
| 75 | enum vm-alloc-pending; |
| 76 | enum running; |
| 77 | enum terminate; |
| 78 | enum vl-terminate-phase; |
| 79 | enum terminated; |
| 80 | enum failed; |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | typedef vnf-operational-status { |
| 85 | type enumeration { |
| 86 | enum pre-init; |
| 87 | enum init; |
| 88 | enum vl-init-phase; |
| 89 | enum vm-init-phase; |
| 90 | enum running; |
| 91 | enum terminate; |
| 92 | enum vm-terminate-phase; |
| 93 | enum vl-terminate-phase; |
| 94 | enum terminated; |
| 95 | enum failed; |
| 96 | } |
| 97 | } |
| 98 | |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 99 | grouping placement-group-info { |
| 100 | list placement-groups-info { |
| 101 | description |
| 102 | " |
| 103 | Placement groups to which this VDU belongs and its |
| 104 | cloud construct |
| 105 | "; |
| 106 | key "name"; |
| 107 | uses manotypes:placement-group-info; |
| 108 | uses manotypes:placement-group-input; |
| Adam Israel | cc14dd7 | 2017-06-28 14:31:45 -0400 | [diff] [blame] | 109 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 110 | } |
| Adam Israel | cc14dd7 | 2017-06-28 14:31:45 -0400 | [diff] [blame] | 111 | |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 112 | grouping virtual-interface { |
| 113 | container virtual-interface { |
| 114 | description |
| 115 | "Container for the virtual interface properties"; |
| 116 | |
| 117 | leaf type { |
| 118 | description |
| 119 | "Specifies the type of virtual interface |
| 120 | between VM and host. |
| 121 | VIRTIO : Use the traditional VIRTIO interface. |
| 122 | PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface. |
| 123 | SR-IOV : Use SR-IOV interface."; |
| 124 | type enumeration { |
| 125 | enum VIRTIO; |
| 126 | enum PCI-PASSTHROUGH; |
| 127 | enum SR-IOV; |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | leaf bandwidth { |
| 132 | description |
| 133 | "Aggregate bandwidth of the NIC."; |
| 134 | type uint64; |
| 135 | } |
| 136 | |
| 137 | leaf ovs-offload { |
| 138 | description |
| 139 | "Defines if the NIC supports OVS offload. |
| 140 | MANDATORY : OVS offload support in the NIC is mandatory. |
| 141 | PREFERRED : OVS offload support in the NIC is preferred."; |
| 142 | type enumeration { |
| 143 | enum MANDATORY; |
| 144 | enum PREFERRED; |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | leaf vendor-id { |
| 149 | description |
| 150 | "Specifies the vendor specific id for |
| 151 | the device. This is used when a NIC from |
| 152 | specific HW vendor is required."; |
| 153 | type string; |
| 154 | } |
| 155 | |
| 156 | leaf datapath-library { |
| 157 | description |
| 158 | "Specifies the name and version of the datapath |
| 159 | library the NIC is expected to support."; |
| 160 | type string; |
| 161 | } |
| 162 | |
| 163 | leaf provider-network-name { |
| 164 | description |
| 165 | "Name of the provider network to which this |
| 166 | NIC is attached."; |
| 167 | type string; |
| 168 | } |
| 169 | } |
| 170 | } |
| 171 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 172 | grouping associated-virtual-cps { |
| 173 | list virtual-cps { |
| 174 | key "name"; |
| 175 | uses vnfd-base:common-connection-point; |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 176 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 177 | leaf ip-address { |
| 178 | description |
| 179 | "IP address assigned to the virtual connection point"; |
| 180 | type inet:ip-address; |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 181 | } |
| 182 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 183 | leaf mac-address { |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 184 | description |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 185 | "MAC address assigned to the virtual connection point"; |
| 186 | type string; |
| 187 | } |
| 188 | |
| 189 | leaf connection-point-id { |
| 190 | description "VIM identifier for connection point"; |
| 191 | type string; |
| 192 | } |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | augment "/rw-project:project" { |
| 197 | container vnfr-catalog { |
| 198 | config false; |
| 199 | list vnfr { |
| 200 | description |
| 201 | "Virtual Network Function Record (VNFR)."; |
| 202 | key "id"; |
| 203 | unique "name"; |
| 204 | |
| 205 | leaf id { |
| 206 | description "Identifier for the VNFR."; |
| 207 | type yang:uuid; |
| 208 | } |
| 209 | |
| 210 | leaf nsr-id-ref { |
| 211 | description |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 212 | "NS instance identifier. |
| 213 | This is a leafref /nsr:ns-instance-config/nsr:nsr/nsr:id"; |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 214 | type yang:uuid; |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 215 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 216 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 217 | leaf member-vnf-index-ref { |
| 218 | description "Reference to member VNF index in Network service."; |
| 219 | type leafref { |
| 220 | path "../../../project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:constituent-vnfd/project-nsd:member-vnf-index"; |
| 221 | } |
| 222 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 223 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 224 | leaf dashboard-url { |
| 225 | description "Dashboard URL"; |
| 226 | type inet:uri; |
| 227 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 228 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 229 | leaf name { |
| 230 | description "VNFR name."; |
| 231 | type string; |
| 232 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 233 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 234 | leaf short-name { |
| 235 | description "VNFR short name."; |
| 236 | type string; |
| 237 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 238 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 239 | leaf vendor { |
| 240 | description "Vendor of the VNFR."; |
| 241 | type string; |
| 242 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 243 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 244 | leaf description { |
| 245 | description "Description of the VNFR."; |
| 246 | type string; |
| 247 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 248 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 249 | leaf version { |
| 250 | description "Version of the VNFR"; |
| 251 | type string; |
| 252 | } |
| 253 | |
| 254 | leaf create-time { |
| 255 | description |
| 256 | "Creation timestamp of this Virtual Network |
| Adam Israel | cc14dd7 | 2017-06-28 14:31:45 -0400 | [diff] [blame] | 257 | Function. The timestamp is expressed as |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 258 | seconds since unix epoch - 1970-01-01T00:00:00Z"; |
| 259 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 260 | type uint32; |
| 261 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 262 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 263 | leaf uptime { |
| 264 | description |
| 265 | "Active period of this Virtual Network Function. |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 266 | Uptime is expressed in seconds"; |
| 267 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 268 | type uint32; |
| 269 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 270 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 271 | container vnfd { |
| 272 | description "VNF descriptor used to instantiate this VNF"; |
| 273 | uses vnfd-base:vnfd-descriptor; |
| 274 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 275 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 276 | leaf vnfd-ref { |
| 277 | description "Reference to VNFD"; |
| 278 | type leafref { |
| 279 | path "../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id"; |
| 280 | } |
| 281 | } |
| 282 | |
| 283 | // Use parameters provided here to configure this VNF |
| Adam Israel | cc14dd7 | 2017-06-28 14:31:45 -0400 | [diff] [blame] | 284 | container vnf-configuration { |
| 285 | uses manotypes:vca-configuration; |
| 286 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 287 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 288 | // Mainly used by Mon-params & dashboard url |
| 289 | container mgmt-interface { |
| 290 | leaf ip-address { |
| 291 | type inet:ip-address; |
| 292 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 293 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 294 | leaf port { |
| 295 | type inet:port-number; |
| 296 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 297 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 298 | container ssh-key { |
| 299 | description "SSH key pair used for this VNF"; |
| 300 | leaf public-key { |
| 301 | description "Public key configured on this VNF"; |
| 302 | type string; |
| 303 | } |
| 304 | |
| 305 | leaf private-key-file { |
| 306 | description "Path to the private key file"; |
| 307 | type string; |
| 308 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 309 | } |
| 310 | } |
| 311 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 312 | list internal-vlr { |
| 313 | key "vlr-ref"; |
| 314 | |
| 315 | leaf vlr-ref { |
| 316 | description "Reference to a VLR record in the VLR catalog"; |
| 317 | type leafref { |
| 318 | path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id"; |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | leaf-list internal-connection-point-ref { |
| 323 | type leafref { |
| 324 | path "../../vdur/internal-connection-point/id"; |
| 325 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 326 | } |
| 327 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 328 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 329 | list connection-point { |
| 330 | key "name"; |
| 331 | description |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 332 | "List for external connection points. Each VNF has one |
| 333 | or more external connection points. As the name |
| 334 | implies that external connection points are used for |
| 335 | connecting the VNF to other VNFs or to external networks. |
| 336 | Each VNF exposes these connection points to the |
| 337 | orchestrator. The orchestrator can construct network |
| 338 | services by connecting the connection points between |
| 339 | different VNFs. The NFVO will use VLDs and VNFFGs at |
| 340 | the network service level to construct network services."; |
| 341 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 342 | uses vnfd-base:common-connection-point; |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 343 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 344 | leaf vlr-ref { |
| 345 | description |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 346 | "Reference to the VLR associated with this connection point"; |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 347 | type leafref { |
| 348 | path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id"; |
| 349 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 350 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 351 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 352 | leaf ip-address { |
| 353 | description |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 354 | "IP address assigned to the external connection point"; |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 355 | type inet:ip-address; |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 356 | } |
| Rajesh | 989442e | 2017-10-08 04:13:32 +0000 | [diff] [blame^] | 357 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 358 | leaf mac-address { |
| 359 | description |
| 360 | "MAC address assigned to the external connection point"; |
| 361 | // type inet:mac-address; |
| 362 | type string; |
| 363 | } |
| 364 | |
| 365 | leaf connection-point-id { |
| 366 | type string; |
| 367 | } |
| 368 | |
| 369 | uses associated-virtual-cps; |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 370 | } |
| 371 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 372 | list vdur { |
| 373 | description "List of Virtual Deployment Units"; |
| 374 | key "id"; |
| 375 | unique "name"; |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 376 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 377 | leaf id { |
| 378 | description "Unique id for the VDU"; |
| 379 | type yang:uuid; |
| 380 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 381 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 382 | leaf name { |
| 383 | description "name of the instantiated VDUR"; |
| 384 | type string; |
| 385 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 386 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 387 | leaf unique-short-name { |
| 388 | description "Short Unique name of the VDU |
| 389 | This will be of the format NSR name-ShortnedString-VDUname |
| 390 | NSR name and VDU name shall be constrained to 10 characters"; |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 391 | type string; |
| 392 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 393 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 394 | leaf vdu-id-ref { |
| 395 | type leafref { |
| 396 | path "../../vnfd/vdu/id"; |
| 397 | } |
| 398 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 399 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 400 | leaf vim-id { |
| 401 | description "Allocated VM resource id"; |
| 402 | type string; |
| 403 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 404 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 405 | leaf flavor-id { |
| 406 | description "VIM assigned flavor id"; |
| 407 | type string; |
| 408 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 409 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 410 | leaf image-id { |
| 411 | description "VIM assigned image id"; |
| 412 | type string; |
| 413 | } |
| 414 | |
| 415 | leaf management-ip { |
| 416 | description "Management IP address"; |
| 417 | type inet:ip-address; |
| 418 | } |
| 419 | |
| 420 | leaf vm-management-ip { |
| 421 | description "VM Private Management IP address"; |
| 422 | type inet:ip-address; |
| 423 | } |
| 424 | |
| 425 | leaf console-url { |
| 426 | description "Console URL for this VDU, if available"; |
| 427 | type inet:uri; |
| 428 | } |
| 429 | |
| 430 | uses manotypes:vm-flavor; |
| 431 | uses manotypes:guest-epa; |
| 432 | uses manotypes:vswitch-epa; |
| 433 | uses manotypes:hypervisor-epa; |
| 434 | uses manotypes:host-epa; |
| 435 | |
| 436 | uses manotypes:supplemental-boot-data; |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 437 | |
| Adam Israel | cc14dd7 | 2017-06-28 14:31:45 -0400 | [diff] [blame] | 438 | container vdu-configuration { |
| 439 | uses manotypes:vca-configuration; |
| 440 | } |
| 441 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 442 | list volumes { |
| 443 | key "name"; |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 444 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 445 | leaf name { |
| 446 | description "Name of the disk-volumes, e.g. vda, vdb etc"; |
| 447 | type string; |
| 448 | } |
| 449 | |
| 450 | leaf volume-id { |
| 451 | description "VIM assigned volume id"; |
| 452 | type string; |
| 453 | } |
| 454 | |
| 455 | uses manotypes:volume-info; |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 456 | } |
| 457 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 458 | list internal-connection-point { |
| 459 | key "id"; |
| 460 | description |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 461 | "List for internal connection points. Each VNFC |
| 462 | has zero or more internal connection points. |
| 463 | Internal connection points are used for connecting |
| 464 | the VNF components internal to the VNF. If a VNF |
| 465 | has only one VNFC, it may not have any internal |
| 466 | connection points."; |
| 467 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 468 | uses vnfd-base:common-connection-point; |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 469 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 470 | leaf ip-address { |
| 471 | description |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 472 | "IP address assigned to the internal connection point"; |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 473 | type inet:ip-address; |
| 474 | } |
| Rajesh | 989442e | 2017-10-08 04:13:32 +0000 | [diff] [blame^] | 475 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 476 | leaf mac-address { |
| 477 | description |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 478 | "MAC address assigned to the internal connection point"; |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 479 | // type inet:mac-address; |
| 480 | type string; |
| 481 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 482 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 483 | leaf connection-point-id { |
| 484 | type string; |
| 485 | } |
| 486 | |
| 487 | uses associated-virtual-cps; |
| 488 | } |
| 489 | |
| 490 | list interface { |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 491 | description |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 492 | "List of interfaces (internal and external) for the VNF"; |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 493 | key name; |
| 494 | |
| 495 | leaf name { |
| 496 | description |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 497 | "Name of the interface. Note that this |
| 498 | name has only local significance to the VDU."; |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 499 | type string; |
| 500 | } |
| 501 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 502 | leaf position { |
| 503 | description |
| 504 | "Explicit Position of the interface within the list"; |
| 505 | type uint32; |
| 506 | } |
| 507 | |
| 508 | leaf type { |
| 509 | description |
| 510 | "Type of the Interface"; |
| 511 | |
| 512 | type vnfd-base:interface-type; |
| 513 | |
| 514 | default "EXTERNAL"; |
| 515 | } |
| 516 | choice connection-point-type { |
| 517 | case internal { |
| 518 | leaf internal-connection-point-ref { |
| 519 | description |
| 520 | "Leaf Ref to the particular internal connection point"; |
| 521 | type leafref { |
| 522 | path "../../internal-connection-point/id"; |
| 523 | } |
| 524 | } |
| 525 | } |
| 526 | case external { |
| 527 | leaf external-connection-point-ref { |
| 528 | description |
| 529 | "Leaf Ref to the particular external connection point"; |
| 530 | type leafref { |
| 531 | path "../../../connection-point/name"; |
| 532 | } |
| 533 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 534 | } |
| 535 | } |
| 536 | uses virtual-interface; |
| 537 | } |
| 538 | |
| Rajesh | 989442e | 2017-10-08 04:13:32 +0000 | [diff] [blame^] | 539 | leaf operational-status { |
| 540 | description |
| 541 | "The operational status of the VDU |
| 542 | init : The VDU has just started. |
| 543 | vm-init-phase : The VDUs in the VNF is being created in VIM. |
| 544 | vm-alloc-pending : The VM alloc is pending in VIM |
| 545 | running : The VDU is active in VM |
| 546 | terminate : The VDU is being terminated |
| 547 | vm-terminate-phase : The VDU in the VNF is being terminated in VIM. |
| 548 | terminated : The VDU is in the terminated state. |
| 549 | failed : The VDU instantiation failed. |
| 550 | "; |
| 551 | type vdu-operational-status; |
| 552 | } |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 553 | |
| 554 | uses placement-group-info; |
| 555 | } |
| 556 | |
| 557 | uses manotypes:monitoring-param; |
| 558 | |
| 559 | leaf operational-status { |
| 560 | description |
| 561 | "The operational status of the VNFR instance |
| 562 | pre-init : The VNF before Input Param Substitution. |
| 563 | init : The VNF has just started. |
| 564 | vl-init-phase : The internal VLs in the VNF are being instantiated. |
| 565 | vm-init-phase : The VMs for VDUs in the VNF are being instantiated. |
| 566 | running : The VNF is in running state. |
| 567 | terminate : The VNF is being terminated. |
| 568 | vm-terminate-phase : The VMs in the VNF are being terminated. |
| 569 | vl-terminate-phase : The internal VLs in the VNF are being terminated. |
| 570 | terminated : The VNF is in the terminated state. |
| 571 | failed : The VNF instantiation failed |
| 572 | "; |
| Rajesh | 989442e | 2017-10-08 04:13:32 +0000 | [diff] [blame^] | 573 | type vnf-operational-status; |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 574 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 575 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 576 | leaf config-status { |
| 577 | description |
| 578 | "The configuration status of the NS instance |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 579 | configuring: At least one of the VNFs in this instance is in configuring state |
| 580 | configured: All the VNFs in this NS instance are configured or config-not-needed state |
| 581 | "; |
| 582 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 583 | type enumeration { |
| 584 | enum configuring { |
| 585 | value 1; |
| 586 | } |
| 587 | enum configured { |
| 588 | value 2; |
| 589 | } |
| 590 | enum failed { |
| 591 | value 3; |
| 592 | } |
| 593 | enum config-not-needed { |
| 594 | value 4; |
| 595 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 596 | } |
| 597 | } |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 598 | uses placement-group-info; |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 599 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 600 | container cloud-config { |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 601 | uses manotypes:cloud-config; |
| 602 | } |
| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 603 | } |
| 604 | } |
| 605 | } |
| 606 | } |