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