Patrick Brady | 7a261fb | 2017-06-06 22:35:43 -0700 | [diff] [blame] | 1 | /*- |
| 2 | * ============LICENSE_START======================================================= |
Patrick Brady | 10bba35 | 2017-07-19 12:09:28 -0700 | [diff] [blame] | 3 | * ONAP : APPC |
Patrick Brady | 7a261fb | 2017-06-06 22:35:43 -0700 | [diff] [blame] | 4 | * ================================================================================ |
vidhyasree | 6cf060d | 2018-02-21 11:19:33 -0500 | [diff] [blame] | 5 | * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. |
Patrick Brady | 7a261fb | 2017-06-06 22:35:43 -0700 | [diff] [blame] | 6 | * ================================================================================ |
Patrick Brady | 10bba35 | 2017-07-19 12:09:28 -0700 | [diff] [blame] | 7 | * Copyright (C) 2017 Amdocs |
| 8 | * ============================================================================= |
Patrick Brady | 7a261fb | 2017-06-06 22:35:43 -0700 | [diff] [blame] | 9 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 10 | * you may not use this file except in compliance with the License. |
| 11 | * You may obtain a copy of the License at |
vidhyasree | ac97522 | 2018-01-12 15:23:34 -0500 | [diff] [blame] | 12 | * |
Patrick Brady | 7a261fb | 2017-06-06 22:35:43 -0700 | [diff] [blame] | 13 | * http://www.apache.org/licenses/LICENSE-2.0 |
vidhyasree | ac97522 | 2018-01-12 15:23:34 -0500 | [diff] [blame] | 14 | * |
Patrick Brady | 7a261fb | 2017-06-06 22:35:43 -0700 | [diff] [blame] | 15 | * Unless required by applicable law or agreed to in writing, software |
| 16 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 18 | * See the License for the specific language governing permissions and |
| 19 | * limitations under the License. |
vidhyasree | ac97522 | 2018-01-12 15:23:34 -0500 | [diff] [blame] | 20 | * |
Patrick Brady | 7a261fb | 2017-06-06 22:35:43 -0700 | [diff] [blame] | 21 | * ECOMP is a trademark and service mark of AT&T Intellectual Property. |
Patrick Brady | 10bba35 | 2017-07-19 12:09:28 -0700 | [diff] [blame] | 22 | * ============LICENSE_END========================================================= |
Patrick Brady | 7a261fb | 2017-06-06 22:35:43 -0700 | [diff] [blame] | 23 | */ |
| 24 | |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 25 | /* |
| 26 | * Yang model for the Application Controller (APP-C) component of ECOMP |
| 27 | * |
| 28 | * This model is used to define the data and services of the Application Controller |
| 29 | * component of ECOMP. The APP-C controller initiates the processing of directed |
| 30 | * graphs, which define the actual process implementations used. The name of the |
| 31 | * directed graph is set by properties and cannot be changed dynamically. |
| 32 | * |
| 33 | * The services exposed by this provider are: |
| 34 | * |
| 35 | * restart-vnf: |
| 36 | * Used to request a restart of a virtual network function (a VM). |
| 37 | * |
| 38 | * rebuild-vnf: |
| 39 | * Used to request a rebuild of a virtual network function (a VM). |
| 40 | * |
| 41 | */ |
| 42 | |
| 43 | module appc-provider-lcm { |
| 44 | |
| 45 | yang-version 1; |
Patrick Brady | 0756759 | 2017-12-13 11:09:30 -0800 | [diff] [blame] | 46 | namespace "org:onap:appc:lcm"; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 47 | prefix appc-provider-lcm; |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 48 | |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 49 | description |
| 50 | "Defines the services and request/response requirements for the ECOMP APP-C component."; |
| 51 | |
| 52 | /* |
| 53 | * Note, the revision changes the package name of the generated java code. Do not |
| 54 | * change the revision unless you also update all references to the bindings. |
| 55 | */ |
| 56 | revision "2016-01-08" { |
| 57 | description |
| 58 | "APP-C interface version 1.0.48"; |
| 59 | } |
| 60 | |
| 61 | /********************************************************************************** |
| 62 | * Data type definitions |
| 63 | * |
| 64 | * The following data type definitions are used to define common data structures, |
| 65 | * define constraints, or to impart special meanings to data objects related to the |
| 66 | * APP-C controller functions. |
| 67 | **********************************************************************************/ |
| 68 | |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 69 | typedef ZULU { |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 70 | description "Define a common definition of a time stamp (expressed as a formatted |
| 71 | string) as follows yyyy-MM-ddTHH:mm:ss.SSSSSSSSZ"; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 72 | type string { |
| 73 | length "16..28"; |
| 74 | 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"; |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | typedef payload { |
| 79 | type string ; |
| 80 | 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"; |
| 81 | } |
| 82 | |
| 83 | typedef action { |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 84 | type enumeration { |
| 85 | enum "Restart"; |
| 86 | enum "Rebuild"; |
| 87 | enum "Migrate"; |
| 88 | enum "Evacuate"; |
| 89 | enum "Snapshot"; |
| 90 | enum "Rollback"; |
| 91 | enum "Sync"; |
| 92 | enum "Audit"; |
| 93 | enum "Stop"; |
| 94 | enum "Start"; |
| 95 | enum "Terminate"; |
| 96 | enum "SoftwareUpload"; |
| 97 | enum "HealthCheck"; |
| 98 | enum "LiveUpgrade"; |
| 99 | enum "Lock"; |
| 100 | enum "Unlock"; |
| 101 | enum "Test"; |
| 102 | enum "CheckLock"; |
| 103 | enum "Configure"; |
| 104 | enum "ConfigModify"; |
| 105 | enum "ConfigScaleOut"; |
| 106 | enum "ConfigRestore"; |
| 107 | enum "ConfigBackup"; |
| 108 | enum "ConfigBackupDelete"; |
| 109 | enum "ConfigExport"; |
mojahidi | de52c62 | 2017-08-14 12:50:45 +0530 | [diff] [blame] | 110 | enum "StopApplication"; |
| 111 | enum "StartApplication"; |
vidhyasree | ac97522 | 2018-01-12 15:23:34 -0500 | [diff] [blame] | 112 | enum "QuiesceTraffic"; |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 113 | enum "ResumeTraffic"; |
| 114 | enum "UpgradePreCheck"; |
| 115 | enum "UpgradeSoftware"; |
| 116 | enum "UpgradePostCheck"; |
| 117 | enum "UpgradeBackup"; |
| 118 | enum "UpgradeBackout"; |
| 119 | enum "ActionStatus"; |
| 120 | enum "Query"; |
| 121 | enum "Reboot"; |
| 122 | enum "AttachVolume"; |
| 123 | enum "DetachVolume"; |
| 124 | |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 125 | } |
| 126 | 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] | 127 | } |
| 128 | |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 129 | typedef vm-state { |
| 130 | description "The state of a VM"; |
| 131 | type enumeration { |
| 132 | enum "active"; |
| 133 | enum "standby"; |
| 134 | enum "inactive"; |
| 135 | enum "unknown"; |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | typedef vm-status { |
| 140 | description "The status of a VM"; |
| 141 | type enumeration { |
| 142 | enum "healthy"; |
| 143 | enum "unhealthy"; |
| 144 | enum "unknown"; |
| 145 | } |
| 146 | } |
| 147 | |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 148 | |
| 149 | /********************************************************************************** |
| 150 | * Basic manipulation of a VNF (or VM) will typically include querying the current |
| 151 | * state, restarting, rebuilding, stopping, starting, etc. In all of these basic |
| 152 | * "state"-type operations, the services require the identification of the VNF to |
| 153 | * be operated on, and the region or LCP that contains that resource. This |
| 154 | * information is used across all of these services, so it has been defined as a |
| 155 | * common structure here and is referenced in the appropriate RPC definitions. |
| 156 | **********************************************************************************/ |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 157 | |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 158 | |
| 159 | /********************************************************************************** |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 160 | * All requests will include this standard header |
| 161 | * |
| 162 | * The standard request header is used to define a correlation identification for |
| 163 | * the request that is returned on all responses. This correlation identifier |
| 164 | * (called the service-request-id) is meaningful to the caller and is included on |
| 165 | * all responses from the services. |
| 166 | **********************************************************************************/ |
| 167 | |
| 168 | /********************************************************************************** |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 169 | * All responses will include this standard header |
| 170 | * |
| 171 | * The standard response header includes the time of completion as well as a |
| 172 | * success|failure indication |
| 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 | grouping common-header { |
| 176 | description "A common header for all APP-C requests"; |
| 177 | container common-header { |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 178 | description "A common header for all APP-C requests"; |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 179 | leaf timestamp { |
| 180 | description "timestamp is in ISO 8601 timestamp format ZULU offset"; |
| 181 | type ZULU; |
| 182 | mandatory true; |
| 183 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 184 | |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 185 | leaf api-ver { |
| 186 | description "api-ver is the API version identifier. A given release of APPC |
| 187 | should support all previous versions of APPC API (correlate with |
| 188 | general requirements)"; |
| 189 | type string { |
| 190 | pattern "[2]\.\d\d" { |
| 191 | error-message "API Version 2.XX is supported at this end point"; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 192 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 193 | } |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 194 | mandatory true; |
| 195 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 196 | |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 197 | leaf originator-id { |
| 198 | description "originator-id an identifier of the calling system which can be |
| 199 | used addressing purposes, i.e. returning asynchronous response |
| 200 | to the proper destination over DMaaP (especially in case of multiple |
| 201 | consumers of APP-C APIs)"; |
| 202 | type string; |
| 203 | mandatory true; |
| 204 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 205 | |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 206 | leaf request-id { |
| 207 | description "UUID for the request ID. An OSS/BSS identifier for the request |
| 208 | that caused the current action. Multiple API calls may be made |
| 209 | with the same request-id The request-id shall be recorded throughout |
| 210 | the operations on a single request"; |
| 211 | type string; |
| 212 | mandatory true; |
| 213 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 214 | |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 215 | leaf sub-request-id { |
| 216 | description "Uniquely identifies a specific LCM action. It is persistent over |
| 217 | the life-cycle of a single request"; |
| 218 | type string; |
| 219 | mandatory false; |
| 220 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 221 | |
| 222 | |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 223 | /********************************************************************************** |
| 224 | * Flags are generic flags that apply to any and all commands, all are optional |
| 225 | * force = TRUE/FALSE - Execute command even if target is in unstable (i.e. locked, transiting, etc) |
| 226 | * state. Specific behaviour of forced commands varies, but implies cancellation |
| 227 | * of previous command and an override by the new command. The FALSE value is |
| 228 | * used by default. |
| 229 | * ttl = <0....N> - The timeout value for command execution, expressed in seconds |
| 230 | * mode = EXCLUSIVE/NORMAL - defines execution mode as follows: |
| 231 | * - EXCLUSIVE ? on encountering an exclusive command, the APP-C will: |
| 232 | * * Cease accepting additional command requests |
| 233 | * * Complete execution of outstanding commands |
| 234 | * * Execute the exclusive command to completion |
| 235 | * * Optionally report the result of the command |
| 236 | * * Optionally resume command acceptance and processing |
| 237 | * - NORMAL - Obverse of EXCLUSIVE, the default one. |
| 238 | **********************************************************************************/ |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 239 | container flags { |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 240 | description "Flags are generic flags that apply to any and all commands, all are optional"; |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 241 | leaf mode { |
| 242 | type enumeration { |
| 243 | enum "EXCLUSIVE"; |
| 244 | enum "NORMAL"; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 245 | } |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 246 | description "EXCLUSIVE (accept no queued requests on this VNF while processing) |
| 247 | or NORMAL (queue other requests until complete)"; |
| 248 | mandatory false; |
| 249 | } |
| 250 | leaf force { |
| 251 | type enumeration { |
| 252 | enum "TRUE"; |
| 253 | enum "FALSE"; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 254 | } |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 255 | description "TRUE/FALSE - Execute action even if target is in unstable (i.e. |
| 256 | locked, transiting, etc.) state"; |
| 257 | mandatory false; |
| 258 | } |
| 259 | leaf ttl { |
| 260 | description "<0....N> -Â The timeout value (expressed in seconds) for action |
| 261 | execution, between action being received by APPC and action initiation"; |
| 262 | type uint16; |
| 263 | mandatory false; |
| 264 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 265 | } |
| 266 | } |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 267 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 268 | |
| 269 | |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 270 | grouping action-identifiers { |
| 271 | description "A block containing the action arguments. These are used to specify |
| 272 | the object upon which APP-C LCM command is to operate"; |
| 273 | container action-identifiers { |
| 274 | description "A block containing the action arguments. These are used to specify |
| 275 | the object upon which APP-C LCM command is to operate"; |
| 276 | leaf service-instance-id { |
| 277 | description "identifies a specific service the command refers to. When multiple |
| 278 | APP-C instances are used and applied to a subset of services, |
| 279 | this will become significant . The field is mandatory when the |
| 280 | vnf-id is empty"; |
| 281 | type string; |
| 282 | mandatory false; |
| 283 | } |
| 284 | leaf vnf-id { |
| 285 | description "identifies the VNF to which this action is to be applied(vnf-id |
| 286 | uniquely identifies the service-instance referred to). Note that |
| 287 | some actions are applied to multiple VNFs in the same service. |
| 288 | When this is the case, vnf-id may be left out, but service-instance-id |
| 289 | must appear. The field is mandatory when service-instance-id is |
| 290 | empty"; |
| 291 | type string; |
| 292 | mandatory false; |
| 293 | } |
Kalpesh Chaniyara | 01316dc | 2017-08-15 14:45:00 +0530 | [diff] [blame] | 294 | leaf vf-module-id { |
| 295 | description "identifies the VF module to which this action is to be applied."; |
| 296 | type string; |
| 297 | mandatory false; |
| 298 | } |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 299 | leaf vnfc-name { |
| 300 | description "identifies the VNFC to which this action is to be applied. Some |
| 301 | actions apply only to a component within a VNF (e.g. RESTART is |
| 302 | sometimes applied to on VM only). In such a case, the name of |
| 303 | the VNFC is used to search for the component within the VNF"; |
| 304 | type string; |
| 305 | mandatory false; |
| 306 | } |
| 307 | leaf vserver-id { |
| 308 | description "identifies a specific VM within the given service/vnf to which |
| 309 | this action is to be applied"; |
| 310 | type string; |
| 311 | mandatory false; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 312 | } |
| 313 | } |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 314 | } |
| 315 | |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 316 | |
| 317 | grouping status { |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 318 | description "The specific response codes are to be aligned with SDC reference doc |
| 319 | (main table removed to avoid duplication and digression from main table). |
| 320 | See SDC and ECOMP Distribution Consumer Interface Agreement"; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 321 | container status { |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 322 | description "The specific response codes are to be aligned with SDC reference doc |
| 323 | (main table removed to avoid duplication and digression from main table). |
| 324 | See SDC and ECOMP Distribution Consumer Interface Agreement"; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 325 | leaf code { |
| 326 | description "Response code"; |
| 327 | type uint16; |
| 328 | mandatory true; |
| 329 | } |
| 330 | leaf message { |
| 331 | description "Response message"; |
| 332 | type string; |
| 333 | mandatory true; |
| 334 | } |
| 335 | } |
| 336 | } |
| 337 | |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 338 | typedef lcm-action-status { |
| 339 | type enumeration { |
| 340 | enum "IN_PROGRESS"; |
| 341 | enum "SUCCESSFUL"; |
| 342 | enum "FAILED"; |
| 343 | enum "NOT_FOUND"; |
| 344 | enum "ABORTED"; |
| 345 | enum "MULTIPLE_REQUESTS_FOUND"; |
| 346 | } |
| 347 | description "The status of the requested LCM action"; |
| 348 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 349 | |
| 350 | /********************************************************************************** |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 351 | * Define the restart service |
| 352 | **********************************************************************************/ |
| 353 | rpc restart { |
| 354 | description "An operation to restart a virtual network function (or VM)"; |
| 355 | input { |
| 356 | uses common-header; |
| 357 | leaf action { |
| 358 | type action; |
| 359 | mandatory true; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 360 | } |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 361 | uses action-identifiers; |
| 362 | leaf payload { |
| 363 | type payload; |
| 364 | mandatory false; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 365 | } |
| 366 | } |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 367 | output { |
| 368 | uses common-header; |
| 369 | uses status; |
| 370 | } |
| 371 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 372 | |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 373 | /********************************************************************************** |
| 374 | * Define the rebuild service |
| 375 | **********************************************************************************/ |
| 376 | rpc rebuild { |
| 377 | description "An operation to rebuild a virtual network function (or VM)"; |
| 378 | input { |
| 379 | uses common-header; |
| 380 | leaf action { |
| 381 | type action; |
| 382 | mandatory true; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 383 | } |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 384 | uses action-identifiers; |
| 385 | leaf payload { |
| 386 | type payload; |
| 387 | mandatory false; |
| 388 | } |
| 389 | } |
| 390 | output { |
| 391 | uses common-header; |
| 392 | uses status; |
| 393 | } |
| 394 | } |
| 395 | |
| 396 | /********************************************************************************** |
| 397 | * Define the migrate service |
| 398 | **********************************************************************************/ |
| 399 | rpc migrate { |
| 400 | description "An operation to migrate a virtual network function (or VM)"; |
| 401 | input { |
| 402 | uses common-header; |
| 403 | leaf action { |
| 404 | type action; |
| 405 | mandatory true; |
| 406 | } |
| 407 | uses action-identifiers; |
| 408 | leaf payload { |
| 409 | type payload; |
| 410 | mandatory false; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 411 | } |
| 412 | } |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 413 | output { |
| 414 | uses common-header; |
| 415 | uses status; |
| 416 | } |
| 417 | } |
| 418 | |
| 419 | /********************************************************************************** |
| 420 | * Define the evacuate service |
| 421 | **********************************************************************************/ |
| 422 | rpc evacuate { |
| 423 | description "An operation to evacuate a virtual network function (or VM)"; |
| 424 | input { |
| 425 | uses common-header; |
| 426 | leaf action { |
| 427 | type action; |
| 428 | mandatory true; |
| 429 | } |
| 430 | uses action-identifiers; |
| 431 | leaf payload { |
| 432 | type payload; |
| 433 | mandatory false; |
| 434 | } |
| 435 | } |
| 436 | output { |
| 437 | uses common-header; |
| 438 | uses status; |
| 439 | } |
| 440 | } |
| 441 | |
| 442 | /********************************************************************************** |
| 443 | * Define the snapshot service |
| 444 | **********************************************************************************/ |
| 445 | rpc snapshot { |
| 446 | description "An operation to create a snapshot of a virtual network function (or VM)"; |
| 447 | input { |
| 448 | uses common-header; |
| 449 | leaf action { |
| 450 | type action; |
| 451 | mandatory true; |
| 452 | } |
| 453 | uses action-identifiers; |
| 454 | leaf payload { |
| 455 | type payload; |
| 456 | mandatory false; |
| 457 | } |
| 458 | leaf identity-url { |
| 459 | type string; |
| 460 | mandatory true; |
| 461 | } |
| 462 | } |
| 463 | output { |
| 464 | uses common-header; |
| 465 | uses status; |
| 466 | leaf snapshot-id { |
| 467 | type string; |
| 468 | } |
| 469 | } |
| 470 | } |
vidhyasree | ac97522 | 2018-01-12 15:23:34 -0500 | [diff] [blame] | 471 | /********************************************************************************** |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 472 | * Define the VNF quiesce traffic service |
| 473 | **********************************************************************************/ |
| 474 | rpc quiesce-traffic { |
| 475 | description "An operation to stop traffic gracefully on the VF. |
| 476 | It stops traffic gracefully without stopping the application"; |
| 477 | input { |
| 478 | uses common-header; |
| 479 | leaf action { |
| 480 | type action; |
| 481 | mandatory true; |
| 482 | } |
| 483 | uses action-identifiers; |
| 484 | leaf payload { |
| 485 | type payload; |
| 486 | mandatory true; |
| 487 | } |
| 488 | } |
| 489 | output { |
| 490 | uses common-header; |
| 491 | uses status; |
| 492 | } |
| 493 | } |
| 494 | |
| 495 | /********************************************************************************** |
| 496 | * Define the VNF resume traffic service |
| 497 | **********************************************************************************/ |
| 498 | rpc resume-traffic { |
| 499 | description "An operation to resume traffic gracefully on the VF. |
| 500 | It resumes traffic gracefully without stopping the application"; |
| 501 | input { |
| 502 | uses common-header; |
| 503 | leaf action { |
| 504 | type action; |
| 505 | mandatory true; |
| 506 | } |
| 507 | uses action-identifiers; |
vidhyasree | ac97522 | 2018-01-12 15:23:34 -0500 | [diff] [blame] | 508 | leaf payload { |
| 509 | type payload; |
| 510 | mandatory true; |
| 511 | } |
| 512 | } |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 513 | output { |
| 514 | uses common-header; |
| 515 | uses status; |
| 516 | } |
| 517 | } |
| 518 | |
| 519 | /********************************************************************************** |
| 520 | * Define the VNF UpgradePreCheck service |
| 521 | **********************************************************************************/ |
| 522 | rpc upgrade-pre-check { |
| 523 | description "An operation to check that the VNF has the correct software version needed for a software upgrade."; |
| 524 | input { |
| 525 | uses common-header; |
| 526 | leaf action { |
| 527 | type action; |
| 528 | mandatory true; |
| 529 | } |
| 530 | uses action-identifiers; |
| 531 | leaf payload { |
| 532 | type payload; |
| 533 | mandatory true; |
| 534 | } |
| 535 | } |
| 536 | output { |
| 537 | uses common-header; |
| 538 | uses status; |
| 539 | } |
| 540 | } |
| 541 | |
| 542 | /********************************************************************************** |
| 543 | * Define the VNF UpgradeSoftware service |
| 544 | **********************************************************************************/ |
| 545 | rpc upgrade-software { |
| 546 | description "An operation to upgrade the target VNF to a new version and expected that the VNF is in a quiesced status ."; |
| 547 | input { |
| 548 | uses common-header; |
| 549 | leaf action { |
| 550 | type action; |
| 551 | mandatory true; |
| 552 | } |
| 553 | uses action-identifiers; |
| 554 | leaf payload { |
| 555 | type payload; |
| 556 | mandatory true; |
| 557 | } |
| 558 | } |
| 559 | output { |
| 560 | uses common-header; |
| 561 | uses status; |
| 562 | } |
| 563 | } |
| 564 | |
| 565 | /********************************************************************************** |
| 566 | * Define the VNF UpgradePostCheck service |
| 567 | **********************************************************************************/ |
| 568 | rpc upgrade-post-check { |
| 569 | description "An operation to check the VNF upgrade has been successful completed and all processes are running properly."; |
| 570 | input { |
| 571 | uses common-header; |
| 572 | leaf action { |
| 573 | type action; |
| 574 | mandatory true; |
| 575 | } |
| 576 | uses action-identifiers; |
| 577 | leaf payload { |
| 578 | type payload; |
| 579 | mandatory true; |
| 580 | } |
| 581 | } |
| 582 | output { |
| 583 | uses common-header; |
| 584 | uses status; |
| 585 | } |
| 586 | } |
| 587 | |
| 588 | /********************************************************************************** |
| 589 | * Define the VNF UpgradeBackup service |
| 590 | **********************************************************************************/ |
| 591 | rpc upgrade-backup { |
| 592 | description "An operation to do full backup of the VNF data prior to an upgrade."; |
| 593 | input { |
| 594 | uses common-header; |
| 595 | leaf action { |
| 596 | type action; |
| 597 | mandatory true; |
| 598 | } |
| 599 | uses action-identifiers; |
| 600 | leaf payload { |
| 601 | type payload; |
| 602 | mandatory true; |
| 603 | } |
| 604 | } |
| 605 | output { |
| 606 | uses common-header; |
| 607 | uses status; |
| 608 | } |
| 609 | } |
| 610 | |
| 611 | /********************************************************************************** |
| 612 | * Define the VNF UpgradeBackout service |
| 613 | **********************************************************************************/ |
| 614 | rpc upgrade-backout { |
| 615 | description "An operation does a backout after an UpgradeSoftware is completed (either successfully or unsuccessfully)."; |
| 616 | input { |
| 617 | uses common-header; |
| 618 | leaf action { |
| 619 | type action; |
| 620 | mandatory true; |
| 621 | } |
| 622 | uses action-identifiers; |
| 623 | leaf payload { |
| 624 | type payload; |
| 625 | mandatory true; |
| 626 | } |
| 627 | } |
| 628 | output { |
| 629 | uses common-header; |
| 630 | uses status; |
| 631 | } |
| 632 | } |
| 633 | |
| 634 | /********************************************************************************** |
| 635 | * Define the rollback service |
| 636 | **********************************************************************************/ |
| 637 | rpc rollback { |
| 638 | description "An operation to rollback to particular snapshot of a virtual network function (or VM)"; |
| 639 | input { |
| 640 | uses common-header; |
| 641 | leaf action { |
| 642 | type action; |
| 643 | mandatory true; |
| 644 | } |
| 645 | uses action-identifiers; |
| 646 | leaf payload { |
| 647 | type payload; |
| 648 | mandatory false; |
| 649 | } |
| 650 | leaf identity-url { |
| 651 | type string; |
| 652 | mandatory true; |
| 653 | } |
| 654 | leaf snapshot-id { |
| 655 | type string; |
| 656 | mandatory true; |
| 657 | } |
| 658 | } |
| 659 | output { |
| 660 | uses common-header; |
| 661 | uses status; |
| 662 | } |
| 663 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 664 | |
| 665 | |
| 666 | /********************************************************************************** |
| 667 | * Additional RPCs added here... |
| 668 | **********************************************************************************/ |
| 669 | |
| 670 | |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 671 | /********************************************************************************** |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 672 | * Define the sync service |
| 673 | **********************************************************************************/ |
| 674 | rpc sync { |
| 675 | description "An operation to sync the configurations of a virtual network function (or VM)"; |
| 676 | input { |
| 677 | uses common-header; |
| 678 | leaf action { |
| 679 | type action; |
| 680 | mandatory true; |
| 681 | } |
| 682 | uses action-identifiers; |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 683 | leaf payload { |
| 684 | type payload; |
| 685 | mandatory false; |
| 686 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 687 | } |
| 688 | output { |
| 689 | uses common-header; |
| 690 | uses status; |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 691 | leaf payload { |
| 692 | type payload; |
| 693 | mandatory false; |
| 694 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 695 | } |
| 696 | } |
| 697 | |
| 698 | /********************************************************************************** |
| 699 | * Define the terminate service |
| 700 | **********************************************************************************/ |
| 701 | rpc terminate { |
| 702 | description "An operation to terminate the configurations of a virtual network function (or VM)"; |
| 703 | input { |
| 704 | uses common-header; |
| 705 | leaf action { |
| 706 | type action; |
| 707 | mandatory true; |
| 708 | } |
| 709 | uses action-identifiers; |
| 710 | leaf payload { |
| 711 | type payload; |
| 712 | mandatory false; |
| 713 | } |
| 714 | } |
| 715 | output { |
| 716 | uses common-header; |
| 717 | uses status; |
| 718 | } |
| 719 | } |
| 720 | |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 721 | |
| 722 | rpc configure { |
| 723 | description "An operation to configure the configurations of a virtual network |
| 724 | function (or VM)"; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 725 | input { |
| 726 | uses common-header; |
| 727 | leaf action { |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 728 | type action; |
| 729 | mandatory true; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 730 | } |
| 731 | uses action-identifiers; |
| 732 | leaf payload { |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 733 | type payload; |
| 734 | mandatory false; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 735 | } |
| 736 | } |
| 737 | output { |
| 738 | uses common-header; |
| 739 | uses status; |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 740 | leaf payload { |
| 741 | type payload; |
| 742 | mandatory false; |
| 743 | } |
| 744 | } |
| 745 | } |
| 746 | |
| 747 | rpc config-modify { |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 748 | description "Use the ModifyConfig command when a full configuration cycle is either not required |
| 749 | or is considered too costly. The ModifyConfig LCM action affects only a subset of the |
| 750 | total configuration data of a VNF. The set of configuration parameters to be affected |
| 751 | is a subset of the total configuration data of the target VNF type. The payload Stop |
| 752 | Application must contain the configuration parameters to be modified and their values. |
| 753 | A successful modify returns a success response. A failed modify returns a failure |
| 754 | response and the specific failure messages in the response payload Stop Application"; |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 755 | input { |
| 756 | uses common-header; |
| 757 | leaf action { |
| 758 | type action; |
| 759 | mandatory true; |
| 760 | } |
| 761 | uses action-identifiers; |
| 762 | leaf payload { |
| 763 | type payload; |
| 764 | mandatory false; |
| 765 | } |
| 766 | } |
| 767 | output { |
| 768 | uses common-header; |
| 769 | uses status; |
| 770 | leaf payload { |
| 771 | type payload; |
| 772 | mandatory false; |
| 773 | } |
| 774 | } |
| 775 | } |
| 776 | |
vidhyasree | 6cf060d | 2018-02-21 11:19:33 -0500 | [diff] [blame] | 777 | rpc config-scale-out { |
| 778 | description "An operation to Modify the configuration or other action to support |
| 779 | a ConfigScaleOut of a VNF."; |
| 780 | input { |
| 781 | uses common-header; |
| 782 | leaf action { |
| 783 | type action; |
| 784 | mandatory true; |
| 785 | } |
| 786 | uses action-identifiers; |
| 787 | leaf payload { |
| 788 | type payload; |
| 789 | mandatory false; |
| 790 | } |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 791 | } |
vidhyasree | 6cf060d | 2018-02-21 11:19:33 -0500 | [diff] [blame] | 792 | output { |
| 793 | uses common-header; |
| 794 | uses status; |
| 795 | leaf payload { |
| 796 | type payload; |
| 797 | mandatory false; |
| 798 | } |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 799 | } |
| 800 | } |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 801 | |
| 802 | rpc config-restore { |
| 803 | description "An operation to restore the configurations of a virtual network |
| 804 | function (or VM)"; |
| 805 | input { |
| 806 | uses common-header; |
| 807 | leaf action { |
| 808 | type action; |
| 809 | mandatory true; |
| 810 | } |
| 811 | uses action-identifiers; |
| 812 | leaf payload { |
| 813 | type payload; |
| 814 | mandatory false; |
| 815 | } |
| 816 | } |
| 817 | output { |
| 818 | uses common-header; |
| 819 | uses status; |
| 820 | leaf payload { |
| 821 | type payload; |
| 822 | mandatory false; |
| 823 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 824 | } |
| 825 | } |
| 826 | |
| 827 | /********************************************************************************** |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 828 | * Define the test service |
| 829 | **********************************************************************************/ |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 830 | rpc test { |
| 831 | description "An operation to test the configurations of a virtual network function (or VM)"; |
| 832 | input { |
| 833 | uses common-header; |
| 834 | leaf action { |
| 835 | type action; |
| 836 | mandatory true; |
| 837 | } |
| 838 | uses action-identifiers; |
| 839 | leaf payload { |
| 840 | type payload; |
| 841 | mandatory false; |
| 842 | } |
| 843 | } |
| 844 | output { |
| 845 | uses common-header; |
| 846 | uses status; |
| 847 | } |
| 848 | } |
| 849 | |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 850 | /********************************************************************************** |
| 851 | * Define the stop service |
| 852 | **********************************************************************************/ |
| 853 | rpc stop { |
| 854 | description "An operation to stop the configurations of a virtual network function (or VM)"; |
| 855 | input { |
| 856 | uses common-header; |
| 857 | leaf action { |
| 858 | type action; |
| 859 | mandatory true; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 860 | } |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 861 | uses action-identifiers; |
| 862 | leaf payload { |
| 863 | type payload; |
| 864 | mandatory false; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 865 | } |
| 866 | } |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 867 | output { |
| 868 | uses common-header; |
| 869 | uses status; |
| 870 | } |
| 871 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 872 | |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 873 | rpc start { |
| 874 | description "An operation to start a virtual network function (or VM)"; |
| 875 | input { |
| 876 | uses common-header; |
| 877 | leaf action { |
| 878 | type action; |
| 879 | mandatory true; |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 880 | } |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 881 | uses action-identifiers; |
| 882 | leaf payload { |
| 883 | type payload; |
| 884 | mandatory false; |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 885 | } |
| 886 | } |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 887 | output { |
| 888 | uses common-header; |
| 889 | uses status; |
| 890 | } |
| 891 | } |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 892 | |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 893 | /********************************************************************************** |
| 894 | * Define the audit service |
| 895 | **********************************************************************************/ |
| 896 | rpc audit { |
| 897 | description "An operation to audit the configurations of a virtual network function (or VM)"; |
| 898 | input { |
| 899 | uses common-header; |
| 900 | leaf action { |
| 901 | type action; |
| 902 | mandatory true; |
| 903 | } |
| 904 | uses action-identifiers; |
| 905 | leaf payload { |
| 906 | type payload; |
| 907 | mandatory false; |
| 908 | } |
| 909 | } |
| 910 | output { |
| 911 | uses common-header; |
| 912 | uses status; |
| 913 | leaf payload { |
| 914 | type payload; |
| 915 | mandatory false; |
| 916 | } |
| 917 | } |
| 918 | } |
| 919 | |
| 920 | /********************************************************************************** |
| 921 | * Define the SoftwareUpload vSCP service |
| 922 | **********************************************************************************/ |
| 923 | rpc software-upload { |
| 924 | description "An operation to upload a new version of vSCP image to vSCP for updating it"; |
| 925 | input { |
| 926 | uses common-header; |
| 927 | leaf action { |
| 928 | type action; |
| 929 | mandatory true; |
| 930 | } |
| 931 | uses action-identifiers; |
| 932 | leaf payload { |
| 933 | type payload; |
| 934 | mandatory false; |
| 935 | } |
| 936 | } |
| 937 | output { |
| 938 | uses common-header; |
| 939 | uses status; |
| 940 | } |
| 941 | } |
| 942 | |
| 943 | /********************************************************************************** |
| 944 | * Define the PreHealthCheck vSCP service |
| 945 | **********************************************************************************/ |
| 946 | rpc health-check { |
| 947 | description "An operation to perform health check of vSCP prior its upgrading"; |
| 948 | input { |
| 949 | uses common-header; |
| 950 | leaf action { |
| 951 | type action; |
| 952 | mandatory true; |
| 953 | } |
| 954 | uses action-identifiers; |
| 955 | leaf payload { |
| 956 | type payload; |
| 957 | mandatory false; |
| 958 | } |
| 959 | } |
| 960 | output { |
| 961 | uses common-header; |
| 962 | uses status; |
| 963 | } |
| 964 | } |
| 965 | |
| 966 | |
| 967 | /********************************************************************************** |
| 968 | * Define the Upgrade vSCP service |
| 969 | **********************************************************************************/ |
| 970 | rpc live-upgrade { |
| 971 | description "An operation to perform upgrade of vSCP"; |
| 972 | input { |
| 973 | uses common-header; |
| 974 | leaf action { |
| 975 | type action; |
| 976 | mandatory true; |
| 977 | } |
| 978 | uses action-identifiers; |
| 979 | leaf payload { |
| 980 | type payload; |
| 981 | mandatory false; |
| 982 | } |
| 983 | } |
| 984 | output { |
| 985 | uses common-header; |
| 986 | uses status; |
| 987 | } |
| 988 | } |
| 989 | |
| 990 | |
| 991 | /********************************************************************************** |
| 992 | * Define the VNF lock service |
| 993 | **********************************************************************************/ |
| 994 | rpc lock { |
| 995 | description "An operation to perform VNF lock operation"; |
| 996 | input { |
| 997 | uses common-header; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 998 | leaf action { |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 999 | type action; |
| 1000 | mandatory true; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 1001 | } |
| 1002 | uses action-identifiers; |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 1003 | leaf payload { |
| 1004 | type payload; |
| 1005 | mandatory false; |
| 1006 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 1007 | } |
| 1008 | output { |
| 1009 | uses common-header; |
| 1010 | uses status; |
| 1011 | } |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 1012 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 1013 | |
| 1014 | /********************************************************************************** |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 1015 | * Define the VNF unlock service |
| 1016 | **********************************************************************************/ |
| 1017 | rpc unlock { |
| 1018 | description "An operation to perform VNF unlock operation"; |
| 1019 | input { |
| 1020 | uses common-header; |
| 1021 | leaf action { |
| 1022 | type action; |
| 1023 | mandatory true; |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 1024 | } |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 1025 | uses action-identifiers; |
| 1026 | leaf payload { |
| 1027 | type payload; |
| 1028 | mandatory false; |
| 1029 | } |
| 1030 | } |
| 1031 | output { |
| 1032 | uses common-header; |
| 1033 | uses status; |
| 1034 | } |
| 1035 | } |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 1036 | |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 1037 | /********************************************************************************** |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 1038 | * Define the VNF check lock service |
| 1039 | **********************************************************************************/ |
| 1040 | rpc check-lock { |
| 1041 | description "An operation to check VNF lock status"; |
| 1042 | input { |
| 1043 | uses common-header; |
| 1044 | leaf action { |
| 1045 | type action; |
| 1046 | mandatory true; |
| 1047 | } |
| 1048 | uses action-identifiers; |
| 1049 | } |
| 1050 | output { |
| 1051 | uses common-header; |
| 1052 | uses status; |
| 1053 | leaf locked { |
| 1054 | type enumeration { |
| 1055 | enum "TRUE"; |
| 1056 | enum "FALSE"; |
| 1057 | } |
| 1058 | description "TRUE/FALSE - returns TRUE when the given VNF was locked, otherwise returns FALSE"; |
| 1059 | mandatory false; |
| 1060 | } |
| 1061 | } |
| 1062 | } |
| 1063 | |
| 1064 | |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 1065 | rpc config-backup { |
| 1066 | description "An operation to Backup configurations of a virtual network function |
| 1067 | (or VM)"; |
| 1068 | input { |
| 1069 | uses common-header; |
| 1070 | leaf action { |
| 1071 | type action; |
| 1072 | mandatory true; |
| 1073 | } |
| 1074 | uses action-identifiers; |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 1075 | leaf payload { |
| 1076 | type payload; |
| 1077 | mandatory false; |
| 1078 | } |
Patrick Brady | c7d0075 | 2017-06-01 10:45:37 -0700 | [diff] [blame] | 1079 | } |
| 1080 | output { |
| 1081 | uses common-header; |
| 1082 | uses status; |
| 1083 | leaf payload { |
| 1084 | type payload; |
| 1085 | mandatory false; |
| 1086 | } |
| 1087 | } |
| 1088 | } |
| 1089 | |
| 1090 | rpc config-backup-delete { |
| 1091 | description "An operation to Delete backup configurations of a virtual network |
| 1092 | function (or VM)"; |
| 1093 | input { |
| 1094 | uses common-header; |
| 1095 | leaf action { |
| 1096 | type action; |
| 1097 | mandatory true; |
| 1098 | } |
| 1099 | uses action-identifiers; |
| 1100 | } |
| 1101 | output { |
| 1102 | uses common-header; |
| 1103 | uses status; |
| 1104 | leaf payload { |
| 1105 | type payload; |
| 1106 | mandatory false; |
| 1107 | } |
| 1108 | } |
| 1109 | } |
| 1110 | |
| 1111 | rpc config-export { |
| 1112 | description "An operation to Export configurations of a virtual network function |
| 1113 | (or VM)"; |
| 1114 | input { |
| 1115 | uses common-header; |
| 1116 | leaf action { |
| 1117 | type action; |
| 1118 | mandatory true; |
| 1119 | } |
| 1120 | uses action-identifiers; |
| 1121 | } |
| 1122 | output { |
| 1123 | uses common-header; |
| 1124 | uses status; |
| 1125 | } |
mojahidi | de52c62 | 2017-08-14 12:50:45 +0530 | [diff] [blame] | 1126 | } |
| 1127 | rpc stop-application { |
| 1128 | description "An operation to Stop Application traffic to a virtual network function"; |
| 1129 | input { |
| 1130 | uses common-header; |
| 1131 | leaf action { |
| 1132 | type action; |
| 1133 | mandatory true; |
| 1134 | } |
| 1135 | uses action-identifiers; |
| 1136 | leaf payload { |
| 1137 | type payload; |
| 1138 | mandatory false; |
| 1139 | } |
| 1140 | } |
| 1141 | output { |
| 1142 | uses common-header; |
| 1143 | uses status; |
| 1144 | } |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 1145 | } |
mojahidi | de52c62 | 2017-08-14 12:50:45 +0530 | [diff] [blame] | 1146 | |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 1147 | /********************************************************************************** |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 1148 | * Define the VNF Start Application service |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 1149 | **********************************************************************************/ |
Anand | 36bcd56 | 2018-01-04 19:35:51 -0500 | [diff] [blame] | 1150 | rpc start-application { |
| 1151 | description "An operation to perform VNF Start Application operation"; |
| 1152 | input { |
| 1153 | uses common-header; |
| 1154 | leaf action { |
| 1155 | type action; |
| 1156 | mandatory true; |
| 1157 | } |
| 1158 | uses action-identifiers; |
| 1159 | leaf payload { |
| 1160 | type payload; |
| 1161 | mandatory false; |
| 1162 | } |
| 1163 | } |
| 1164 | output { |
| 1165 | uses common-header; |
| 1166 | uses status; |
| 1167 | } |
| 1168 | } |
| 1169 | |
| 1170 | |
| 1171 | /********************************************************************************** |
| 1172 | * Gets the current state of the previously submitted LCM request |
| 1173 | **********************************************************************************/ |
| 1174 | rpc action-status { |
| 1175 | description "An operation to get the current state of the previously submitted LCM request"; |
| 1176 | input { |
| 1177 | uses common-header; |
| 1178 | leaf action { |
| 1179 | type action; |
| 1180 | mandatory true; |
| 1181 | } |
| 1182 | uses action-identifiers; |
| 1183 | leaf payload { |
| 1184 | type payload; |
| 1185 | mandatory false; |
| 1186 | } |
| 1187 | } |
| 1188 | output { |
| 1189 | uses common-header; |
| 1190 | uses status; |
| 1191 | leaf payload { |
| 1192 | type payload; |
| 1193 | } |
| 1194 | } |
| 1195 | } |
| 1196 | |
| 1197 | /********************************************************************************** |
| 1198 | * Define the VNF Query service |
| 1199 | **********************************************************************************/ |
| 1200 | rpc query { |
| 1201 | description "An operation to query the status of a targe VNF. |
| 1202 | Returns information on each VM, including state (active or standby) |
| 1203 | and status (healthy or unhealthy)"; |
| 1204 | input { |
| 1205 | uses common-header; |
| 1206 | leaf action { |
| 1207 | type action; |
| 1208 | mandatory true; |
| 1209 | } |
| 1210 | uses action-identifiers; |
| 1211 | } |
| 1212 | output { |
| 1213 | uses common-header; |
| 1214 | uses status; |
| 1215 | list query-results { |
| 1216 | leaf vserver-id { |
| 1217 | description "Identifier of a VM"; |
| 1218 | type string; |
| 1219 | mandatory true; |
| 1220 | } |
| 1221 | leaf vm-state { |
| 1222 | description "The state of the VM"; |
| 1223 | type vm-state; |
| 1224 | mandatory true; |
| 1225 | } |
| 1226 | leaf vm-status { |
| 1227 | description "the status of the VM"; |
| 1228 | type vm-status; |
| 1229 | mandatory true; |
| 1230 | } |
| 1231 | } |
| 1232 | } |
| 1233 | } |
| 1234 | |
| 1235 | /********************************************************************************** |
| 1236 | * Define the Reboot service |
| 1237 | **********************************************************************************/ |
| 1238 | rpc reboot { |
| 1239 | description "An operation to reboot a specified virtual machine (VM)"; |
| 1240 | input { |
| 1241 | uses common-header; |
| 1242 | leaf action { |
| 1243 | type action; |
| 1244 | mandatory true; |
| 1245 | } |
| 1246 | uses action-identifiers; |
| 1247 | leaf payload { |
| 1248 | type payload; |
| 1249 | mandatory false; |
| 1250 | } |
| 1251 | } |
| 1252 | output { |
| 1253 | uses common-header; |
| 1254 | uses status; |
| 1255 | } |
| 1256 | } |
| 1257 | |
| 1258 | /********************************************************************************** |
| 1259 | * Define the VM attach volume service |
| 1260 | **********************************************************************************/ |
| 1261 | rpc attach-volume { |
| 1262 | description "An operation to attach a cinder volume to a VM"; |
| 1263 | input { |
| 1264 | uses common-header; |
| 1265 | leaf action { |
| 1266 | type action; |
| 1267 | mandatory true; |
| 1268 | } |
| 1269 | uses action-identifiers; |
| 1270 | leaf payload { |
| 1271 | type payload; |
| 1272 | mandatory true; |
| 1273 | } |
| 1274 | } |
| 1275 | output { |
| 1276 | uses common-header; |
| 1277 | uses status; |
| 1278 | } |
| 1279 | } |
| 1280 | |
| 1281 | /********************************************************************************** |
| 1282 | * Define the VM detach volume service |
| 1283 | **********************************************************************************/ |
| 1284 | rpc detach-volume { |
| 1285 | description "An operation to detach a cinder volume from a VM"; |
| 1286 | input { |
| 1287 | uses common-header; |
| 1288 | leaf action { |
| 1289 | type action; |
| 1290 | mandatory true; |
| 1291 | } |
| 1292 | uses action-identifiers; |
| 1293 | leaf payload { |
| 1294 | type payload; |
| 1295 | mandatory true; |
| 1296 | } |
| 1297 | } |
| 1298 | output { |
| 1299 | uses common-header; |
| 1300 | uses status; |
| 1301 | } |
| 1302 | } |
| 1303 | |
| 1304 | |
| 1305 | |
| 1306 | /********************************************************************************** |
| 1307 | * Additional RPCs added here... |
| 1308 | **********************************************************************************/ |
Patrick Brady | 57b5eef | 2017-02-10 15:00:49 -0800 | [diff] [blame] | 1309 | } |