Initial import of Microsemi Driver
Change-Id: I431d5f2c18e0b66a84c36273c3d9f0b84f223841
Added in BUCK files for building driver
Change-Id: I70681327f5b89f67e904c45d5974ab393652d51f
Corrected some syntax errors
Change-Id: I11150cc499c212005f80619e3900e747f1c23d96
Updated pom file to clean build
Change-Id: I6613ddc9e6802aa882e716cf04df210249870835
Added in utility functions for EA1000 Init
Change-Id: I51ffe0cf0daf9ffcea0e2479ee9982fcd1755440
Added YMS code to Microsemi Driver
Change-Id: I6f2a14e454c6909bf9e9f6025321c74c98c13c72
Updated driver to work with YMS and YCH
Change-Id: If7dbe3cd5bd1b6f902d09d6b2dc3895605d70f70
Implemented IetfSystemManager as a service and call on YMS as a service
Change-Id: If1c5e8482b1f53f578a3b0b770accd50024111cf
Moved YMS calls over in to Yang Service implementation
Change-Id: I044aad06f1ef7452bc48e88987787a683666cd72
improved unit test for IetfSystemManager
Change-Id: I48fbf831e7e5ca0e1ef3de8288e56da1b5ebb7a4
Major changes to IetfSystemManager to work in live system
Change-Id: I6e3aa118ba422151f314b9a666860d90905c9929
Added in retry mechanism for DeviceDescription to wait for YCH
Change-Id: If8e0f2c2f315ffd6db15627a11382a00217dd262
Added in implementation of MseaSaFiltering and unit tests
Change-Id: I34bf888e0e732bd4664d1fb8ef5abb679b1506fe
Updated driver with unit tests for MseaSaFiltering
Change-Id: I7ea2407a546622ff55d1ab21610c45697546d632
Modified removeFlowRules of Ea1000FlowRuleProgrammable
Change-Id: Ibb4a555f61887a8e6e42af588bb42f7b70f58efb
Added in manager for MseaUniEvc service with unit tests
Change-Id: Idc5853f46051548973f52a0659f7f88982ff960c
Implemented getFlowEntries() for EVCs from EA1000
Change-Id: Ie85dadfa7760f0b30a9bdf6ccd09cca9f097fff9
Added in translation of FlowRules in to EVC on EA1000
Change-Id: Icfb65171c3300c96b3ca4e18cbd327f0ed2190be
Added in handling of FlowRule deletion including complex ceVlanMaps
Change-Id: I7fd0bb0ef04d1b40e4b7d6a6db7f7ee662329780
Updated Service entries for new onos-yang-tools
Change-Id: I44e655202f3a45073e1e16f83737caed6e01afa8
Revert "Updated Service entries for new onos-yang-tools"
This reverts commit 642b550ef1de12ed59bad2eaa3a2da414d2e5e59.
Improved timeout mechanism for YANG model loading
Change-Id: If744ecd206372e822edf2b736c83226321a12256
Minor edits of EVC creation
Change-Id: Ib0a4763deaf6dce37625ba77f5095b39cd98272d
Added in CustomEvc and supporting classes
Change-Id: Iad60eb1bcd48d2aec55b894b2d419b51852c3b2f
Created CeVlanUtils to resolve loading problem
Change-Id: I0d63931ad2c5ad2725861ebc7dccc4d5fe7b9298
Modified startup check
Change-Id: I6e6bcfa7e615044cb08fe7ee2f8a6c8b89aabb21
Modified handlin of flow rules
Change-Id: I965a79c23298866122aeb94c6d9d584aafee3bd5
Fixed problem with ceVlanMap
Change-Id: If1458c35d0b95b5b25b6636f098292f9e91c06c6
Minor Pom edits
Change-Id: I5cefb18674aa04b1f50bd7e2306260c1c3ad3814
Commented out extension references in YANG files to avoid onos-yang-tools problems
Change-Id: I32fdb34c4f476f495fe28e75d0f410aaf14e2ec1
Corrected error in removing 0 in CeVlanMapUtils
Change-Id: I8cd1fd02788b81c2613364d5639ef6e090057f80
Changes in YMS to accomodate EA1000 driver
Change-Id: I6ae2b9bd2be49eae8d4ad2f929dfe3214c514550
diff --git a/drivers/microsemi/ea1000yang/src/main/java/org/onosproject/drivers/microsemi/yang/impl/AbstractYangServiceImpl.java b/drivers/microsemi/ea1000yang/src/main/java/org/onosproject/drivers/microsemi/yang/impl/AbstractYangServiceImpl.java
new file mode 100644
index 0000000..7b65a75
--- /dev/null
+++ b/drivers/microsemi/ea1000yang/src/main/java/org/onosproject/drivers/microsemi/yang/impl/AbstractYangServiceImpl.java
@@ -0,0 +1,185 @@
+/*
+ * Copyright 2017-present Open Networking Laboratory
+ *
+ * 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.
+ */
+package org.onosproject.drivers.microsemi.yang.impl;
+
+import static org.onosproject.yms.ych.YangProtocolEncodingFormat.XML;
+import static org.onosproject.yms.ydt.YmsOperationType.EDIT_CONFIG_REQUEST;
+import static org.onosproject.yms.ydt.YmsOperationType.QUERY_REPLY;
+import static org.onosproject.yms.ydt.YmsOperationType.QUERY_REQUEST;
+
+import java.util.List;
+
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.ReferenceCardinality;
+import org.apache.felix.scr.annotations.Service;
+import org.onosproject.core.ApplicationId;
+import org.onosproject.core.CoreService;
+import org.onosproject.netconf.NetconfException;
+import org.onosproject.netconf.NetconfSession;
+import org.onosproject.netconf.TargetConfig;
+import org.onosproject.yms.ych.YangCodecHandler;
+import org.onosproject.yms.ych.YangCompositeEncoding;
+import org.onosproject.yms.ymsm.YmsService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Abstract class that implements some of the core functions of a YANG model service.
+ *
+ */
+@Component(immediate = true)
+@Service
+public abstract class AbstractYangServiceImpl {
+ protected final Logger log = LoggerFactory.getLogger(getClass());
+ protected boolean alreadyLoaded = false;
+
+ @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+ protected CoreService coreService;
+
+ @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+ protected YmsService ymsService;
+
+ protected ApplicationId appId;
+
+ // YCH is not a service and is a class variable. Can be lost on deactivate.
+ // Must be recreated on activate
+ protected YangCodecHandler ych;
+
+ @Activate
+ public abstract void activate();
+
+ @Deactivate
+ public void deactivate() {
+ alreadyLoaded = false;
+ }
+
+ /**
+ * Internal method to generically make a NETCONF get query from YANG objects.
+ * @param yangObjectOpParamFilter A YANG object model
+ * @param session A NETCONF session
+ * @return YangObjectModel
+ * @throws NetconfException if the session has any error
+ */
+ protected final Object getNetconfObject(
+ Object yangObjectOpParamFilter, NetconfSession session)
+ throws NetconfException {
+ if (session == null) {
+ throw new NetconfException("Session is null when calling getNetconfObject()");
+ }
+ if (yangObjectOpParamFilter == null) {
+ throw new NetconfException("Query object cannot be null");
+ }
+ //Convert the param to XML to use as a filter
+ YangCompositeEncoding xmlQuery =
+ ych.encodeCompositeOperation(null, null,
+ yangObjectOpParamFilter, XML, QUERY_REQUEST);
+
+ String xmlQueryStr = xmlQuery.getResourceInformation().replace("<>", "").replace("</>", "").trim();
+ log.debug("Sending <get> query on NETCONF session " + session.getSessionId() +
+ ":\n" + xmlQueryStr);
+
+ String xmlResult = session.get(xmlQueryStr, null);
+
+ List<Object> objectList = ych.decode(xmlResult, XML, QUERY_REPLY);
+ if (objectList != null && objectList.size() > 0) {
+ Object systemObject = objectList.get(0);
+ return systemObject;
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Internal method to generically make a NETCONF get-config query from YANG objects.
+ *
+ * @param yangObjectOpParamFilter A YANG object model
+ * @param session A NETCONF session
+ * @param targetDs - running,candidate or startup
+ * @return YangObjectModel
+ * @throws NetconfException if the session has any error
+ */
+ protected final Object getConfigNetconfObject(
+ Object yangObjectOpParamFilter, NetconfSession session, TargetConfig targetDs)
+ throws NetconfException {
+ if (session == null) {
+ throw new NetconfException("Session is null when calling getConfigNetconfObject()");
+ }
+
+ if (yangObjectOpParamFilter == null) {
+ throw new NetconfException("Query object cannot be null");
+ }
+ //Convert the param to XML to use as a filter
+ YangCompositeEncoding xmlQuery =
+ ych.encodeCompositeOperation(null, null,
+ yangObjectOpParamFilter, XML, QUERY_REQUEST);
+
+ String xmlQueryStr = xmlQuery.getResourceInformation().replace("<>", "").replace("</>", "").trim();
+ log.debug("Sending <get-config> for " + targetDs +
+ " query on NETCONF session " + session.getSessionId() +
+ ":\n" + xmlQueryStr);
+
+ String xmlResult = session.getConfig(targetDs, xmlQueryStr);
+
+ List<Object> objectList = ych.decode(xmlResult, XML, QUERY_REPLY);
+ if (objectList != null && objectList.size() > 0) {
+ Object systemObject = objectList.get(0);
+ return systemObject;
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Internal method to generically make a NETCONF edit-config call from a set of YANG objects.
+ *
+ * @param yangObjectOpParamFilter A YANG object model
+ * @param session A NETCONF session
+ * @param targetDs - running,candidate or startup
+ * @throws NetconfException if the session has any error
+ */
+ protected final void setNetconfObject(
+ Object yangObjectOpParamFilter, NetconfSession session, TargetConfig targetDs)
+ throws NetconfException {
+ if (yangObjectOpParamFilter == null) {
+ throw new NetconfException("Query object cannot be null");
+ } else if (session == null) {
+ throw new NetconfException("Session is null when calling getMseaSaFiltering()");
+ }
+ //Convert the param to XML to use as a filter
+ YangCompositeEncoding xmlContent =
+ ych.encodeCompositeOperation(null, null,
+ yangObjectOpParamFilter, XML, EDIT_CONFIG_REQUEST);
+
+ String xmlContentStr = xmlContent.getResourceInformation()
+ .replace("<>", "").replace("</>", "")
+ //FIXME: Necessary for MEP ccmInterval
+ .replaceAll("yangAutoPrefix", "")
+ .trim();
+
+ log.debug("Sending XML <edit-config> on NETCONF session " + session.getSessionId() +
+ ":\n" + xmlContentStr);
+
+ boolean succeeded = session.editConfig(targetDs, null, xmlContentStr);
+ if (succeeded) {
+ log.debug("<edit-config> succeeded through NETCONF");
+ } else {
+ throw new NetconfException("Failed to run edit-config through NETCONF");
+ }
+ }
+}
diff --git a/drivers/microsemi/ea1000yang/src/main/java/org/onosproject/drivers/microsemi/yang/impl/IetfSystemManager.java b/drivers/microsemi/ea1000yang/src/main/java/org/onosproject/drivers/microsemi/yang/impl/IetfSystemManager.java
new file mode 100644
index 0000000..4c61143
--- /dev/null
+++ b/drivers/microsemi/ea1000yang/src/main/java/org/onosproject/drivers/microsemi/yang/impl/IetfSystemManager.java
@@ -0,0 +1,207 @@
+/*
+ * Copyright 2017-present Open Networking Laboratory
+ *
+ * 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.
+ */
+package org.onosproject.drivers.microsemi.yang.impl;
+
+import static org.onosproject.yms.ych.YangProtocolEncodingFormat.XML;
+import static org.onosproject.yms.ydt.YmsOperationType.QUERY_REPLY;
+
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.List;
+import java.util.regex.Pattern;
+
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
+import org.apache.felix.scr.annotations.Service;
+import org.onosproject.drivers.microsemi.yang.IetfSystemNetconfService;
+import org.onosproject.netconf.NetconfException;
+import org.onosproject.netconf.NetconfSession;
+import org.onosproject.netconf.TargetConfig;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.system.rev20160505.IetfSystemMicrosemiService;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.system.rev20160505.ietfsystemmicrosemi.doupgradeandreboot.DoUpgradeAndRebootInput;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.system.rev20160505.ietfsystemmicrosemi.doupgradeandreboot.DoUpgradeAndRebootOutput;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.system.rev20160505.ietfsystemmicrosemi.pullupdatetarfromtftp.PullUpdateTarFromTftpInput;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.system.rev20160505.ietfsystemmicrosemi.readfromsyslog.ReadFromSyslogInput;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.system.rev20160505.ietfsystemmicrosemi.readfromsyslog.ReadFromSyslogOutput;
+import org.onosproject.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.system.rev20140806.IetfSystem;
+import org.onosproject.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.system.rev20140806.IetfSystemOpParam;
+import org.onosproject.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.system.rev20140806.IetfSystemService;
+import org.onosproject.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.system.rev20140806.ietfsystem.systemrestart.SystemRestartInput;
+
+/**
+ * Implementation of the IetfService YANG model service.
+ */
+@Component(immediate = true, inherit = true)
+@Service
+public class IetfSystemManager extends AbstractYangServiceImpl
+ implements IetfSystemNetconfService {
+
+ protected final Pattern regexRemoveSystem =
+ Pattern.compile("(<system).*(</system>)", Pattern.DOTALL);
+ protected final Pattern regexRemoveSystemState =
+ Pattern.compile("(<system-state).*(</system-state>)", Pattern.DOTALL);
+
+ protected static final String IETF_SYSTEM = "org.onosproject.drivers.microsemi.yang.ietfsystem";
+
+ @Activate
+ public void activate() {
+ appId = coreService.registerApplication(IETF_SYSTEM);
+ ych = ymsService.getYangCodecHandler();
+ ych.addDeviceSchema(IetfSystemService.class);
+ ych.addDeviceSchema(IetfSystemMicrosemiService.class);
+ log.info("IetfSystemManager Started");
+ }
+
+ @Deactivate
+ public void deactivate() {
+ super.deactivate();
+ ymsService.unRegisterService(this, IetfSystemService.class);
+ ymsService.unRegisterService(this, IetfSystemMicrosemiService.class);
+ ych = null;
+ log.info("IetfSystemManager Stopped");
+ }
+
+ /**
+ * Get a filtered subset of the model.
+ * This is meant to filter the current live model
+ * against the attribute(s) given in the argument
+ * and return the filtered model.
+ * @throws NetconfException if the session has any error
+ */
+ @Override
+ public IetfSystem getIetfSystem(IetfSystemOpParam ietfSystemFilter, NetconfSession session)
+ throws NetconfException {
+ return (IetfSystem) getNetconfObject(ietfSystemFilter, session);
+ }
+
+ @Override
+ public IetfSystem getIetfSystemInit(NetconfSession session) throws NetconfException {
+ if (session == null) {
+ throw new NetconfException("Session is null when calling getIetfSystemInit()");
+ }
+
+ String xmlResult = session.get(getInitRequestBuilder(), null);
+
+ //The result will be a <system> followed by <system-state>
+ //YCH can decode only one at a time - split it and send half each time
+ IetfSystem.IetfSystemBuilder iBuilder = new IetfSystemOpParam.IetfSystemBuilder();
+
+ String xmlResultSystem = regexRemoveSystemState.matcher(xmlResult).replaceFirst("");
+ List<Object> objectListState = ych.decode(xmlResultSystem, XML, QUERY_REPLY);
+ if (objectListState != null && objectListState.size() > 0) {
+ IetfSystem system = (IetfSystem) objectListState.get(0);
+ iBuilder.system(system.system());
+ }
+
+ String xmlResultSystemState = regexRemoveSystem.matcher(xmlResult).replaceFirst("");
+ List<Object> objectListSystemState = ych.decode(xmlResultSystemState, XML, QUERY_REPLY);
+ if (objectListSystemState != null && objectListSystemState.size() > 0) {
+ IetfSystem system = (IetfSystem) objectListSystemState.get(0);
+ iBuilder.systemState(system.systemState());
+ }
+
+ return iBuilder.build();
+ }
+
+ /**
+ * Call NETCONF edit-config with a configuration.
+ */
+ @Override
+ public void setIetfSystem(IetfSystemOpParam ietfSystem, NetconfSession session, TargetConfig ncDs)
+ throws NetconfException {
+ setNetconfObject(ietfSystem, session, ncDs);
+ }
+
+ @Override
+ public void setCurrentDatetime(OffsetDateTime date, NetconfSession session)
+ throws NetconfException {
+ String xmlQueryStr = getSetCurrentDatetimeBuilder(date);
+ log.info("Sending <get> query on NETCONF session " + session.getSessionId() +
+ ":\n" + xmlQueryStr);
+
+ String xmlResult = session.doWrappedRpc(xmlQueryStr);
+ log.info("Result from NETCONF RPC <set-current-datetime>: {}", xmlResult);
+ }
+
+ @Override
+ public void systemRestart(SystemRestartInput inputVar, NetconfSession session) {
+ throw new UnsupportedOperationException("Not yet implemented");
+ }
+
+ @Override
+ public void systemShutdown(NetconfSession session) {
+ throw new UnsupportedOperationException("Not yet implemented");
+ }
+
+ @Override
+ public DoUpgradeAndRebootOutput doUpgradeAndReboot(DoUpgradeAndRebootInput inputVar, NetconfSession session)
+ throws NetconfException {
+ throw new UnsupportedOperationException("Not yet implemented");
+ }
+
+ @Override
+ public void pullUpdateTarFromTftp(PullUpdateTarFromTftpInput inputVar, NetconfSession session)
+ throws NetconfException {
+ throw new UnsupportedOperationException("Not yet implemented");
+ }
+
+ @Override
+ public ReadFromSyslogOutput readFromSyslog(ReadFromSyslogInput inputVar, NetconfSession session)
+ throws NetconfException {
+ throw new UnsupportedOperationException("Not yet implemented");
+ }
+
+
+ /**
+ * Builds a request crafted to get the configuration required to create
+ * details descriptions for the device.
+ *
+ * @return The request string.
+ */
+ private static String getInitRequestBuilder() {
+ StringBuilder rpc = new StringBuilder();
+ rpc.append("<system-state xmlns=\"urn:ietf:params:xml:ns:yang:ietf-system\" ");
+ rpc.append("xmlns:sysms=\"http://www.microsemi.com/microsemi-edge-assure/msea-system\">");
+ rpc.append("<platform>");
+ rpc.append("<os-release/>");
+ rpc.append("<sysms:device-identification>");
+ rpc.append("<sysms:serial-number/>");
+ rpc.append("</sysms:device-identification>");
+ rpc.append("</platform>");
+ rpc.append("<clock>");
+ rpc.append("<current-datetime/>");
+ rpc.append("</clock>");
+ rpc.append("</system-state>");
+ rpc.append("<system xmlns=\"urn:ietf:params:xml:ns:yang:ietf-system\" ");
+ rpc.append("xmlns:sysms=\"http://www.microsemi.com/microsemi-edge-assure/msea-system\">");
+ rpc.append("<sysms:longitude/>");
+ rpc.append("<sysms:latitude/>");
+ rpc.append("</system>");
+ return rpc.toString();
+ }
+
+ private static String getSetCurrentDatetimeBuilder(OffsetDateTime date) {
+ StringBuilder rpc = new StringBuilder();
+ rpc.append("<set-current-datetime xmlns=\"urn:ietf:params:xml:ns:yang:ietf-system\">");
+ rpc.append("<current-datetime>");
+ rpc.append(date.format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssxxx")));
+ rpc.append("</current-datetime>");
+ rpc.append("</set-current-datetime>");
+
+ return rpc.toString();
+ }
+}
diff --git a/drivers/microsemi/ea1000yang/src/main/java/org/onosproject/drivers/microsemi/yang/impl/MseaCfmManager.java b/drivers/microsemi/ea1000yang/src/main/java/org/onosproject/drivers/microsemi/yang/impl/MseaCfmManager.java
new file mode 100644
index 0000000..c2359ab
--- /dev/null
+++ b/drivers/microsemi/ea1000yang/src/main/java/org/onosproject/drivers/microsemi/yang/impl/MseaCfmManager.java
@@ -0,0 +1,221 @@
+/*
+ * Copyright 2017-present Open Networking Laboratory
+ *
+ * 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.
+ */
+package org.onosproject.drivers.microsemi.yang.impl;
+
+import static org.onosproject.yms.ych.YangProtocolEncodingFormat.XML;
+import static org.onosproject.yms.ydt.YmsOperationType.QUERY_REPLY;
+
+import java.util.List;
+
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
+import org.apache.felix.scr.annotations.Service;
+import org.onosproject.drivers.microsemi.yang.MseaCfmNetconfService;
+import org.onosproject.netconf.NetconfException;
+import org.onosproject.netconf.NetconfSession;
+import org.onosproject.netconf.TargetConfig;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.cfm.rev20160229.MseaCfm;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.cfm.rev20160229.MseaCfmOpParam;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.cfm.rev20160229.MseaCfmService;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.cfm.rev20160229.mseacfm.MseaCfmEventListener;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.cfm.rev20160229.mseacfm.abortloopback.AbortLoopbackInput;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.cfm.rev20160229.mseacfm.transmitlinktrace.TransmitLinktraceInput;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.cfm.rev20160229.mseacfm.transmitlinktrace.TransmitLinktraceOutput;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.cfm.rev20160229.mseacfm.transmitloopback.TransmitLoopbackInput;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.soam.fm.rev20160229.MseaSoamFmService;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.soam.pm.rev20160229.MseaSoamPmService;
+
+/**
+ * Implementation of the MseaCfmServiceNetconf YANG model service.
+ */
+@Component(immediate = true, inherit = true)
+@Service
+public class MseaCfmManager extends AbstractYangServiceImpl
+ implements MseaCfmNetconfService {
+
+ public static final String MSEA_CFM = "org.onosproject.drivers.microsemi.yang.mseacfmservice";
+
+ @Activate
+ public void activate() {
+ appId = coreService.registerApplication(MSEA_CFM);
+ ych = ymsService.getYangCodecHandler();
+ ych.addDeviceSchema(MseaCfmService.class);
+ ych.addDeviceSchema(MseaSoamFmService.class);
+ ych.addDeviceSchema(MseaSoamPmService.class);
+ log.info("MseaCfmService Started");
+ }
+
+ @Deactivate
+ public void deactivate() {
+ super.deactivate();
+ ymsService.unRegisterService(this, MseaCfmService.class);
+ ymsService.unRegisterService(this, MseaSoamFmService.class);
+ ymsService.unRegisterService(this, MseaSoamPmService.class);
+ ych = null;
+ log.info("MseaCfmService Stopped");
+ }
+
+ @Override
+ public MseaCfm getMepEssentials(String mdName, String maName, int mepId,
+ NetconfSession session) throws NetconfException {
+ if (session == null) {
+ throw new NetconfException("Session is null when calling getMepEssentials()");
+ }
+
+ String xmlQueryStr = buildMepQueryString(mdName, maName, mepId);
+ log.debug("Sending <get> for " +
+ " query on NETCONF session " + session.getSessionId() +
+ ":\n" + xmlQueryStr);
+
+ String xmlResult = session.get(xmlQueryStr, null);
+ //FIXME Line is removed because YCH decode does not know how to handle it
+ xmlResult = xmlResult.replaceAll("(<ccm-interval>)(3.3ms|10ms|100ms|1s)(</ccm-interval>)", "");
+ xmlResult = xmlResult.replaceAll("(<active-defects/>)", "");
+
+ List<Object> objectList = ych.decode(xmlResult, XML, QUERY_REPLY);
+ if (objectList != null && objectList.size() > 0) {
+ Object systemObject = objectList.get(0);
+ return (MseaCfm) systemObject;
+ } else {
+ throw new NetconfException("Failure of YCH decode - could not parse as MseaCfm: " + xmlResult);
+ }
+ }
+
+ @Override
+ public MseaCfm getSoamDm(String mdName, String maName, int mepId,
+ int dmId, NetconfSession session) throws NetconfException {
+ String xmlQueryStr = buildDmQueryString(mdName, maName, mepId, dmId);
+ log.debug("Sending <get> for " +
+ " query on NETCONF session " + session.getSessionId() +
+ ":\n" + xmlQueryStr);
+
+ String xmlResult = session.get(xmlQueryStr, null);
+
+ List<Object> objectList = ych.decode(xmlResult, XML, QUERY_REPLY);
+ if (objectList != null && objectList.size() > 0) {
+ Object systemObject = objectList.get(0);
+ return (MseaCfm) systemObject;
+ } else {
+ throw new NetconfException("Failure of YCH decode - could not parse as MseaCfm: " + xmlResult);
+ }
+ }
+
+ @Override
+ public void setMseaCfm(MseaCfmOpParam mseaCfm, NetconfSession session, TargetConfig targetDs)
+ throws NetconfException {
+ setNetconfObject(mseaCfm, session, targetDs);
+ }
+
+ /**
+ * Call RPCs on the device through NETCONF.
+ */
+ @Override
+ public void transmitLoopback(TransmitLoopbackInput inputVar, NetconfSession session) throws NetconfException {
+ throw new UnsupportedOperationException("Not yet implemented");
+ }
+
+ @Override
+ public void abortLoopback(AbortLoopbackInput inputVar, NetconfSession session) throws NetconfException {
+ throw new UnsupportedOperationException("Not yet implemented");
+ }
+
+ @Override
+ public TransmitLinktraceOutput transmitLinktrace(TransmitLinktraceInput inputVar, NetconfSession session)
+ throws NetconfException {
+ throw new UnsupportedOperationException("Not yet implemented");
+ }
+
+ @Override
+ public void addListener(MseaCfmEventListener listener) {
+ throw new UnsupportedOperationException("Not yet implemented");
+ }
+
+ @Override
+ public void removeListener(MseaCfmEventListener listener) {
+ throw new UnsupportedOperationException("Not yet implemented");
+ }
+
+ private String buildMepQueryString(String mdName, String maName, int mepId) {
+ StringBuilder rpc = new StringBuilder();
+
+ rpc.append("<mef-cfm xmlns=\"http://www.microsemi.com/microsemi-edge-assure/msea-cfm\" ");
+ rpc.append(" xmlns:msea-soam-fm=\"http://www.microsemi.com/microsemi-edge-assure/msea-soam-fm\" ");
+ rpc.append("xmlns:msea-soam-pm=\"http://www.microsemi.com/microsemi-edge-assure/msea-soam-pm\">\n");
+ rpc.append("<maintenance-domain>\n");
+ rpc.append("<id/>\n");
+ rpc.append("<name>" + mdName + "</name>\n");
+ rpc.append("<md-level/>\n");
+ rpc.append("<maintenance-association>\n");
+ rpc.append("<id/>\n");
+ rpc.append("<name>" + maName + "</name>\n");
+// rpc.append("<ccm-interval>10ms</ccm-interval>\n"); //Have to omit for the moment - YMS problem
+ rpc.append("<remote-meps/>\n");
+ rpc.append("<component-list/>\n");
+ rpc.append("<maintenance-association-end-point>\n");
+ rpc.append("<mep-identifier>" + mepId + "</mep-identifier>\n");
+ rpc.append("<interface/>\n");
+ rpc.append("<primary-vid/>\n");
+ rpc.append("<administrative-state/>\n");
+ rpc.append("<ccm-ltm-priority/>\n");
+ rpc.append("<continuity-check/>\n");
+ rpc.append("<mac-address/>\n");
+ rpc.append("<msea-soam-fm:port-status/>\n");
+ rpc.append("<msea-soam-fm:interface-status/>\n");
+// rpc.append("<msea-soam-fm:last-defect-sent/>\n");//Have to omit for the moment - YMS problem
+ rpc.append("<msea-soam-fm:rdi-transmit-status/>\n");
+ rpc.append("<loopback/>\n");
+ rpc.append("<remote-mep-database/>\n");
+ rpc.append("<linktrace/>\n");
+ rpc.append("</maintenance-association-end-point>\n");
+ rpc.append("</maintenance-association>\n");
+ rpc.append("</maintenance-domain>\n");
+ rpc.append("</mef-cfm>");
+
+ return rpc.toString();
+ }
+
+
+ private String buildDmQueryString(String mdName, String maName, int mepId, int dmId) {
+ StringBuilder rpc = new StringBuilder();
+
+ rpc.append("<mef-cfm xmlns=\"http://www.microsemi.com/microsemi-edge-assure/msea-cfm\" ");
+ rpc.append(" xmlns:msea-soam-fm=\"http://www.microsemi.com/microsemi-edge-assure/msea-soam-fm\" ");
+ rpc.append("xmlns:msea-soam-pm=\"http://www.microsemi.com/microsemi-edge-assure/msea-soam-pm\">\n");
+ rpc.append("<maintenance-domain>\n");
+ rpc.append("<id/>\n");
+ rpc.append("<name>" + mdName + "</name>\n");
+ rpc.append("<md-level/>\n");
+ rpc.append("<maintenance-association>\n");
+ rpc.append("<id/>\n");
+ rpc.append("<name>" + maName + "</name>\n");
+// rpc.append("<ccm-interval>10ms</ccm-interval>\n"); //Have to omit for the moment - YMS problem
+ rpc.append("<maintenance-association-end-point>\n");
+ rpc.append("<mep-identifier>" + mepId + "</mep-identifier>\n");
+ rpc.append("<msea-soam-pm:delay-measurements>");
+ rpc.append("<msea-soam-pm:delay-measurement>");
+ rpc.append("<msea-soam-pm:dm-id>" + dmId + "</msea-soam-pm:dm-id>");
+ rpc.append("</msea-soam-pm:delay-measurement>");
+ rpc.append("</msea-soam-pm:delay-measurements>");
+ rpc.append("</maintenance-association-end-point>\n");
+ rpc.append("</maintenance-association>\n");
+ rpc.append("</maintenance-domain>\n");
+ rpc.append("</mef-cfm>");
+
+ return rpc.toString();
+ }
+
+}
diff --git a/drivers/microsemi/ea1000yang/src/main/java/org/onosproject/drivers/microsemi/yang/impl/MseaSaFilteringManager.java b/drivers/microsemi/ea1000yang/src/main/java/org/onosproject/drivers/microsemi/yang/impl/MseaSaFilteringManager.java
new file mode 100644
index 0000000..eeba11e
--- /dev/null
+++ b/drivers/microsemi/ea1000yang/src/main/java/org/onosproject/drivers/microsemi/yang/impl/MseaSaFilteringManager.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2017-present Open Networking Laboratory
+ *
+ * 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.
+ */
+package org.onosproject.drivers.microsemi.yang.impl;
+
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
+import org.apache.felix.scr.annotations.Service;
+import org.onosproject.drivers.microsemi.yang.MseaSaFilteringNetconfService;
+import org.onosproject.netconf.NetconfException;
+import org.onosproject.netconf.NetconfSession;
+import org.onosproject.netconf.TargetConfig;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.sa.filtering.rev20160412.MseaSaFiltering;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.sa.filtering.rev20160412.MseaSaFilteringOpParam;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.sa.filtering.rev20160412.MseaSaFilteringService;
+
+/**
+ * Implementation of the MseaSaFiltering YANG model service.
+ */
+@Component(immediate = true, inherit = true)
+@Service
+public class MseaSaFilteringManager extends AbstractYangServiceImpl
+ implements MseaSaFilteringNetconfService {
+ public static final String MSEA_SA_FILTERING = "org.onosproject.drivers.microsemi.yang.mseasafiltering";
+
+ @Activate
+ public void activate() {
+ appId = coreService.registerApplication(MSEA_SA_FILTERING);
+ ych = ymsService.getYangCodecHandler();
+ ych.addDeviceSchema(MseaSaFilteringService.class);
+ log.info("MseaSaFilteringManager Started");
+ }
+
+ @Deactivate
+ public void deactivate() {
+ super.deactivate();
+ ymsService.unRegisterService(this, MseaSaFilteringService.class);
+ ych = null;
+ log.info("MseaSaFilteringManager Stopped");
+ }
+
+ /**
+ * Get a filtered subset of the model.
+ * This is meant to filter the current live model
+ * against the attribute(s) given in the argument
+ * and return the filtered model.
+ */
+ @Override
+ public MseaSaFiltering getMseaSaFiltering(MseaSaFilteringOpParam mseaSaFilteringFilter, NetconfSession session)
+ throws NetconfException {
+ return (MseaSaFiltering) getNetconfObject(mseaSaFilteringFilter, session);
+ }
+
+ /**
+ * Call NETCONF edit-config with a configuration.
+ */
+ @Override
+ public void setMseaSaFiltering(
+ MseaSaFilteringOpParam mseaSaFiltering, NetconfSession session, TargetConfig ncDs)
+ throws NetconfException {
+ setNetconfObject(mseaSaFiltering, session, ncDs);
+ }
+}
diff --git a/drivers/microsemi/ea1000yang/src/main/java/org/onosproject/drivers/microsemi/yang/impl/MseaUniEvcServiceManager.java b/drivers/microsemi/ea1000yang/src/main/java/org/onosproject/drivers/microsemi/yang/impl/MseaUniEvcServiceManager.java
new file mode 100644
index 0000000..82b6116
--- /dev/null
+++ b/drivers/microsemi/ea1000yang/src/main/java/org/onosproject/drivers/microsemi/yang/impl/MseaUniEvcServiceManager.java
@@ -0,0 +1,226 @@
+/*
+ * Copyright 2017-present Open Networking Laboratory
+ *
+ * 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.
+ */
+package org.onosproject.drivers.microsemi.yang.impl;
+
+import static org.onosproject.yms.ych.YangProtocolEncodingFormat.XML;
+import static org.onosproject.yms.ydt.YmsOperationType.QUERY_CONFIG_REPLY;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
+import org.apache.felix.scr.annotations.Service;
+import org.onosproject.drivers.microsemi.yang.MseaUniEvcServiceNetconfService;
+import org.onosproject.netconf.NetconfException;
+import org.onosproject.netconf.NetconfSession;
+import org.onosproject.netconf.TargetConfig;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.uni.evc.service.rev20160317.MseaUniEvcService;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.uni.evc.service.rev20160317.MseaUniEvcServiceOpParam;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.uni.evc.service.rev20160317.MseaUniEvcServiceService;
+import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.uni.evc.service.rev20160317.mseaunievcservice.mefservices.uni.UniSideInterfaceAssignmentEnum;
+
+/**
+ * Implementation of the MseaUniEvcServiceService YANG model service.
+ */
+@Component(immediate = true, inherit = true)
+@Service
+public class MseaUniEvcServiceManager extends AbstractYangServiceImpl
+ implements MseaUniEvcServiceNetconfService {
+ public static final String MSEA_SA_FILTERING = "org.onosproject.drivers.microsemi.yang.mseaunievcservice";
+
+ @Activate
+ public void activate() {
+ appId = coreService.registerApplication(MSEA_SA_FILTERING);
+ ych = ymsService.getYangCodecHandler();
+ ych.addDeviceSchema(MseaUniEvcServiceService.class);
+ log.info("MseaUniEvcServiceManager Started");
+ }
+
+ @Deactivate
+ public void deactivate() {
+ super.deactivate();
+ ymsService.unRegisterService(this, MseaUniEvcServiceService.class);
+ ych = null;
+ log.info("MseaUniEvcServiceManager Stopped");
+ }
+
+ @Override
+ public MseaUniEvcService getMseaUniEvcService(
+ MseaUniEvcServiceOpParam mseaUniEvcService, NetconfSession session) throws NetconfException {
+ return (MseaUniEvcService) getNetconfObject(mseaUniEvcService, session);
+ }
+
+ @Override
+ public MseaUniEvcService getConfigMseaUniEvcService(
+ MseaUniEvcServiceOpParam mseaUniEvcService, NetconfSession session, TargetConfig targetDs)
+ throws NetconfException {
+ return (MseaUniEvcService) getConfigNetconfObject(mseaUniEvcService, session, targetDs);
+ }
+
+ /**
+ * Modify the configuration.
+ */
+ @Override
+ public void setMseaUniEvcService(
+ MseaUniEvcServiceOpParam mseaUniEvcService, NetconfSession session, TargetConfig ncDs)
+ throws NetconfException {
+ setNetconfObject(mseaUniEvcService, session, ncDs);
+ }
+
+ @Override
+ public MseaUniEvcService getmseaUniEvcCeVlanMaps(
+ NetconfSession session, TargetConfig ncDs)
+ throws NetconfException {
+ if (session == null) {
+ throw new NetconfException("Session is null when calling getMseaSaFiltering()");
+ }
+
+ String xmlResult = session.getConfig(ncDs, evcFilterQuery());
+
+ List<Object> objectList = ych.decode(xmlResult, XML, QUERY_CONFIG_REPLY);
+ if (objectList != null && objectList.size() > 0) {
+ return (MseaUniEvcService) objectList.get(0);
+ }
+
+ return null;
+ }
+
+ @Override
+ public void removeEvcUniFlowEntries(
+ Map<Integer, String> ceVlanUpdates,
+ Map<Integer, List<Short>> flowVlanIds,
+ NetconfSession session, TargetConfig targetDs,
+ UniSideInterfaceAssignmentEnum portAssign) throws NetconfException {
+
+ List<Integer> evcAlreadyHandled = new ArrayList<>();
+ StringBuilder xmlEvcUpdate = new StringBuilder(evcUniOpener());
+ for (Integer evcKey:ceVlanUpdates.keySet()) {
+ int evcId = (evcKey & ((1 << 8) - 100)) >> 2;
+ if (evcAlreadyHandled.contains(new Integer(evcId))) {
+ continue;
+ }
+ evcAlreadyHandled.add(evcId);
+ int port = (evcKey & 3);
+ String ceVlanMapThis = ceVlanUpdates.get(evcKey);
+ String ceVlanMapOpposite = ceVlanUpdates.get(evcKey ^ 1);
+
+ if ((ceVlanMapThis == null || ceVlanMapThis.isEmpty()) &&
+ (ceVlanMapOpposite == null || ceVlanMapOpposite.isEmpty())) {
+ xmlEvcUpdate.append("<evc nc:operation=\"delete\">\n<evc-index>");
+ xmlEvcUpdate.append(Integer.toString(evcId));
+ xmlEvcUpdate.append("</evc-index>\n</evc>\n");
+ } else {
+ xmlEvcUpdate.append("<evc>\n<evc-index>");
+ xmlEvcUpdate.append(Integer.toString(evcId));
+ xmlEvcUpdate.append("</evc-index>\n<evc-per-uni>\n");
+ if (port == 0 && portAssign == UniSideInterfaceAssignmentEnum.UNI_C_ON_OPTICS ||
+ port == 1 && portAssign == UniSideInterfaceAssignmentEnum.UNI_C_ON_HOST) {
+ if (ceVlanMapThis != null) {
+ xmlEvcUpdate.append("<evc-per-uni-c>\n<ce-vlan-map nc:operation=\"replace\">");
+ xmlEvcUpdate.append(ceVlanMapThis);
+ xmlEvcUpdate.append("</ce-vlan-map>\n");
+ xmlEvcUpdate.append(deleteFlowMapping(flowVlanIds.get(evcKey)));
+ xmlEvcUpdate.append("</evc-per-uni-c>\n");
+ }
+ if (ceVlanMapOpposite != null) {
+ xmlEvcUpdate.append("<evc-per-uni-n>\n<ce-vlan-map nc:operation=\"replace\">");
+ xmlEvcUpdate.append(ceVlanMapOpposite);
+ xmlEvcUpdate.append("</ce-vlan-map>\n");
+ xmlEvcUpdate.append(deleteFlowMapping(flowVlanIds.get(evcKey ^ 1)));
+ xmlEvcUpdate.append("</evc-per-uni-n>\n");
+ }
+ } else {
+ if (ceVlanMapThis != null) {
+ xmlEvcUpdate.append("<evc-per-uni-n>\n<ce-vlan-map nc:operation=\"replace\">");
+ xmlEvcUpdate.append(ceVlanMapThis);
+ xmlEvcUpdate.append("</ce-vlan-map>\n");
+ xmlEvcUpdate.append(deleteFlowMapping(flowVlanIds.get(evcKey)));
+ xmlEvcUpdate.append("</evc-per-uni-n>\n");
+ }
+ if (ceVlanMapOpposite != null) {
+ xmlEvcUpdate.append("<evc-per-uni-c>\n<ce-vlan-map nc:operation=\"replace\">");
+ xmlEvcUpdate.append(ceVlanMapOpposite);
+ xmlEvcUpdate.append("</ce-vlan-map>\n");
+ xmlEvcUpdate.append(deleteFlowMapping(flowVlanIds.get(evcKey ^ 1)));
+ xmlEvcUpdate.append("</evc-per-uni-c>\n");
+ }
+ }
+
+ xmlEvcUpdate.append("</evc-per-uni>\n</evc>\n");
+ }
+ }
+ xmlEvcUpdate.append("</uni>\n</mef-services>");
+
+ log.info("Sending XML <edit-config> on NETCONF session " + session.getSessionId() +
+ ":\n" + xmlEvcUpdate.toString());
+
+
+ session.editConfig(targetDs, null, xmlEvcUpdate.toString());
+ }
+
+
+ private static String deleteFlowMapping(List<Short> vlanIds) {
+ if (vlanIds == null || vlanIds.size() == 0) {
+ return "";
+ }
+ StringBuilder fmXmlBuilder = new StringBuilder();
+ for (long vlanId:vlanIds) {
+ fmXmlBuilder.append("<flow-mapping nc:operation=\"delete\">\n");
+ fmXmlBuilder.append("<ce-vlan-id>");
+ fmXmlBuilder.append(String.valueOf(vlanId));
+ fmXmlBuilder.append("</ce-vlan-id>\n");
+ fmXmlBuilder.append("</flow-mapping>\n");
+ }
+
+ return fmXmlBuilder.toString();
+ }
+
+ private String evcFilterQuery() {
+ StringBuilder sb = new StringBuilder("<mef-services "
+ + "xmlns=\"http://www.microsemi.com/microsemi-edge-assure/msea-uni-evc-service\">");
+ sb.append("<uni>");
+ sb.append("<evc>");
+ sb.append("<evc-index/>");
+ sb.append("<evc-per-uni>");
+ sb.append("<evc-per-uni-c>");
+ sb.append("<ce-vlan-map/>");
+ sb.append("<flow-mapping/>");
+ sb.append("<ingress-bwp-group-index/>");
+ sb.append("</evc-per-uni-c>");
+ sb.append("<evc-per-uni-n>");
+ sb.append("<ce-vlan-map/>");
+ sb.append("<flow-mapping/>");
+ sb.append("<ingress-bwp-group-index/>");
+ sb.append("</evc-per-uni-n>");
+ sb.append("</evc-per-uni>");
+ sb.append("</evc>");
+ sb.append("</uni>");
+ sb.append("</mef-services>");
+
+ return sb.toString();
+ }
+
+ private String evcUniOpener() {
+ StringBuilder sb = new StringBuilder("<mef-services ");
+ sb.append("xmlns=\"http://www.microsemi.com/microsemi-edge-assure/msea-uni-evc-service\">\n");
+ sb.append("<uni>\n");
+
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/drivers/microsemi/ea1000yang/src/main/java/org/onosproject/drivers/microsemi/yang/impl/package-info.java b/drivers/microsemi/ea1000yang/src/main/java/org/onosproject/drivers/microsemi/yang/impl/package-info.java
new file mode 100644
index 0000000..ccf0dd2
--- /dev/null
+++ b/drivers/microsemi/ea1000yang/src/main/java/org/onosproject/drivers/microsemi/yang/impl/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2017-present Open Networking Laboratory
+ *
+ * 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.
+ */
+
+/**
+ * Package for Microsemi device drivers support for NETCONF for EA1000.
+ */
+package org.onosproject.drivers.microsemi.yang.impl;
\ No newline at end of file