From f4773f3f249b7ac058a53848303cb27dc0d8022c Mon Sep 17 00:00:00 2001 From: demx8as6 Date: Fri, 26 Aug 2022 16:53:23 +0200 Subject: [PATCH] Import OPNVF Yang based Event Stream - add yes-performance-monitoring IssueID: OAM-289 Change-Id: I86551c79013dc2b9efe10d8d7b3ccf6fb7c9b25d Signed-off-by: demx8as6 --- .../opnfv/yes-performance-monitoring.yang | 184 +++++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 data-model/yang/published/opnfv/yes-performance-monitoring.yang diff --git a/data-model/yang/published/opnfv/yes-performance-monitoring.yang b/data-model/yang/published/opnfv/yes-performance-monitoring.yang new file mode 100644 index 0000000..8c8e813 --- /dev/null +++ b/data-model/yang/published/opnfv/yes-performance-monitoring.yang @@ -0,0 +1,184 @@ +module yes-performance-monitoring { + yang-version 1.1; + namespace "urn:opnfv:params:xml:ns:yang:yes-performance-monitoring"; + prefix ypm; + + import yang-based-event-stream { + prefix yes; + reference + "wiki.opnfv.org/display/ves/VES+goes+YES"; + } + import yes-types { + prefix yt; + reference + "wiki.opnfv.org/display/ves/VES+goes+YES"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types."; + } + + organization + "Open Platform for NFV (OPNFV) - Virtual Event Streaming (VES) project"; + contact + "wiki.opnfv.org/display/ves"; + description + "This module is inspired by VES 7.1.1 but uses YANG concepts and types to + describe the exchanged data format. + + Copyright 2020 highstreet technologies GmbH and others. + + 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."; + + revision 2020-06-28 { + description + "Initial version"; + reference + "ONAP SDN-R: wiki.onap.org/display/DW/SDN-R + VES: wiki.opnfv.org/display/ves/VES+Home + docs.onap.org/en/frankfurt/submodules/dcaegen2.git/docs/sections/services/ves-http + YES: wiki.opnfv.org/display/ves/VES+goes+YES"; + } + + /* + * Identities + */ + identity performance-monitoring { + base yt:domain-id; + description + "Indicates, that the event body contains performance-monitoring + related asynchronous message context."; + } + + identity granularity-period-id { + description + "Base identity for the granularity period. A unique identification of + the granularity period. The description of the granularity period + value MUST indicate if the granularity period is abstract or not. + + This identity is abstract and MUST NOT be used for granularity + period."; + } + + identity gp15min { + base granularity-period-id; + description + "Indicates a period length of 900s. The display value is '15min'."; + } + + identity gp24h { + base granularity-period-id; + description + "Indicates a period length of maximal 86400s. The display value is + '24h'."; + } + + /* + * Type definitions + */ + typedef granularity-period-type { + type identityref { + base granularity-period-id; + } + description + "The enumeration with the options for granularity period of the + performance measurement data."; + } + + /* + * Groupings + */ + grouping pm-measurement-grp { + leaf pm-key { + type yt:performance-measurement-type-id; + description + "The local identifier of a pm-measurement object."; + } + leaf pm-value { + type yt:pm-value-type; + mandatory true; + description + "The performance measurement value, measured in a certain interval."; + } + leaf pm-unit { + type yt:performance-measurement-unit-id; + description + "A representing of the unit og the pm-value."; + } + description + "An abstract object class representing a key-value pair for + pm-measurement."; + } + + grouping performance-monitoring-grp { + leaf granularity-period { + type granularity-period-type; + config false; + description + "Time period between reset of the underlying counter."; + } + leaf suspect-interval-flag { + type boolean; + config false; + description + "This attribute indicates that the data collected during the interval is suspect."; + } + leaf period-end-time { + type yang:date-and-time; + config false; + description + "Time when the counter values have been recorded and the counter reset."; + } + list measurement { + key pm-key; + uses pm-measurement-grp; + description + "A set of measurement data for this interval."; + } + description + "An object class containing all performance-monitoring specific parameters."; + } + + /* + * Augmentation of YES + */ + augment "/yes:event-history/yes:event" { + when "derived-from-or-self(/yes:event-history/yes:event/yes:header/yes:domain, 'ypm:performance-monitoring')" { + description + "The event header must indicate 'performance-monitoring'."; + } + if-feature yes:event-history; + list performance-monitoring { + uses performance-monitoring-grp; + description + "A list for performance-monitoring objects."; + } + description + "Adds to YES the specifics of performance-monitoring notifications."; + } + + augment "/yes:yang-based-event-stream/yes:event" { + when "derived-from-or-self(/yes:yang-based-event-stream/yes:event/yes:header/yes:domain, 'ypm:performance-monitoring')" { + description + "The event header must indicate 'performance-monitoring'."; + } + list performance-monitoring { + uses performance-monitoring-grp; + description + "A list for performance-monitoring objects."; + } + description + "Adds to YES the specifics of performance-monitoring notifications."; + } +} -- 2.16.6