/*- * ============LICENSE_START======================================================= * ONAP : APPC * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Copyright (C) 2017 Amdocs * ============================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * ECOMP is a trademark and service mark of AT&T Intellectual Property. * ============LICENSE_END========================================================= */ module sequence-generator { yang-version 1; namespace "org:onap:appc:sequencegenerator"; prefix sequencegenerator; description "Defines sequence generator api interface for App-C services"; revision "2017-07-06" { description "Initial draft"; } grouping request-info { container request-info{ leaf action { type enumeration { enum "Start"; enum "Stop"; enum "Restart"; } } leaf action-level { type enumeration { enum "vm"; enum "vnfc"; enum "vnf"; enum "vf-module"; } } container action-identifier { leaf vnf-id { description "identifies the VNF to which this action is to be applied(vnf-id uniquely identifies the service-instance referred to)."; type string; } leaf vnfc-name { type string; } leaf vserver-id { type string; } } leaf payload { description "An action-specific value opaque to the APPC handler. The value can be any valid JSON type (primitive, object, collection of those two). APPC will pass the value as raw JSON string"; type string; } } } grouping inventory-info { container inventory-info { container vnf-info { leaf vnf-id { type string; } leaf vnf-name { type string; } leaf vnf-type { type string; } leaf identity-url { type string; } list vm { ordered-by user; key "vserver-id"; leaf vserver-id { type string; } leaf vm-id { type string; } container vnfc { leaf vnfc-type { type string; } leaf vnfc-name { type string; } leaf vnfc-function-code { type string; } } } } } } grouping dependency-info { container dependency-info { list vnfcs { leaf vnfc-type { type string; } leaf mandatory { type boolean; } leaf resilience { type string; } leaf-list parents { type string; } } } } grouping tunable-parameters { container tunable-parameters { leaf strategy { type enumeration { enum "FORWARD"; enum "REVERSE"; } } leaf wait-time { type uint16; } leaf retry-count { type uint16; } } } grouping capabilities { container capabilities { leaf-list vnf { type string; } leaf-list vf-module { type string; } container vm { leaf-list AttachVolume { type string; } leaf-list DetachVolume { type string; } leaf-list Evacuate { type string; } leaf-list Migrate { type string; } leaf-list Reboot { type string; } leaf-list Rebuild { type string; } leaf-list Restart { type string; } leaf-list Snapshot { type string; } leaf-list Start { type string; } leaf-list Stop { type string; } } leaf-list vnfc { type string; } } } grouping response { container status { leaf code { type uint16; } leaf message { type string; } } list transactions{ ordered-by user; key "transaction-id"; leaf transaction-id{ type uint16; } leaf action{ type string; } leaf action-level{ type string; } container action-identifier{ leaf vserver-id { type string; } leaf vnfc-name { type string; } leaf vnf-id { type string; } } leaf payload{ type string; } leaf precheck-operator{ type string; } list precheck-options{ leaf pre-transaction-id{ type uint16; } leaf param-name{ type string; } leaf param-value{ type string; } leaf rule{ type string; } } list responses{ leaf response-message{ type string; } container response-action{ leaf wait{ type uint16; } leaf retry{ type uint16; } leaf continue{ type boolean; } leaf stop{ type boolean; } leaf ignore{ type boolean; } leaf jump{ type uint16; } } } } } rpc generate-sequence { input{ uses request-info; uses inventory-info; uses dependency-info; uses tunable-parameters; uses capabilities; } output{ uses response; } } }