Patrick Brady | 7a261fb | 2017-06-06 22:35:43 -0700 | [diff] [blame] | 1 | /*- |
| 2 | * ============LICENSE_START======================================================= |
| 3 | * APPC |
| 4 | * ================================================================================ |
| 5 | * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. |
| 6 | * Copyright (C) 2017 Amdocs |
| 7 | * ================================================================================ |
| 8 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | * you may not use this file except in compliance with the License. |
| 10 | * You may obtain a copy of the License at |
| 11 | * |
| 12 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | * |
| 14 | * Unless required by applicable law or agreed to in writing, software |
| 15 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | * See the License for the specific language governing permissions and |
| 18 | * limitations under the License. |
| 19 | * ============LICENSE_END========================================================= |
| 20 | * ECOMP is a trademark and service mark of AT&T Intellectual Property. |
| 21 | */ |
| 22 | |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 23 | /* |
| 24 | * Yang model for the Application Controller (APP-C) component of ECOMP |
| 25 | * |
| 26 | * This model is used to define the data and services of the Application Controller |
| 27 | * component of ECOMP. The APP-C controller initiates the processing of directed |
| 28 | * graphs, which define the actual process implementations used. The name of the |
| 29 | * directed graph is set by properties and cannot be changed dynamically. |
| 30 | * |
| 31 | * The services exposed by this provider are: |
| 32 | * |
| 33 | * restart-vnf: |
| 34 | * Used to request a restart of a virtual network function (a VM). |
| 35 | * |
| 36 | * rebuild-vnf: |
| 37 | * Used to request a rebuild of a virtual network function (a VM). |
| 38 | * |
| 39 | */ |
| 40 | |
| 41 | module appc-provider-lcm { |
| 42 | |
| 43 | yang-version 1; |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 44 | namespace "org:openecomp:appc:lcm"; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 45 | prefix appc-provider-lcm; |
| 46 | organization "Copyright 2017 AT&T Intellectual Property."; |
| 47 | |
| 48 | description |
| 49 | "Defines the services and request/response requirements for the ECOMP APP-C component."; |
| 50 | |
| 51 | /* |
| 52 | * Note, the revision changes the package name of the generated java code. Do not |
| 53 | * change the revision unless you also update all references to the bindings. |
| 54 | */ |
| 55 | revision "2016-01-08" { |
| 56 | description |
| 57 | "APP-C interface version 1.0.48"; |
| 58 | } |
| 59 | |
| 60 | /********************************************************************************** |
| 61 | * Data type definitions |
| 62 | * |
| 63 | * The following data type definitions are used to define common data structures, |
| 64 | * define constraints, or to impart special meanings to data objects related to the |
| 65 | * APP-C controller functions. |
| 66 | **********************************************************************************/ |
| 67 | |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 68 | |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 69 | |
| 70 | typedef ZULU { |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 71 | description "Define a common definition of a time stamp (expressed as a formatted |
| 72 | string) as follows yyyy-MM-ddTHH:mm:ss.SSSSSSSSZ"; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 73 | type string { |
| 74 | length "16..28"; |
| 75 | pattern "[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}T[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}.[0-9]{1,6}Z"; |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | typedef payload { |
| 80 | type string ; |
| 81 | description "The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value"; |
| 82 | } |
| 83 | |
| 84 | typedef action { |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 85 | type enumeration { |
| 86 | enum "Restart"; |
| 87 | enum "Rebuild"; |
| 88 | enum "Migrate"; |
| 89 | enum "Evacuate"; |
| 90 | enum "Snapshot"; |
| 91 | enum "Rollback"; |
| 92 | enum "Sync"; |
| 93 | enum "Audit"; |
| 94 | enum "Stop"; |
| 95 | enum "Start"; |
| 96 | enum "Terminate"; |
| 97 | enum "SoftwareUpload"; |
| 98 | enum "HealthCheck"; |
| 99 | enum "LiveUpgrade"; |
| 100 | enum "Lock"; |
| 101 | enum "Unlock"; |
| 102 | enum "Test"; |
| 103 | enum "CheckLock"; |
| 104 | enum "Configure"; |
| 105 | enum "ConfigModify"; |
| 106 | enum "ConfigScaleOut"; |
| 107 | enum "ConfigRestore"; |
| 108 | enum "ConfigBackup"; |
| 109 | enum "ConfigBackupDelete"; |
| 110 | enum "ConfigExport"; |
| 111 | } |
| 112 | description "The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate"; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 113 | } |
| 114 | |
| 115 | /********************************************************************************** |
| 116 | * All requests will include this standard header |
| 117 | * |
| 118 | * The standard request header is used to define a correlation identification for |
| 119 | * the request that is returned on all responses. This correlation identifier |
| 120 | * (called the service-request-id) is meaningful to the caller and is included on |
| 121 | * all responses from the services. |
| 122 | **********************************************************************************/ |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 123 | |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 124 | |
| 125 | /********************************************************************************** |
| 126 | * Basic manipulation of a VNF (or VM) will typically include querying the current |
| 127 | * state, restarting, rebuilding, stopping, starting, etc. In all of these basic |
| 128 | * "state"-type operations, the services require the identification of the VNF to |
| 129 | * be operated on, and the region or LCP that contains that resource. This |
| 130 | * information is used across all of these services, so it has been defined as a |
| 131 | * common structure here and is referenced in the appropriate RPC definitions. |
| 132 | **********************************************************************************/ |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 133 | |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 134 | |
| 135 | /********************************************************************************** |
| 136 | * All responses will include this standard header |
| 137 | * |
| 138 | * The standard response header includes the time of completion as well as a |
| 139 | * success|failure indication |
| 140 | **********************************************************************************/ |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 141 | |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 142 | |
| 143 | |
| 144 | /********************************************************************************** |
| 145 | * All requests/response will include this standard header |
| 146 | * |
| 147 | * The standard common header is used to define a correlation identification for |
| 148 | * the request that is returned on all responses. |
| 149 | **********************************************************************************/ |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 150 | |
| 151 | |
| 152 | |
| 153 | grouping common-header { |
| 154 | description "A common header for all APP-C requests"; |
| 155 | container common-header { |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 156 | description "A common header for all APP-C requests"; |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 157 | leaf timestamp { |
| 158 | description "timestamp is in ISO 8601 timestamp format ZULU offset"; |
| 159 | type ZULU; |
| 160 | mandatory true; |
| 161 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 162 | |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 163 | leaf api-ver { |
| 164 | description "api-ver is the API version identifier. A given release of APPC |
| 165 | should support all previous versions of APPC API (correlate with |
| 166 | general requirements)"; |
| 167 | type string { |
| 168 | pattern "[2]\.\d\d" { |
| 169 | error-message "API Version 2.XX is supported at this end point"; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 170 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 171 | } |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 172 | mandatory true; |
| 173 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 174 | |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 175 | leaf originator-id { |
| 176 | description "originator-id an identifier of the calling system which can be |
| 177 | used addressing purposes, i.e. returning asynchronous response |
| 178 | to the proper destination over DMaaP (especially in case of multiple |
| 179 | consumers of APP-C APIs)"; |
| 180 | type string; |
| 181 | mandatory true; |
| 182 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 183 | |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 184 | leaf request-id { |
| 185 | description "UUID for the request ID. An OSS/BSS identifier for the request |
| 186 | that caused the current action. Multiple API calls may be made |
| 187 | with the same request-id The request-id shall be recorded throughout |
| 188 | the operations on a single request"; |
| 189 | type string; |
| 190 | mandatory true; |
| 191 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 192 | |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 193 | leaf sub-request-id { |
| 194 | description "Uniquely identifies a specific LCM action. It is persistent over |
| 195 | the life-cycle of a single request"; |
| 196 | type string; |
| 197 | mandatory false; |
| 198 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 199 | |
| 200 | |
| 201 | /********************************************************************************** |
| 202 | * Flags are generic flags that apply to any and all commands, all are optional |
| 203 | * force = TRUE/FALSE - Execute command even if target is in unstable (i.e. locked, transiting, etc) state. Specific behaviour of forced commands varies, but implies cancellation of previous command and an override by the new command. The FALSE value is used by default. |
| 204 | * ttl = <0....N> - The timeout value for command execution, expressed in seconds |
| 205 | * mode = EXCLUSIVE/NORMAL - defines execution mode as follows: |
| 206 | * - EXCLUSIVE ? on encountering an exclusive command, the APP-C will: |
| 207 | * * Cease accepting additional command requests |
| 208 | * * Complete execution of outstanding commands |
| 209 | * * Execute the exclusive command to completion |
| 210 | * * Optionally report the result of the command |
| 211 | * * Optionally resume command acceptance and processing |
| 212 | * - NORMAL - Obverse of EXCLUSIVE, the default one. |
| 213 | **********************************************************************************/ |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 214 | container flags { |
| 215 | description "Flags are generic flags that apply to any and all commands, all |
| 216 | are optional"; |
| 217 | leaf mode { |
| 218 | type enumeration { |
| 219 | enum "EXCLUSIVE"; |
| 220 | enum "NORMAL"; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 221 | } |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 222 | description "EXCLUSIVE (accept no queued requests on this VNF while processing) |
| 223 | or NORMAL (queue other requests until complete)"; |
| 224 | mandatory false; |
| 225 | } |
| 226 | leaf force { |
| 227 | type enumeration { |
| 228 | enum "TRUE"; |
| 229 | enum "FALSE"; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 230 | } |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 231 | description "TRUE/FALSE - Execute action even if target is in unstable (i.e. |
| 232 | locked, transiting, etc.) state"; |
| 233 | mandatory false; |
| 234 | } |
| 235 | leaf ttl { |
| 236 | description "<0....N> -Â The timeout value (expressed in seconds) for action |
| 237 | execution, between action being received by APPC and action initiation"; |
| 238 | type uint16; |
| 239 | mandatory false; |
| 240 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 241 | } |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 246 | grouping action-identifiers { |
| 247 | description "A block containing the action arguments. These are used to specify |
| 248 | the object upon which APP-C LCM command is to operate"; |
| 249 | container action-identifiers { |
| 250 | description "A block containing the action arguments. These are used to specify |
| 251 | the object upon which APP-C LCM command is to operate"; |
| 252 | leaf service-instance-id { |
| 253 | description "identifies a specific service the command refers to. When multiple |
| 254 | APP-C instances are used and applied to a subset of services, |
| 255 | this will become significant . The field is mandatory when the |
| 256 | vnf-id is empty"; |
| 257 | type string; |
| 258 | mandatory false; |
| 259 | } |
| 260 | leaf vnf-id { |
| 261 | description "identifies the VNF to which this action is to be applied(vnf-id |
| 262 | uniquely identifies the service-instance referred to). Note that |
| 263 | some actions are applied to multiple VNFs in the same service. |
| 264 | When this is the case, vnf-id may be left out, but service-instance-id |
| 265 | must appear. The field is mandatory when service-instance-id is |
| 266 | empty"; |
| 267 | type string; |
| 268 | mandatory false; |
| 269 | } |
| 270 | leaf vnfc-name { |
| 271 | description "identifies the VNFC to which this action is to be applied. Some |
| 272 | actions apply only to a component within a VNF (e.g. RESTART is |
| 273 | sometimes applied to on VM only). In such a case, the name of |
| 274 | the VNFC is used to search for the component within the VNF"; |
| 275 | type string; |
| 276 | mandatory false; |
| 277 | } |
| 278 | leaf vserver-id { |
| 279 | description "identifies a specific VM within the given service/vnf to which |
| 280 | this action is to be applied"; |
| 281 | type string; |
| 282 | mandatory false; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 283 | } |
| 284 | } |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 285 | } |
| 286 | |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 287 | |
| 288 | grouping status { |
| 289 | description "The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement"; |
| 290 | container status { |
| 291 | description "The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement"; |
| 292 | leaf code { |
| 293 | description "Response code"; |
| 294 | type uint16; |
| 295 | mandatory true; |
| 296 | } |
| 297 | leaf message { |
| 298 | description "Response message"; |
| 299 | type string; |
| 300 | mandatory true; |
| 301 | } |
| 302 | } |
| 303 | } |
| 304 | |
| 305 | |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 306 | |
| 307 | |
| 308 | |
| 309 | /********************************************************************************** |
| 310 | * Define the restart service |
| 311 | **********************************************************************************/ |
| 312 | rpc restart { |
| 313 | description "An operation to restart a virtual network function (or VM)"; |
| 314 | input { |
| 315 | uses common-header; |
| 316 | leaf action { |
| 317 | type action; |
| 318 | mandatory true; |
| 319 | } |
| 320 | uses action-identifiers; |
| 321 | leaf payload { |
| 322 | type payload; |
| 323 | mandatory false; |
| 324 | } |
| 325 | } |
| 326 | output { |
| 327 | uses common-header; |
| 328 | uses status; |
| 329 | } |
| 330 | } |
| 331 | |
| 332 | /********************************************************************************** |
| 333 | * Define the rebuild service |
| 334 | **********************************************************************************/ |
| 335 | rpc rebuild { |
| 336 | description "An operation to rebuild a virtual network function (or VM)"; |
| 337 | input { |
| 338 | uses common-header; |
| 339 | leaf action { |
| 340 | type action; |
| 341 | mandatory true; |
| 342 | } |
| 343 | uses action-identifiers; |
| 344 | leaf payload { |
| 345 | type payload; |
| 346 | mandatory false; |
| 347 | } |
| 348 | } |
| 349 | output { |
| 350 | uses common-header; |
| 351 | uses status; |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | /********************************************************************************** |
| 356 | * Define the migrate service |
| 357 | **********************************************************************************/ |
| 358 | rpc migrate { |
| 359 | description "An operation to migrate a virtual network function (or VM)"; |
| 360 | input { |
| 361 | uses common-header; |
| 362 | leaf action { |
| 363 | type action; |
| 364 | mandatory true; |
| 365 | } |
| 366 | uses action-identifiers; |
| 367 | leaf payload { |
| 368 | type payload; |
| 369 | mandatory false; |
| 370 | } |
| 371 | } |
| 372 | output { |
| 373 | uses common-header; |
| 374 | uses status; |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | /********************************************************************************** |
| 379 | * Define the evacuate service |
| 380 | **********************************************************************************/ |
| 381 | rpc evacuate { |
| 382 | description "An operation to evacuate a virtual network function (or VM)"; |
| 383 | input { |
| 384 | uses common-header; |
| 385 | leaf action { |
| 386 | type action; |
| 387 | mandatory true; |
| 388 | } |
| 389 | uses action-identifiers; |
| 390 | leaf payload { |
| 391 | type payload; |
| 392 | mandatory false; |
| 393 | } |
| 394 | } |
| 395 | output { |
| 396 | uses common-header; |
| 397 | uses status; |
| 398 | } |
| 399 | } |
| 400 | |
| 401 | |
| 402 | /********************************************************************************** |
| 403 | * Define the snapshot service |
| 404 | **********************************************************************************/ |
| 405 | rpc snapshot { |
| 406 | description "An operation to create a snapshot of a virtual network function (or VM)"; |
| 407 | input { |
| 408 | uses common-header; |
| 409 | leaf action { |
| 410 | type action; |
| 411 | mandatory true; |
| 412 | } |
| 413 | uses action-identifiers; |
| 414 | leaf payload { |
| 415 | type payload; |
| 416 | mandatory false; |
| 417 | } |
| 418 | leaf identity-url { |
| 419 | type string; |
| 420 | mandatory true; |
| 421 | } |
| 422 | } |
| 423 | output { |
| 424 | uses common-header; |
| 425 | uses status; |
| 426 | leaf snapshot-id { |
| 427 | type string; |
| 428 | } |
| 429 | |
| 430 | } |
| 431 | } |
| 432 | |
| 433 | /********************************************************************************** |
| 434 | * Define the rollback service |
| 435 | **********************************************************************************/ |
| 436 | rpc rollback { |
| 437 | description "An operation to rollback to particular snapshot of a virtual network function (or VM)"; |
| 438 | input { |
| 439 | uses common-header; |
| 440 | leaf action { |
| 441 | type action; |
| 442 | mandatory true; |
| 443 | } |
| 444 | uses action-identifiers; |
| 445 | leaf payload { |
| 446 | type payload; |
| 447 | mandatory false; |
| 448 | } |
| 449 | leaf identity-url { |
| 450 | type string; |
| 451 | mandatory true; |
| 452 | } |
| 453 | leaf snapshot-id { |
| 454 | type string; |
| 455 | mandatory true; |
| 456 | } |
| 457 | } |
| 458 | output { |
| 459 | uses common-header; |
| 460 | uses status; |
| 461 | } |
| 462 | } |
| 463 | |
| 464 | |
| 465 | /********************************************************************************** |
| 466 | * Additional RPCs added here... |
| 467 | **********************************************************************************/ |
| 468 | |
| 469 | |
| 470 | /********************************************************************************** |
| 471 | * Define the sync service |
| 472 | **********************************************************************************/ |
| 473 | rpc sync { |
| 474 | description "An operation to sync the configurations of a virtual network function (or VM)"; |
| 475 | input { |
| 476 | uses common-header; |
| 477 | leaf action { |
| 478 | type action; |
| 479 | mandatory true; |
| 480 | } |
| 481 | uses action-identifiers; |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 482 | leaf payload { |
| 483 | type payload; |
| 484 | mandatory false; |
| 485 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 486 | } |
| 487 | output { |
| 488 | uses common-header; |
| 489 | uses status; |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 490 | leaf payload { |
| 491 | type payload; |
| 492 | mandatory false; |
| 493 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 494 | } |
| 495 | } |
| 496 | |
| 497 | /********************************************************************************** |
| 498 | * Define the terminate service |
| 499 | **********************************************************************************/ |
| 500 | rpc terminate { |
| 501 | description "An operation to terminate the configurations of a virtual network function (or VM)"; |
| 502 | input { |
| 503 | uses common-header; |
| 504 | leaf action { |
| 505 | type action; |
| 506 | mandatory true; |
| 507 | } |
| 508 | uses action-identifiers; |
| 509 | leaf payload { |
| 510 | type payload; |
| 511 | mandatory false; |
| 512 | } |
| 513 | } |
| 514 | output { |
| 515 | uses common-header; |
| 516 | uses status; |
| 517 | } |
| 518 | } |
| 519 | |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 520 | |
| 521 | rpc configure { |
| 522 | description "An operation to configure the configurations of a virtual network |
| 523 | function (or VM)"; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 524 | input { |
| 525 | uses common-header; |
| 526 | leaf action { |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 527 | type action; |
| 528 | mandatory true; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 529 | } |
| 530 | uses action-identifiers; |
| 531 | leaf payload { |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 532 | type payload; |
| 533 | mandatory false; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 534 | } |
| 535 | } |
| 536 | output { |
| 537 | uses common-header; |
| 538 | uses status; |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 539 | leaf payload { |
| 540 | type payload; |
| 541 | mandatory false; |
| 542 | } |
| 543 | } |
| 544 | } |
| 545 | |
| 546 | rpc config-modify { |
| 547 | description "Use the ModifyConfig command when a full configuration cycle is either not required or is considered too costly. The ModifyConfig LCM action affects only a subset of the total configuration data of a VNF. The set of configuration parameters to be affected is a subset of the total configuration data of the target VNF type. The payload block must contain the configuration parameters to be modified and their values. A successful modify returns a success response. A failed modify returns a failure response and the specific failure messages in the response payload block"; |
| 548 | input { |
| 549 | uses common-header; |
| 550 | leaf action { |
| 551 | type action; |
| 552 | mandatory true; |
| 553 | } |
| 554 | uses action-identifiers; |
| 555 | leaf payload { |
| 556 | type payload; |
| 557 | mandatory false; |
| 558 | } |
| 559 | } |
| 560 | output { |
| 561 | uses common-header; |
| 562 | uses status; |
| 563 | leaf payload { |
| 564 | type payload; |
| 565 | mandatory false; |
| 566 | } |
| 567 | } |
| 568 | } |
| 569 | |
| 570 | rpc config-scaleout { |
| 571 | description "An operation to scaleout the configurations of a virtual network |
| 572 | function (or VM)"; |
| 573 | input { |
| 574 | uses common-header; |
| 575 | leaf action { |
| 576 | type action; |
| 577 | mandatory true; |
| 578 | } |
| 579 | uses action-identifiers; |
| 580 | leaf payload { |
| 581 | type payload; |
| 582 | mandatory false; |
| 583 | } |
| 584 | } |
| 585 | output { |
| 586 | uses common-header; |
| 587 | uses status; |
| 588 | leaf payload { |
| 589 | type payload; |
| 590 | mandatory false; |
| 591 | } |
| 592 | } |
| 593 | } |
| 594 | |
| 595 | rpc config-restore { |
| 596 | description "An operation to restore the configurations of a virtual network |
| 597 | function (or VM)"; |
| 598 | input { |
| 599 | uses common-header; |
| 600 | leaf action { |
| 601 | type action; |
| 602 | mandatory true; |
| 603 | } |
| 604 | uses action-identifiers; |
| 605 | leaf payload { |
| 606 | type payload; |
| 607 | mandatory false; |
| 608 | } |
| 609 | } |
| 610 | output { |
| 611 | uses common-header; |
| 612 | uses status; |
| 613 | leaf payload { |
| 614 | type payload; |
| 615 | mandatory false; |
| 616 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 617 | } |
| 618 | } |
| 619 | |
| 620 | /********************************************************************************** |
| 621 | * Define the test service |
| 622 | **********************************************************************************/ |
| 623 | rpc test { |
| 624 | description "An operation to test the configurations of a virtual network function (or VM)"; |
| 625 | input { |
| 626 | uses common-header; |
| 627 | leaf action { |
| 628 | type action; |
| 629 | mandatory true; |
| 630 | } |
| 631 | uses action-identifiers; |
| 632 | leaf payload { |
| 633 | type payload; |
| 634 | mandatory false; |
| 635 | } |
| 636 | } |
| 637 | output { |
| 638 | uses common-header; |
| 639 | uses status; |
| 640 | } |
| 641 | } |
| 642 | |
| 643 | /********************************************************************************** |
| 644 | * Define the stop service |
| 645 | **********************************************************************************/ |
| 646 | rpc stop { |
| 647 | description "An operation to stop the configurations of a virtual network function (or VM)"; |
| 648 | input { |
| 649 | uses common-header; |
| 650 | leaf action { |
| 651 | type action; |
| 652 | mandatory true; |
| 653 | } |
| 654 | uses action-identifiers; |
| 655 | leaf payload { |
| 656 | type payload; |
| 657 | mandatory false; |
| 658 | } |
| 659 | } |
| 660 | output { |
| 661 | uses common-header; |
| 662 | uses status; |
| 663 | } |
| 664 | } |
| 665 | |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 666 | rpc start { |
| 667 | description "An operation to start a virtual network function (or VM)"; |
| 668 | input { |
| 669 | uses common-header; |
| 670 | leaf action { |
| 671 | type action; |
| 672 | mandatory true; |
| 673 | } |
| 674 | uses action-identifiers; |
| 675 | leaf payload { |
| 676 | type payload; |
| 677 | mandatory false; |
| 678 | } |
| 679 | } |
| 680 | output { |
| 681 | uses common-header; |
| 682 | uses status; |
| 683 | } |
| 684 | } |
| 685 | |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 686 | /********************************************************************************** |
| 687 | * Define the audit service |
| 688 | **********************************************************************************/ |
| 689 | rpc audit { |
| 690 | description "An operation to audit the configurations of a virtual network function (or VM)"; |
| 691 | input { |
| 692 | uses common-header; |
| 693 | leaf action { |
| 694 | type action; |
| 695 | mandatory true; |
| 696 | } |
| 697 | uses action-identifiers; |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 698 | leaf payload { |
| 699 | type payload; |
| 700 | mandatory false; |
| 701 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 702 | } |
| 703 | output { |
| 704 | uses common-header; |
| 705 | uses status; |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 706 | leaf payload { |
| 707 | type payload; |
| 708 | mandatory false; |
| 709 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 710 | } |
| 711 | } |
| 712 | |
| 713 | /********************************************************************************** |
| 714 | * Define the SoftwareUpload vSCP service |
| 715 | **********************************************************************************/ |
| 716 | rpc software-upload { |
| 717 | description "An operation to upload a new version of vSCP image to vSCP for updating it"; |
| 718 | input { |
| 719 | uses common-header; |
| 720 | leaf action { |
| 721 | type action; |
| 722 | mandatory true; |
| 723 | } |
| 724 | uses action-identifiers; |
| 725 | leaf payload { |
| 726 | type payload; |
| 727 | mandatory false; |
| 728 | } |
| 729 | } |
| 730 | output { |
| 731 | uses common-header; |
| 732 | uses status; |
| 733 | } |
| 734 | } |
| 735 | |
| 736 | |
| 737 | |
| 738 | /********************************************************************************** |
| 739 | * Define the PreHealthCheck vSCP service |
| 740 | **********************************************************************************/ |
| 741 | rpc health-check { |
| 742 | description "An operation to perform health check of vSCP prior its upgrading"; |
| 743 | input { |
| 744 | uses common-header; |
| 745 | leaf action { |
| 746 | type action; |
| 747 | mandatory true; |
| 748 | } |
| 749 | uses action-identifiers; |
| 750 | leaf payload { |
| 751 | type payload; |
| 752 | mandatory false; |
| 753 | } |
| 754 | } |
| 755 | output { |
| 756 | uses common-header; |
| 757 | uses status; |
| 758 | |
| 759 | } |
| 760 | } |
| 761 | |
| 762 | |
| 763 | /********************************************************************************** |
| 764 | * Define the Upgrade vSCP service |
| 765 | **********************************************************************************/ |
| 766 | rpc live-upgrade { |
| 767 | description "An operation to perform upgrade of vSCP"; |
| 768 | input { |
| 769 | uses common-header; |
| 770 | leaf action { |
| 771 | type action; |
| 772 | mandatory true; |
| 773 | } |
| 774 | uses action-identifiers; |
| 775 | leaf payload { |
| 776 | type payload; |
| 777 | mandatory false; |
| 778 | } |
| 779 | } |
| 780 | output { |
| 781 | uses common-header; |
| 782 | uses status; |
| 783 | } |
| 784 | } |
| 785 | |
| 786 | |
| 787 | /********************************************************************************** |
| 788 | * Define the VNF lock service |
| 789 | **********************************************************************************/ |
| 790 | rpc lock { |
| 791 | description "An operation to perform VNF lock operation"; |
| 792 | input { |
| 793 | uses common-header; |
| 794 | leaf action { |
| 795 | type action; |
| 796 | mandatory true; |
| 797 | } |
| 798 | uses action-identifiers; |
| 799 | leaf payload { |
| 800 | type payload; |
| 801 | mandatory false; |
| 802 | } |
| 803 | } |
| 804 | output { |
| 805 | uses common-header; |
| 806 | uses status; |
| 807 | } |
| 808 | } |
| 809 | |
| 810 | /********************************************************************************** |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 811 | * Define the VNF unlock service |
| 812 | **********************************************************************************/ |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 813 | rpc unlock { |
| 814 | description "An operation to perform VNF unlock operation"; |
| 815 | input { |
| 816 | uses common-header; |
| 817 | leaf action { |
| 818 | type action; |
| 819 | mandatory true; |
| 820 | } |
| 821 | uses action-identifiers; |
| 822 | leaf payload { |
| 823 | type payload; |
| 824 | mandatory false; |
| 825 | } |
| 826 | } |
| 827 | output { |
| 828 | uses common-header; |
| 829 | uses status; |
| 830 | } |
| 831 | } |
| 832 | |
| 833 | /********************************************************************************** |
| 834 | * Define the VNF check lock service |
| 835 | **********************************************************************************/ |
| 836 | rpc check-lock { |
| 837 | description "An operation to check VNF lock status"; |
| 838 | input { |
| 839 | uses common-header; |
| 840 | leaf action { |
| 841 | type action; |
| 842 | mandatory true; |
| 843 | } |
| 844 | uses action-identifiers; |
| 845 | } |
| 846 | output { |
| 847 | uses common-header; |
| 848 | uses status; |
| 849 | leaf locked { |
| 850 | type enumeration { |
| 851 | enum "TRUE"; |
| 852 | enum "FALSE"; |
| 853 | } |
| 854 | description "TRUE/FALSE - returns TRUE when the given VNF was locked, otherwise returns FALSE"; |
| 855 | mandatory false; |
| 856 | } |
| 857 | } |
| 858 | } |
| 859 | |
| 860 | |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 861 | rpc config-backup { |
| 862 | description "An operation to Backup configurations of a virtual network function |
| 863 | (or VM)"; |
| 864 | input { |
| 865 | uses common-header; |
| 866 | leaf action { |
| 867 | type action; |
| 868 | mandatory true; |
| 869 | } |
| 870 | uses action-identifiers; |
| 871 | } |
| 872 | output { |
| 873 | uses common-header; |
| 874 | uses status; |
| 875 | leaf payload { |
| 876 | type payload; |
| 877 | mandatory false; |
| 878 | } |
| 879 | } |
| 880 | } |
| 881 | |
| 882 | rpc config-backup-delete { |
| 883 | description "An operation to Delete backup configurations of a virtual network |
| 884 | function (or VM)"; |
| 885 | input { |
| 886 | uses common-header; |
| 887 | leaf action { |
| 888 | type action; |
| 889 | mandatory true; |
| 890 | } |
| 891 | uses action-identifiers; |
| 892 | } |
| 893 | output { |
| 894 | uses common-header; |
| 895 | uses status; |
| 896 | leaf payload { |
| 897 | type payload; |
| 898 | mandatory false; |
| 899 | } |
| 900 | } |
| 901 | } |
| 902 | |
| 903 | rpc config-export { |
| 904 | description "An operation to Export configurations of a virtual network function |
| 905 | (or VM)"; |
| 906 | input { |
| 907 | uses common-header; |
| 908 | leaf action { |
| 909 | type action; |
| 910 | mandatory true; |
| 911 | } |
| 912 | uses action-identifiers; |
| 913 | } |
| 914 | output { |
| 915 | uses common-header; |
| 916 | uses status; |
| 917 | } |
| 918 | } |
| 919 | |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 920 | /********************************************************************************** |
| 921 | * Additional RPCs added here... |
| 922 | **********************************************************************************/ |
| 923 | } |