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