From ad7220f5dcb8a3acd43bca1d855012a441e97d5c Mon Sep 17 00:00:00 2001 From: Lathish Date: Thu, 16 Jul 2020 15:46:14 +0100 Subject: Updated A1 Yang model Issue-ID: CCSDK-2581 Change-Id: I816cac765c2cf09c3d0911b98b3361ef8cb3696f Signed-off-by: Lathish --- .../model/src/main/yang/A1-ADAPTER-API.yang | 336 ++++----------------- 1 file changed, 59 insertions(+), 277 deletions(-) (limited to 'sdnr/northbound/a1Adapter/model') diff --git a/sdnr/northbound/a1Adapter/model/src/main/yang/A1-ADAPTER-API.yang b/sdnr/northbound/a1Adapter/model/src/main/yang/A1-ADAPTER-API.yang index fb740cc27..157bde5af 100644 --- a/sdnr/northbound/a1Adapter/model/src/main/yang/A1-ADAPTER-API.yang +++ b/sdnr/northbound/a1Adapter/model/src/main/yang/A1-ADAPTER-API.yang @@ -1,340 +1,122 @@ +//- +// ============LICENSE_START======================================================= +// Copyright (C) 2020 Nordix Foundation. +// ================================================================================ +// 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. +// +// SPDX-License-Identifier: Apache-2.0 +// ============LICENSE_END========================================================= +// module A1-ADAPTER-API { - namespace "org:onap:ccsdk"; + namespace "org:onap:a1-adapter"; prefix a1-adapter-api; - revision "2019-12-12" { - description - "Added standard output payload for all RPC's"; - } - - revision "2019-10-02" { - description - "A1 adapter for Frankfurt"; + import ietf-inet-types { + prefix "inet"; + revision-date "2013-07-15"; } - grouping a1-adapter-response { - leaf response-code { - type string; - } - leaf response-message { - type string; - } - description - "Response payload for A1 Adapter RPC's"; + import ietf-yang-types { + prefix yang; } - grouping a1-policy-instance-property { - - description - "Properties as specified in the create_schema field of policy type in PUT payload"; - - leaf property-name { - type string { - length "1..64"; - } - description - "Individual property name"; - } - leaf property-value { - type string { - length "1..64"; - } - description - "Value of the property"; - } - } - - - grouping a1-policy-type-create-schema-property-statement { - - leaf policy-statement { - type string { - length "1..64"; - } + revision "2020-01-22" { description - "Individual policy statement name"; - } - leaf policy-statement-value { - type string { - length "1..64"; - } - description - "Value of the policy statement"; - } + "A1 adapter"; } - -///Flattend interface using RPC - - //Get a comma separated list of near-rt rics, e.g. domain-name1:port1,domainname2:port2 - //Each item in the returned list will be regarded as one near-rt-ric-id. - rpc getNearRT-RICs { - // OpenDaylight Fluorine version of restconf cannot handle RPCs with no input + rpc putA1Policy { input { - leaf dummy { - type string; - } - } - - output { - uses a1-adapter-response; - leaf-list near-rt-ric-id-list { - type string; + leaf near-rt-ric-url { + type inet:uri; } - } - } - - //Get health status for a Near-RT-RIC. true - health ok, false - health is not ok. - rpc getHealthCheck { - input { - leaf near-rt-ric-id { + leaf body { type string; } } - output { - uses a1-adapter-response; - leaf health-status { - type boolean; - } - } - } - - //Get a comma separated list of integer policy type ids - //Each item in the returned list will be regarded as one policy-type-id. - rpc getPolicyTypes { - input { - leaf near-rt-ric-id { + leaf body { type string; } - } - output { - uses a1-adapter-response; - leaf-list policy-type-id-list { - type uint32; + leaf http-status { + type int32; } } } - //Create a policy type - rpc createPolicyType { + rpc getA1Policy { input { - leaf near-rt-ric-id { - type string; - } - leaf policy-type-id { - type uint32; - } - leaf description { - type string; - } - leaf name { - type string; - } - leaf policy-type { - type string; - } - list properties { - key "property-name"; - leaf property-name { - type string { - length "1..64"; - } - description - "Individual property name"; - } - list policy-statements { - key "policy-statement"; - uses a1-policy-type-create-schema-property-statement; - } - } - } - output { - uses a1-adapter-response; - leaf status { - type string; - } - leaf code { - type string; - } - } - } - - //Get a policy type - rpc getPolicyType { - input { - leaf near-rt-ric-id { - type string; - } - leaf policy-type-id { - type uint32; + leaf near-rt-ric-url { + type inet:uri; } } output { - uses a1-adapter-response; - leaf description { + leaf body { type string; } - leaf name { - type string; - } - leaf policy-type { - type string; + leaf http-status { + type int32; } } } - //Delete a policy type - rpc deletePolicyType { + rpc getA1PolicyStatus { input { - leaf near-rt-ric-id { - type string; - } - leaf policy-type-id { - type uint32; + leaf near-rt-ric-url { + type inet:uri; } } output { - uses a1-adapter-response; - } - } - - //Get a comma separeated list of string policy instance ids - //Each item in the returned list will be regarded as one policy-instance-id. - rpc getPolicyInstances { - input { - leaf near-rt-ric-id { + leaf body { type string; } - leaf policy-type-id { - type uint32; - } - } - - output { - uses a1-adapter-response; - leaf-list policy-instance-id-list { - type string; + leaf http-status { + type int32; } } } - //Create a policy instance - rpc createPolicyInstance { + rpc getA1PolicyType { input { - leaf near-rt-ric-id { - type string; - } - leaf policy-type-id { - type uint32; - } - leaf policy-instance-id { - type string; - } - leaf policy-instance { - type string; - } - list properties { - key "property-name"; - uses a1-policy-instance-property; - } - } - output { - uses a1-adapter-response; - } - } - - ///Get a policy instance - rpc getPolicyInstance { - input { - leaf near-rt-ric-id { - type string; - } - leaf policy-type-id { - type uint32; - } - leaf policy-instance-id { - type string; + leaf near-rt-ric-url { + type inet:uri; } } output { - uses a1-adapter-response; - leaf policy-instance { - type string; - } - } - } - - //Delete a policy instance - rpc deletePolicyInstance { - input { - leaf near-rt-ric-id { + leaf body { type string; } - leaf policy-type-id { - type uint32; - } - leaf policy-instance-id { - type string; + leaf http-status { + type int32; } } - output { - uses a1-adapter-response; - } } - //Get the status for a policy instance - rpc getStatus { + rpc deleteA1Policy { input { - leaf near-rt-ric-id { - type string; - } - leaf policy-type-id { - type uint32; - } - leaf policy-instance-id { - type string; + leaf near-rt-ric-url { + type inet:uri; } } output { - uses a1-adapter-response; - leaf status { + leaf body { type string; } - } - } - - //Policy feedback Notification to provide policy enforcement update - rpc notifyPolicyEnforcementUpdate { - input { - leaf near-rt-ric-id { - type string; - } - leaf policy-type-id { - type uint32; - } - leaf policy-instance-id { - type string; - } - leaf policy_enforcement_status { - type string; - description - "Policy enforcement status - IN_EFFECT or NON_IN_EFFECT"; - } - leaf policy_enforcement_reason { - type string; - description - "Indicates the reason why policy is no longer being enforced"; + leaf http-status { + type int32; } } - output { - uses a1-adapter-response; - } } - - - - -} +} \ No newline at end of file -- cgit 1.2.3-korg