| velandy | 88a64f1 | 2017-06-07 23:32:49 -0400 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | * |
| 4 | * Copyright 2016 RIFT.IO Inc |
| 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 rw-nsr |
| 22 | { |
| 23 | namespace "http://riftio.com/ns/riftware-1.0/rw-nsr"; |
| 24 | prefix "rw-nsr"; |
| 25 | |
| 26 | import mano-types { |
| 27 | prefix "manotypes"; |
| 28 | } |
| 29 | |
| 30 | import nsr { |
| 31 | prefix "nsr"; |
| 32 | } |
| 33 | |
| 34 | import nsd { |
| 35 | prefix "nsd"; |
| 36 | } |
| 37 | |
| 38 | import rw-cloud { |
| 39 | prefix "rw-cloud"; |
| 40 | } |
| 41 | |
| 42 | import rw-config-agent { |
| 43 | prefix "rw-config-agent"; |
| 44 | } |
| 45 | |
| 46 | import rw-sdn { |
| 47 | prefix "rw-sdn"; |
| 48 | } |
| 49 | |
| 50 | import ietf-yang-types { |
| 51 | prefix "yang"; |
| 52 | } |
| 53 | |
| 54 | revision 2015-09-10 { |
| 55 | description |
| 56 | "Initial revision. This YANG file augments |
| 57 | the base MANO VNFD"; |
| 58 | reference |
| 59 | "Derived from earlier versions of base YANG files"; |
| 60 | } |
| 61 | |
| 62 | grouping operational-events { |
| 63 | list operational-events { |
| 64 | key "id"; |
| 65 | description |
| 66 | "Recent operational events for this network service. |
| 67 | Though the model does not impose any restrictions on the numbe of events, |
| 68 | the max operational events will be limited to the most recent 10"; |
| 69 | |
| 70 | leaf id { |
| 71 | description "The id of the instance"; |
| 72 | type uint64; |
| 73 | } |
| 74 | |
| 75 | leaf timestamp { |
| 76 | description |
| 77 | "The timestamp of this event expressed as seconds since |
| 78 | unix epoch - 1970-01-01T00:00:00Z"; |
| 79 | type uint32; |
| 80 | } |
| 81 | leaf event { |
| 82 | description "Short description of the event"; |
| 83 | type string; |
| 84 | } |
| 85 | leaf description { |
| 86 | description |
| 87 | "The description of this event"; |
| 88 | type string; |
| 89 | } |
| 90 | leaf details { |
| 91 | description |
| 92 | "The detailed description of this event (in case of errors)"; |
| 93 | type string; |
| 94 | } |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | |
| 99 | grouping rw-ns-instance-config { |
| 100 | leaf cloud-account { |
| 101 | description |
| 102 | "The configured cloud account which the NSR is instantiated within. |
| 103 | All VDU's, Virtual Links, and provider networks will be requested |
| 104 | using the cloud-account's associated CAL instance"; |
| 105 | type leafref { |
| 106 | path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | leaf om-datacenter { |
| 111 | description |
| 112 | "Openmano datacenter name to use when instantiating |
| 113 | the network service. This is only used when openmano |
| 114 | is selected as the cloud account. This should be superceded |
| 115 | by multiple cloud accounts when that becomes available."; |
| 116 | type string; |
| 117 | } |
| 118 | |
| 119 | list vnf-cloud-account-map { |
| 120 | description |
| 121 | "Mapping VNF to Cloud Account where VNF will be instantiated"; |
| 122 | |
| 123 | key "member-vnf-index-ref"; |
| 124 | leaf member-vnf-index-ref { |
| 125 | type uint64; |
| 126 | } |
| 127 | |
| 128 | leaf cloud-account { |
| 129 | description |
| 130 | "The configured cloud account where VNF is instantiated within. |
| 131 | All VDU's, Virtual Links, and provider networks will be requested |
| 132 | using the cloud-account's associated CAL instance"; |
| 133 | type leafref { |
| 134 | path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | leaf om-datacenter { |
| 139 | description |
| 140 | "Openmano datacenter name to use when instantiating |
| 141 | the network service. This is only used when openmano |
| 142 | is selected as the cloud account. This should be superceded |
| 143 | by multiple cloud accounts when that becomes available."; |
| 144 | type string; |
| 145 | } |
| 146 | |
| 147 | leaf config-agent-account { |
| 148 | description |
| 149 | "The configured config agent account to use for instantiating this VNF. |
| 150 | The configuration for this VNF will be driven using the specified config |
| 151 | agent account"; |
| 152 | type leafref { |
| 153 | path "/rw-config-agent:config-agent/rw-config-agent:account/rw-config-agent:name"; |
| 154 | } |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | list vl-cloud-account-map { |
| 159 | description |
| 160 | "Mapping VL to Cloud Account where VL will be instantiated"; |
| 161 | |
| 162 | key "vld-id-ref"; |
| 163 | |
| 164 | leaf vld-id-ref { |
| 165 | description |
| 166 | "A reference to a vld. |
| 167 | leafref path ../../nsd/vld/id"; |
| 168 | type string; |
| 169 | } |
| 170 | |
| 171 | leaf-list cloud-accounts { |
| 172 | description |
| 173 | "The configured list of cloud accounts where VL is instantiated. |
| 174 | All VDU's, Virtual Links, and provider networks will be requested |
| 175 | using the cloud-account's associated CAL instance"; |
| 176 | type leafref { |
| 177 | path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | leaf-list om-datacenters { |
| 182 | description |
| 183 | "Openmano datacenter names to use when instantiating |
| 184 | the VLs. This is only used when openmano |
| 185 | is selected as the cloud account. This should be superceded |
| 186 | by multiple cloud accounts when that becomes available."; |
| 187 | type string; |
| 188 | } |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | |
| 193 | augment /nsr:ns-instance-config/nsr:nsr { |
| 194 | uses rw-ns-instance-config; |
| 195 | } |
| 196 | |
| 197 | augment /nsr:start-network-service/nsr:input{ |
| 198 | uses rw-ns-instance-config; |
| 199 | } |
| 200 | |
| 201 | augment /nsr:ns-instance-opdata/nsr:nsr { |
| 202 | uses manotypes:action-param; |
| 203 | uses manotypes:control-param; |
| 204 | |
| 205 | leaf sdn-account { |
| 206 | description |
| 207 | "The SDN account associted with the cloud account using which an |
| 208 | NS was instantiated."; |
| 209 | type leafref { |
| 210 | path "/rw-sdn:sdn/rw-sdn:account/rw-sdn:name"; |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | leaf config-status-details { |
| 215 | description |
| 216 | "The configuration status error details of the NS instance, in case of any errors"; |
| 217 | type string; |
| 218 | } |
| 219 | |
| 220 | container nfvi-metrics { |
| 221 | container vm { |
| 222 | leaf label { |
| 223 | description |
| 224 | "Label to show in UI"; |
| 225 | type string; |
| 226 | default "VM"; |
| 227 | } |
| 228 | |
| 229 | leaf active-vm { |
| 230 | description |
| 231 | "The number of active VMs."; |
| 232 | type uint64; |
| 233 | } |
| 234 | |
| 235 | leaf inactive-vm { |
| 236 | description |
| 237 | "The number of inactive VMs."; |
| 238 | type uint64; |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | uses manotypes:nfvi-metrics; |
| 243 | } |
| 244 | |
| 245 | container epa-param { |
| 246 | container ovs-acceleration { |
| 247 | leaf label { |
| 248 | description |
| 249 | "Label to show in UI for the param"; |
| 250 | type string; |
| 251 | default "OVS ACCELERATION"; |
| 252 | } |
| 253 | |
| 254 | leaf vm { |
| 255 | description |
| 256 | "Number of VMs with the EPA attribute"; |
| 257 | type uint64; |
| 258 | } |
| 259 | |
| 260 | leaf unit { |
| 261 | description |
| 262 | "Unit label to show in the UI"; |
| 263 | type string; |
| 264 | default "vms"; |
| 265 | } |
| 266 | } |
| 267 | |
| 268 | container ovs-offload { |
| 269 | leaf label { |
| 270 | description |
| 271 | "Label to show in UI for the param"; |
| 272 | type string; |
| 273 | default "OVS OFFLOAD"; |
| 274 | } |
| 275 | |
| 276 | leaf vm { |
| 277 | description |
| 278 | "Number of VMs with the EPA attribute"; |
| 279 | type uint64; |
| 280 | } |
| 281 | |
| 282 | leaf unit { |
| 283 | description |
| 284 | "Unit label to show in the UI"; |
| 285 | type string; |
| 286 | default "vms"; |
| 287 | } |
| 288 | |
| 289 | } |
| 290 | |
| 291 | container ddio { |
| 292 | leaf label { |
| 293 | description |
| 294 | "Label to show in UI for the param"; |
| 295 | type string; |
| 296 | default "DDIO"; |
| 297 | } |
| 298 | |
| 299 | leaf vm { |
| 300 | description |
| 301 | "Number of VMs with the EPA attribute"; |
| 302 | type uint64; |
| 303 | } |
| 304 | |
| 305 | leaf unit { |
| 306 | description |
| 307 | "Unit label to show in the UI"; |
| 308 | type string; |
| 309 | default "vms"; |
| 310 | } |
| 311 | |
| 312 | } |
| 313 | |
| 314 | container cat { |
| 315 | leaf label { |
| 316 | description |
| 317 | "Label to show in UI for the param"; |
| 318 | type string; |
| 319 | default "CAT"; |
| 320 | } |
| 321 | |
| 322 | leaf vm { |
| 323 | description |
| 324 | "Number of VMs with the EPA attribute"; |
| 325 | type uint64; |
| 326 | } |
| 327 | |
| 328 | leaf unit { |
| 329 | description |
| 330 | "Unit label to show in the UI"; |
| 331 | type string; |
| 332 | default "vms"; |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | container cmt { |
| 337 | leaf label { |
| 338 | description |
| 339 | "Label to show in UI for the param"; |
| 340 | type string; |
| 341 | default "CMT"; |
| 342 | } |
| 343 | |
| 344 | leaf vm { |
| 345 | description |
| 346 | "Number of VMs with the EPA attribute"; |
| 347 | type uint64; |
| 348 | } |
| 349 | |
| 350 | leaf unit { |
| 351 | description |
| 352 | "Unit label to show in the UI"; |
| 353 | type string; |
| 354 | default "vms"; |
| 355 | } |
| 356 | |
| 357 | } |
| 358 | } |
| 359 | uses operational-events; |
| 360 | } |
| 361 | |
| 362 | |
| 363 | augment /nsr:ns-instance-opdata/nsr:nsr/nsr:vlr { |
| 364 | leaf assigned-subnet { |
| 365 | description "Subnet added for the VL"; |
| 366 | type string; |
| 367 | } |
| 368 | leaf cloud-account { |
| 369 | description |
| 370 | "The configured cloud account in which the VL is instantiated within."; |
| 371 | type leafref { |
| 372 | path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; |
| 373 | } |
| 374 | } |
| 375 | leaf om-datacenter { |
| 376 | description |
| 377 | "Openmano datacenter name to use when instantiating |
| 378 | the network service. This is only used when openmano |
| 379 | is selected as the cloud account. This should be superceded |
| 380 | by multiple cloud accounts when that becomes available."; |
| 381 | type string; |
| 382 | } |
| 383 | } |
| 384 | |
| 385 | augment /nsr:ns-instance-opdata/nsr:nsr/nsr:constituent-vnfr-ref { |
| 386 | leaf cloud-account { |
| 387 | description |
| 388 | "The configured cloud account in which the VNF is instantiated within. |
| 389 | All VDU's, Virtual Links, and provider networks will be requested |
| 390 | using the cloud-account's associated CAL instance"; |
| 391 | type leafref { |
| 392 | path "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name"; |
| 393 | } |
| 394 | } |
| 395 | leaf om-datacenter { |
| 396 | description |
| 397 | "Openmano datacenter name to use when instantiating |
| 398 | the network service. This is only used when openmano |
| 399 | is selected as the cloud account. This should be superceded |
| 400 | by multiple cloud accounts when that becomes available."; |
| 401 | type string; |
| 402 | } |
| 403 | } |
| 404 | |
| 405 | augment /nsr:ns-instance-config { |
| 406 | leaf nfvi-polling-period { |
| 407 | description |
| 408 | "Defines the period (secons) that the NFVI metrics are polled at"; |
| 409 | type uint64; |
| 410 | default 4; |
| 411 | } |
| 412 | } |
| 413 | |
| 414 | notification nsm-notification { |
| 415 | description "Notification for NSM Events. |
| 416 | The timestamp of this event is automatically expressed |
| 417 | in human readble format - 1970-01-01T00:00:00Z"; |
| 418 | |
| 419 | leaf event { |
| 420 | description "Short name of the event"; |
| 421 | type string; |
| 422 | } |
| 423 | |
| 424 | leaf description { |
| 425 | description "The description of this event"; |
| 426 | type string; |
| 427 | } |
| 428 | |
| 429 | leaf details { |
| 430 | description "The detailed description of this event, in case of errors"; |
| 431 | type string; |
| 432 | } |
| 433 | } |
| 434 | } |
| 435 | |
| 436 | // vim: sw=2 |