From 0e517a26e69ff3d1b04ba19c4539cb8dee60b097 Mon Sep 17 00:00:00 2001 From: Maros Marsalek Date: Sat, 9 Apr 2016 16:22:06 +0200 Subject: HONEYCOMB-33: Add notification service to Hc Implement VPP interface notification translator as part of v3po2vpp plugin Change-Id: I69cfad9668ae9e4d79ed30bb8d54d294faa4c54a Signed-off-by: Maros Marsalek --- .../rev150105/InterfaceNameOrIndexBuilder.java | 19 ++++++++++ v3po/api/src/main/yang/v3po.yang | 40 ++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 v3po/api/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/rev150105/InterfaceNameOrIndexBuilder.java (limited to 'v3po/api') diff --git a/v3po/api/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/rev150105/InterfaceNameOrIndexBuilder.java b/v3po/api/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/rev150105/InterfaceNameOrIndexBuilder.java new file mode 100644 index 000000000..5e9974a5a --- /dev/null +++ b/v3po/api/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/rev150105/InterfaceNameOrIndexBuilder.java @@ -0,0 +1,19 @@ +package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105; + + +/** + * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation. + * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32). + * + * The reason behind putting it under src/main/java is: + * This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent + * loss of user code. + * + */ +public class InterfaceNameOrIndexBuilder { + + public static InterfaceNameOrIndex getDefaultInstance(java.lang.String defaultValue) { + throw new java.lang.UnsupportedOperationException("Not yet implemented"); + } + +} diff --git a/v3po/api/src/main/yang/v3po.yang b/v3po/api/src/main/yang/v3po.yang index f35ccdcdf..b1f2e2c56 100644 --- a/v3po/api/src/main/yang/v3po.yang +++ b/v3po/api/src/main/yang/v3po.yang @@ -505,4 +505,44 @@ module v3po { "vlib version info"; } } + + // VPP Notifications + + typedef interface-status { + type enumeration { + enum up { + value 1; + } + enum down { + value 0; + } + } + } + + typedef interface-name-or-index { + type union { + type string; + type uint32; + } + } + + notification interface-state-change { + leaf name { + type interface-name-or-index; + } + + leaf admin-status { + type interface-status; + } + + leaf oper-status { + type interface-status; + } + } + + notification interface-deleted { + leaf name { + type interface-name-or-index; + } + } } -- cgit 1.2.3-korg