Cleaning up unused code in Microsemi driver
Change-Id: If7e9790d9141324dff084e41d040ba0132141de8
diff --git a/drivers/microsemi/BUCK b/drivers/microsemi/BUCK
index 398fff7..80ef2c8 100644
--- a/drivers/microsemi/BUCK
+++ b/drivers/microsemi/BUCK
@@ -4,6 +4,7 @@
'//drivers/utilities:onos-drivers-utilities',
'//protocols/netconf/api:onos-protocols-netconf-api',
'//protocols/netconf/ctl:onos-protocols-netconf-ctl',
+ '//models/common:onos-models-common',
'//models/microsemi:onos-models-microsemi',
'//lib:org.apache.karaf.shell.console',
'//incubator/api:onos-incubator-api',
@@ -24,6 +25,7 @@
'org.onosproject.netconf',
'org.onosproject.netconfsb',
'org.onosproject.drivers.netconf',
+ 'org.onosproject.models.common',
'org.onosproject.models.microsemi'
]
diff --git a/drivers/microsemi/README.md b/drivers/microsemi/README.md
index 36f5416..e821fcd 100644
--- a/drivers/microsemi/README.md
+++ b/drivers/microsemi/README.md
@@ -28,7 +28,7 @@
* The name must follow the format **netconf:ipaddr:port**
* The **ip** and **port** must correspond to the ip and port in the name (above).
-```json
+```js
{
"devices": {
"netconf:192.168.56.10:830": {
@@ -36,7 +36,10 @@
"username": "admin",
"password": "admin",
"ip": "192.168.56.10",
- "port": "830"
+ "port": 830,
+ "connect-timeout": 50,
+ "reply-timeout": 50,
+ "idle-timeout": 40
},
"basic": {
"driver": "microsemi-netconf",
@@ -85,7 +88,7 @@
A feature of the EA1000 that may be configured through Flow Rules is IP Source Address Filtering. This can only be activated on Port 0 (the optics Port). An example of this kind of flow is
`POST /onos/v1/flows/ HTTP/1.1`<br/>
-```json
+```js
{
"flows": [
{
@@ -96,8 +99,8 @@
"tableId": 8,
"treatment": {
"instructions": [ {"type": "NOACTION"} ],
- "deferred": []
- },
+ "deferred": []
+ },
"selector": {
"criteria": [
{"type": "IPV4_SRC", "ip": "192.168.8.0/24"},
@@ -115,7 +118,7 @@
Flows that Push, Pop or Overwrite VLAN tags are implemented in EA1000 and are treated as MEF Carrier Ethernet EVCs. Both CTags and STags can be pushed on to matching Ethernet packets at network Layer 2.
`POST /onos/v1/flows/ HTTP/1.1`<br/>
-```json
+```js
{
"flows": [
{
@@ -268,7 +271,7 @@
This will not exist by default since Link Discovery is not yet a feature of the EA1000 driver. These have to be created manually - through the network/configuration REST API.
`POST /onos/v1/network/configuration/ HTTP/1.1`<br/>
-```json
+```js
{
"links": {
"netconf:192.168.56.10:830/0-netconf:192.168.56.20:830/0": { // 10 to 20
@@ -388,4 +391,105 @@
```
## EVC Deletion
-EVCs can be deleted individually with **ce-evc-remove <evc-id>** or all together with **ce-evc-remove-all**.
\ No newline at end of file
+EVCs can be deleted individually with **ce-evc-remove <evc-id>** or all together with **ce-evc-remove-all**.
+
+# Support for Layer 2 Monitoring
+EA1000 supports both Connectivity Fault Management (CFM) and MEF Services OAM. This is achieved through the EA1000 driver supporting the ONOS behaviors CfmMepProgrammable and SoamDmProgrammable described in [Layer 2 Monitoring with CFM and Services OAM](https://wiki.onosproject.org/display/ONOS/Layer+2+Monitoring+with+CFM+and+Services+OAM).
+
+With EA1000 the CFM entities (Maintenance Association Endpoints or MEPs) are created in parallel with the EVC services that they are designed to test, and related loosely to each other only through VLAN ID.
+For instance an EVC might be created with a VLAN of 101, and separately a Maintenance Association would be created with the same VLAN ID, and MEPs created under this for monitoring that VLAN (and by inference that EVC).
+
+The CFM interface to ONOS is exposed through a REST API at /onos/cfm
+In ONOS Maintenance Domains and Maintenance Associations beneath them are created and persisted in a distributed datastore. These are logical entities that can span across an ONOS cluster and are not directly related to devices.
+
+The Maintenance Association Endpoint - MEP (the child of the Maintenance Association, and grandchild of the Maintenance Domain) is also a logical entity but has a hard many:1 association to a device that supports the CfmMepProgrammable behaviour. EA1000 is one such device, and so one to many MEPs can be associated with an EA1000 device.
+
+For example to create an Maintenance Domain in ONOS the following might be POSTed to
+`POST http://localhost:8181/onos/cfm/md HTTP/1.1`</br>
+```js
+{"md": {
+ "mdName": "Microsemi",
+ "mdNameType": "CHARACTERSTRING",
+ "mdLevel": "LEVEL3",
+ "mdNumericId": 1
+ }
+}
+```
+
+To create a Maintenance Association under this
+`POST http://localhost:8181/onos/cfm/md/Microsemi/ma HTTP/1.1`</br>
+```js
+{
+ "ma": {
+ "maName": "ma-vlan-1",
+ "maNameType": "CHARACTERSTRING",
+ "maNumericId": 1,
+ "ccm-interval": "INTERVAL_1S",
+ "component-list": [
+ { "component": {
+ "component-id":"1",
+ "tag-type": "VLAN_STAG",
+ "vid-list": [
+ {"vid":1}
+ ]
+ }
+ }
+ ],
+ "rmep-list": [
+ { "rmep":10 },
+ { "rmep":20 },
+ { "rmep":30 }
+ ]
+ }
+}
+```
+
+To create a MEP under this:
+`POST http://localhost:8181/onos/cfm/md/Microsemi/ma/ma-vlan-1/mep HTTP/1.1`</br>
+```js
+{
+ "mep": {
+ "mepId": 10,
+ "deviceId": "netconf:10.205.86.26:830",
+ "port": 0,
+ "direction": "DOWN_MEP",
+ "primary-vid": 1,
+ "administrative-state": true,
+ "ccm-ltm-priority": 4,
+ "cci-enabled" :true
+ }
+}
+```
+
+When the MEP is created a configuration is written down to the EA1000 device at 10.205.86.26 through NETCONF roughly in the format:
+```xml
+<maintenance-domain>
+ <id>1</id>
+ <name>Microsemi</name>
+ <name-type>CHARACTER_STRING</name-type>
+ <md-level>3</md-level>
+ <maintenance-association>
+ <id>1</id>
+ <name>ma-vlan-1</name>
+ <name-type>CHARACTER_STRING</name-type>
+ <component-list>
+ <tag-type>vlan-stag</tag-type>
+ <vid>1</vid>
+ </component-list>
+ <remote-mep>10</remote-mep>
+ <remote-mep>20</remote-mep>
+ <remote-mep>30</remote-mep>
+ <maintenance-association-endpoint>
+ <mep-identifier>10</mep-identifier>
+ ...
+ </maintenance-association-endpoint>
+ </maintenance-association>
+</maintenance-domain>
+```
+
+There are a few things to note here:
+* On EA1000 the MD and MA are indexed by their _id_ and not by name. This means that it is essential when working with EA1000 that all MD's and MA's have a numeric ID specified, and that the numeric IDs of Maintenance Domains should be unique. The numeric IDs of Maintenance Associations should be unique _within_ Maintenance Domains.
+* The component list is flattened down to a singleton object. While in the CFM model many Components are possible, EA1000 supports only 1
+* With Remote Meps - the local and all remote meps must be specified by their ID. In this instance 10 is the local on device 10.205.86.26 and 20 and 30 are remote meps that we expect will be local to some other devices
+* Even though the write to the EA1000 only happens when the MEP is created it brings down the MD and MA to the device with it.
+* When the MEP is deleted the MD and MA are left behind on the device. If the MD and MA were then to be changed in ONOS and a new MEP pushed down to the device, there would be an error, as the MD and MA would remain on the device since the earlier time. To remedy this, the MD and MA would need to be deleted manually through yangcli-pro.
diff --git a/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/Ea1000DeviceDescription.java b/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/Ea1000DeviceDescription.java
index 43c76f1..34274e2 100644
--- a/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/Ea1000DeviceDescription.java
+++ b/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/Ea1000DeviceDescription.java
@@ -83,16 +83,21 @@
IetfSystem system = ietfSystemService.getIetfSystemInit(session);
if (system != null && system.systemState() != null) {
swVersion = system.systemState().platform().osRelease();
- AugmentedSysPlatform augmentedSysPlatform =
+ AugmentedSysPlatform augmentedSysStatePlatform =
(AugmentedSysPlatform) system.systemState()
.platform().augmentation(DefaultAugmentedSysPlatform.class);
- serialNumber = augmentedSysPlatform.deviceIdentification().serialNumber();
+ if (augmentedSysStatePlatform != null && augmentedSysStatePlatform.deviceIdentification() != null) {
+ serialNumber = augmentedSysStatePlatform.deviceIdentification().serialNumber();
+ } else {
+ log.warn("Serial Number of device not available: {}", handler().data().deviceId());
+ }
DateAndTime deviceDateAndTime = system.systemState().clock().currentDatetime();
OffsetDateTime odt =
OffsetDateTime.parse(deviceDateAndTime.string(), DateTimeFormatter.ISO_OFFSET_DATE_TIME);
if (odt.getYear() < OffsetDateTime.now(ZoneId.of("UTC")).getYear()) {
OffsetDateTime nowUtc = OffsetDateTime.now(ZoneId.of("UTC"));
- log.warn("Date on device is in the past: {}. Setting it to {}", odt.toString(), nowUtc);
+ log.warn("Date on device {} is in the past: {}. Setting it to {}",
+ handler().data().deviceId(), odt.toString(), nowUtc);
ietfSystemService.setCurrentDatetime(nowUtc, session);
}
}
diff --git a/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/IetfSystemNetconfService.java b/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/IetfSystemNetconfService.java
index 32e77b1..d72050e 100644
--- a/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/IetfSystemNetconfService.java
+++ b/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/IetfSystemNetconfService.java
@@ -20,14 +20,8 @@
import org.onosproject.netconf.DatastoreId;
import org.onosproject.netconf.NetconfException;
import org.onosproject.netconf.NetconfSession;
-import org.onosproject.yang.gen.v1.ietfsystemmicrosemi.rev20160505.ietfsystemmicrosemi.doupgradeandreboot.DoUpgradeAndRebootInput;
-import org.onosproject.yang.gen.v1.ietfsystemmicrosemi.rev20160505.ietfsystemmicrosemi.doupgradeandreboot.DoUpgradeAndRebootOutput;
-import org.onosproject.yang.gen.v1.ietfsystemmicrosemi.rev20160505.ietfsystemmicrosemi.pullupdatetarfromtftp.PullUpdateTarFromTftpInput;
-import org.onosproject.yang.gen.v1.ietfsystemmicrosemi.rev20160505.ietfsystemmicrosemi.readfromsyslog.ReadFromSyslogInput;
-import org.onosproject.yang.gen.v1.ietfsystemmicrosemi.rev20160505.ietfsystemmicrosemi.readfromsyslog.ReadFromSyslogOutput;
import org.onosproject.yang.gen.v1.ietfsystem.rev20140806.IetfSystem;
import org.onosproject.yang.gen.v1.ietfsystem.rev20140806.IetfSystemOpParam;
-import org.onosproject.yang.gen.v1.ietfsystem.rev20140806.ietfsystem.systemrestart.SystemRestartInput;
/**
* Extension of ietfSystemService to include NETCONF sessions.
@@ -76,15 +70,6 @@
void setCurrentDatetime(OffsetDateTime date, NetconfSession session) throws NetconfException;
/**
- * Service interface of systemRestart.
- *
- * @param inputVar input of service interface systemRestart
- * @param session An active NETCONF session
- * @throws NetconfException if the session has any error
- */
- void systemRestart(SystemRestartInput inputVar, NetconfSession session) throws NetconfException;
-
- /**
* Service interface of systemShutdown.
*
* @param session An active NETCONF session
@@ -92,36 +77,4 @@
*/
void systemShutdown(NetconfSession session) throws NetconfException;
- /**
- * Service interface of doUpgradeAndReboot.
- *
- * @param inputVar input of service interface doUpgradeAndReboot
- * @param session An active NETCONF session
- * @return doUpgradeAndRebootOutput output of service interface doUpgradeAndReboot
- * @throws NetconfException if the session has any error
- */
- DoUpgradeAndRebootOutput doUpgradeAndReboot(DoUpgradeAndRebootInput inputVar, NetconfSession session)
- throws NetconfException;
-
- /**
- * Service interface of pullUpdateTarFromTftp.
- *
- * @param inputVar input of service interface pullUpdateTarFromTftp
- * @param session An active NETCONF session
- * @throws NetconfException if the session has any error
- */
- void pullUpdateTarFromTftp(PullUpdateTarFromTftpInput inputVar, NetconfSession session)
- throws NetconfException;
-
- /**
- * Service interface of readFromSyslog.
- *
- * @param inputVar input of service interface readFromSyslog
- * @param session An active NETCONF session
- * @return readFromSyslogOutput output of service interface readFromSyslog
- * @throws NetconfException if the session has any error
- */
- ReadFromSyslogOutput readFromSyslog(ReadFromSyslogInput inputVar, NetconfSession session)
- throws NetconfException;
-
}
diff --git a/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/MicrosemiModelRegistrator.java b/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/MicrosemiModelRegistrator.java
deleted file mode 100644
index a075d83..0000000
--- a/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/MicrosemiModelRegistrator.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright 2017-present Open Networking 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.
- */
-package org.onosproject.drivers.microsemi.yang;
-
-import com.google.common.collect.ImmutableMap;
-import org.apache.felix.scr.annotations.Component;
-import org.onosproject.yang.AbstractYangModelRegistrator;
-import org.onosproject.yang.gen.v1.entitystatetcmib.rev20051122.EntityStateTcMib;
-import org.onosproject.yang.gen.v1.fpgainternal.rev20151130.FpgaInternal;
-import org.onosproject.yang.gen.v1.ianacrypthash.rev20140806.IanaCryptHash;
-import org.onosproject.yang.gen.v1.ianaiftype.rev20140508.IanaIfType;
-import org.onosproject.yang.gen.v1.ieeetypes.rev20080522.IeeeTypes;
-import org.onosproject.yang.gen.v1.ietfinettypes.rev20130715.IetfInetTypes;
-import org.onosproject.yang.gen.v1.ietfinterfaces.rev20140508.IetfInterfaces;
-import org.onosproject.yang.gen.v1.ietfnetconf.rev20110601.IetfNetconf;
-import org.onosproject.yang.gen.v1.ietfnetconfacm.rev20120222.IetfNetconfAcm;
-import org.onosproject.yang.gen.v1.ietfnetconfmonitoring.rev20101004.IetfNetconfMonitoring;
-import org.onosproject.yang.gen.v1.ietfnetconfnotifications.rev20120206.IetfNetconfNotifications;
-import org.onosproject.yang.gen.v1.ietfnetconfwithdefaults.rev20100609.IetfNetconfWithDefaults;
-import org.onosproject.yang.gen.v1.ietfsystem.rev20140806.IetfSystem;
-import org.onosproject.yang.gen.v1.ietfsystemmicrosemi.rev20160505.IetfSystemMicrosemi;
-import org.onosproject.yang.gen.v1.ietfsystemtlsauth.rev20140524.IetfSystemTlsAuth;
-import org.onosproject.yang.gen.v1.ietfx509certtoname.rev20130326.IetfX509CertToName;
-import org.onosproject.yang.gen.v1.ietfyangtypes.rev20130715.IetfYangTypes;
-import org.onosproject.yang.gen.v1.mseacfm.rev20160229.MseaCfm;
-import org.onosproject.yang.gen.v1.mseasafiltering.rev20160412.MseaSaFiltering;
-import org.onosproject.yang.gen.v1.mseasoamfm.rev20160229.MseaSoamFm;
-import org.onosproject.yang.gen.v1.mseasoampm.rev20160229.MseaSoamPm;
-import org.onosproject.yang.gen.v1.mseatypes.rev20160229.MseaTypes;
-import org.onosproject.yang.gen.v1.mseaunievcinterface.rev20160317.MseaUniEvcInterface;
-import org.onosproject.yang.gen.v1.mseaunievcservice.rev20160317.MseaUniEvcService;
-import org.onosproject.yang.gen.v1.ncnotifications.rev20080714.NcNotifications;
-import org.onosproject.yang.gen.v1.netopeercfgnetopeer.rev20130214.NetopeerCfgnetopeer;
-import org.onosproject.yang.gen.v1.notifications.rev20080714.Notifications;
-import org.onosproject.yang.gen.v1.rfc2544.rev20151020.Rfc2544;
-import org.onosproject.yang.gen.v1.svcactivationtypes.rev20151027.SvcActivationTypes;
-import org.onosproject.yang.gen.v1.y1564.rev20151029.Y1564;
-import org.onosproject.yang.model.DefaultYangModuleId;
-import org.onosproject.yang.model.YangModuleId;
-import org.onosproject.yang.runtime.AppModuleInfo;
-import org.onosproject.yang.runtime.DefaultAppModuleInfo;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Representation of Microsemi model registrator which registers Microsemi device
- * models.
- */
-@Component(immediate = true)
-public class MicrosemiModelRegistrator extends AbstractYangModelRegistrator {
-
- public MicrosemiModelRegistrator() {
- super(IetfSystem.class, getAppInfo());
- }
-
- private static Map<YangModuleId, AppModuleInfo> getAppInfo() {
- Map<YangModuleId, AppModuleInfo> appInfo = new HashMap<>();
-
- appInfo.put(new DefaultYangModuleId("fpga-internal", "2015-11-30"),
- new DefaultAppModuleInfo(FpgaInternal.class, null));
- appInfo.put(new DefaultYangModuleId("iana-if-type", "2014-05-08"),
- new DefaultAppModuleInfo(IanaIfType.class, null));
- appInfo.put(new DefaultYangModuleId("ietf-yang-types", "2013-07-15"),
- new DefaultAppModuleInfo(IetfYangTypes.class, null));
- appInfo.put(new DefaultYangModuleId("msea-sa-filtering", "2016-04-12"),
- new DefaultAppModuleInfo(MseaSaFiltering.class, null));
- appInfo.put(new DefaultYangModuleId("ietf-x509-cert-to-name", "2013-03-26"),
- new DefaultAppModuleInfo(IetfX509CertToName.class, null));
- appInfo.put(new DefaultYangModuleId("ietf-system", "2014-08-06"),
- new DefaultAppModuleInfo(IetfSystem.class, null));
- appInfo.put(new DefaultYangModuleId("msea-types", "2016-02-29"),
- new DefaultAppModuleInfo(MseaTypes.class, null));
- appInfo.put(new DefaultYangModuleId("ietf-inet-types", "2013-07-15"),
- new DefaultAppModuleInfo(IetfInetTypes.class, null));
- appInfo.put(new DefaultYangModuleId("ietf-netconf-with-defaults", "2010-06-09"),
- new DefaultAppModuleInfo(IetfNetconfWithDefaults.class, null));
- appInfo.put(new DefaultYangModuleId("msea-uni-evc-service", "2016-03-17"),
- new DefaultAppModuleInfo(MseaUniEvcService.class, null));
- appInfo.put(new DefaultYangModuleId("ietf-netconf-monitoring", "2010-10-04"),
- new DefaultAppModuleInfo(IetfNetconfMonitoring.class, null));
- appInfo.put(new DefaultYangModuleId("ietf-netconf-acm", "2012-02-22"),
- new DefaultAppModuleInfo(IetfNetconfAcm.class, null));
- appInfo.put(new DefaultYangModuleId("ietf-system-tls-auth", "2014-05-24"),
- new DefaultAppModuleInfo(IetfSystemTlsAuth.class, null));
- appInfo.put(new DefaultYangModuleId("rfc-2544", "2015-10-20"),
- new DefaultAppModuleInfo(Rfc2544.class, null));
- appInfo.put(new DefaultYangModuleId("msea-cfm", "2016-02-29"),
- new DefaultAppModuleInfo(MseaCfm.class, null));
- appInfo.put(new DefaultYangModuleId("netopeer-cfgnetopeer", "2013-02-14"),
- new DefaultAppModuleInfo(NetopeerCfgnetopeer.class, null));
- appInfo.put(new DefaultYangModuleId("ENTITY-STATE-TC-MIB", "2005-11-22"),
- new DefaultAppModuleInfo(EntityStateTcMib.class, null));
- appInfo.put(new DefaultYangModuleId("msea-soam-fm", "2016-02-29"),
- new DefaultAppModuleInfo(MseaSoamFm.class, null));
- appInfo.put(new DefaultYangModuleId("ietf-netconf-notifications", "2012-02-06"),
- new DefaultAppModuleInfo(IetfNetconfNotifications.class, null));
- appInfo.put(new DefaultYangModuleId("nc-notifications", "2008-07-14"),
- new DefaultAppModuleInfo(NcNotifications.class, null));
- appInfo.put(new DefaultYangModuleId("iana-crypt-hash", "2014-08-06"),
- new DefaultAppModuleInfo(IanaCryptHash.class, null));
- appInfo.put(new DefaultYangModuleId("msea-uni-evc-interface", "2016-03-17"),
- new DefaultAppModuleInfo(MseaUniEvcInterface.class, null));
- appInfo.put(new DefaultYangModuleId("msea-soam-pm", "2016-02-29"),
- new DefaultAppModuleInfo(MseaSoamPm.class, null));
- appInfo.put(new DefaultYangModuleId("ieee-types", "2008-05-22"),
- new DefaultAppModuleInfo(IeeeTypes.class, null));
- appInfo.put(new DefaultYangModuleId("svc-activation-types", "2015-10-27"),
- new DefaultAppModuleInfo(SvcActivationTypes.class, null));
- appInfo.put(new DefaultYangModuleId("ietf-netconf", "2011-06-01"),
- new DefaultAppModuleInfo(IetfNetconf.class, null));
- appInfo.put(new DefaultYangModuleId("ietf-system-microsemi", "2016-05-05"),
- new DefaultAppModuleInfo(IetfSystemMicrosemi.class, null));
- appInfo.put(new DefaultYangModuleId("notifications", "2008-07-14"),
- new DefaultAppModuleInfo(Notifications.class, null));
- appInfo.put(new DefaultYangModuleId("y-1564", "2015-10-29"),
- new DefaultAppModuleInfo(Y1564.class, null));
- appInfo.put(new DefaultYangModuleId("ietf-interfaces", "2014-05-08"),
- new DefaultAppModuleInfo(IetfInterfaces.class, null));
- return ImmutableMap.copyOf(appInfo);
- }
-}
diff --git a/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/impl/AbstractYangServiceImpl.java b/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/impl/AbstractYangServiceImpl.java
index 27c1e86..074aad4 100644
--- a/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/impl/AbstractYangServiceImpl.java
+++ b/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/impl/AbstractYangServiceImpl.java
@@ -76,15 +76,12 @@
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
protected YangModelRegistry yangModelRegistry;
-// @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
-// protected SchemaContextProvider schemaContextProvider;
-
protected ApplicationId appId;
// xSer is not a service and is a class variable. Can be lost on deactivate.
// Must be recreated on activate
- protected XmlSerializer xSer;
- protected YangSerializerContext yCtx;
+ protected XmlSerializer xSer = null;
+ protected YangSerializerContext yCtx = null;
protected static final Pattern REGEX_XML_HEADER =
Pattern.compile("(<\\?xml).*(\\?>)", Pattern.DOTALL);
@@ -107,11 +104,8 @@
@Activate
public void activate() {
Set<YangSerializer> yangSer = ((YangSerializerRegistry) yangModelRegistry).getSerializers();
- yangSer.forEach(ser -> {
- if (ser instanceof XmlSerializer) {
- xSer = (XmlSerializer) ser;
- }
- });
+ xSer = (XmlSerializer) yangSer.stream()
+ .filter(ser -> (ser instanceof XmlSerializer)).findFirst().get();
SchemaContext context = ((SchemaContextProvider) yangModelRegistry)
.getSchemaContext(ResourceId.builder().addBranchPointSchema("/", null).build());
diff --git a/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/impl/IetfSystemManager.java b/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/impl/IetfSystemManager.java
index 0e8f4bd..9a8b471 100644
--- a/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/impl/IetfSystemManager.java
+++ b/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/impl/IetfSystemManager.java
@@ -29,14 +29,8 @@
import org.onosproject.netconf.NetconfSession;
import org.onosproject.yang.gen.v1.ietfsystem.rev20140806.ietfsystem.DefaultSystem;
import org.onosproject.yang.gen.v1.ietfsystem.rev20140806.ietfsystem.DefaultSystemState;
-import org.onosproject.yang.gen.v1.ietfsystemmicrosemi.rev20160505.ietfsystemmicrosemi.doupgradeandreboot.DoUpgradeAndRebootInput;
-import org.onosproject.yang.gen.v1.ietfsystemmicrosemi.rev20160505.ietfsystemmicrosemi.doupgradeandreboot.DoUpgradeAndRebootOutput;
-import org.onosproject.yang.gen.v1.ietfsystemmicrosemi.rev20160505.ietfsystemmicrosemi.pullupdatetarfromtftp.PullUpdateTarFromTftpInput;
-import org.onosproject.yang.gen.v1.ietfsystemmicrosemi.rev20160505.ietfsystemmicrosemi.readfromsyslog.ReadFromSyslogInput;
-import org.onosproject.yang.gen.v1.ietfsystemmicrosemi.rev20160505.ietfsystemmicrosemi.readfromsyslog.ReadFromSyslogOutput;
import org.onosproject.yang.gen.v1.ietfsystem.rev20140806.IetfSystem;
import org.onosproject.yang.gen.v1.ietfsystem.rev20140806.IetfSystemOpParam;
-import org.onosproject.yang.gen.v1.ietfsystem.rev20140806.ietfsystem.systemrestart.SystemRestartInput;
import org.onosproject.yang.model.DefaultModelObjectData;
import org.onosproject.yang.model.ModelConverter;
import org.onosproject.yang.model.ModelObject;
@@ -146,34 +140,10 @@
}
@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.
@@ -186,9 +156,10 @@
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>");
+//FIXME: This has been commented out until the augment of common models issue with onos-yang-tools is sorted
+// 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/>");
diff --git a/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/impl/MseaCfmManager.java b/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/impl/MseaCfmManager.java
index 43be669..695dfcb 100644
--- a/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/impl/MseaCfmManager.java
+++ b/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/impl/MseaCfmManager.java
@@ -35,7 +35,6 @@
import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.abortloopback.AbortLoopbackInput;
import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.mefcfm.MaintenanceDomain;
import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.mefcfm.maintenancedomain.MaintenanceAssociation;
-import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.mefcfm.maintenancedomain.maintenanceassociation.CcmIntervalEnum;
import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.mefcfm.maintenancedomain.maintenanceassociation.MaintenanceAssociationEndPoint;
import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.transmitlinktrace.TransmitLinktraceInput;
import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.transmitlinktrace.TransmitLinktraceOutput;
@@ -43,7 +42,6 @@
import org.onosproject.yang.gen.v1.mseasoampm.rev20160229.mseasoampm.mefcfm.maintenancedomain.maintenanceassociation.maintenanceassociationendpoint.AugmentedMseaCfmMaintenanceAssociationEndPoint;
import org.onosproject.yang.gen.v1.mseasoampm.rev20160229.mseasoampm.mefcfm.maintenancedomain.maintenanceassociation.maintenanceassociationendpoint.DefaultAugmentedMseaCfmMaintenanceAssociationEndPoint;
import org.onosproject.yang.gen.v1.mseasoampm.rev20160229.mseasoampm.mefcfm.maintenancedomain.maintenanceassociation.maintenanceassociationendpoint.augmentedmseacfmmaintenanceassociationendpoint.delaymeasurements.DelayMeasurement;
-import org.onosproject.yang.gen.v1.mseasoampm.rev20160229.mseasoampm.mefcfm.maintenancedomain.maintenanceassociation.maintenanceassociationendpoint.augmentedmseacfmmaintenanceassociationendpoint.lossmeasurements.lossmeasurement.MessagePeriodEnum;
import org.onosproject.yang.model.DefaultModelObjectData;
import org.onosproject.yang.model.ModelConverter;
import org.onosproject.yang.model.ModelObject;
@@ -56,6 +54,7 @@
import org.onosproject.yang.runtime.DefaultCompositeStream;
import java.io.ByteArrayInputStream;
+import java.util.regex.Pattern;
/**
* Implementation of the MseaCfmServiceNetconf YANG model service.
@@ -69,6 +68,16 @@
public static final String MSEA_CFM_NS = "http://www.microsemi.com/microsemi-edge-assure/msea-cfm";
public static final String MSEA_CFM_PM_NS = "http://www.microsemi.com/microsemi-edge-assure/msea-soam-pm";
+
+ //FIXME Remove when the issue with Null bits on onos-yang-tools is sorted
+ @Deprecated
+ protected static final Pattern REGEX_EMPTY_ACTIVE_DEFECTS =
+ Pattern.compile("(<active-defects)[ ]?(/>)", Pattern.DOTALL);
+ //FIXME Remove when the issue with Null bits on onos-yang-tools is sorted
+ @Deprecated
+ protected static final Pattern REGEX_EMPTY_LAST_DEFECT_SENT =
+ Pattern.compile("(<msea-soam-fm:last-defect-sent)[ ]?(/>)", Pattern.DOTALL);
+
@Activate
public void activate() {
super.activate();
@@ -96,7 +105,6 @@
String xmlResult = session.get(xmlQueryStr, null);
xmlResult = removeRpcReplyData(xmlResult);
- xmlResult = removePrefixedMessagePeriod(xmlResult);
DefaultCompositeStream resultDcs = new DefaultCompositeStream(
null, new ByteArrayInputStream(xmlResult.getBytes()));
CompositeData compositeData = xSer.decode(resultDcs, yCtx);
@@ -127,7 +135,7 @@
String xmlResult = session.get(xmlQueryStr, null);
xmlResult = removeRpcReplyData(xmlResult);
- xmlResult = removePrefixedCcmInterval(xmlResult);
+ xmlResult = removeEmptyActiveDefects(xmlResult);
DefaultCompositeStream resultDcs = new DefaultCompositeStream(
null, new ByteArrayInputStream(xmlResult.getBytes()));
CompositeData compositeData = xSer.decode(resultDcs, yCtx);
@@ -155,7 +163,6 @@
String xmlResult = session.get(xmlQueryStr, null);
xmlResult = removeRpcReplyData(xmlResult);
- xmlResult = removePrefixedMessagePeriod(xmlResult);
DefaultCompositeStream resultDcs = new DefaultCompositeStream(
null, new ByteArrayInputStream(xmlResult.getBytes()));
CompositeData compositeData = xSer.decode(resultDcs, yCtx);
@@ -287,6 +294,16 @@
throw new UnsupportedOperationException("Not yet implemented");
}
+ //FIXME Remove when the fix for null bits with onos-yang-tools
+ // https://gerrit.onosproject.org/#/c/15777/ is available
+ @Deprecated
+ private static String removeEmptyActiveDefects(String rpcReplyXml) throws NetconfException {
+ rpcReplyXml = REGEX_EMPTY_ACTIVE_DEFECTS.matcher(rpcReplyXml).replaceFirst("");
+ rpcReplyXml = REGEX_EMPTY_LAST_DEFECT_SENT.matcher(rpcReplyXml).replaceFirst("");
+
+ return rpcReplyXml;
+ }
+
@Deprecated //Replace this with a ModelObject defintion
private String buildMepEssentialsQueryString(MdId mdId, MaIdShort maId,
MepId mepId) {
@@ -435,29 +452,4 @@
return rpc.toString();
}
-
- private static final String removePrefixedMessagePeriod(String xmlResult) {
- xmlResult = xmlResult.replace("message-period>3ms</",
- "message-period>" + MessagePeriodEnum.YANGAUTOPREFIX3MS.toString() + "</");
- xmlResult = xmlResult.replace("message-period>10ms</",
- "message-period>" + MessagePeriodEnum.YANGAUTOPREFIX10MS.toString() + "</");
- xmlResult = xmlResult.replace("message-period>100ms</",
- "message-period>" + MessagePeriodEnum.YANGAUTOPREFIX100MS.toString() + "</");
- xmlResult = xmlResult.replace("message-period>1000ms</",
- "message-period>" + MessagePeriodEnum.YANGAUTOPREFIX1000MS.toString() + "</");
- return xmlResult;
- }
-
- private static final String removePrefixedCcmInterval(String xmlResult) {
- xmlResult = xmlResult.replace("ccm-interval>3.3ms</",
- "ccm-interval>" + CcmIntervalEnum.YANGAUTOPREFIX3_3MS.toString() + "</");
- xmlResult = xmlResult.replace("ccm-interval>10ms</",
- "ccm-interval>" + CcmIntervalEnum.YANGAUTOPREFIX10MS.toString() + "</");
- xmlResult = xmlResult.replace("ccm-interval>100ms</",
- "ccm-interval>" + CcmIntervalEnum.YANGAUTOPREFIX100MS.toString() + "</");
- xmlResult = xmlResult.replace("ccm-interval>1s</",
- "ccm-interval>" + CcmIntervalEnum.YANGAUTOPREFIX1S.toString() + "</");
- return xmlResult;
- }
-
}
diff --git a/drivers/microsemi/src/test/java/org/onosproject/drivers/microsemi/EA1000CfmMepProgrammableTest.java b/drivers/microsemi/src/test/java/org/onosproject/drivers/microsemi/EA1000CfmMepProgrammableTest.java
index 1b8135c..20e80a1 100644
--- a/drivers/microsemi/src/test/java/org/onosproject/drivers/microsemi/EA1000CfmMepProgrammableTest.java
+++ b/drivers/microsemi/src/test/java/org/onosproject/drivers/microsemi/EA1000CfmMepProgrammableTest.java
@@ -41,14 +41,17 @@
import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.mefcfm.maintenancedomain.MdNameAndTypeCombo;
import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.mefcfm.maintenancedomain.maintenanceassociation.MaNameAndTypeCombo;
+import java.util.BitSet;
+
/**
* Test of the CFM implementation on EA1000 through the incubator/net/l2monitoring interface.
*/
public class EA1000CfmMepProgrammableTest {
EA1000CfmMepProgrammable cfmProgrammable;
- MdId mdId1 = MdIdCharStr.asMdId("md-1");
- MaIdShort maId11 = MaIdCharStr.asMaId("ma-1-1");
- MepId mep111 = MepId.valueOf((short) 1);
+ public static final MdId MD_ID_1 = MdIdCharStr.asMdId("md-1");
+ public static final MaIdShort MA_ID_11 = MaIdCharStr.asMaId("ma-1-1");
+ public static final MepId MEP_111 = MepId.valueOf((short) 1);
+ public static final MepId MEP_112 = MepId.valueOf((short) 2);
@Before
public void setUp() throws Exception {
@@ -72,7 +75,7 @@
@Test
public void testGetMep() throws CfmConfigException {
- MepEntry mepEntry = cfmProgrammable.getMep(mdId1, maId11, mep111);
+ MepEntry mepEntry = cfmProgrammable.getMep(MD_ID_1, MA_ID_11, MEP_111);
//Result will come from MockNetconfSessionEa1000.SAMPLE_MSEACFM_MD_MA_MEP_FULL_REPLY
assertNotNull(mepEntry);
@@ -80,13 +83,43 @@
assertTrue(mepEntry.cciEnabled());
assertEquals(Priority.PRIO5.name(), mepEntry.ccmLtmPriority().name());
- assertTrue(mepEntry.activeMacStatusDefect()); //remote-mac-error
- assertTrue(mepEntry.activeRdiCcmDefect()); //remote-rdi
+ assertTrue("Expecting remote-mac-error", mepEntry.activeMacStatusDefect()); //remote-mac-error
+ assertTrue("Expecting remote-rdi", mepEntry.activeRdiCcmDefect()); //remote-rdi
assertNotNull(mepEntry.activeRemoteMepList());
- //TODO Comment back in this test - this is a serious issue with onos-yang-tools that only 1 is found
- // See https://gerrit.onosproject.org/#/c/15164/
+//FIXME Waiting on patch https://gerrit.onosproject.org/#/c/15778/
+// assertEquals("Expecting 2 Remote Meps", 2, mepEntry.activeRemoteMepList().size());
+ mepEntry.activeRemoteMepList().forEach(rmep -> {
+ if (rmep.remoteMepId().value() == 1) {
+ assertEquals(RemoteMepState.RMEP_FAILED.name(),
+ rmep.state().toString());
+ assertEquals(54654654L, rmep.failedOrOkTime().toMillis());
+ assertEquals("aa:bb:cc:dd:ee:ff".toUpperCase(), rmep.macAddress().toString());
+ assertFalse(rmep.rdi());
+ assertEquals(PortStatusTlvType.PS_NO_STATUS_TLV.name(),
+ rmep.portStatusTlvType().toString());
+ assertEquals(InterfaceStatusTlvType.IS_DORMANT.name(),
+ rmep.interfaceStatusTlvType().toString());
+ }
+ });
+
+ }
+
+ @Test
+ public void testGetMep2() throws CfmConfigException {
+ MepEntry mepEntry = cfmProgrammable.getMep(MD_ID_1, MA_ID_11, MEP_112);
+
+ //Result will come from MockNetconfSessionEa1000.SAMPLE_MSEACFM_MD_MA_MEP_FULL_REPLY
+ assertNotNull(mepEntry);
+ assertTrue(mepEntry.administrativeState());
+ assertTrue(mepEntry.cciEnabled());
+ assertEquals(Priority.PRIO4.name(), mepEntry.ccmLtmPriority().name());
+
+ assertNotNull(mepEntry.activeRemoteMepList());
+ BitSet bs1 = new BitSet();
+ bs1.clear();
+//FIXME Waiting on patch https://gerrit.onosproject.org/#/c/15778/
// assertEquals("Expecting 2 Remote Meps", 2, mepEntry.activeRemoteMepList().size());
mepEntry.activeRemoteMepList().forEach(rmep -> {
if (rmep.remoteMepId().value() == 1) {
@@ -110,7 +143,7 @@
*/
@Test
public void testDeleteMep() throws CfmConfigException {
- assertTrue(cfmProgrammable.deleteMep(mdId1, maId11, mep111));
+ assertTrue(cfmProgrammable.deleteMep(MD_ID_1, MA_ID_11, MEP_111));
}
/**
@@ -126,12 +159,12 @@
lbCreate.vlanPriority(Priority.PRIO3);
lbCreate.vlanDropEligible(true);
- cfmProgrammable.transmitLoopback(mdId1, maId11, mep111, lbCreate.build());
+ cfmProgrammable.transmitLoopback(MD_ID_1, MA_ID_11, MEP_111, lbCreate.build());
}
@Test
public void testAbortLoopback() throws CfmConfigException {
- cfmProgrammable.abortLoopback(mdId1, maId11, mep111);
+ cfmProgrammable.abortLoopback(MD_ID_1, MA_ID_11, MEP_111);
}
// @Test
diff --git a/drivers/microsemi/src/test/java/org/onosproject/drivers/microsemi/yang/IetfSystemManagerTest.java b/drivers/microsemi/src/test/java/org/onosproject/drivers/microsemi/yang/IetfSystemManagerTest.java
index 22112b3..8a5e6f4 100644
--- a/drivers/microsemi/src/test/java/org/onosproject/drivers/microsemi/yang/IetfSystemManagerTest.java
+++ b/drivers/microsemi/src/test/java/org/onosproject/drivers/microsemi/yang/IetfSystemManagerTest.java
@@ -96,7 +96,7 @@
AugmentedSysPlatform sysSystemState =
(AugmentedSysPlatform) sys.systemState().platform().augmentation(DefaultAugmentedSysPlatform.class);
- assertEquals("Eagle Simulator.", sysSystemState.deviceIdentification().serialNumber());
+ assertEquals("EA1000 unit test.", sysSystemState.deviceIdentification().serialNumber());
}
@Test
diff --git a/drivers/microsemi/src/test/java/org/onosproject/drivers/microsemi/yang/MockNetconfSessionEa1000.java b/drivers/microsemi/src/test/java/org/onosproject/drivers/microsemi/yang/MockNetconfSessionEa1000.java
index d2c07e5..b9d4342 100644
--- a/drivers/microsemi/src/test/java/org/onosproject/drivers/microsemi/yang/MockNetconfSessionEa1000.java
+++ b/drivers/microsemi/src/test/java/org/onosproject/drivers/microsemi/yang/MockNetconfSessionEa1000.java
@@ -19,6 +19,7 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Pattern;
+import org.onosproject.drivers.microsemi.EA1000CfmMepProgrammableTest;
import org.onosproject.netconf.DatastoreId;
import org.onosproject.netconf.NetconfDeviceInfo;
import org.onosproject.netconf.NetconfDeviceOutputEventListener;
@@ -375,43 +376,59 @@
+ "(</rpc>)\\R?"
+ "(]]>){2}", Pattern.DOTALL);
- //For testGetConfigMseaCfmEssentials
+ //For testGetMep
+ private String sampleXmlRegexGetMseaCfmFullStr =
+ "(<\\?xml).*(<rpc).*(<get>)\\R?"
+ + "(<filter type=\"subtree\">)\\R?"
+ + "(<mef-cfm).*"
+ + "(<maintenance-domain>)\\R?"
+ + "(<id/>)\\R?"
+ + "(<name>)([a-zA-Z0-9\\-:\\.]){1,48}(</name>)\\R?"
+ + "(<md-level/>)?\\R?"
+ + "(<maintenance-association>)\\R?"
+ + "(<id/>)\\R?"
+ + "(<name>)([a-zA-Z0-9\\-:\\.]){1,48}(</name>)\\R?"
+ + "(<maintenance-association-end-point>)\\R?"
+ + "(<mep-identifier>)[0-9]{1,4}(</mep-identifier>)\\R?"
+ + "(<interface/>)?\\R?"
+ + "(<primary-vid/>)?\\R?"
+ + "(<administrative-state/>)?\\R?"
+ + "(<mac-address/>)?\\R?"
+ + "(<ccm-ltm-priority/>)?\\R?"
+ + "(<continuity-check/>)?\\R?"
+ + "(<loopback/>)?\\R?"
+ + "(<linktrace/>)?\\R?"
+ + "(<remote-mep-database/>)\\R?"
+ + "(<msea-soam-fm:operational-state/>)\\R?"
+ + "(<msea-soam-fm:connectivity-status/>)\\R?"
+ + "(<msea-soam-fm:port-status/>)\\R?"
+ + "(<msea-soam-fm:interface-status/>)\\R?"
+ + "(<msea-soam-fm:last-defect-sent/>)\\R?"
+ + "(<msea-soam-fm:rdi-transmit-status/>)\\R?"
+ + "(</maintenance-association-end-point>)\\R?"
+ + "(</maintenance-association>)\\R?"
+ + "(</maintenance-domain>)\\R?"
+ + "(</mef-cfm>)\\R?"
+ + "(</filter>)\\R?"
+ + "(</get>)\\R?"
+ + "(</rpc>)\\R?"
+ + "(]]>){2}";
+
private Pattern sampleXmlRegexGetMseaCfmFull =
- Pattern.compile("(<\\?xml).*(<rpc).*(<get>)\\R?"
- + "(<filter type=\"subtree\">)\\R?"
- + "(<mef-cfm).*"
- + "(<maintenance-domain>)\\R?"
- + "(<id/>)\\R?"
- + "(<name>)([a-zA-Z0-9\\-:\\.]){1,48}(</name>)\\R?"
- + "(<md-level/>)?\\R?"
- + "(<maintenance-association>)\\R?"
- + "(<id/>)\\R?"
- + "(<name>)([a-zA-Z0-9\\-:\\.]){1,48}(</name>)\\R?"
- + "(<maintenance-association-end-point>)\\R?"
- + "(<mep-identifier>)[0-9]{1,4}(</mep-identifier>)\\R?"
- + "(<interface/>)?\\R?"
- + "(<primary-vid/>)?\\R?"
- + "(<administrative-state/>)?\\R?"
- + "(<mac-address/>)?\\R?"
- + "(<ccm-ltm-priority/>)?\\R?"
- + "(<continuity-check/>)?\\R?"
- + "(<loopback/>)?\\R?"
- + "(<linktrace/>)?\\R?"
- + "(<remote-mep-database/>)\\R?"
- + "(<msea-soam-fm:operational-state/>)\\R?"
- + "(<msea-soam-fm:connectivity-status/>)\\R?"
- + "(<msea-soam-fm:port-status/>)\\R?"
- + "(<msea-soam-fm:interface-status/>)\\R?"
- + "(<msea-soam-fm:last-defect-sent/>)\\R?"
- + "(<msea-soam-fm:rdi-transmit-status/>)\\R?"
- + "(</maintenance-association-end-point>)\\R?"
- + "(</maintenance-association>)\\R?"
- + "(</maintenance-domain>)\\R?"
- + "(</mef-cfm>)\\R?"
- + "(</filter>)\\R?"
- + "(</get>)\\R?"
- + "(</rpc>)\\R?"
- + "(]]>){2}", Pattern.DOTALL);
+ Pattern.compile(sampleXmlRegexGetMseaCfmFullStr
+ .replace("(<mep-identifier>)[0-9]{1,4}(</mep-identifier>)",
+ "(<mep-identifier>)" +
+ EA1000CfmMepProgrammableTest.MEP_111 +
+ "(</mep-identifier>)"),
+ Pattern.DOTALL);
+
+ private Pattern sampleXmlRegexGetMseaCfmFull2 =
+ Pattern.compile(sampleXmlRegexGetMseaCfmFullStr
+ .replace("(<mep-identifier>)[0-9]{1,4}(</mep-identifier>)",
+ "(<mep-identifier>)" +
+ EA1000CfmMepProgrammableTest.MEP_112 +
+ "(</mep-identifier>)"),
+ Pattern.DOTALL);
//For testGetConfigMseaCfmEssentials
private Pattern sampleXmlRegexGetMseaDelay =
@@ -555,7 +572,7 @@
+ "<platform>\n"
+ "<os-release>4.4.0-53-generic</os-release>\n"
+ "<sysms:device-identification>\n"
- + "<sysms:serial-number>Eagle Simulator.</sysms:serial-number>\n"
+ + "<sysms:serial-number>EA1000 unit test.</sysms:serial-number>\n"
+ "</sysms:device-identification>\n"
+ "</platform>\n"
+ "</system-state>\n"
@@ -830,25 +847,25 @@
+ "xmlns:msea-soam-pm=\"http://www.microsemi.com/microsemi-edge-assure/msea-soam-pm\">"
+ "<maintenance-domain>"
+ "<id>1</id>"
- + "<name>md-1</name>"
+ + "<name>" + EA1000CfmMepProgrammableTest.MD_ID_1 + "</name>"
+ "<maintenance-association>"
+ "<id>1</id>"
- + "<name>ma-1-1</name>"
+ + "<name>" + EA1000CfmMepProgrammableTest.MA_ID_11 + "</name>"
+ "<ccm-interval>3.3ms</ccm-interval>"
+ "<maintenance-association-end-point>"
- + "<mep-identifier>1</mep-identifier>"
+ + "<mep-identifier>" + EA1000CfmMepProgrammableTest.MEP_111 + "</mep-identifier>"
+ "<interface>eth0</interface>"
+ "<primary-vid>20</primary-vid>"
+ "<administrative-state>true</administrative-state>"
+ "<mac-address>00:b0:ae:03:ff:31</mac-address>"
+ "<ccm-ltm-priority>5</ccm-ltm-priority>"
+ "<continuity-check>"
- + "<cci-enabled>true</cci-enabled>"
- + "<fng-state>defect-reported</fng-state>"
- + "<highest-priority-defect-found>remote-invalid-ccm</highest-priority-defect-found>"
- + "<active-defects>remote-rdi remote-invalid-ccm</active-defects>"
- + "<ccm-sequence-error-count>0</ccm-sequence-error-count>"
- + "<sent-ccms>197</sent-ccms>"
+ + "<cci-enabled>true</cci-enabled>"
+ + "<fng-state>defect-reported</fng-state>"
+ + "<highest-priority-defect-found>remote-invalid-ccm</highest-priority-defect-found>"
+ + "<active-defects>remote-rdi remote-invalid-ccm</active-defects>"
+ + "<ccm-sequence-error-count>0</ccm-sequence-error-count>"
+ + "<sent-ccms>197</sent-ccms>"
+ "</continuity-check>"
+ "<loopback>"
+ "</loopback>"
@@ -887,6 +904,85 @@
+ "</data>"
+ "</rpc-reply>";
+
+ /**
+ * With an empty <last-defect-sent />. Retrieved from simulator.
+ */
+ private static final String SAMPLE_MSEACFM_MD_MA_MEP_FULL_REPLY2 =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ + "<rpc-reply xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\" message-id=\"47\">"
+ + "<data>"
+ + "<mef-cfm xmlns=\"http://www.microsemi.com/microsemi-edge-assure/msea-cfm\" "
+ + "xmlns:msea-soam-fm=\"http://www.microsemi.com/microsemi-edge-assure/msea-soam-fm\" "
+ + "xmlns:msea-soam-pm=\"http://www.microsemi.com/microsemi-edge-assure/msea-soam-pm\">"
+ + "<maintenance-domain>"
+ + "<id>1</id>"
+ + "<name>" + EA1000CfmMepProgrammableTest.MD_ID_1 + "</name>"
+ + "<maintenance-association>"
+ + "<id>1</id>"
+ + "<name>" + EA1000CfmMepProgrammableTest.MA_ID_11 + "</name>"
+ + "<maintenance-association-end-point>"
+ + "<mep-identifier>" + EA1000CfmMepProgrammableTest.MEP_112 + "</mep-identifier>"
+ + "<interface>eth0</interface>"
+ + "<administrative-state>true</administrative-state>"
+ + "<ccm-ltm-priority>4</ccm-ltm-priority>"
+ + "<continuity-check>"
+ + "<cci-enabled>true</cci-enabled>"
+ + "<fng-state>report-defect</fng-state>"
+ + "<highest-priority-defect-found>remote-mac-error</highest-priority-defect-found>"
+ + "<active-defects> remote-mac-error invalid-ccm</active-defects>"
+ + "<last-error-ccm>U2FtcGxlIGxhc3QgZXJyb3IgY2NtAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+ + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+ + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+ + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
+ + "</last-error-ccm>"
+ + "<ccm-sequence-error-count>10</ccm-sequence-error-count>"
+ + "<sent-ccms>15</sent-ccms>"
+ + "</continuity-check>"
+ + "<mac-address>53:65:61:6e:20:43</mac-address>"
+ + "<msea-soam-fm:port-status>no-status-tlv</msea-soam-fm:port-status>"
+ + "<msea-soam-fm:interface-status>no-status-tlv</msea-soam-fm:interface-status>"
+ + "<msea-soam-fm:last-defect-sent />"
+ + "<msea-soam-fm:rdi-transmit-status>false</msea-soam-fm:rdi-transmit-status>"
+ + "<loopback>"
+ + "<replies-received>123</replies-received>"
+ + "<replies-transmitted>456</replies-transmitted>"
+ + "</loopback>"
+ + "<remote-mep-database>"
+ + "<remote-mep>"
+ + "<remote-mep-id>20</remote-mep-id>"
+ + "<remote-mep-state>ok</remote-mep-state>"
+ + "<failed-ok-time>150859498</failed-ok-time>"
+ + "<mac-address>53:65:61:6e:20:43</mac-address>"
+ + "<rdi>true</rdi>"
+ + "<port-status-tlv>up</port-status-tlv>"
+ + "<interface-status-tlv>no-status-tlv</interface-status-tlv>"
+ + "</remote-mep>"
+ + "<remote-mep>"
+ + "<remote-mep-id>30</remote-mep-id>"
+ + "<remote-mep-state>ok</remote-mep-state>"
+ + "<failed-ok-time>150859498</failed-ok-time>"
+ + "<mac-address>53:65:61:6e:20:43</mac-address>"
+ + "<rdi>true</rdi>"
+ + "<port-status-tlv>no-status-tlv</port-status-tlv>"
+ + "<interface-status-tlv>down</interface-status-tlv>"
+ + "</remote-mep>"
+ + "</remote-mep-database>"
+ + "<linktrace>"
+ + "<unexpected-replies-received>0</unexpected-replies-received>"
+ + "<msea-soam-fm:ltm-msgs-transmitted>2</msea-soam-fm:ltm-msgs-transmitted>"
+ + "<msea-soam-fm:ltm-msgs-received>2</msea-soam-fm:ltm-msgs-received>"
+ + "<msea-soam-fm:ltr-msgs-transmitted>2</msea-soam-fm:ltr-msgs-transmitted>"
+ + "<msea-soam-fm:ltr-msgs-received>2</msea-soam-fm:ltr-msgs-received>"
+ + "<linktrace-database />"
+ + "</linktrace>"
+ + "</maintenance-association-end-point>"
+ + "</maintenance-association>"
+ + "</maintenance-domain>"
+ + "</mef-cfm>"
+ + "</data>"
+ + "</rpc-reply>";
+
private static final String SAMPLE_MSEACFM_DELAY_MEASUREMENT_FULL_REPLY =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ "<rpc-reply xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\" message-id=\"47\">"
@@ -1208,6 +1304,9 @@
} else if (sampleXmlRegexGetMseaCfmFull.matcher(request).matches()) {
return SAMPLE_MSEACFM_MD_MA_MEP_FULL_REPLY;
+ } else if (sampleXmlRegexGetMseaCfmFull2.matcher(request).matches()) {
+ return SAMPLE_MSEACFM_MD_MA_MEP_FULL_REPLY2;
+
} else if (sampleXmlRegexDeleteMseaCfmMep.matcher(request).matches()) {
return SAMPLE_REPLY_OK;
diff --git a/drivers/microsemi/src/test/java/org/onosproject/yang/MockMicrosemiRegistrator.java b/drivers/microsemi/src/test/java/org/onosproject/yang/MockMicrosemiRegistrator.java
index f8129f2..111ec8a 100644
--- a/drivers/microsemi/src/test/java/org/onosproject/yang/MockMicrosemiRegistrator.java
+++ b/drivers/microsemi/src/test/java/org/onosproject/yang/MockMicrosemiRegistrator.java
@@ -15,7 +15,7 @@
*/
package org.onosproject.yang;
-import org.onosproject.drivers.microsemi.yang.MicrosemiModelRegistrator;
+import org.onosproject.models.microsemi.MicrosemiModelRegistrator;
import org.onosproject.yang.compiler.datamodel.YangNode;
import org.onosproject.yang.compiler.tool.YangNodeInfo;
import org.onosproject.yang.runtime.DefaultModelRegistrationParam;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/cfm/MaintenanceAssociation.java b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/cfm/MaintenanceAssociation.java
index 5b28c9a..f6e1f3c 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/cfm/MaintenanceAssociation.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/cfm/MaintenanceAssociation.java
@@ -79,7 +79,7 @@
/**
* Enumerated values from IEEE 802.1Q Table 21-16—CCM Interval field encoding.
*/
- public enum CcmInterval {
+ enum CcmInterval {
INVALID(0),
INTERVAL_3MS(3),
INTERVAL_10MS(10),
diff --git a/models/microsemi/BUCK b/models/microsemi/BUCK
index c9f83f3..3ab6536 100644
--- a/models/microsemi/BUCK
+++ b/models/microsemi/BUCK
@@ -1,4 +1,16 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//models/common:onos-models-common',
+]
+
+APPS = [
+ 'org.onosproject.models.common',
+]
+
yang_model(
app_name = 'org.onosproject.models.microsemi',
title = 'Microsemi YANG Models',
+ custom_registrator = True,
+ deps = COMPILE_DEPS,
+ required_apps = APPS,
)
diff --git a/models/microsemi/pom.xml b/models/microsemi/pom.xml
index 2e53b5d..e6c8d06 100644
--- a/models/microsemi/pom.xml
+++ b/models/microsemi/pom.xml
@@ -43,6 +43,12 @@
<dependency>
<groupId>org.onosproject</groupId>
+ <artifactId>onos-models-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
<artifactId>onos-apps-yang</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/models/microsemi/src/main/java/org/onosproject/models/microsemi/MicrosemiModelRegistrator.java b/models/microsemi/src/main/java/org/onosproject/models/microsemi/MicrosemiModelRegistrator.java
new file mode 100644
index 0000000..b04aac1
--- /dev/null
+++ b/models/microsemi/src/main/java/org/onosproject/models/microsemi/MicrosemiModelRegistrator.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2017-present Open Networking 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.
+ */
+package org.onosproject.models.microsemi;
+
+import com.google.common.collect.ImmutableMap;
+import org.onosproject.yang.AbstractYangModelRegistrator;
+import org.onosproject.yang.gen.v1.ietfsystem.rev20140806.IetfSystem;
+import org.onosproject.yang.gen.v1.ietfsystemmicrosemi.rev20160505.IetfSystemMicrosemi;
+import org.apache.felix.scr.annotations.Component;
+import org.onosproject.yang.gen.v1.mseacfm.rev20160229.MseaCfm;
+import org.onosproject.yang.gen.v1.mseasoampm.rev20160229.MseaSoamPm;
+import org.onosproject.yang.gen.v1.mseasoamfm.rev20160229.MseaSoamFm;
+import org.onosproject.yang.gen.v1.mseasafiltering.rev20160412.MseaSaFiltering;
+import org.onosproject.yang.gen.v1.mseaunievcservice.rev20160317.MseaUniEvcService;
+import org.onosproject.yang.model.DefaultYangModuleId;
+import org.onosproject.yang.model.YangModuleId;
+import org.onosproject.yang.runtime.AppModuleInfo;
+import org.onosproject.yang.runtime.DefaultAppModuleInfo;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+@Component(immediate = true)
+public class MicrosemiModelRegistrator extends AbstractYangModelRegistrator {
+ public MicrosemiModelRegistrator() {
+ super(MicrosemiModelRegistrator.class, getAppInfo());
+ }
+
+ private static Map<YangModuleId, AppModuleInfo> getAppInfo() {
+ Map<YangModuleId, AppModuleInfo> appInfo = new HashMap<>();
+ List<String> sysMicrosemiFeatures = new ArrayList<>();
+ sysMicrosemiFeatures.add("serial-number");
+ appInfo.put(new DefaultYangModuleId("ietf-system-microsemi", "2016-05-05"),
+ new DefaultAppModuleInfo(IetfSystemMicrosemi.class, sysMicrosemiFeatures));
+
+ List<String> systemFeatures = new ArrayList<>();
+ systemFeatures.add("local-users");
+ systemFeatures.add("authentication");
+ systemFeatures.add("ntp");
+ appInfo.put(new DefaultYangModuleId("ietf-system", "2014-08-06"),
+ new DefaultAppModuleInfo(IetfSystem.class, systemFeatures));
+
+ appInfo.put(new DefaultYangModuleId("msea-uni-evc-service", "2016-03-17"),
+ new DefaultAppModuleInfo(MseaUniEvcService.class, null));
+ appInfo.put(new DefaultYangModuleId("msea-cfm", "2016-02-29"),
+ new DefaultAppModuleInfo(MseaCfm.class, null));
+ appInfo.put(new DefaultYangModuleId("msea-soam-fm", "2016-02-29"),
+ new DefaultAppModuleInfo(MseaSoamFm.class, null));
+ appInfo.put(new DefaultYangModuleId("msea-soam-pm", "2016-02-29"),
+ new DefaultAppModuleInfo(MseaSoamPm.class, null));
+ appInfo.put(new DefaultYangModuleId("msea-sa-filtering", "2016-04-12"),
+ new DefaultAppModuleInfo(MseaSaFiltering.class, null));
+
+ return ImmutableMap.copyOf(appInfo);
+ // TODO: Do some other registration tasks...
+ }
+}
\ No newline at end of file
diff --git a/models/microsemi/src/main/java/org/onosproject/models/microsemi/package-info.java b/models/microsemi/src/main/java/org/onosproject/models/microsemi/package-info.java
new file mode 100644
index 0000000..b484dad
--- /dev/null
+++ b/models/microsemi/src/main/java/org/onosproject/models/microsemi/package-info.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2017-present Open Networking 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.
+ */
+/**
+ * Commonly used yang models.
+ */
+package org.onosproject.models.microsemi;
diff --git a/models/microsemi/src/main/yang/ENTITY-STATE-TC-MIB.yang b/models/microsemi/src/main/yang/ENTITY-STATE-TC-MIB@2005-11-22.yang
similarity index 100%
rename from models/microsemi/src/main/yang/ENTITY-STATE-TC-MIB.yang
rename to models/microsemi/src/main/yang/ENTITY-STATE-TC-MIB@2005-11-22.yang
diff --git a/models/microsemi/src/main/yang/fpga-internal.yang b/models/microsemi/src/main/yang/fpga-internal.yang
deleted file mode 100644
index 87fabb1..0000000
--- a/models/microsemi/src/main/yang/fpga-internal.yang
+++ /dev/null
@@ -1,266 +0,0 @@
-module fpga-internal {
-
- /*** NAMESPACE / PREFIX DEFINITION ***/
-
- namespace "http://www.microsemi.com/fpga-int";
- prefix "fpga-int";
-
- /*** META INFORMATION ***/
-
- organization
- "Microsemi Inc., FTD Division";
-
- contact
- "Web URL: http://www.microsemi.com/
- E-mail: info@microsemi.com
- Postal: Microsemi Corporation Corporate Headquarters
- One Enterprise Aliso Viejo,
- CA 92656
- U.S.A.
- Phone: +1 949 380 6100
- Fax: +1 949 215-4996";
-
- description
- "This YANG module add internal procedures to access FPAA hardware
-
- Copyright 2015 Microsemi Inc.
- All rights reserved.";
-
- revision "2015-11-30" {
- description
- "Initial version - Sean Condon, Microsemi";
- }
-
- typedef sixteen-bit-hex {
- type string {
- pattern '0x[0-9a-fA-F]{4}';
- }
-
- description
- "A 16-bit address represented as a hexadecimal number";
- }
-
- typedef thirtytwo-bit-hex {
- type string {
- pattern '0x[0-9a-fA-F]{8}';
- }
-
- description
- "A 32-bit address represented as a hexadecimal number";
- }
-
- typedef thirtytwobit-data {
- type string {
- pattern '([0-9a-fA-F]{8}(:[0-9a-fA-F]{8})*)?';
- }
-
- description
- "A set of 32 bit data values represented as colon separated
- hex strings e.g. 'A1B2C3D4:B2C3D4F5:C3D4E5F6'";
- }
-
- typedef select-ram-enum {
- type enumeration {
- enum pkt-store-sel {value 0;}
- enum probe-store-sel {value 1;}
- enum xconn-store-sel {value 2;}
- enum rmep-err-store-sel {value 3;}
- enum rx-lmep-map-sel {value 4;}
- enum cpu-sys-capt-fifo-sel {value 5;}
- enum rmep-ram-sel {value 6;}
- enum xconn-ram-sel {value 7;}
- enum rmep-err-ram-sel {value 8;}
- enum tx-lmep-map-sel {value 9;}
- enum ext-sram-sel {value 10;}
- enum car-rmac-sel {value 11;}
- enum sys-mac-sel {value 12;}
- enum rx-carr-data-fifo-sel {value 13;}
- enum line-stats-ram-sel {value 14;}
- enum cpu-sys-capt-info-fifo-sel {value 15;}
- enum vlan-info-ram-sel {value 16;}
- enum lbm-store-sel {value 17;}
- enum lbr-ram-sel {value 18;}
- enum mc-lbr-store-sel {value 19;}
- enum port-mac-ram-sel {value 20;}
- enum pm-db-ram-sel {value 22;}
- enum tx-lb-ram-sel {value 24;}
- enum tlv-ram-sel {value 25;}
- enum cpu-capt-fifo-sel {value 26;}
- enum cpu-capt-info-fifo-sel {value 27;}
- enum policer-cfg-ram-sel {value 28;}
- enum policer-ctxt-ram-sel {value 29;}
- enum cpu-sys-tx-ram-sel {value 30;}
- enum policer-stats-ram-sel {value 31;}
- }
- }
-
-
- container fpga-internal {
- presence "Supports FPGA direct access";
- }
-
- rpc read-registers {
-
- description "Method to read directly from hardware registers";
- input {
- choice hex-or-dec {
-
- description "Enter the starting address in either decimal (0-65535)
- or hexadecimal (preceeded with 0x)";
- mandatory true;
-
- case hex {
- leaf start-address-hex {
- type sixteen-bit-hex;
- }
- }
-
- case decimal {
- leaf start-address-dec {
- type uint16;
- }
- }
- }
-
- leaf num-locations {
- type uint8 {
- range 1..max;
- }
- description "The number of following locations (addresses) to read from";
- default 1;
- }
- }
-
- output {
- anyxml data {
- description "A set of 32 bit data values represented
- as colon separated 8 character hexadecimal values";
- }
- }
- }
-
-
- rpc write-registers {
-
- description "Method to write directly to hardware registers.
- If a number of data values are given then subsequent
- locations are written to";
- input {
- choice hex-or-dec {
-
- description "Enter the starting address in either decimal (0-65535)
- or hexadecimal (preceeded with 0x)";
-
- case hex {
- leaf start-address-hex {
- type sixteen-bit-hex;
- }
- }
-
- case decimal {
- leaf start-address-dec {
- type uint16;
- }
- }
- }
-
- leaf value-hex-32 {
- type thirtytwobit-data;
- description "A set of 32 bit data values represented
- as colon separated 8 character hexadecimal values
- e.g. ffffffff:ffffffff:ffffffff
- The number of locations written to will be
- determinted by the number of such values given";
- }
- }
- }
-
- rpc read-ram {
-
- description "Method to read directly from hardware RAM";
- input {
- leaf ram {
- type select-ram-enum;
- mandatory true;
- description "The type of RAM to read from";
- }
-
- choice hex-or-dec {
-
- description "Enter the starting address in either decimal (0-65535)
- or hexadecimal (preceeded with 0x)";
- mandatory true;
-
- case hex {
- leaf start-address-hex {
- type thirtytwo-bit-hex;
- }
- }
-
- case decimal {
- leaf start-address-dec {
- type uint32;
- }
- }
- }
-
- leaf num-locations {
- type uint8 {
- range 1..max;
- }
- description "The number of following locations (addresses) to read from";
- default 1;
- }
- }
-
- output {
- anyxml data {
- description "A set of 32 bit data values represented
- as colon separated 8 character hexadecimal values";
- }
- }
- }
-
- rpc write-ram {
-
- description "Method to write directly to RAM registers.
- If a number of data values are given then subsequent
- locations are written to";
- input {
- leaf ram {
- type select-ram-enum;
- mandatory true;
- description "The type of RAM to read from";
- }
-
- choice hex-or-dec {
-
- description "Enter the starting address in either decimal (0-65535)
- or hexadecimal (preceeded with 0x)";
- mandatory true;
-
- case hex {
- leaf start-address-hex {
- type thirtytwo-bit-hex;
- }
- }
-
- case decimal {
- leaf start-address-dec {
- type uint32;
- }
- }
- }
-
- leaf value-hex-32 {
- type thirtytwobit-data;
- description "A set of 32 bit data values represented
- as colon separated 8 character hexadecimal values
- e.g. ffffffff:ffffffff:ffffffff
- The number of locations written to will be
- determinted by the number of such values given";
- }
- }
- }
-
-}
\ No newline at end of file
diff --git a/models/microsemi/src/main/yang/iana-crypt-hash.yang b/models/microsemi/src/main/yang/iana-crypt-hash.yang
deleted file mode 100644
index 3a9ef55..0000000
--- a/models/microsemi/src/main/yang/iana-crypt-hash.yang
+++ /dev/null
@@ -1,121 +0,0 @@
-module iana-crypt-hash {
- namespace "urn:ietf:params:xml:ns:yang:iana-crypt-hash";
- prefix ianach;
-
- organization "IANA";
- contact
- " Internet Assigned Numbers Authority
-
- Postal: ICANN
- 12025 Waterfront Drive, Suite 300
- Los Angeles, CA 90094-2536
- United States
-
- Tel: +1 310 301 5800
- E-Mail: iana@iana.org>";
- description
- "This YANG module defines a type for storing passwords
- using a hash function and features to indicate which hash
- functions are supported by an implementation.
-
- The latest revision of this YANG module can be obtained from
- the IANA web site.
-
- Requests for new values should be made to IANA via
- email (iana@iana.org).
-
- Copyright (c) 2014 IETF Trust and the persons identified as
- authors of the code. All rights reserved.
-
- Redistribution and use in source and binary forms, with or
- without modification, is permitted pursuant to, and subject
- to the license terms contained in, the Simplified BSD License
- set forth in Section 4.c of the IETF Trust's Legal Provisions
- Relating to IETF Documents
- (http://trustee.ietf.org/license-info).
-
- The initial version of this YANG module is part of RFC 7317;
- see the RFC itself for full legal notices.";
-
- revision 2014-08-06 {
- description
- "Initial revision.";
- reference
- "RFC 7317: A YANG Data Model for System Management";
- }
-
- typedef crypt-hash {
- type string {
- pattern
- '$0$.*' //Escaped all $ as Java Pattern matcher will interpret them otherwise
- + '|$1$[a-zA-Z0-9./]{1,8}$[a-zA-Z0-9./]{22}'
- + '|$5$(rounds=\d+$)?[a-zA-Z0-9./]{1,16}$[a-zA-Z0-9./]{43}'
- + '|$6$(rounds=\d+$)?[a-zA-Z0-9./]{1,16}$[a-zA-Z0-9./]{86}';
- }
- description
- "The crypt-hash type is used to store passwords using
- a hash function. The algorithms for applying the hash
- function and encoding the result are implemented in
- various UNIX systems as the function crypt(3).
-
- A value of this type matches one of the forms:
-
- $0$<clear text password>
- $<id>$<salt>$<password hash>
- $<id>$<parameter>$<salt>$<password hash>
-
- The '$0$' prefix signals that the value is clear text. When
- such a value is received by the server, a hash value is
- calculated, and the string '$<id>$<salt>$' or
- $<id>$<parameter>$<salt>$ is prepended to the result. This
- value is stored in the configuration data store.
-
- If a value starting with '$<id>$', where <id> is not '0', is
- received, the server knows that the value already represents a
- hashed value and stores it 'as is' in the data store.
-
- When a server needs to verify a password given by a user, it
- finds the stored password hash string for that user, extracts
- the salt, and calculates the hash with the salt and given
- password as input. If the calculated hash value is the same
- as the stored value, the password given by the client is
- accepted.
-
- This type defines the following hash functions:
-
- id | hash function | feature
- ---+---------------+-------------------
- 1 | MD5 | crypt-hash-md5
- 5 | SHA-256 | crypt-hash-sha-256
- 6 | SHA-512 | crypt-hash-sha-512
-
- The server indicates support for the different hash functions
- by advertising the corresponding feature.";
- reference
- "IEEE Std 1003.1-2008 - crypt() function
- RFC 1321: The MD5 Message-Digest Algorithm
- FIPS.180-4.2012: Secure Hash Standard (SHS)";
- }
-
- feature crypt-hash-md5 {
- description
- "Indicates that the device supports the MD5
- hash function in 'crypt-hash' values.";
- reference "RFC 1321: The MD5 Message-Digest Algorithm";
- }
-
- feature crypt-hash-sha-256 {
- description
- "Indicates that the device supports the SHA-256
- hash function in 'crypt-hash' values.";
- reference "FIPS.180-4.2012: Secure Hash Standard (SHS)";
- }
-
- feature crypt-hash-sha-512 {
- description
- "Indicates that the device supports the SHA-512
- hash function in 'crypt-hash' values.";
- reference "FIPS.180-4.2012: Secure Hash Standard (SHS)";
- }
-
-}
diff --git a/models/microsemi/src/main/yang/iana-if-type.yang b/models/microsemi/src/main/yang/iana-if-type@2014-05-08.yang
similarity index 100%
rename from models/microsemi/src/main/yang/iana-if-type.yang
rename to models/microsemi/src/main/yang/iana-if-type@2014-05-08.yang
diff --git a/models/microsemi/src/main/yang/ieee-types.yang b/models/microsemi/src/main/yang/ieee-types.yang
deleted file mode 100644
index 5ff5c1d..0000000
--- a/models/microsemi/src/main/yang/ieee-types.yang
+++ /dev/null
@@ -1,79 +0,0 @@
- module ieee-types {
-
- // XXX namespace to be allocated by IANA
-
- namespace "urn:ietf:params:xml:ns:yang:ieee-types";
- prefix "ieee";
-
- import ietf-yang-types {
- prefix yang;
- }
-
- organization
- "YANG Language Design Team";
-
- contact
- "Juergen Schoenwaelder (Editor)
- <j.schoenwaelder@jacobs-university.de>";
-
- description
- "This module contains standard derived YANG types
- for IEEE 802 addresses and related things.";
-
- revision 2008-05-22 {
- description "Initial revision.";
- }
-
- /*
- * collection of IEEE address type definitions
- */
-
- typedef mac-address {
- type yang:phys-address {
- pattern '([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}';
- }
- description
- "The mac-address type represents an 802 MAC address
- represented in the `canonical' order defined by
- IEEE 802.1a, i.e., as if it were transmitted least
- significant bit first, even though 802.5 (in contrast
- to other 802.x protocols) requires MAC addresses to
- be transmitted most significant bit first.";
- reference
- "RFC 2579 STD 58";
- }
-
- /*
- * collection of IEEE 802 related identifier types
- */
-
- typedef bridgeid {
- type string {
- pattern '[0-9a-fA-F]{4}:'
- + '([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}';
- }
- description
- "The bridgeid type represents identifers that uniquely
- identify a bridge. Its first four hexadecimal digits
- contain a priority value followed by a colon. The
- remaining characters contain the MAC address used to
- refer to a bridge in a unique fashion (typically, the
- numerically smallest MAC address of all ports on the
- bridge).";
- reference
- "RFC 4188";
- }
-
- typedef vlanid {
- type uint16 {
- range "1..4094";
- }
- description
- "The vlanid type uniquely identifies a VLAN. This is
- the 12-bit VLAN-ID used in the VLAN Tag header. The
- range is defined by the referenced specification.";
- reference
- "IEEE Std 802.1Q 2003 Edition, Virtual Bridged Local
- Area Networks.";
- }
- }
diff --git a/models/microsemi/src/main/yang/ietf-inet-types.yang b/models/microsemi/src/main/yang/ietf-inet-types.yang
deleted file mode 100644
index 5388b03..0000000
--- a/models/microsemi/src/main/yang/ietf-inet-types.yang
+++ /dev/null
@@ -1,461 +0,0 @@
-module ietf-inet-types {
-
- namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types";
- prefix "inet";
-
- organization
- "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
-
- contact
- "WG Web: <http://tools.ietf.org/wg/netmod/>
- WG List: <mailto:netmod@ietf.org>
-
- WG Chair: David Kessens
- <mailto:david.kessens@nsn.com>
-
- WG Chair: Juergen Schoenwaelder
- <mailto:j.schoenwaelder@jacobs-university.de>
-
- Editor: Juergen Schoenwaelder
- <mailto:j.schoenwaelder@jacobs-university.de>";
-
- description
- "This module contains a collection of generally useful derived
- YANG data types for Internet addresses and related things.
-
- Copyright (c) 2013 IETF Trust and the persons identified as
- authors of the code. All rights reserved.
-
- Redistribution and use in source and binary forms, with or
- without modification, is permitted pursuant to, and subject
- to the license terms contained in, the Simplified BSD License
- set forth in Section 4.c of the IETF Trust's Legal Provisions
- Relating to IETF Documents
- (http://trustee.ietf.org/license-info).
-
- This version of this YANG module is part of RFC 6991; see
- the RFC itself for full legal notices.";
-
- revision 2013-07-15 {
- description
- "This revision adds the following new data types:
- - ip-address-no-zone
- - ipv4-address-no-zone
- - ipv6-address-no-zone";
- reference
- "RFC 6991: Common YANG Data Types";
- }
-
- revision 2010-09-24 {
- description
- "Initial revision.";
- reference
- "RFC 6021: Common YANG Data Types";
- }
-
- /*** collection of types related to protocol fields ***/
-
- typedef ip-version {
- type enumeration {
- enum unknown {
- value "0";
- description
- "An unknown or unspecified version of the Internet
- protocol.";
- }
- enum ipv4 {
- value "1";
- description
- "The IPv4 protocol as defined in RFC 791.";
- }
- enum ipv6 {
- value "2";
- description
- "The IPv6 protocol as defined in RFC 2460.";
- }
- }
- description
- "This value represents the version of the IP protocol.
-
- In the value set and its semantics, this type is equivalent
- to the InetVersion textual convention of the SMIv2.";
- reference
- "RFC 791: Internet Protocol
- RFC 2460: Internet Protocol, Version 6 (IPv6) Specification
- RFC 4001: Textual Conventions for Internet Network Addresses";
- }
-
- typedef dscp {
- type uint8 {
- range "0..63";
- }
- description
- "The dscp type represents a Differentiated Services Code Point
- that may be used for marking packets in a traffic stream.
- In the value set and its semantics, this type is equivalent
- to the Dscp textual convention of the SMIv2.";
- reference
- "RFC 3289: Management Information Base for the Differentiated
- Services Architecture
- RFC 2474: Definition of the Differentiated Services Field
- (DS Field) in the IPv4 and IPv6 Headers
- RFC 2780: IANA Allocation Guidelines For Values In
- the Internet Protocol and Related Headers";
- }
-
- typedef ipv6-flow-label {
- type uint32 {
- range "0..1048575";
- }
- description
- "The ipv6-flow-label type represents the flow identifier or Flow
- Label in an IPv6 packet header that may be used to
- discriminate traffic flows.
-
- In the value set and its semantics, this type is equivalent
- to the IPv6FlowLabel textual convention of the SMIv2.";
- reference
- "RFC 3595: Textual Conventions for IPv6 Flow Label
- RFC 2460: Internet Protocol, Version 6 (IPv6) Specification";
- }
-
- typedef port-number {
- type uint16 {
- range "0..65535";
- }
- description
- "The port-number type represents a 16-bit port number of an
- Internet transport-layer protocol such as UDP, TCP, DCCP, or
- SCTP. Port numbers are assigned by IANA. A current list of
- all assignments is available from <http://www.iana.org/>.
-
- Note that the port number value zero is reserved by IANA. In
- situations where the value zero does not make sense, it can
- be excluded by subtyping the port-number type.
- In the value set and its semantics, this type is equivalent
- to the InetPortNumber textual convention of the SMIv2.";
- reference
- "RFC 768: User Datagram Protocol
- RFC 793: Transmission Control Protocol
- RFC 4960: Stream Control Transmission Protocol
- RFC 4340: Datagram Congestion Control Protocol (DCCP)
- RFC 4001: Textual Conventions for Internet Network Addresses";
- }
-
- /*** collection of types related to autonomous systems ***/
-
- typedef as-number {
- type uint32;
- description
- "The as-number type represents autonomous system numbers
- which identify an Autonomous System (AS). An AS is a set
- of routers under a single technical administration, using
- an interior gateway protocol and common metrics to route
- packets within the AS, and using an exterior gateway
- protocol to route packets to other ASes. IANA maintains
- the AS number space and has delegated large parts to the
- regional registries.
-
- Autonomous system numbers were originally limited to 16
- bits. BGP extensions have enlarged the autonomous system
- number space to 32 bits. This type therefore uses an uint32
- base type without a range restriction in order to support
- a larger autonomous system number space.
-
- In the value set and its semantics, this type is equivalent
- to the InetAutonomousSystemNumber textual convention of
- the SMIv2.";
- reference
- "RFC 1930: Guidelines for creation, selection, and registration
- of an Autonomous System (AS)
- RFC 4271: A Border Gateway Protocol 4 (BGP-4)
- RFC 4001: Textual Conventions for Internet Network Addresses
- RFC 6793: BGP Support for Four-Octet Autonomous System (AS)
- Number Space";
- }
-
- /*** collection of types related to IP addresses and hostnames ***/
-
- typedef ip-address {
- type union {
- type inet:ipv4-address;
- type inet:ipv6-address;
- }
- description
- "The ip-address type represents an IP address and is IP
- version neutral. The format of the textual representation
- implies the IP version. This type supports scoped addresses
- by allowing zone identifiers in the address format.";
- reference
- "RFC 4007: IPv6 Scoped Address Architecture";
- }
-
- typedef ipv4-address {
- type string {
- pattern
- '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}'
- + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'
- + '(%[\p{N}\p{L}]+)?';
- }
- description
- "The ipv4-address type represents an IPv4 address in
- dotted-quad notation. The IPv4 address may include a zone
- index, separated by a % sign.
-
- The zone index is used to disambiguate identical address
- values. For link-local addresses, the zone index will
- typically be the interface index number or the name of an
- interface. If the zone index is not present, the default
- zone of the device will be used.
-
- The canonical format for the zone index is the numerical
- format";
- }
-
- typedef ipv6-address {
- type string {
- pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}'
- + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|'
- + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}'
- + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))'
- + '(%[\p{N}\p{L}]+)?';
- pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|'
- + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)'
- + '(%.+)?';
- }
- description
- "The ipv6-address type represents an IPv6 address in full,
- mixed, shortened, and shortened-mixed notation. The IPv6
- address may include a zone index, separated by a % sign.
-
- The zone index is used to disambiguate identical address
- values. For link-local addresses, the zone index will
- typically be the interface index number or the name of an
- interface. If the zone index is not present, the default
- zone of the device will be used.
-
-
-
- The canonical format of IPv6 addresses uses the textual
- representation defined in Section 4 of RFC 5952. The
- canonical format for the zone index is the numerical
- format as described in Section 11.2 of RFC 4007.";
- reference
- "RFC 4291: IP Version 6 Addressing Architecture
- RFC 4007: IPv6 Scoped Address Architecture
- RFC 5952: A Recommendation for IPv6 Address Text
- Representation";
- }
-
- typedef ip-address-no-zone {
- type union {
- type inet:ipv4-address-no-zone;
- type inet:ipv6-address-no-zone;
- }
- description
- "The ip-address-no-zone type represents an IP address and is
- IP version neutral. The format of the textual representation
- implies the IP version. This type does not support scoped
- addresses since it does not allow zone identifiers in the
- address format.";
- reference
- "RFC 4007: IPv6 Scoped Address Architecture";
- }
-
- typedef ipv4-address-no-zone {
- type inet:ipv4-address {
- pattern '[0-9\.]*';
- }
- description
- "An IPv4 address without a zone index. This type, derived from
- ipv4-address, may be used in situations where the zone is
- known from the context and hence no zone index is needed.";
- }
-
- typedef ipv6-address-no-zone {
- type inet:ipv6-address {
- pattern '[0-9a-fA-F:\.]*';
- }
- description
- "An IPv6 address without a zone index. This type, derived from
- ipv6-address, may be used in situations where the zone is
- known from the context and hence no zone index is needed.";
- reference
- "RFC 4291: IP Version 6 Addressing Architecture
- RFC 4007: IPv6 Scoped Address Architecture
- RFC 5952: A Recommendation for IPv6 Address Text
- Representation";
- }
-
- typedef ip-prefix {
- type union {
- type inet:ipv4-prefix;
- type inet:ipv6-prefix;
- }
- description
- "The ip-prefix type represents an IP prefix and is IP
- version neutral. The format of the textual representations
- implies the IP version.";
- }
-
- typedef ipv4-prefix {
- type string {
- pattern
- '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}'
- + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'
- + '/(([0-9])|([1-2][0-9])|(3[0-2]))';
- }
- description
- "The ipv4-prefix type represents an IPv4 address prefix.
- The prefix length is given by the number following the
- slash character and must be less than or equal to 32.
-
- A prefix length value of n corresponds to an IP address
- mask that has n contiguous 1-bits from the most
- significant bit (MSB) and all other bits set to 0.
-
- The canonical format of an IPv4 prefix has all bits of
- the IPv4 address set to zero that are not part of the
- IPv4 prefix.";
- }
-
- typedef ipv6-prefix {
- type string {
- pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}'
- + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|'
- + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}'
- + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))'
- + '(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))';
- pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|'
- + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)'
- + '(/.+)';
- }
-
-
- description
- "The ipv6-prefix type represents an IPv6 address prefix.
- The prefix length is given by the number following the
- slash character and must be less than or equal to 128.
-
- A prefix length value of n corresponds to an IP address
- mask that has n contiguous 1-bits from the most
- significant bit (MSB) and all other bits set to 0.
-
- The IPv6 address should have all bits that do not belong
- to the prefix set to zero.
-
- The canonical format of an IPv6 prefix has all bits of
- the IPv6 address set to zero that are not part of the
- IPv6 prefix. Furthermore, the IPv6 address is represented
- as defined in Section 4 of RFC 5952.";
- reference
- "RFC 5952: A Recommendation for IPv6 Address Text
- Representation";
- }
-
- /*** collection of domain name and URI types ***/
-
- typedef domain-name {
- type string {
- pattern
- '((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*'
- + '([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)'
- + '|\.';
- length "1..253";
- }
- description
- "The domain-name type represents a DNS domain name. The
- name SHOULD be fully qualified whenever possible.
-
- Internet domain names are only loosely specified. Section
- 3.5 of RFC 1034 recommends a syntax (modified in Section
- 2.1 of RFC 1123). The pattern above is intended to allow
- for current practice in domain name use, and some possible
- future expansion. It is designed to hold various types of
- domain names, including names used for A or AAAA records
- (host names) and other records, such as SRV records. Note
- that Internet host names have a stricter syntax (described
- in RFC 952) than the DNS recommendations in RFCs 1034 and
- 1123, and that systems that want to store host names in
- schema nodes using the domain-name type are recommended to
- adhere to this stricter standard to ensure interoperability.
-
- The encoding of DNS names in the DNS protocol is limited
- to 255 characters. Since the encoding consists of labels
- prefixed by a length bytes and there is a trailing NULL
- byte, only 253 characters can appear in the textual dotted
- notation.
-
- The description clause of schema nodes using the domain-name
- type MUST describe when and how these names are resolved to
- IP addresses. Note that the resolution of a domain-name value
- may require to query multiple DNS records (e.g., A for IPv4
- and AAAA for IPv6). The order of the resolution process and
- which DNS record takes precedence can either be defined
- explicitly or may depend on the configuration of the
- resolver.
-
- Domain-name values use the US-ASCII encoding. Their canonical
- format uses lowercase US-ASCII characters. Internationalized
- domain names MUST be A-labels as per RFC 5890.";
- reference
- "RFC 952: DoD Internet Host Table Specification
- RFC 1034: Domain Names - Concepts and Facilities
- RFC 1123: Requirements for Internet Hosts -- Application
- and Support
- RFC 2782: A DNS RR for specifying the location of services
- (DNS SRV)
- RFC 5890: Internationalized Domain Names in Applications
- (IDNA): Definitions and Document Framework";
- }
-
- typedef host {
- type union {
- type inet:ip-address;
- type inet:domain-name;
- }
- description
- "The host type represents either an IP address or a DNS
- domain name.";
- }
-
- typedef uri {
- type string;
- description
- "The uri type represents a Uniform Resource Identifier
- (URI) as defined by STD 66.
-
- Objects using the uri type MUST be in US-ASCII encoding,
- and MUST be normalized as described by RFC 3986 Sections
- 6.2.1, 6.2.2.1, and 6.2.2.2. All unnecessary
- percent-encoding is removed, and all case-insensitive
- characters are set to lowercase except for hexadecimal
- digits, which are normalized to uppercase as described in
- Section 6.2.2.1.
-
- The purpose of this normalization is to help provide
- unique URIs. Note that this normalization is not
- sufficient to provide uniqueness. Two URIs that are
- textually distinct after this normalization may still be
- equivalent.
-
- Objects using the uri type may restrict the schemes that
- they permit. For example, 'data:' and 'urn:' schemes
- might not be appropriate.
-
- A zero-length URI is not a valid URI. This can be used to
- express 'URI absent' where required.
-
- In the value set and its semantics, this type is equivalent
- to the Uri SMIv2 textual convention defined in RFC 5017.";
- reference
- "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax
- RFC 3305: Report from the Joint W3C/IETF URI Planning Interest
- Group: Uniform Resource Identifiers (URIs), URLs,
- and Uniform Resource Names (URNs): Clarifications
- and Recommendations
- RFC 5017: MIB Textual Conventions for Uniform Resource
- Identifiers (URIs)";
- }
-
-}
diff --git a/models/microsemi/src/main/yang/ietf-interfaces.yang b/models/microsemi/src/main/yang/ietf-interfaces@2014-05-08.yang
similarity index 100%
rename from models/microsemi/src/main/yang/ietf-interfaces.yang
rename to models/microsemi/src/main/yang/ietf-interfaces@2014-05-08.yang
diff --git a/models/microsemi/src/main/yang/ietf-netconf-acm.yang b/models/microsemi/src/main/yang/ietf-netconf-acm.yang
deleted file mode 100644
index f0c6fe3..0000000
--- a/models/microsemi/src/main/yang/ietf-netconf-acm.yang
+++ /dev/null
@@ -1,449 +0,0 @@
-module ietf-netconf-acm {
-
- namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-acm";
-
- prefix "nacm";
-
- import ietf-yang-types {
- prefix yang;
- }
-
- organization
- "IETF NETCONF (Network Configuration) Working Group";
-
- contact
- "WG Web: <http://tools.ietf.org/wg/netconf/>
- WG List: <mailto:netconf@ietf.org>
-
- WG Chair: Mehmet Ersue
- <mailto:mehmet.ersue@nsn.com>
-
- WG Chair: Bert Wijnen
- <mailto:bertietf@bwijnen.net>
-
- Editor: Andy Bierman
- <mailto:andy@yumaworks.com>
-
- Editor: Martin Bjorklund
- <mailto:mbj@tail-f.com>";
-
- description
- "NETCONF Access Control Model.
-
- Copyright (c) 2012 IETF Trust and the persons identified as
- authors of the code. All rights reserved.
-
- Redistribution and use in source and binary forms, with or
- without modification, is permitted pursuant to, and subject
- to the license terms contained in, the Simplified BSD
- License set forth in Section 4.c of the IETF Trust's
- Legal Provisions Relating to IETF Documents
- (http://trustee.ietf.org/license-info).
-
- This version of this YANG module is part of RFC 6536; see
- the RFC itself for full legal notices.";
-
- revision "2012-02-22" {
- description
- "Initial version";
- reference
- "RFC 6536: Network Configuration Protocol (NETCONF)
- Access Control Model";
- }
-
- /*
- * Extension statements
- */
-
- extension default-deny-write {
- description
- "Used to indicate that the data model node
- represents a sensitive security system parameter.
-
- If present, and the NACM module is enabled (i.e.,
- /nacm/enable-nacm object equals 'true'), the NETCONF server
- will only allow the designated 'recovery session' to have
- write access to the node. An explicit access control rule is
- required for all other users.
-
- The 'default-deny-write' extension MAY appear within a data
- definition statement. It is ignored otherwise.";
- }
-
- extension default-deny-all {
- description
- "Used to indicate that the data model node
- controls a very sensitive security system parameter.
-
- If present, and the NACM module is enabled (i.e.,
- /nacm/enable-nacm object equals 'true'), the NETCONF server
- will only allow the designated 'recovery session' to have
- read, write, or execute access to the node. An explicit
- access control rule is required for all other users.
-
- The 'default-deny-all' extension MAY appear within a data
- definition statement, 'rpc' statement, or 'notification'
- statement. It is ignored otherwise.";
- }
-
- /*
- * Derived types
- */
-
- typedef user-name-type {
- type string {
- length "1..max";
- }
- description
- "General Purpose Username string.";
- }
-
- typedef matchall-string-type {
- type string {
- pattern "\*";
- }
- description
- "The string containing a single asterisk '*' is used
- to conceptually represent all possible values
- for the particular leaf using this data type.";
- }
-
- typedef access-operations-type {
- type bits {
- bit create {
- description
- "Any protocol operation that creates a
- new data node.";
- }
- bit read {
- description
- "Any protocol operation or notification that
- returns the value of a data node.";
- }
- bit update {
- description
- "Any protocol operation that alters an existing
- data node.";
- }
- bit delete {
- description
- "Any protocol operation that removes a data node.";
- }
- bit exec {
- description
- "Execution access to the specified protocol operation.";
- }
- }
- description
- "NETCONF Access Operation.";
- }
-
- typedef group-name-type {
- type string {
- length "1..max";
- pattern "[^\*].*";
- }
- description
- "Name of administrative group to which
- users can be assigned.";
- }
-
- typedef action-type {
- type enumeration {
- enum permit {
- description
- "Requested action is permitted.";
- }
- enum deny {
- description
- "Requested action is denied.";
- }
- }
- description
- "Action taken by the server when a particular
- rule matches.";
- }
-
- typedef node-instance-identifier {
- type yang:xpath1.0;
- description
- "Path expression used to represent a special
- data node instance identifier string.
-
- A node-instance-identifier value is an
- unrestricted YANG instance-identifier expression.
- All the same rules as an instance-identifier apply
- except predicates for keys are optional. If a key
- predicate is missing, then the node-instance-identifier
- represents all possible server instances for that key.
-
- This XPath expression is evaluated in the following context:
-
- o The set of namespace declarations are those in scope on
- the leaf element where this type is used.
-
- o The set of variable bindings contains one variable,
- 'USER', which contains the name of the user of the current
- session.
-
- o The function library is the core function library, but
- note that due to the syntax restrictions of an
- instance-identifier, no functions are allowed.
-
- o The context node is the root node in the data tree.";
- }
-
- /*
- * Data definition statements
- */
-
- container nacm {
-// nacm:default-deny-all;
-
- description
- "Parameters for NETCONF Access Control Model.";
-
- leaf enable-nacm {
- type boolean;
- default true;
- description
- "Enables or disables all NETCONF access control
- enforcement. If 'true', then enforcement
- is enabled. If 'false', then enforcement
- is disabled.";
- }
-
- leaf read-default {
- type action-type;
- default "permit";
- description
- "Controls whether read access is granted if
- no appropriate rule is found for a
- particular read request.";
- }
-
- leaf write-default {
- type action-type;
- default "deny";
- description
- "Controls whether create, update, or delete access
- is granted if no appropriate rule is found for a
- particular write request.";
- }
-
- leaf exec-default {
- type action-type;
- default "permit";
- description
- "Controls whether exec access is granted if no appropriate
- rule is found for a particular protocol operation request.";
- }
-
- leaf enable-external-groups {
- type boolean;
- default true;
- description
- "Controls whether the server uses the groups reported by the
- NETCONF transport layer when it assigns the user to a set of
- NACM groups. If this leaf has the value 'false', any group
- names reported by the transport layer are ignored by the
- server.";
- }
-
- leaf denied-operations {
- type yang:zero-based-counter32;
- config false;
- mandatory true;
- description
- "Number of times since the server last restarted that a
- protocol operation request was denied.";
- }
-
- leaf denied-data-writes {
- type yang:zero-based-counter32;
- config false;
- mandatory true;
- description
- "Number of times since the server last restarted that a
- protocol operation request to alter
- a configuration datastore was denied.";
- }
-
- leaf denied-notifications {
- type yang:zero-based-counter32;
- config false;
- mandatory true;
- description
- "Number of times since the server last restarted that
- a notification was dropped for a subscription because
- access to the event type was denied.";
- }
-
- container groups {
- description
- "NETCONF Access Control Groups.";
-
- list group {
- key name;
-
- description
- "One NACM Group Entry. This list will only contain
- configured entries, not any entries learned from
- any transport protocols.";
-
- leaf name {
- type group-name-type;
- description
- "Group name associated with this entry.";
- }
-
- leaf-list user-name {
- type user-name-type;
- description
- "Each entry identifies the username of
- a member of the group associated with
- this entry.";
- }
- }
- }
-
- list rule-list {
- key "name";
- ordered-by user;
- description
- "An ordered collection of access control rules.";
-
- leaf name {
- type string {
- length "1..max";
- }
- description
- "Arbitrary name assigned to the rule-list.";
- }
- leaf-list group {
- type union {
- type matchall-string-type;
- type group-name-type;
- }
- description
- "List of administrative groups that will be
- assigned the associated access rights
- defined by the 'rule' list.
-
- The string '*' indicates that all groups apply to the
- entry.";
- }
-
- list rule {
- key "name";
- ordered-by user;
- description
- "One access control rule.
-
- Rules are processed in user-defined order until a match is
- found. A rule matches if 'module-name', 'rule-type', and
- 'access-operations' match the request. If a rule
- matches, the 'action' leaf determines if access is granted
- or not.";
-
- leaf name {
- type string {
- length "1..max";
- }
- description
- "Arbitrary name assigned to the rule.";
- }
-
- leaf module-name {
- type union {
- type matchall-string-type;
- type string;
- }
- default "*";
- description
- "Name of the module associated with this rule.
-
- This leaf matches if it has the value '*' or if the
- object being accessed is defined in the module with the
- specified module name.";
- }
- choice rule-type {
- description
- "This choice matches if all leafs present in the rule
- match the request. If no leafs are present, the
- choice matches all requests.";
- case protocol-operation {
- leaf rpc-name {
- type union {
- type matchall-string-type;
- type string;
- }
- description
- "This leaf matches if it has the value '*' or if
- its value equals the requested protocol operation
- name.";
- }
- }
- case notification {
- leaf notification-name {
- type union {
- type matchall-string-type;
- type string;
- }
- description
- "This leaf matches if it has the value '*' or if its
- value equals the requested notification name.";
- }
- }
- case data-node {
- leaf path {
- type node-instance-identifier;
- mandatory true;
- description
- "Data Node Instance Identifier associated with the
- data node controlled by this rule.
-
- Configuration data or state data instance
- identifiers start with a top-level data node. A
- complete instance identifier is required for this
- type of path value.
-
- The special value '/' refers to all possible
- datastore contents.";
- }
- }
- }
-
- leaf access-operations {
- type union {
- type matchall-string-type;
- type access-operations-type;
- }
- default "*";
- description
- "Access operations associated with this rule.
-
- This leaf matches if it has the value '*' or if the
- bit corresponding to the requested operation is set.";
- }
-
- leaf action {
- type action-type;
- mandatory true;
- description
- "The access control action associated with the
- rule. If a rule is determined to match a
- particular request, then this object is used
- to determine whether to permit or deny the
- request.";
- }
-
- leaf comment {
- type string;
- description
- "A textual description of the access rule.";
- }
- }
- }
- }
-}
diff --git a/models/microsemi/src/main/yang/ietf-netconf-monitoring.yang b/models/microsemi/src/main/yang/ietf-netconf-monitoring.yang
deleted file mode 100644
index 8130bfd..0000000
--- a/models/microsemi/src/main/yang/ietf-netconf-monitoring.yang
+++ /dev/null
@@ -1,559 +0,0 @@
-
-module ietf-netconf-monitoring {
-
- namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring";
- prefix "ncm";
-
- import ietf-yang-types { prefix yang; }
- import ietf-inet-types { prefix inet; }
-
- organization
- "IETF NETCONF (Network Configuration) Working Group";
-
- contact
- "WG Web: <http://tools.ietf.org/wg/netconf/>
- WG List: <mailto:netconf@ietf.org>
-
- WG Chair: Mehmet Ersue
- <mailto:mehmet.ersue@nsn.com>
-
- WG Chair: Bert Wijnen
- <mailto:bertietf@bwijnen.net>
-
- Editor: Mark Scott
- <mailto:mark.scott@ericsson.com>
-
- Editor: Martin Bjorklund
- <mailto:mbj@tail-f.com>";
-
- description
- "NETCONF Monitoring Module.
- All elements in this module are read-only.
-
- Copyright (c) 2010 IETF Trust and the persons identified as
- authors of the code. All rights reserved.
-
- Redistribution and use in source and binary forms, with or
- without modification, is permitted pursuant to, and subject
- to the license terms contained in, the Simplified BSD
- License set forth in Section 4.c of the IETF Trust's
- Legal Provisions Relating to IETF Documents
- (http://trustee.ietf.org/license-info).
-
- This version of this YANG module is part of RFC 6022; see
- the RFC itself for full legal notices.";
-
- revision 2010-10-04 {
- description
- "Initial revision.";
- reference
- "RFC 6022: YANG Module for NETCONF Monitoring";
- }
-
- typedef netconf-datastore-type {
- type enumeration {
- enum running;
- enum candidate;
- enum startup;
- }
- description
- "Enumeration of possible NETCONF datastore types.";
- reference
- "RFC 4741: NETCONF Configuration Protocol";
- }
-
- identity transport {
- description
- "Base identity for NETCONF transport types.";
- }
-
- identity netconf-ssh {
- base transport;
- description
- "NETCONF over Secure Shell (SSH).";
- reference
- "RFC 4742: Using the NETCONF Configuration Protocol
- over Secure SHell (SSH)";
- }
-
- identity netconf-soap-over-beep {
- base transport;
- description
- "NETCONF over Simple Object Access Protocol (SOAP) over
- Blocks Extensible Exchange Protocol (BEEP).";
- reference
- "RFC 4743: Using NETCONF over the Simple Object
- Access Protocol (SOAP)";
- }
-
- identity netconf-soap-over-https {
- base transport;
- description
- "NETCONF over Simple Object Access Protocol (SOAP)
- over Hypertext Transfer Protocol Secure (HTTPS).";
- reference
- "RFC 4743: Using NETCONF over the Simple Object
- Access Protocol (SOAP)";
- }
-
- identity netconf-beep {
- base transport;
- description
- "NETCONF over Blocks Extensible Exchange Protocol (BEEP).";
- reference
- "RFC 4744: Using the NETCONF Protocol over the
- Blocks Extensible Exchange Protocol (BEEP)";
- }
-
- identity netconf-tls {
- base transport;
- description
- "NETCONF over Transport Layer Security (TLS).";
- reference
- "RFC 5539: NETCONF over Transport Layer Security (TLS)";
- }
-
- identity schema-format {
- description
- "Base identity for data model schema languages.";
- }
-
- identity xsd {
- base schema-format;
- description
- "W3C XML Schema Definition.";
- reference
- "W3C REC REC-xmlschema-1-20041028:
- XML Schema Part 1: Structures";
- }
-
- identity yang {
- base schema-format;
- description
- "The YANG data modeling language for NETCONF.";
- reference
- "RFC 6020: YANG - A Data Modeling Language for the
- Network Configuration Protocol (NETCONF)";
- }
-
- identity yin {
- base schema-format;
- description
- "The YIN syntax for YANG.";
- reference
- "RFC 6020: YANG - A Data Modeling Language for the
- Network Configuration Protocol (NETCONF)";
- }
-
- identity rng {
- base schema-format;
- description
- "Regular Language for XML Next Generation (RELAX NG).";
- reference
- "ISO/IEC 19757-2:2008: RELAX NG";
- }
-
- identity rnc {
- base schema-format;
- description
- "Relax NG Compact Syntax";
- reference
- "ISO/IEC 19757-2:2008: RELAX NG";
- }
-
- grouping common-counters {
- description
- "Counters that exist both per session, and also globally,
- accumulated from all sessions.";
-
- leaf in-rpcs {
- type yang:zero-based-counter32;
- description
- "Number of correct <rpc> messages received.";
- }
- leaf in-bad-rpcs {
- type yang:zero-based-counter32;
- description
- "Number of messages received when an <rpc> message was expected,
- that were not correct <rpc> messages. This includes XML parse
- errors and errors on the rpc layer.";
- }
- leaf out-rpc-errors {
- type yang:zero-based-counter32;
- description
- "Number of <rpc-reply> messages sent that contained an
- <rpc-error> element.";
- }
- leaf out-notifications {
- type yang:zero-based-counter32;
- description
- "Number of <notification> messages sent.";
- }
- }
-
- container netconf-state {
- config false;
- description
- "The netconf-state container is the root of the monitoring
- data model.";
-
- container capabilities {
- description
- "Contains the list of NETCONF capabilities supported by the
- server.";
-
- leaf-list capability {
- type inet:uri;
- description
- "List of NETCONF capabilities supported by the server.";
- }
- }
-
- container datastores {
- description
- "Contains the list of NETCONF configuration datastores.";
-
- list datastore {
- key name;
- description
- "List of NETCONF configuration datastores supported by
- the NETCONF server and related information.";
-
- leaf name {
- type netconf-datastore-type;
- description
- "Name of the datastore associated with this list entry.";
- }
- container locks {
- presence
- "This container is present only if the datastore
- is locked.";
- description
- "The NETCONF <lock> and <partial-lock> operations allow
- a client to lock specific resources in a datastore. The
- NETCONF server will prevent changes to the locked
- resources by all sessions except the one that acquired
- the lock(s).
-
- Monitoring information is provided for each datastore
- entry including details such as the session that acquired
- the lock, the type of lock (global or partial) and the
- list of locked resources. Multiple locks per datastore
- are supported.";
-
- grouping lock-info {
- description
- "Lock related parameters, common to both global and
- partial locks.";
-
- leaf locked-by-session {
- type uint32;
- mandatory true;
- description
- "The session ID of the session that has locked
- this resource. Both a global lock and a partial
- lock MUST contain the NETCONF session-id.
-
- If the lock is held by a session that is not managed
- by the NETCONF server (e.g., a CLI session), a session
- id of 0 (zero) is reported.";
- reference
- "RFC 4741: NETCONF Configuration Protocol";
- }
- leaf locked-time {
- type yang:date-and-time;
- mandatory true;
- description
- "The date and time of when the resource was
- locked.";
- }
- }
-
- choice lock-type {
- description
- "Indicates if a global lock or a set of partial locks
- are set.";
-
- container global-lock {
- description
- "Present if the global lock is set.";
- uses lock-info;
- }
-
- list partial-lock {
- key lock-id;
- description
- "List of partial locks.";
- reference
- "RFC 5717: Partial Lock Remote Procedure Call (RPC) for
- NETCONF";
-
- leaf lock-id {
- type uint32;
- description
- "This is the lock id returned in the <partial-lock>
- response.";
- }
- uses lock-info;
- leaf-list select {
- type yang:xpath1.0;
- min-elements 1;
- description
- "The xpath expression that was used to request
- the lock. The select expression indicates the
- original intended scope of the lock.";
- }
- leaf-list locked-node {
- type instance-identifier;
- description
- "The list of instance-identifiers (i.e., the
- locked nodes).
-
- The scope of the partial lock is defined by the list
- of locked nodes.";
- }
- }
- }
- }
- }
- }
-
- container schemas {
- description
- "Contains the list of data model schemas supported by the
- server.";
-
- list schema {
- key "identifier version format";
-
- description
- "List of data model schemas supported by the server.";
-
- leaf identifier {
- type string;
- description
- "Identifier to uniquely reference the schema. The
- identifier is used in the <get-schema> operation and may
- be used for other purposes such as file retrieval.
-
- For modeling languages that support or require a data
- model name (e.g., YANG module name) the identifier MUST
- match that name. For YANG data models, the identifier is
- the name of the module or submodule. In other cases, an
- identifier such as a filename MAY be used instead.";
- }
- leaf version {
- type string;
- description
- "Version of the schema supported. Multiple versions MAY be
- supported simultaneously by a NETCONF server. Each
- version MUST be reported individually in the schema list,
- i.e., with same identifier, possibly different location,
- but different version.
-
- For YANG data models, version is the value of the most
- recent YANG 'revision' statement in the module or
- submodule, or the empty string if no 'revision' statement
- is present.";
- }
- leaf format {
- type identityref {
- base schema-format;
- }
- description
- "The data modeling language the schema is written
- in (currently xsd, yang, yin, rng, or rnc).
- For YANG data models, 'yang' format MUST be supported and
- 'yin' format MAY also be provided.";
- }
- leaf namespace {
- type inet:uri;
- mandatory true;
- description
- "The XML namespace defined by the data model.
-
- For YANG data models, this is the module's namespace.
- If the list entry describes a submodule, this field
- contains the namespace of the module to which the
- submodule belongs.";
- }
- leaf-list location {
- type union {
- type enumeration {
- enum "NETCONF";
- }
- type inet:uri;
- }
- description
- "One or more locations from which the schema can be
- retrieved. This list SHOULD contain at least one
- entry per schema.
-
- A schema entry may be located on a remote file system
- (e.g., reference to file system for ftp retrieval) or
- retrieved directly from a server supporting the
- <get-schema> operation (denoted by the value 'NETCONF').";
- }
- }
- }
-
- container sessions {
- description
- "The sessions container includes session-specific data for
- NETCONF management sessions. The session list MUST include
- all currently active NETCONF sessions.";
-
- list session {
- key session-id;
- description
- "All NETCONF sessions managed by the NETCONF server
- MUST be reported in this list.";
-
- leaf session-id {
- type uint32 {
- range "1..max";
- }
- description
- "Unique identifier for the session. This value is the
- NETCONF session identifier, as defined in RFC 4741.";
- reference
- "RFC 4741: NETCONF Configuration Protocol";
- }
- leaf transport {
- type identityref {
- base transport;
- }
- mandatory true;
- description
- "Identifies the transport for each session, e.g.,
- 'netconf-ssh', 'netconf-soap', etc.";
- }
- leaf username {
- type string;
- mandatory true;
- description
- "The username is the client identity that was authenticated
- by the NETCONF transport protocol. The algorithm used to
- derive the username is NETCONF transport protocol specific
- and in addition specific to the authentication mechanism
- used by the NETCONF transport protocol.";
- }
- leaf source-host {
- type inet:host;
- description
- "Host identifier of the NETCONF client. The value
- returned is implementation specific (e.g., hostname,
- IPv4 address, IPv6 address)";
- }
- leaf login-time {
- type yang:date-and-time;
- mandatory true;
- description
- "Time at the server at which the session was established.";
- }
- uses common-counters {
- description
- "Per-session counters. Zero based with following reset
- behaviour:
- - at start of a session
- - when max value is reached";
- }
- }
- }
-
- container statistics {
- description
- "Statistical data pertaining to the NETCONF server.";
-
- leaf netconf-start-time {
- type yang:date-and-time;
- description
- "Date and time at which the management subsystem was
- started.";
- }
- leaf in-bad-hellos {
- type yang:zero-based-counter32;
- description
- "Number of sessions silently dropped because an
- invalid <hello> message was received. This includes <hello>
- messages with a 'session-id' attribute, bad namespace, and
- bad capability declarations.";
- }
- leaf in-sessions {
- type yang:zero-based-counter32;
- description
- "Number of sessions started. This counter is incremented
- when a <hello> message with a <session-id> is sent.
-
- 'in-sessions' - 'in-bad-hellos' =
- 'number of correctly started netconf sessions'";
- }
- leaf dropped-sessions {
- type yang:zero-based-counter32;
- description
- "Number of sessions that were abnormally terminated, e.g.,
- due to idle timeout or transport close. This counter is not
- incremented when a session is properly closed by a
- <close-session> operation, or killed by a <kill-session>
- operation.";
- }
- uses common-counters {
- description
- "Global counters, accumulated from all sessions.
- Zero based with following reset behaviour:
- - re-initialization of NETCONF server
- - when max value is reached";
- }
- }
- }
-
- rpc get-schema {
- description
- "This operation is used to retrieve a schema from the
- NETCONF server.
-
- Positive Response:
- The NETCONF server returns the requested schema.
-
- Negative Response:
- If requested schema does not exist, the <error-tag> is
- 'invalid-value'.
-
- If more than one schema matches the requested parameters, the
- <error-tag> is 'operation-failed', and <error-app-tag> is
- 'data-not-unique'.";
-
- input {
- leaf identifier {
- type string;
- mandatory true;
- description
- "Identifier for the schema list entry.";
- }
- leaf version {
- type string;
- description
- "Version of the schema requested. If this parameter is not
- present, and more than one version of the schema exists on
- the server, a 'data-not-unique' error is returned, as
- described above.";
- }
- leaf format {
- type identityref {
- base schema-format;
- }
- description
- "The data modeling language of the schema. If this
- parameter is not present, and more than one formats of
- the schema exists on the server, a 'data-not-unique' error
- is returned, as described above.";
- }
- }
- output {
- anyxml data {
- description
- "Contains the schema content.";
- }
- }
- }
-}
diff --git a/models/microsemi/src/main/yang/ietf-netconf-notifications.yang b/models/microsemi/src/main/yang/ietf-netconf-notifications.yang
deleted file mode 100644
index 4ec1dea..0000000
--- a/models/microsemi/src/main/yang/ietf-netconf-notifications.yang
+++ /dev/null
@@ -1,337 +0,0 @@
-module ietf-netconf-notifications {
-
- namespace
- "urn:ietf:params:xml:ns:yang:ietf-netconf-notifications";
-
- prefix ncn;
-
- import ietf-inet-types { prefix inet; }
- import ietf-netconf { prefix nc; }
-
- organization
- "IETF NETCONF (Network Configuration Protocol) Working Group";
-
- contact
- "WG Web: <http://tools.ietf.org/wg/netconf/>
- WG List: <mailto:netconf@ietf.org>
-
- WG Chair: Bert Wijnen
- <mailto:bertietf@bwijnen.net>
-
- WG Chair: Mehmet Ersue
- <mailto:mehmet.ersue@nsn.com>
-
- Editor: Andy Bierman
- <mailto:andy@netconfcentral.org>";
-
- description
- "This module defines a YANG data model for use with the
- NETCONF protocol that allows the NETCONF client to
- receive common NETCONF base event notifications.
-
- Copyright (c) 2012 IETF Trust and the persons identified as
- the document authors. All rights reserved.
-
- Redistribution and use in source and binary forms, with or
- without modification, is permitted pursuant to, and subject
- to the license terms contained in, the Simplified BSD License
- set forth in Section 4.c of the IETF Trust's Legal Provisions
- Relating to IETF Documents
- (http://trustee.ietf.org/license-info).
-
- This version of this YANG module is part of RFC 6470; see
- the RFC itself for full legal notices.";
-
- revision "2012-02-06" {
- description
- "Initial version.";
- reference
- "RFC 6470: NETCONF Base Notifications";
- }
-
- grouping common-session-parms {
- description
- "Common session parameters to identify a
- management session.";
-
- leaf username {
- type string;
- mandatory true;
- description
- "Name of the user for the session.";
- }
-
- leaf session-id {
- type nc:session-id-or-zero-type;
- mandatory true;
- description
- "Identifier of the session.
- A NETCONF session MUST be identified by a non-zero value.
- A non-NETCONF session MAY be identified by the value zero.";
- }
-
- leaf source-host {
- type inet:ip-address;
- description
- "Address of the remote host for the session.";
- }
- }
-
- grouping changed-by-parms {
- description
- "Common parameters to identify the source
- of a change event, such as a configuration
- or capability change.";
-
- container changed-by {
- description
- "Indicates the source of the change.
- If caused by internal action, then the
- empty leaf 'server' will be present.
- If caused by a management session, then
- the name, remote host address, and session ID
- of the session that made the change will be reported.";
- choice server-or-user {
- mandatory true;
- leaf server {
- type empty;
- description
- "If present, the change was caused
- by the server.";
- }
-
- case by-user {
- uses common-session-parms;
- }
- } // choice server-or-user
- } // container changed-by-parms
- }
-
-
- notification netconf-config-change {
- description
- "Generated when the NETCONF server detects that the
- <running> or <startup> configuration datastore
- has been changed by a management session.
- The notification summarizes the edits that
- have been detected.
-
- The server MAY choose to also generate this
- notification while loading a datastore during the
- boot process for the device.";
-
- uses changed-by-parms;
-
- leaf datastore {
- type enumeration {
- enum running {
- description "The <running> datastore has changed.";
- }
- enum startup {
- description "The <startup> datastore has changed";
- }
- }
- default "running";
- description
- "Indicates which configuration datastore has changed.";
- }
-
- list edit {
- description
- "An edit record SHOULD be present for each distinct
- edit operation that the server has detected on
- the target datastore. This list MAY be omitted
- if the detailed edit operations are not known.
- The server MAY report entries in this list for
- changes not made by a NETCONF session (e.g., CLI).";
-
- leaf target {
- type instance-identifier;
- description
- "Topmost node associated with the configuration change.
- A server SHOULD set this object to the node within
- the datastore that is being altered. A server MAY
- set this object to one of the ancestors of the actual
- node that was changed, or omit this object, if the
- exact node is not known.";
- }
-
- leaf operation {
- type nc:edit-operation-type;
- description
- "Type of edit operation performed.
- A server MUST set this object to the NETCONF edit
- operation performed on the target datastore.";
- }
- } // list edit
- } // notification netconf-config-change
-
- notification netconf-capability-change {
- description
- "Generated when the NETCONF server detects that
- the server capabilities have changed.
- Indicates which capabilities have been added, deleted,
- and/or modified. The manner in which a server
- capability is changed is outside the scope of this
- document.";
-
- uses changed-by-parms;
-
- leaf-list added-capability {
- type inet:uri;
- description
- "List of capabilities that have just been added.";
- }
-
- leaf-list deleted-capability {
- type inet:uri;
- description
- "List of capabilities that have just been deleted.";
- }
-
- leaf-list modified-capability {
- type inet:uri;
- description
- "List of capabilities that have just been modified.
- A capability is considered to be modified if the
- base URI for the capability has not changed, but
- one or more of the parameters encoded at the end of
- the capability URI have changed.
- The new modified value of the complete URI is returned.";
- }
- } // notification netconf-capability-change
-
-
- notification netconf-session-start {
- description
- "Generated when a NETCONF server detects that a
- NETCONF session has started. A server MAY generate
- this event for non-NETCONF management sessions.
- Indicates the identity of the user that started
- the session.";
- uses common-session-parms;
- } // notification netconf-session-start
-
- notification netconf-session-end {
- description
- "Generated when a NETCONF server detects that a
- NETCONF session has terminated.
- A server MAY optionally generate this event for
- non-NETCONF management sessions. Indicates the
- identity of the user that owned the session,
- and why the session was terminated.";
-
- uses common-session-parms;
-
- leaf killed-by {
- when "../termination-reason = 'killed'";
- type nc:session-id-type;
- description
- "The ID of the session that directly caused this session
- to be abnormally terminated. If this session was abnormally
- terminated by a non-NETCONF session unknown to the server,
- then this leaf will not be present.";
- }
-
- leaf termination-reason {
- type enumeration {
- enum "closed" {
- description
- "The session was terminated by the client in normal
- fashion, e.g., by the NETCONF <close-session>
- protocol operation.";
- }
- enum "killed" {
- description
- "The session was terminated in abnormal
- fashion, e.g., by the NETCONF <kill-session>
- protocol operation.";
- }
- enum "dropped" {
- description
- "The session was terminated because the transport layer
- connection was unexpectedly closed.";
- }
- enum "timeout" {
- description
- "The session was terminated because of inactivity,
- e.g., waiting for the <hello> message or <rpc>
- messages.";
- }
- enum "bad-hello" {
- description
- "The client's <hello> message was invalid.";
- }
- enum "other" {
- description
- "The session was terminated for some other reason.";
- }
- }
- mandatory true;
- description
- "Reason the session was terminated.";
- }
- } // notification netconf-session-end
-
-
- notification netconf-confirmed-commit {
- description
- "Generated when a NETCONF server detects that a
- confirmed-commit event has occurred. Indicates the event
- and the current state of the confirmed-commit procedure
- in progress.";
- reference
- "RFC 6241, Section 8.4";
-
- uses common-session-parms {
- when "../confirm-event != 'timeout'";
- }
-
- leaf confirm-event {
- type enumeration {
- enum "start" {
- description
- "The confirmed-commit procedure has started.";
- }
- enum "cancel" {
- description
- "The confirmed-commit procedure has been canceled,
- e.g., due to the session being terminated, or an
- explicit <cancel-commit> operation.";
- }
- enum "timeout" {
- description
- "The confirmed-commit procedure has been canceled
- due to the confirm-timeout interval expiring.
- The common session parameters will not be present
- in this sub-mode.";
- }
- enum "extend" {
- description
- "The confirmed-commit timeout has been extended,
- e.g., by a new <confirmed-commit> operation.";
- }
- enum "complete" {
- description
- "The confirmed-commit procedure has been completed.";
- }
- }
- mandatory true;
- description
- "Indicates the event that caused the notification.";
- }
-
- leaf timeout {
- when
- "../confirm-event = 'start' or ../confirm-event = 'extend'";
- type uint32;
- units "seconds";
- description
- "The configured timeout value if the event type
- is 'start' or 'extend'. This value represents
- the approximate number of seconds from the event
- time when the 'timeout' event might occur.";
- }
- } // notification netconf-confirmed-commit
-
-}
diff --git a/models/microsemi/src/main/yang/ietf-netconf-with-defaults.yang b/models/microsemi/src/main/yang/ietf-netconf-with-defaults.yang
deleted file mode 100644
index 1c569a2..0000000
--- a/models/microsemi/src/main/yang/ietf-netconf-with-defaults.yang
+++ /dev/null
@@ -1,165 +0,0 @@
- module ietf-netconf-with-defaults {
-
- namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults";
-
- prefix ncwd;
-
- import ietf-netconf { prefix nc; }
-
- organization
- "IETF NETCONF (Network Configuration Protocol) Working Group";
-
- contact
- "WG Web: <http://tools.ietf.org/wg/netconf/>
- WG List: <mailto:netconf@ietf.org>
-
- WG Chair: Bert Wijnen
- <mailto:bertietf@bwijnen.net>
-
- WG Chair: Mehmet Ersue
- <mailto:mehmet.ersue@nsn.com>
-
- Editor: Andy Bierman
- <mailto:andy.bierman@brocade.com>
-
- Editor: Balazs Lengyel
- <mailto:balazs.lengyel@ericsson.com>";
-
- description
- "This module defines an extension to the NETCONF protocol
- that allows the NETCONF client to control how default
- values are handled by the server in particular NETCONF operations.
-
- Copyright (c) 2010 IETF Trust and the persons identified as
- the document authors. All rights reserved.
-
- Redistribution and use in source and binary forms, with or
- without modification, is permitted pursuant to, and subject
- to the license terms contained in, the Simplified BSD License
- set forth in Section 4.c of the IETF Trust's Legal Provisions
- Relating to IETF Documents
- (http://trustee.ietf.org/license-info).
-
- This version of this YANG module is part of RFC XXXX; see
- the RFC itself for full legal notices.";
- // RFC Ed.: replace XXXX with actual RFC number and remove this note
-
- // RFC Ed.: remove this note
- // Note: extracted from draft-ietf-netmod-with-defaults-10.txt
-
- revision 2010-06-09 {
- description
- "Initial version.";
- reference
- "RFC XXXX: With-defaults capability for NETCONF";
- }
- // RFC Ed.: replace XXXX with actual
- // RFC number and remove this note
-
- typedef with-defaults-mode {
- description
- "Possible modes to report default data.";
- reference
- "RFC XXXX; section 3.";
- // RFC Ed.: replace XXXX with actual
- // RFC number and remove this note
-
- type enumeration {
- enum report-all {
- description
- "All default data is reported.";
- reference
- "RFC XXXX; section 3.1";
- // RFC Ed.: replace XXXX with actual
- // RFC number and remove this note
-
- }
- enum report-all-tagged {
- description
- "All default data is reported.
- Any nodes considered to be default data
- will contain a 'wd:default' XML attribute,
- set to 'true'.";
- reference
- "RFC XXXX; section 3.4";
- // RFC Ed.: replace XXXX with actual
- // RFC number and remove this note
- }
- enum trim {
- description
- "Values are not reported if they contain the default.";
- reference
- "RFC XXXX; section 3.2";
- // RFC Ed.: replace XXXX with actual
- // RFC number and remove this note
-
- }
- enum explicit {
- description
- "Report values that contain the definition of
- explicitly set data.";
- reference
- "RFC XXXX; section 3.3";
- // RFC Ed.: replace XXXX with actual
- // RFC number and remove this note
- }
- }
- }
-
- grouping with-defaults-parameters {
- description
- "Contains the <with-defaults> parameter for control
- of defaults in NETCONF retrieval operations.";
-
- leaf with-defaults {
- description
- "The explicit defaults processing mode requested.";
- reference
- "RFC XXXX; section 4.6.1";
- // RFC Ed.: replace XXXX with actual
- // RFC number and remove this note
-
- type with-defaults-mode;
- }
- }
-
- // extending the get-config operation
- augment /nc:get-config/nc:input {
- description
- "Adds the <with-defaults> parameter to the
- input of the NETCONF <get-config> operation.";
- reference
- "RFC XXXX; section 4.6.1";
- // RFC Ed.: replace XXXX with actual
- // RFC number and remove this note
-
- uses with-defaults-parameters;
- }
-
- // extending the get operation
- augment /nc:get/nc:input {
- description
- "Adds the <with-defaults> parameter to
- the input of the NETCONF <get> operation.";
- reference
- "RFC XXXX; section 4.6.1";
- // RFC Ed.: replace XXXX with actual
- // RFC number and remove this note
-
- uses with-defaults-parameters;
- }
-
- // extending the copy-config operation
- augment /nc:copy-config/nc:input {
- description
- "Adds the <with-defaults> parameter to
- the input of the NETCONF <copy-config> operation.";
- reference
- "RFC XXXX; section 4.6.1";
- // RFC Ed.: replace XXXX with actual
- // RFC number and remove this note
-
- uses with-defaults-parameters;
- }
-
- }
diff --git a/models/microsemi/src/main/yang/ietf-netconf.yang b/models/microsemi/src/main/yang/ietf-netconf.yang
deleted file mode 100644
index 2595a12..0000000
--- a/models/microsemi/src/main/yang/ietf-netconf.yang
+++ /dev/null
@@ -1,980 +0,0 @@
-module ietf-netconf {
-
- // the namespace for NETCONF XML definitions is unchanged
- // from RFC 4741, which this document replaces
- namespace "urn:ietf:params:xml:ns:netconf:base:1.0";
-
- prefix nc;
-
- import ietf-inet-types {
- prefix inet;
- }
-
- organization
- "IETF NETCONF (Network Configuration) Working Group";
-
- contact
- "WG Web: <http://tools.ietf.org/wg/netconf/>
- WG List: <netconf@ietf.org>
-
- WG Chair: Bert Wijnen
- <bertietf@bwijnen.net>
-
- WG Chair: Mehmet Ersue
- <mehmet.ersue@nsn.com>
-
- Editor: Martin Bjorklund
- <mbj@tail-f.com>
-
- Editor: Juergen Schoenwaelder
- <j.schoenwaelder@jacobs-university.de>
-
- Editor: Andy Bierman
- <andy.bierman@brocade.com>";
- description
- "NETCONF Protocol Data Types and Protocol Operations.
-
- Copyright (c) 2011 IETF Trust and the persons identified as
- the document authors. All rights reserved.
-
- Redistribution and use in source and binary forms, with or
- without modification, is permitted pursuant to, and subject
- to the license terms contained in, the Simplified BSD License
- set forth in Section 4.c of the IETF Trust's Legal Provisions
- Relating to IETF Documents
- (http://trustee.ietf.org/license-info).
-
- This version of this YANG module is part of RFC 6241; see
- the RFC itself for full legal notices.";
-
- revision 2011-06-01 {
- description
- "Initial revision;";
- reference
- "RFC 6241: Network Configuration Protocol";
- }
-
- extension get-filter-element-attributes {
- description
- "If this extension is present within an 'anyxml'
- statement named 'filter', which must be conceptually
- defined within the RPC input section for the <get>
- and <get-config> protocol operations, then the
- following unqualified XML attribute is supported
- within the <filter> element, within a <get> or
- <get-config> protocol operation:
-
- type : optional attribute with allowed
- value strings 'subtree' and 'xpath'.
- If missing, the default value is 'subtree'.
-
- If the 'xpath' feature is supported, then the
- following unqualified XML attribute is
- also supported:
-
- select: optional attribute containing a
- string representing an XPath expression.
- The 'type' attribute must be equal to 'xpath'
- if this attribute is present.";
- }
-
- // NETCONF capabilities defined as features
- feature writable-running {
- description
- "NETCONF :writable-running capability;
- If the server advertises the :writable-running
- capability for a session, then this feature must
- also be enabled for that session. Otherwise,
- this feature must not be enabled.";
- reference "RFC 6241, Section 8.2";
- }
-
- feature candidate {
- description
- "NETCONF :candidate capability;
- If the server advertises the :candidate
- capability for a session, then this feature must
- also be enabled for that session. Otherwise,
- this feature must not be enabled.";
- reference "RFC 6241, Section 8.3";
- }
-
- feature confirmed-commit {
- if-feature candidate;
- description
- "NETCONF :confirmed-commit:1.1 capability;
- If the server advertises the :confirmed-commit:1.1
- capability for a session, then this feature must
- also be enabled for that session. Otherwise,
- this feature must not be enabled.";
-
- reference "RFC 6241, Section 8.4";
- }
-
- feature rollback-on-error {
- description
- "NETCONF :rollback-on-error capability;
- If the server advertises the :rollback-on-error
- capability for a session, then this feature must
- also be enabled for that session. Otherwise,
- this feature must not be enabled.";
- reference "RFC 6241, Section 8.5";
- }
-
- feature validate {
- description
- "NETCONF :validate:1.1 capability;
- If the server advertises the :validate:1.1
- capability for a session, then this feature must
- also be enabled for that session. Otherwise,
- this feature must not be enabled.";
- reference "RFC 6241, Section 8.6";
- }
-
- feature startup {
- description
- "NETCONF :startup capability;
- If the server advertises the :startup
- capability for a session, then this feature must
- also be enabled for that session. Otherwise,
- this feature must not be enabled.";
- reference "RFC 6241, Section 8.7";
- }
-
- feature url {
- description
- "NETCONF :url capability;
- If the server advertises the :url
- capability for a session, then this feature must
- also be enabled for that session. Otherwise,
- this feature must not be enabled.";
- reference "RFC 6241, Section 8.8";
- }
-
- feature xpath {
- description
- "NETCONF :xpath capability;
- If the server advertises the :xpath
- capability for a session, then this feature must
- also be enabled for that session. Otherwise,
- this feature must not be enabled.";
- reference "RFC 6241, Section 8.9";
- }
-
- // NETCONF Simple Types
-
- typedef session-id-type {
- type uint32 {
- range "1..max";
- }
- description
- "NETCONF Session Id";
- }
-
- typedef session-id-or-zero-type {
- type uint32;
- description
- "NETCONF Session Id or Zero to indicate none";
- }
- typedef error-tag-type {
- type enumeration {
- enum in-use {
- description
- "The request requires a resource that
- already is in use.";
- }
- enum invalid-value {
- description
- "The request specifies an unacceptable value for one
- or more parameters.";
- }
- enum too-big {
- description
- "The request or response (that would be generated) is
- too large for the implementation to handle.";
- }
- enum missing-attribute {
- description
- "An expected attribute is missing.";
- }
- enum bad-attribute {
- description
- "An attribute value is not correct; e.g., wrong type,
- out of range, pattern mismatch.";
- }
- enum unknown-attribute {
- description
- "An unexpected attribute is present.";
- }
- enum missing-element {
- description
- "An expected element is missing.";
- }
- enum bad-element {
- description
- "An element value is not correct; e.g., wrong type,
- out of range, pattern mismatch.";
- }
- enum unknown-element {
- description
- "An unexpected element is present.";
- }
- enum unknown-namespace {
- description
- "An unexpected namespace is present.";
- }
- enum access-denied {
- description
- "Access to the requested protocol operation or
- data model is denied because authorization failed.";
- }
- enum lock-denied {
- description
- "Access to the requested lock is denied because the
- lock is currently held by another entity.";
- }
- enum resource-denied {
- description
- "Request could not be completed because of
- insufficient resources.";
- }
- enum rollback-failed {
- description
- "Request to roll back some configuration change (via
- rollback-on-error or <discard-changes> operations)
- was not completed for some reason.";
-
- }
- enum data-exists {
- description
- "Request could not be completed because the relevant
- data model content already exists. For example,
- a 'create' operation was attempted on data that
- already exists.";
- }
- enum data-missing {
- description
- "Request could not be completed because the relevant
- data model content does not exist. For example,
- a 'delete' operation was attempted on
- data that does not exist.";
- }
- enum operation-not-supported {
- description
- "Request could not be completed because the requested
- operation is not supported by this implementation.";
- }
- enum operation-failed {
- description
- "Request could not be completed because the requested
- operation failed for some reason not covered by
- any other error condition.";
- }
- enum partial-operation {
- description
- "This error-tag is obsolete, and SHOULD NOT be sent
- by servers conforming to this document.";
- }
- enum malformed-message {
- description
- "A message could not be handled because it failed to
- be parsed correctly. For example, the message is not
- well-formed XML or it uses an invalid character set.";
- }
- }
- description "NETCONF Error Tag";
- reference "RFC 6241, Appendix A";
- }
-
- typedef error-severity-type {
- type enumeration {
- enum error {
- description "Error severity";
- }
- enum warning {
- description "Warning severity";
- }
- }
- description "NETCONF Error Severity";
- reference "RFC 6241, Section 4.3";
- }
-
- typedef edit-operation-type {
- type enumeration {
- enum merge {
- description
- "The configuration data identified by the
- element containing this attribute is merged
- with the configuration at the corresponding
- level in the configuration datastore identified
- by the target parameter.";
- }
- enum replace {
- description
- "The configuration data identified by the element
- containing this attribute replaces any related
- configuration in the configuration datastore
- identified by the target parameter. If no such
- configuration data exists in the configuration
- datastore, it is created. Unlike a
- <copy-config> operation, which replaces the
- entire target configuration, only the configuration
- actually present in the config parameter is affected.";
- }
- enum create {
- description
- "The configuration data identified by the element
- containing this attribute is added to the
- configuration if and only if the configuration
- data does not already exist in the configuration
- datastore. If the configuration data exists, an
- <rpc-error> element is returned with an
- <error-tag> value of 'data-exists'.";
- }
- enum delete {
- description
- "The configuration data identified by the element
- containing this attribute is deleted from the
- configuration if and only if the configuration
- data currently exists in the configuration
- datastore. If the configuration data does not
- exist, an <rpc-error> element is returned with
- an <error-tag> value of 'data-missing'.";
- }
- enum remove {
- description
- "The configuration data identified by the element
- containing this attribute is deleted from the
- configuration if the configuration
- data currently exists in the configuration
- datastore. If the configuration data does not
- exist, the 'remove' operation is silently ignored
- by the server.";
- }
- }
- default "merge";
- description "NETCONF 'operation' attribute values";
- reference "RFC 6241, Section 7.2";
- }
-
- // NETCONF Standard Protocol Operations
-
- rpc get-config {
- description
- "Retrieve all or part of a specified configuration.";
-
- reference "RFC 6241, Section 7.1";
-
- input {
- container source {
- description
- "Particular configuration to retrieve.";
-
- choice config-source {
- mandatory true;
- description
- "The configuration to retrieve.";
- case candidate {
- leaf candidate {
- if-feature candidate;
- type empty;
- description
- "The candidate configuration is the config source.";
- }
- }
- case running {
- leaf running {
- type empty;
- description
- "The running configuration is the config source.";
- }
- }
- case startup {
- leaf startup {
- if-feature startup;
- type empty;
- description
- "The startup configuration is the config source.
- This is optional-to-implement on the server because
- not all servers will support filtering for this
- datastore.";
- }
- }
- }
- }
-
- anyxml filter {
- description
- "Subtree or XPath filter to use.";
-// nc:get-filter-element-attributes;
- }
- }
-
- output {
- anyxml data {
- description
- "Copy of the source datastore subset that matched
- the filter criteria (if any). An empty data container
- indicates that the request did not produce any results.";
- }
- }
- }
-
- rpc edit-config {
- description
- "The <edit-config> operation loads all or part of a specified
- configuration to the specified target configuration.";
-
- reference "RFC 6241, Section 7.2";
-
- input {
- container target {
- description
- "Particular configuration to edit.";
-
- choice config-target {
- mandatory true;
- description
- "The configuration target.";
- case candidate {
- leaf candidate {
- if-feature candidate;
- type empty;
- description
- "The candidate configuration is the config target.";
- }
- }
- case running {
- leaf running {
- if-feature writable-running;
- type empty;
- description
- "The running configuration is the config source.";
- }
- }
- }
- }
-
- leaf default-operation {
- type enumeration {
- enum merge {
- description
- "The default operation is merge.";
- }
- enum replace {
- description
- "The default operation is replace.";
- }
- enum none {
- description
- "There is no default operation.";
- }
- }
- default "merge";
- description
- "The default operation to use.";
- }
-
- leaf test-option {
- if-feature validate;
- type enumeration {
- enum test-then-set {
- description
- "The server will test and then set if no errors.";
- }
- enum set {
- description
- "The server will set without a test first.";
- }
-
- enum test-only {
- description
- "The server will only test and not set, even
- if there are no errors.";
- }
- }
- default "test-then-set";
- description
- "The test option to use.";
- }
-
- leaf error-option {
- type enumeration {
- enum stop-on-error {
- description
- "The server will stop on errors.";
- }
- enum continue-on-error {
- description
- "The server may continue on errors.";
- }
- enum rollback-on-error {
- description
- "The server will roll back on errors.
- This value can only be used if the 'rollback-on-error'
- feature is supported.";
- }
- }
- default "stop-on-error";
- description
- "The error option to use.";
- }
-
- choice edit-content {
- mandatory true;
- description
- "The content for the edit operation.";
- case config {
- anyxml config {
- description
- "Inline Config content.";
- }
- }
- case url {
- leaf url {
- if-feature url;
- type inet:uri;
- description
- "URL-based config content.";
- }
- }
- }
- }
- }
-
- rpc copy-config {
- description
- "Create or replace an entire configuration datastore with the
- contents of another complete configuration datastore.";
-
- reference "RFC 6241, Section 7.3";
-
- input {
- container target {
- description
- "Particular configuration to copy to.";
-
- choice config-target {
- mandatory true;
- description
- "The configuration target of the copy operation.";
- case candidate {
- leaf candidate {
- if-feature candidate;
- type empty;
- description
- "The candidate configuration is the config target.";
- }
- }
- case running {
- leaf running {
- if-feature writable-running;
- type empty;
- description
- "The running configuration is the config target.
- This is optional-to-implement on the server.";
- }
- }
- case startup {
- leaf startup {
- if-feature startup;
- type empty;
- description
- "The startup configuration is the config target.";
- }
- }
- case url {
- leaf url {
- if-feature url;
- type inet:uri;
- description
- "The URL-based configuration is the config target.";
- }
- }
- }
- }
-
- container source {
- description
- "Particular configuration to copy from.";
-
- choice config-source {
- mandatory true;
- description
- "The configuration source for the copy operation.";
-
- case candidate {
- leaf candidate {
- if-feature candidate;
- type empty;
- description
- "The candidate configuration is the config source.";
- }
- }
- case running {
- leaf running {
- type empty;
- description
- "The running configuration is the config source.";
- }
- }
- case startup {
- leaf startup {
- if-feature startup;
- type empty;
- description
- "The startup configuration is the config source.";
- }
- }
- case url {
- leaf url {
- if-feature url;
- type inet:uri;
- description
- "The URL-based configuration is the config source.";
- }
- }
- case config {
- anyxml config {
- description
- "Inline Config content: <config> element. Represents
- an entire configuration datastore, not
- a subset of the running datastore.";
- }
- }
- }
- }
- }
- }
-
- rpc delete-config {
- description
- "Delete a configuration datastore.";
-
- reference "RFC 6241, Section 7.4";
-
- input {
- container target {
- description
- "Particular configuration to delete.";
-
- choice config-target {
- mandatory true;
- description
- "The configuration target to delete.";
- case startup {
- leaf startup {
- if-feature startup;
- type empty;
- description
- "The startup configuration is the config target.";
- }
- }
- case url {
- leaf url {
- if-feature url;
- type inet:uri;
- description
- "The URL-based configuration is the config target.";
- }
- }
- }
- }
- }
- }
-
- rpc lock {
- description
- "The lock operation allows the client to lock the configuration
- system of a device.";
-
- reference "RFC 6241, Section 7.5";
-
- input {
- container target {
- description
- "Particular configuration to lock.";
-
- choice config-target {
- mandatory true;
- description
- "The configuration target to lock.";
- case candidate {
- leaf candidate {
- if-feature candidate;
- type empty;
- description
- "The candidate configuration is the config target.";
- }
- }
- case running {
- leaf running {
- type empty;
- description
- "The running configuration is the config target.";
- }
- }
- case startup {
- leaf startup {
- if-feature startup;
- type empty;
- description
- "The startup configuration is the config target.";
- }
- }
- }
- }
- }
- }
-
- rpc unlock {
- description
- "The unlock operation is used to release a configuration lock,
- previously obtained with the 'lock' operation.";
-
- reference "RFC 6241, Section 7.6";
-
- input {
- container target {
- description
- "Particular configuration to unlock.";
-
- choice config-target {
- mandatory true;
- description
- "The configuration target to unlock.";
- case candidate {
- leaf candidate {
- if-feature candidate;
- type empty;
- description
- "The candidate configuration is the config target.";
- }
- }
- case running {
- leaf running {
- type empty;
- description
- "The running configuration is the config target.";
- }
- }
- case startup {
- leaf startup {
- if-feature startup;
- type empty;
- description
- "The startup configuration is the config target.";
- }
- }
- }
- }
- }
- }
-
- rpc get {
- description
- "Retrieve running configuration and device state information.";
-
- reference "RFC 6241, Section 7.7";
-
- input {
- anyxml filter {
- description
- "This parameter specifies the portion of the system
- configuration and state data to retrieve.";
-// nc:get-filter-element-attributes;
- }
- }
-
- output {
- anyxml data {
- description
- "Copy of the running datastore subset and/or state
- data that matched the filter criteria (if any).
- An empty data container indicates that the request did not
- produce any results.";
- }
- }
- }
-
- rpc close-session {
- description
- "Request graceful termination of a NETCONF session.";
-
- reference "RFC 6241, Section 7.8";
- }
-
- rpc kill-session {
- description
- "Force the termination of a NETCONF session.";
-
- reference "RFC 6241, Section 7.9";
-
- input {
- leaf session-id {
- type session-id-type;
- mandatory true;
- description
- "Particular session to kill.";
- }
- }
- }
-
- rpc commit {
- if-feature candidate;
-
- description
- "Commit the candidate configuration as the device's new
- current configuration.";
-
- reference "RFC 6241, Section 8.3.4.1";
-
- input {
- leaf confirmed {
- if-feature confirmed-commit;
- type empty;
- description
- "Requests a confirmed commit.";
- reference "RFC 6241, Section 8.3.4.1";
- }
-
- leaf confirm-timeout {
- if-feature confirmed-commit;
- type uint32 {
- range "1..max";
- }
- units "seconds";
- default "600"; // 10 minutes
- description
- "The timeout interval for a confirmed commit.";
- reference "RFC 6241, Section 8.3.4.1";
- }
-
- leaf persist {
- if-feature confirmed-commit;
- type string;
- description
- "This parameter is used to make a confirmed commit
- persistent. A persistent confirmed commit is not aborted
- if the NETCONF session terminates. The only way to abort
- a persistent confirmed commit is to let the timer expire,
- or to use the <cancel-commit> operation.
-
- The value of this parameter is a token that must be given
- in the 'persist-id' parameter of <commit> or
- <cancel-commit> operations in order to confirm or cancel
- the persistent confirmed commit.
-
- The token should be a random string.";
- reference "RFC 6241, Section 8.3.4.1";
- }
-
- leaf persist-id {
- if-feature confirmed-commit;
- type string;
- description
- "This parameter is given in order to commit a persistent
- confirmed commit. The value must be equal to the value
- given in the 'persist' parameter to the <commit> operation.
- If it does not match, the operation fails with an
- 'invalid-value' error.";
- reference "RFC 6241, Section 8.3.4.1";
- }
-
- }
- }
-
- rpc discard-changes {
- if-feature candidate;
-
- description
- "Revert the candidate configuration to the current
- running configuration.";
- reference "RFC 6241, Section 8.3.4.2";
- }
-
- rpc cancel-commit {
- if-feature confirmed-commit;
- description
- "This operation is used to cancel an ongoing confirmed commit.
- If the confirmed commit is persistent, the parameter
- 'persist-id' must be given, and it must match the value of the
- 'persist' parameter.";
- reference "RFC 6241, Section 8.4.4.1";
-
- input {
- leaf persist-id {
- type string;
- description
- "This parameter is given in order to cancel a persistent
- confirmed commit. The value must be equal to the value
- given in the 'persist' parameter to the <commit> operation.
- If it does not match, the operation fails with an
- 'invalid-value' error.";
- }
- }
- }
-
- rpc validate {
- if-feature validate;
-
- description
- "Validates the contents of the specified configuration.";
-
- reference "RFC 6241, Section 8.6.4.1";
-
- input {
- container source {
- description
- "Particular configuration to validate.";
-
- choice config-source {
- mandatory true;
- description
- "The configuration source to validate.";
-
- case candidate {
- leaf candidate {
- if-feature candidate;
- type empty;
- description
- "The candidate configuration is the config source.";
- }
- }
- case running {
- leaf running {
- type empty;
- description
- "The running configuration is the config source.";
- }
- }
- case startup {
- leaf startup {
- if-feature startup;
- type empty;
- description
- "The startup configuration is the config source.";
- }
- }
- case url {
- leaf url {
- if-feature url;
- type inet:uri;
- description
- "The URL-based configuration is the config source.";
- }
- }
- case config {
- anyxml config {
- description
- "Inline Config content: <config> element. Represents
- an entire configuration datastore, not
- a subset of the running datastore.";
- }
- }
- }
- }
- }
- }
-
-}
\ No newline at end of file
diff --git a/models/microsemi/src/main/yang/ietf-system-microsemi.yang b/models/microsemi/src/main/yang/ietf-system-microsemi@2016-05-05.yang
similarity index 75%
rename from models/microsemi/src/main/yang/ietf-system-microsemi.yang
rename to models/microsemi/src/main/yang/ietf-system-microsemi@2016-05-05.yang
index b88ba26..b46cb7d 100644
--- a/models/microsemi/src/main/yang/ietf-system-microsemi.yang
+++ b/models/microsemi/src/main/yang/ietf-system-microsemi@2016-05-05.yang
@@ -23,10 +23,10 @@
revision-date 2014-08-06;
}
- import ietf-netconf-acm {
- prefix nacm;
- revision-date 2012-02-22;
- }
+// import ietf-netconf-acm {
+// prefix nacm;
+// revision-date 2012-02-22;
+// }
/*** META INFORMATION ***/
@@ -351,7 +351,7 @@
augment "/sys:system-state/sys:platform" {
description
- "Extends the SYSTEM-STATE with some extra configuration attributes required for setup.
+ "Extends the SYSTEM-STATE platform with some extra configuration attributes required for setup.
All attributes are automatically config=false because they extend system-state";
@@ -410,118 +410,4 @@
}
}
}
-
- rpc do-upgrade-and-reboot {
-// nacm:default-deny-all;
- if-feature remote-upgrade;
-
- description "Method to perform an upgrade of the device. This
- expects a file /update.tar to have be present on the device.
- The system-state/remote-upgrade attributes can be used to
- verify the contents of the file before calling this action.
- If there is a problem performing the upgrade
- these will be described in any error thrown";
-
- input {
- leaf reset-option {
- type enumeration {
- enum nuclear {
- description "Erases all configuration and resets the device to
- factory defaults.";
- }
- enum allnetconf {
- description "Reset all NETCONF data - leaves only logs and SSH keys.
- If a lesser reset is required use system-restart with a
- suitable reset-option";
- }
- }
- description "Optionally specify a parameter that can be
- used to reset the device to factory defaults";
- }
- }
-
- output {
- anyxml data {
- description "A message describing the result.
- The result might not be seen as it schedules a reboot of the device";
- }
- }
- }
-
-
- rpc pull-update-tar-from-tftp {
-// nacm:default-deny-all;
- if-feature remote-upgrade;
-
- description "Pulls a specified file from the specifed host and copies it
- to the local device (usually at /update.tar
- It also expects the file to be signed with GnuPG and the signature
- file to exist on the TFTP server at <tftp-file>.asc";
-
- input {
- leaf tftp-file {
- type msea:file-name;
- mandatory true;
- description "The name of a file to pull from the TFTP server at the host name specified";
- }
-
- leaf tftp-host {
- type inet:host;
- mandatory true;
- description "The hostname of a TFTP server where an update TAR file can be pulled from";
- }
- }
- }
-
- rpc read-from-syslog {
- description "A method of reading the entries from syslog. If no
- argument is given will read the last 100 lines";
-
- input {
- leaf start-line {
- type int16 {
- range -10000..-1;
- }
- default -100;
- description "The number of lines to read from the end of syslog.";
- }
- }
-
- output {
- anyxml data {
- description "Syslog entries represented as XML";
- }
- }
- }
-
-// notification upgrade-notification {
-// description
-// "Generated when a remote upgrade is in progress.";
-//
-// leaf upgrade-stage {
-// type enumeration {
-// enum "check" {
-// description
-// "Checking the upgrade file is valid";
-// }
-// enum "erase" {
-// description "Erasing old image";
-// }
-// enum "write" {
-// description "Writing new image";
-// }
-// enum "complete" {
-// description "Upgrade complete";
-// }
-// }
-// mandatory true;
-// }
-//
-// leaf upgrade-detail {
-// description "Textual description of the stage of upgrade";
-// type string {
-// length 0..100;
-// }
-// }
-// } // upgrade-notification
}
\ No newline at end of file
diff --git a/models/microsemi/src/main/yang/ietf-system-tls-auth.yang b/models/microsemi/src/main/yang/ietf-system-tls-auth.yang
deleted file mode 100644
index c1cbf4c..0000000
--- a/models/microsemi/src/main/yang/ietf-system-tls-auth.yang
+++ /dev/null
@@ -1,215 +0,0 @@
-module ietf-system-tls-auth {
-
- yang-version 1;
-
- namespace
- "urn:ietf:params:xml:ns:yang:ietf-system-tls-auth";
-
- prefix system-tls-auth;
-
- import ietf-system {
- prefix sys;
- }
- import ietf-netconf-acm {
- prefix nacm;
- }
- import ietf-yang-types {
- prefix yang;
- }
- import ietf-x509-cert-to-name {
- prefix x509c2n;
- }
-
- organization
- "IETF NETCONF (Network Configuration) Working Group";
-
- contact
- "WG Web: <http://tools.ietf.org/wg/netconf/>
- WG List: <mailto:netconf@ietf.org>
-
- WG Chair: Mehmet Ersue
- <mailto:mehmet.ersue@nsn.com>
-
- WG Chair: Bert Wijnen
- <mailto:bertietf@bwijnen.net>
-
- Editor: Kent Watsen
- <mailto:kwatsen@juniper.net>
-
- Juergen Schoenwaelder
- <mailto:j.schoenwaelder@jacobs-university.de>";
-
- description
- "This module augments the ietf-system module in order to
- add TLS authentication configuration nodes to the
- 'authentication' container.
-
- Copyright (c) 2014 IETF Trust and the persons identified as
- authors of the code. All rights reserved.
-
- Redistribution and use in source and binary forms, with or
- without modification, is permitted pursuant to, and subject
- to the license terms contained in, the Simplified BSD
- License set forth in Section 4.c of the IETF Trust's
- Legal Provisions Relating to IETF Documents
- (http://trustee.ietf.org/license-info).
-
- This version of this YANG module is part of RFC XXXX; see
- the RFC itself for full legal notices.";
-
- revision "2014-05-24" {
- description "Initial version";
- reference
- "RFC XXXX: NETCONF Server Configuration Model";
-
- }
-
-
- feature tls-map-certificates {
- description
- "The tls-map-certificates feature indicates that the
- NETCONF server implements mapping X.509 certificates to NETCONF
- usernames.";
- }
-
- feature tls-map-pre-shared-keys {
- description
- "The tls-map-pre-shared-keys feature indicates that the
- NETCONF server implements mapping TLS pre-shared keys to NETCONF
- usernames.";
- }
-
- grouping tls-global-config {
- container trusted-ca-certs {
- description
- "A list of Certificate Authority (CA) certificates that a
- NETCONF server can use to authenticate a NETCONF client's
- certificate. A client's certificate is authenticated if
- its Issuer matches one of the configured trusted CA
- certificates.";
- leaf-list trusted-ca-cert {
- type binary;
- description
- "The binary certificate structure, as
- specified by RFC 5246, Section 7.4.6, i.e.,:
-
- opaque ASN.1Cert<1..2^24>;
-
- ";
- reference
- "RFC 5246: The Transport Layer Security (TLS)
- Protocol Version 1.2";
-
- }
- } // container trusted-ca-certs
-
- container trusted-client-certs {
- description
- "A list of client certificates that a NETCONF server can
- use to authenticate a NETCONF client's certificate. A
- client's certificate is authenticated if it is an exact
- match to one of the configured trusted client certificates.";
- leaf-list trusted-client-cert {
- type binary;
- description
- "The binary certificate structure, as
- specified by RFC 5246, Section 7.4.6, i.e.,:
-
- opaque ASN.1Cert<1..2^24>;
-
- ";
- reference
- "RFC 5246: The Transport Layer Security (TLS)
- Protocol Version 1.2";
-
- }
- } // container trusted-client-certs
-
- container cert-maps {
- if-feature tls-map-certificates;
- description
- "The cert-maps container is used by a NETCONF server to
- map the NETCONF client's presented X.509 certificate to
- a NETCONF username.
-
- If no matching and valid cert-to-name list entry can be
- found, then the NETCONF server MUST close the connection,
- and MUST NOT accept NETCONF messages over it.";
- uses x509c2n:cert-to-name;
- } // container cert-maps
-
- container psk-maps {
- if-feature tls-map-pre-shared-keys;
- description
- "During the TLS Handshake, the client indicates which
- key to use by including a PSK identity in the TLS
- ClientKeyExchange message. On the NETCONF server side,
- this PSK identity is used to look up an entry in the psk-map
- list. If such an entry is found, and the pre-shared keys
- match, then the client is authenticated. The NETCONF
- server uses the value from the user-name leaf in the
- psk-map list as the NETCONF username. If the NETCONF
- server cannot find an entry in the psk-map list, or if
- the pre-shared keys do not match, then the NETCONF
- server terminates the connection.";
- reference
- "RFC 4279: Pre-Shared Key Ciphersuites for Transport Layer
- Security (TLS)";
-
- list psk-map {
- key "psk-identity";
- leaf psk-identity {
- type string;
- description
- "The PSK identity encoded as a UTF-8 string. For
- details how certain common PSK identity formats can
- be encoded in UTF-8, see section 5.1. of RFC 4279.";
- reference
- "RFC 4279: Pre-Shared Key Ciphersuites for Transport
- Layer Security (TLS)";
-
- }
-
- leaf user-name {
- type nacm:user-name-type;
- mandatory true;
- description
- "The NETCONF username associated with this PSK
- identity.";
- }
-
- leaf not-valid-before {
- type yang:date-and-time;
- description
- "This PSK identity is not valid before the given date
- and time.";
- }
-
- leaf not-valid-after {
- type yang:date-and-time;
- description
- "This PSK identity is not valid after the given date
- and time.";
- }
-
- leaf key {
-// nacm:default-deny-all;
- type yang:hex-string;
- mandatory true;
- description
- "The key associated with the PSK identity";
- reference
- "RFC 4279: Pre-Shared Key Ciphersuites for Transport
- Layer Security (TLS)";
-
- }
- } // list psk-map
- } // container psk-maps
- } // grouping tls-global-config
-
- augment /sys:system/sys:authentication {
- container tls {
- uses tls-global-config;
- } // container tls
- }
- } // module ietf-system-tls-auth
diff --git a/models/microsemi/src/main/yang/ietf-system.yang b/models/microsemi/src/main/yang/ietf-system.yang
deleted file mode 100644
index 12e6a9f..0000000
--- a/models/microsemi/src/main/yang/ietf-system.yang
+++ /dev/null
@@ -1,832 +0,0 @@
-module ietf-system {
- namespace "urn:ietf:params:xml:ns:yang:ietf-system";
- prefix "sys";
-
- import ietf-yang-types {
- prefix yang;
- }
-
- import ietf-inet-types {
- prefix inet;
- }
-
- import ietf-netconf-acm {
- prefix nacm;
- }
-
- import iana-crypt-hash {
- prefix ianach;
- }
-
- import msea-types {
- prefix msea;
- revision-date 2016-02-29;
- }
-
- organization
- "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
-
- contact
- "WG Web: <http://tools.ietf.org/wg/netmod/>
- WG List: <mailto:netmod@ietf.org>
-
- WG Chair: Thomas Nadeau
- <mailto:tnadeau@lucidvision.com>
-
- WG Chair: Juergen Schoenwaelder
- <mailto:j.schoenwaelder@jacobs-university.de>
-
- Editor: Andy Bierman
- <mailto:andy@yumaworks.com>
-
- Editor: Martin Bjorklund
- <mailto:mbj@tail-f.com>";
-
- description
- "This module contains a collection of YANG definitions for the
- configuration and identification of some common system
- properties within a device containing a NETCONF server. This
- includes data node definitions for system identification,
- time-of-day management, user management, DNS resolver
- configuration, and some protocol operations for system
- management.
-
- Copyright (c) 2014 IETF Trust and the persons identified as
- authors of the code. All rights reserved.
-
- Redistribution and use in source and binary forms, with or
- without modification, is permitted pursuant to, and subject
- to the license terms contained in, the Simplified BSD License
- set forth in Section 4.c of the IETF Trust's Legal Provisions
- Relating to IETF Documents
- (http://trustee.ietf.org/license-info).
-
- This version of this YANG module is part of RFC 7317; see
- the RFC itself for full legal notices.";
-
- revision 2014-08-06 {
- description
- "Initial revision.";
- reference
- "RFC 7317: A YANG Data Model for System Management";
- }
-
- /*
- * Typedefs
- */
-
- typedef timezone-name {
- type string;
- description
- "A time zone name as used by the Time Zone Database,
- sometimes referred to as the 'Olson Database'.
-
- The exact set of valid values is an implementation-specific
- matter. Client discovery of the exact set of time zone names
- for a particular server is out of scope.";
- reference
- "RFC 6557: Procedures for Maintaining the Time Zone Database";
- }
-
- /*
- * Features
- */
-
- feature radius {
- description
- "Indicates that the device can be configured as a RADIUS
- client.";
- reference
- "RFC 2865: Remote Authentication Dial In User Service (RADIUS)";
- }
-
- feature authentication {
- description
- "Indicates that the device supports configuration of
- user authentication.";
- }
-
- feature local-users {
- if-feature authentication;
- description
- "Indicates that the device supports configuration of
- local user authentication.";
- }
-
- feature radius-authentication {
- if-feature radius;
- if-feature authentication;
- description
- "Indicates that the device supports configuration of user
- authentication over RADIUS.";
- reference
- "RFC 2865: Remote Authentication Dial In User Service (RADIUS)
- RFC 5607: Remote Authentication Dial-In User Service (RADIUS)
- Authorization for Network Access Server (NAS)
- Management";
- }
-
- feature ntp {
- description
- "Indicates that the device can be configured to use one or
- more NTP servers to set the system date and time.";
- }
-
- feature ntp-udp-port {
- if-feature ntp;
- description
- "Indicates that the device supports the configuration of
- the UDP port for NTP servers.
-
- This is a 'feature', since many implementations do not support
- any port other than the default port.";
- }
-
- feature timezone-name {
- description
- "Indicates that the local time zone on the device
- can be configured to use the TZ database
- to set the time zone and manage daylight saving time.";
- reference
- "RFC 6557: Procedures for Maintaining the Time Zone Database";
- }
-
- feature dns-udp-tcp-port {
- description
- "Indicates that the device supports the configuration of
- the UDP and TCP port for DNS servers.
-
- This is a 'feature', since many implementations do not support
- any port other than the default port.";
- }
-
- /*
- * Identities
- */
-
- identity authentication-method {
- description
- "Base identity for user authentication methods.";
- }
-
- identity radius {
- base authentication-method;
- description
- "Indicates user authentication using RADIUS.";
- reference
- "RFC 2865: Remote Authentication Dial In User Service (RADIUS)
- RFC 5607: Remote Authentication Dial-In User Service (RADIUS)
- Authorization for Network Access Server (NAS)
- Management";
- }
-
- identity local-users {
- base authentication-method;
- description
- "Indicates password-based authentication of locally
- configured users.";
- }
-
- identity radius-authentication-type {
- description
- "Base identity for RADIUS authentication types.";
- }
-
- identity radius-pap {
- base radius-authentication-type;
- description
- "The device requests Password Authentication Protocol (PAP)
- authentication from the RADIUS server.";
- reference
- "RFC 2865: Remote Authentication Dial In User Service (RADIUS)";
- }
-
- identity radius-chap {
- base radius-authentication-type;
- description
- "The device requests Challenge Handshake Authentication
- Protocol (CHAP) authentication from the RADIUS server.";
- reference
- "RFC 2865: Remote Authentication Dial In User Service (RADIUS)";
- }
-
- /*
- * Configuration data nodes
- */
-
- container system {
- description
- "System group configuration.";
-
- leaf contact {
- type string;
- description
- "The administrator contact information for the system.
-
- A server implementation MAY map this leaf to the sysContact
- MIB object. Such an implementation needs to use some
- mechanism to handle the differences in size and characters
- allowed between this leaf and sysContact. The definition of
- such a mechanism is outside the scope of this document.";
- reference
- "RFC 3418: Management Information Base (MIB) for the
- Simple Network Management Protocol (SNMP)
- SNMPv2-MIB.sysContact";
- }
-
- leaf hostname {
- type inet:domain-name;
- description
- "The name of the host. This name can be a single domain
- label or the fully qualified domain name of the host.";
-
- }
-
- leaf location {
- type string;
- description
- "The system location.
-
- A server implementation MAY map this leaf to the sysLocation
- MIB object. Such an implementation needs to use some
- mechanism to handle the differences in size and characters
- allowed between this leaf and sysLocation. The definition
- of such a mechanism is outside the scope of this document.";
-
- reference
- "RFC 3418: Management Information Base (MIB) for the
- Simple Network Management Protocol (SNMP)
- SNMPv2-MIB.sysLocation";
- }
-
- container clock {
- description
- "Configuration of the system date and time properties.";
-
- choice timezone {
- description
- "The system time zone information.";
-
- case timezone-name {
- if-feature timezone-name;
- leaf timezone-name {
- type timezone-name;
- description
- "The TZ database name to use for the system, such
- as 'Europe/Stockholm'.";
- }
- }
- case timezone-utc-offset {
- leaf timezone-utc-offset {
- type int16 {
- range "-1500 .. 1500";
- }
- units "minutes";
- description
- "The number of minutes to add to UTC time to
- identify the time zone for this system. For example,
- 'UTC - 8:00 hours' would be represented as '-480'.
- Note that automatic daylight saving time adjustment
- is not provided if this object is used.";
- }
- }
- }
- }
-
- container ntp {
- if-feature ntp;
- presence
- "Enables the NTP client unless the 'enabled' leaf
- (which defaults to 'true') is set to 'false'";
- description
- "Configuration of the NTP client.";
-
- leaf enabled {
- type boolean;
- default true;
- description
- "Indicates that the system should attempt to
- synchronize the system clock with an NTP server
- from the 'ntp/server' list.";
- }
- list server {
- key name;
- max-elements 3;
- description
- "List of NTP servers to use for system clock
- synchronization. If '/system/ntp/enabled'
- is 'true', then the system will attempt to
- contact and utilize the specified NTP servers.
- If DHCP retrieves NTP servers then these values
- are used in addition to those";
-
- leaf name {
- type string;
- description
- "An arbitrary name for the NTP server.";
- }
- choice transport {
- mandatory true;
- description
- "The transport-protocol-specific parameters for this
- server.";
-
- case udp {
- container udp {
- description
- "Contains UDP-specific configuration parameters
- for NTP.";
- leaf address {
- type inet:host;
- mandatory true;
- description
- "The address of the NTP server.";
- }
-// leaf port {
-// if-feature ntp-udp-port;
-// type inet:port-number;
-// default 123;
-// description
-// "The port number of the NTP server.";
-// }
- }
- }
- }
-
-// leaf association-type { //These elements are omitted because MSEA1000 does not support these options
-// type enumeration {
-// enum server {
-// description
-// "Use client association mode. This device
-// will not provide synchronization to the
-// configured NTP server.";
-// }
-// enum peer {
-// description
-// "Use symmetric active association mode.
-// This device may provide synchronization
-// to the configured NTP server.";
-// }
-// enum pool {
-// description
-// "Use client association mode with one or
-// more of the NTP servers found by DNS
-// resolution of the domain name given by
-// the 'address' leaf. This device will not
-// provide synchronization to the servers.";
-// }
-// }
-// default server;
-// description
-// "The desired association type for this NTP server.";
-// }
-// leaf iburst {
-// type boolean;
-// default false;
-// description
-// "Indicates whether this server should enable burst
-// synchronization or not.";
-// }
-// leaf prefer {
-// type boolean;
-// default false;
-// description
-// "Indicates whether this server should be preferred
-// or not.";
-// }
- }
- }
-
- container dns-resolver {
- presence "If defined enables the DNS servers to be configured.";
-
- description
- "Configuration of the DNS resolver. If DHCP retrieves DNS
- servers or search domains then these values are used in
- addition to those";
-
- leaf-list search {
- type inet:domain-name;
- max-elements 3;
- ordered-by user;
- description
- "An ordered list of domains to search when resolving
- a host name.";
- }
- list server {
- key name;
- max-elements 3;
- ordered-by user;
- description
- "List of the DNS servers that the resolver should query.
-
- When the resolver is invoked by a calling application, it
- sends the query to the first name server in this list. If
- no response has been received within 'timeout' seconds,
- the resolver continues with the next server in the list.
- If no response is received from any server, the resolver
- continues with the first server again. When the resolver
- has traversed the list 'attempts' times without receiving
- any response, it gives up and returns an error to the
- calling application.
-
- Implementations MAY limit the number of entries in this
- list.";
-
- leaf name {
- type string;
- description
- "An arbitrary name for the DNS server.";
- }
- choice transport {
- mandatory true;
- description
- "The transport-protocol-specific parameters for this
- server.";
-
- case udp-and-tcp {
- container udp-and-tcp {
- description
- "Contains UDP- and TCP-specific configuration
- parameters for DNS.";
- reference
- "RFC 1035: Domain Names - Implementation and
- Specification
- RFC 5966: DNS Transport over TCP - Implementation
- Requirements";
-
- leaf address {
- type inet:ip-address;
- mandatory true;
- description
- "The address of the DNS server.";
- }
-// leaf port {
-// if-feature dns-udp-tcp-port;
-// type inet:port-number;
-// default 53;
-// description
-// "The UDP and TCP port number of the DNS server.";
-// }
- }
- }
- }
- }
-// container options { //These elements are omitted because MSEA1000 does not support these options
-// description
-// "Resolver options. The set of available options has been
-// limited to those that are generally available across
-// different resolver implementations and generally useful.";
-// leaf timeout {
-// type uint8 {
-// range "1..max";
-// }
-// units "seconds";
-// default "5";
-// description
-// "The amount of time the resolver will wait for a
-// response from each remote name server before
-// retrying the query via a different name server.";
-// }
-// leaf attempts {
-// type uint8 {
-// range "1..max";
-// }
-// default "2";
-// description
-// "The number of times the resolver will send a query to
-// all of its name servers before giving up and returning
-// an error to the calling application.";
-// }
-// }
- }
-
- container radius {
- if-feature radius;
-
- description
- "Configuration of the RADIUS client.";
-
- list server {
- key name;
- ordered-by user;
- description
- "List of RADIUS servers used by the device.
-
- When the RADIUS client is invoked by a calling
- application, it sends the query to the first server in
- this list. If no response has been received within
- 'timeout' seconds, the client continues with the next
- server in the list. If no response is received from any
- server, the client continues with the first server again.
- When the client has traversed the list 'attempts' times
- without receiving any response, it gives up and returns an
- error to the calling application.";
-
- leaf name {
- type string;
- description
- "An arbitrary name for the RADIUS server.";
- }
- choice transport {
- mandatory true;
- description
- "The transport-protocol-specific parameters for this
- server.";
-
- case udp {
- container udp {
- description
- "Contains UDP-specific configuration parameters
- for RADIUS.";
- leaf address {
- type inet:host;
- mandatory true;
- description
- "The address of the RADIUS server.";
- }
-
- leaf authentication-port {
- type inet:port-number;
- default "1812";
- description
- "The port number of the RADIUS server.";
- }
- leaf shared-secret {
- type string;
- mandatory true;
-// nacm:default-deny-all;
- description
- "The shared secret, which is known to both the
- RADIUS client and server.";
- reference
- "RFC 2865: Remote Authentication Dial In User
- Service (RADIUS)";
- }
- }
- }
- }
- leaf authentication-type {
- type identityref {
- base radius-authentication-type;
- }
- default radius-pap;
- description
- "The authentication type requested from the RADIUS
- server.";
- }
- }
- container options {
- description
- "RADIUS client options.";
-
- leaf timeout {
- type uint8 {
- range "1..max";
- }
- units "seconds";
- default "5";
- description
- "The number of seconds the device will wait for a
- response from each RADIUS server before trying with a
- different server.";
- }
-
- leaf attempts {
- type uint8 {
- range "1..max";
- }
- default "2";
- description
- "The number of times the device will send a query to
- all of its RADIUS servers before giving up.";
- }
- }
- }
-
- container authentication {
-// nacm:default-deny-write;
- if-feature authentication;
-
- description
- "The authentication configuration subtree.";
-
- leaf-list user-authentication-order {
- type identityref {
- base authentication-method;
- }
- must '(. != "sys:radius" or ../../radius/server)' {
- error-message
- "When 'radius' is used, a RADIUS server"
- + " must be configured.";
- description
- "When 'radius' is used as an authentication method,
- a RADIUS server must be configured.";
- }
- ordered-by user;
-
- description
- "When the device authenticates a user with a password,
- it tries the authentication methods in this leaf-list in
- order. If authentication with one method fails, the next
- method is used. If no method succeeds, the user is
- denied access.
-
- An empty user-authentication-order leaf-list still allows
- authentication of users using mechanisms that do not
- involve a password.
-
- If the 'radius-authentication' feature is advertised by
- the NETCONF server, the 'radius' identity can be added to
- this list.
-
- If the 'local-users' feature is advertised by the
- NETCONF server, the 'local-users' identity can be
- added to this list.";
- }
-
- list user {
- if-feature local-users;
- key name;
- description
- "The list of local users configured on this device.";
-
- leaf name {
- type string;
- description
- "The user name string identifying this entry.";
-
- must ".='netconf' or .='admin' or .='readonly'" {
- error-message "The set of users is not changeable on this device. Must have admin, netconf and readonly";
- error-app-tag "msea-sys-must-01";
- }
- }
- leaf password {
- type ianach:crypt-hash;
- description
- "The password for this entry.";
- }
- list authorized-key {
- key name;
- description
- "A list of public SSH keys for this user. These keys
- are allowed for SSH authentication, as described in
- RFC 4253.";
- reference
- "RFC 4253: The Secure Shell (SSH) Transport Layer
- Protocol";
-
- leaf name {
- type string;
- description
- "An arbitrary name for the SSH key.";
- }
-
- leaf algorithm {
- type string;
- mandatory true;
- description
- "The public key algorithm name for this SSH key.
-
- Valid values are the values in the IANA 'Secure Shell
- (SSH) Protocol Parameters' registry, Public Key
- Algorithm Names.";
- reference
- "IANA 'Secure Shell (SSH) Protocol Parameters'
- registry, Public Key Algorithm Names";
- }
- leaf key-data {
- type binary;
- mandatory true;
- description
- "The binary public key data for this SSH key, as
- specified by RFC 4253, Section 6.6, i.e.:
-
- string certificate or public key format
- identifier
- byte[n] key/certificate data.";
- reference
- "RFC 4253: The Secure Shell (SSH) Transport Layer
- Protocol";
- }
- }
- }
- }
- }
-
- /*
- * Operational state data nodes
- */
-
- container system-state {
- config false;
- description
- "System group operational state.";
-
- container platform {
- description
- "Contains vendor-specific information for
- identifying the system platform and operating system.";
- reference
- "IEEE Std 1003.1-2008 - sys/utsname.h";
-
- leaf os-name {
- type string;
- description
- "The name of the operating system in use -
- for example, 'Linux'.";
- reference
- "IEEE Std 1003.1-2008 - utsname.sysname";
- }
- leaf os-release {
- type string;
- description
- "The current release level of the operating
- system in use. This string MAY indicate
- the OS source code revision.";
- reference
- "IEEE Std 1003.1-2008 - utsname.release";
- }
- leaf os-version {
- type string;
- description
- "The current version level of the operating
- system in use. This string MAY indicate
- the specific OS build date and target variant
- information.";
- reference
- "IEEE Std 1003.1-2008 - utsname.version";
- }
- leaf machine {
- type string;
- description
- "A vendor-specific identifier string representing
- the hardware in use.";
- reference
- "IEEE Std 1003.1-2008 - utsname.machine";
- }
- }
-
- container clock {
- description
- "Monitoring of the system date and time properties.";
-
- leaf current-datetime {
- type yang:date-and-time;
- description
- "The current system date and time.";
- }
-
- leaf boot-datetime {
- type yang:date-and-time;
- description
- "The system date and time when the system last restarted.";
- }
- }
- }
-
- rpc set-current-datetime {
-// nacm:default-deny-all;
- description
- "Set the /system-state/clock/current-datetime leaf
- to the specified value.
-
- If the system is using NTP (i.e., /system/ntp/enabled
- is set to 'true'), then this operation will fail with
- error-tag 'operation-failed' and error-app-tag value of
- 'ntp-active'.";
- input {
- leaf current-datetime {
- type yang:date-and-time;
- mandatory true;
- description
- "The current system date and time.";
- }
- }
- }
-
- rpc system-restart {
-// nacm:default-deny-all;
- description
- "Request that the entire system be restarted immediately.
- A server SHOULD send an rpc reply to the client before
- restarting the system.";
- input {
- leaf reset-option {
- type msea:reset-config-options;
- description "Optionally specify a parameter that can be
- used to reset the configuration on the device or
- reset it to factory defaults";
- }
- }
- }
-
- rpc system-shutdown {
-// nacm:default-deny-all;
- description
- "Request that the entire system be shut down immediately.
- A server SHOULD send an rpc reply to the client before
- shutting down the system.";
- }
-
-}
diff --git a/models/microsemi/src/main/yang/ietf-x509-cert-to-name.yang b/models/microsemi/src/main/yang/ietf-x509-cert-to-name.yang
deleted file mode 100644
index 2996954..0000000
--- a/models/microsemi/src/main/yang/ietf-x509-cert-to-name.yang
+++ /dev/null
@@ -1,248 +0,0 @@
-module ietf-x509-cert-to-name {
- namespace "urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name";
- prefix x509c2n;
-
- import ietf-yang-types {
- prefix yang;
- }
-
- organization "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
- contact
- "WG Web: <http://tools.ietf.org/wg/netmod/>
- WG List: <mailto:netmod@ietf.org>
-
- WG Chair: David Kessens
- <mailto:david.kessens@nsn.com>
-
- WG Chair: Juergen Schoenwaelder
- <mailto:j.schoenwaelder@jacobs-university.de>
-
- Editor: Martin Bjorklund
- <mailto:mbj@tail-f.com>
-
- Editor: Juergen Schoenwaelder
- <mailto:j.schoenwaelder@jacobs-university.de>";
- description
- "This module contains a collection of YANG definitions for
- extracting a name from a X.509 certificate.
-
- The algorithm used to extract a name from a X.509 certificate
- was first defined in RFC 6353.
-
- Copyright (c) 2013 IETF Trust and the persons identified as
- authors of the code. All rights reserved.
-
- Redistribution and use in source and binary forms, with or
- without modification, is permitted pursuant to, and subject
- to the license terms contained in, the Simplified BSD License
- set forth in Section 4.c of the IETF Trust's Legal Provisions
- Relating to IETF Documents
- (http://trustee.ietf.org/license-info).
-
- This version of this YANG module is part of RFC XXXX; see
- the RFC itself for full legal notices.";
- reference
- "RFC6353: Transport Layer Security (TLS) Transport Model for
- the Simple Network Management Protocol (SNMP)";
-
- revision 2013-03-26 {
- description
- "Initial revision.";
- reference "RFC XXXX: A YANG Data Model for SNMP Configuration";
- }
-
- typedef tls-fingerprint {
- type yang:hex-string {
- pattern "([0-9a-fA-F]){2}(:([0-9a-fA-F]){2}){0,254}";
- }
- description
- "A fingerprint value that can be used to uniquely reference
- other data of potentially arbitrary length.
-
- An tls-fingerprint value is composed of a 1-octet hashing
- algorithm identifier followed by the fingerprint value. The
- first octet value identifying the hashing algorithm is taken
- from the IANA TLS HashAlgorithm Registry (RFC 5246). The
- remaining octets are filled using the results of the hashing
- algorithm.";
- reference "SNMP-TLS-TM-MIB.SnmpTLSFingerprint";
- }
-
- identity cert-to-name {
- description
- "Base identity for algorithms to derive a name from a
- certificate.";
- }
-
- identity specified {
- base cert-to-name;
- description
- "Directly specifies the name to be used for the certificate.
- The value of the leaf 'name' in 'cert-to-name' list is used.";
- reference "SNMP-TLS-TM-MIB.snmpTlstmCertSpecified";
- }
-
- identity san-rfc822-name {
- base cert-to-name;
- description
- "Maps a subjectAltName's rfc822Name to a name. The local part
- of the rfc822Name is passed unaltered but the host-part of the
- name must be passed in lowercase. This mapping results in a
- 1:1 correspondence between equivalent subjectAltName
- rfc822Name values and name values except that the host-part
- of the name MUST be passed in lowercase. For example, the
- rfc822Name field FooBar@Example.COM is mapped to name
- FooBar@example.com.";
- reference "SNMP-TLS-TM-MIB.snmpTlstmCertSANRFC822Name";
- }
-
- identity san-dns-name {
- base cert-to-name;
- description
- "Maps a subjectAltName's dNSName to a name after first
- converting it to all lowercase (RFC 5280 does not specify
- converting to lowercase so this involves an extra step).
- This mapping results in a 1:1 correspondence between
- subjectAltName dNSName values and the name values.";
- reference "SNMP-TLS-TM-MIB.snmpTlstmCertSANDNSName";
- }
-
- identity san-ip-address {
- base cert-to-name;
- description
- "Maps a subjectAltName's iPAddress to a name by
- transforming the binary encoded address as follows:
-
- 1) for IPv4, the value is converted into a
- decimal-dotted quad address (e.g., '192.0.2.1').
-
- 2) for IPv6 addresses, the value is converted into a
- 32-character all lowercase hexadecimal string
- without any colon separators.
-
- This mapping results in a 1:1 correspondence between
- subjectAltName iPAddress values and the name values.";
- reference "SNMP-TLS-TM-MIB.snmpTlstmCertSANIpAddress";
- }
-
- identity san-any {
- base cert-to-name;
- description
- "Maps any of the following fields using the corresponding
- mapping algorithms:
-
- +------------+-----------------+
- | Type | Algorithm |
- |------------+-----------------|
- | rfc822Name | san-rfc822-name |
- | dNSName | san-dns-name |
- | iPAddress | san-ip-address |
- +------------+-----------------+
-
- The first matching subjectAltName value found in the
- certificate of the above types MUST be used when deriving
- the name. The mapping algorithm specified in the
- 'Algorithm' column MUST be used to derive the name.
-
- This mapping results in a 1:1 correspondence between
- subjectAltName values and name values. The three sub-mapping
- algorithms produced by this combined algorithm cannot produce
- conflicting results between themselves.";
- reference "SNMP-TLS-TM-MIB.snmpTlstmCertSANAny";
- }
-
- identity common-name {
- base cert-to-name;
- description
- "Maps a certificate's CommonName to a name after converting
- it to a UTF-8 encoding. The usage of CommonNames is
- deprecated and users are encouraged to use subjectAltName
- mapping methods instead. This mapping results in a 1:1
- correspondence between certificate CommonName values and name
- values.";
- reference "SNMP-TLS-TM-MIB.snmpTlstmCertCommonName";
- }
-
- grouping cert-to-name {
- description
- "Defines nodes for mapping certificates to names. Modules
- that uses this grouping should describe how the resulting
- name is used.";
- list cert-to-name {
- key "id";
- description
- "This list defines how certificates are mapped to names.
- The name is derived by considering each cert-to-name
- list entry in order. The cert-to-name entry's fingerprint
- determines whether the list entry is a match:
-
- 1) If the cert-to-name list entry's fingerprint value
- matches that of the presented certificate, then consider
- the list entry as a successful match.
-
- 2) If the cert-to-name list entry's fingerprint value
- matches that of a locally held copy of a trusted CA
- certificate, and that CA certificate was part of the CA
- certificate chain to the presented certificate, then
- consider the list entry as a successful match.
-
- Once a matching cert-to-name list entry has been found, the
- map-type is used to determine how the name associated with
- the certificate should be determined. See the map-type
- leaf's description for details on determining the name value.
- If it is impossible to determine a name from the cert-to-name
- list entry's data combined with the data presented in the
- certificate, then additional cert-to-name list entries MUST
- be searched looking for another potential match.
-
- Security administrators are encouraged to make use of
- certificates with subjectAltName fields that can be mapped to
- names so that a single root CA certificate can allow all
- child certificate's subjectAltName to map directly to a name
- via a 1:1 transformation.";
- reference "SNMP-TLS-TM-MIB.snmpTlstmCertToTSNEntry";
- leaf id {
- type uint32;
- description
- "The id specifies the order in which the entries in the
- cert-to-name list are searched. Entries with lower
- numbers are searched first.";
- reference "SNMP-TLS-TM-MIB.snmpTlstmCertToTSNID";
- }
- leaf fingerprint {
- type x509c2n:tls-fingerprint;
- mandatory true;
- description
- "Specifies a value with which the fingerprint of the
- certificate presented by the peer is compared. If the
- fingerprint of the certificate presented by the peer does
- not match the fingerprint configured, then the entry is
- skipped and the search for a match continues.";
- reference "SNMP-TLS-TM-MIB.snmpTlstmCertToTSNFingerprint";
- }
- leaf map-type {
- type identityref {
- base cert-to-name;
- }
- mandatory true;
- description
- "Specifies the algorithm used to map the certificate
- presented by the peer to a name.
-
- Mappings that need additional configuration objects should
- use the 'when' statement to make them conditional based on
- the 'map-type'.";
- reference "SNMP-TLS-TM-MIB.snmpTlstmCertToTSNMapType";
- }
- leaf name {
- when "../map-type = 'x509c2n:specified'";
- type string;
- mandatory true;
- description
- "Directly specifies the NETCONF username when the
- 'map-type' is 'specified'.";
- reference "SNMP-TLS-TM-MIB.snmpTlstmCertToTSNData";
- }
- }
- }
-}
diff --git a/models/microsemi/src/main/yang/ietf-yang-types.yang b/models/microsemi/src/main/yang/ietf-yang-types.yang
deleted file mode 100644
index 371a091..0000000
--- a/models/microsemi/src/main/yang/ietf-yang-types.yang
+++ /dev/null
@@ -1,480 +0,0 @@
-module ietf-yang-types {
-
- namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types";
- prefix "yang";
-
- organization
- "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
-
- contact
- "WG Web: <http://tools.ietf.org/wg/netmod/>
- WG List: <mailto:netmod@ietf.org>
-
- WG Chair: David Kessens
- <mailto:david.kessens@nsn.com>
-
- WG Chair: Juergen Schoenwaelder
- <mailto:j.schoenwaelder@jacobs-university.de>
-
- Editor: Juergen Schoenwaelder
- <mailto:j.schoenwaelder@jacobs-university.de>";
-
- description
- "This module contains a collection of generally useful derived
- YANG data types.
-
- Copyright (c) 2013 IETF Trust and the persons identified as
- authors of the code. All rights reserved.
-
- Redistribution and use in source and binary forms, with or
- without modification, is permitted pursuant to, and subject
- to the license terms contained in, the Simplified BSD License
- set forth in Section 4.c of the IETF Trust's Legal Provisions
- Relating to IETF Documents
- (http://trustee.ietf.org/license-info).
-
- This version of this YANG module is part of RFC 6991; see
- the RFC itself for full legal notices.";
-
- revision 2013-07-15 {
- description
- "This revision adds the following new data types:
- - yang-identifier
- - hex-string
- - uuid
- - dotted-quad";
- reference
- "RFC 6991: Common YANG Data Types";
- }
-
- revision 2010-09-24 {
- description
- "Initial revision.";
- reference
- "RFC 6021: Common YANG Data Types";
- }
-
- /*** collection of counter and gauge types ***/
-
- typedef counter32 {
- type uint32;
- description
- "The counter32 type represents a non-negative integer
- that monotonically increases until it reaches a
- maximum value of 2^32-1 (4294967295 decimal), when it
- wraps around and starts increasing again from zero.
-
- Counters have no defined 'initial' value, and thus, a
- single value of a counter has (in general) no information
- content. Discontinuities in the monotonically increasing
- value normally occur at re-initialization of the
- management system, and at other times as specified in the
- description of a schema node using this type. If such
- other times can occur, for example, the creation of
- a schema node of type counter32 at times other than
- re-initialization, then a corresponding schema node
- should be defined, with an appropriate type, to indicate
- the last discontinuity.
-
- The counter32 type should not be used for configuration
- schema nodes. A default statement SHOULD NOT be used in
- combination with the type counter32.
-
- In the value set and its semantics, this type is equivalent
- to the Counter32 type of the SMIv2.";
- reference
- "RFC 2578: Structure of Management Information Version 2
- (SMIv2)";
- }
-
- typedef zero-based-counter32 {
- type yang:counter32;
- default "0";
- description
- "The zero-based-counter32 type represents a counter32
- that has the defined 'initial' value zero.
-
- A schema node of this type will be set to zero (0) on creation
- and will thereafter increase monotonically until it reaches
- a maximum value of 2^32-1 (4294967295 decimal), when it
- wraps around and starts increasing again from zero.
-
- Provided that an application discovers a new schema node
- of this type within the minimum time to wrap, it can use the
- 'initial' value as a delta. It is important for a management
- station to be aware of this minimum time and the actual time
- between polls, and to discard data if the actual time is too
- long or there is no defined minimum time.
-
- In the value set and its semantics, this type is equivalent
- to the ZeroBasedCounter32 textual convention of the SMIv2.";
- reference
- "RFC 4502: Remote Network Monitoring Management Information
- Base Version 2";
- }
-
- typedef counter64 {
- type uint64;
- description
- "The counter64 type represents a non-negative integer
- that monotonically increases until it reaches a
- maximum value of 2^64-1 (18446744073709551615 decimal),
- when it wraps around and starts increasing again from zero.
-
- Counters have no defined 'initial' value, and thus, a
- single value of a counter has (in general) no information
- content. Discontinuities in the monotonically increasing
- value normally occur at re-initialization of the
- management system, and at other times as specified in the
- description of a schema node using this type. If such
- other times can occur, for example, the creation of
- a schema node of type counter64 at times other than
- re-initialization, then a corresponding schema node
- should be defined, with an appropriate type, to indicate
- the last discontinuity.
-
- The counter64 type should not be used for configuration
- schema nodes. A default statement SHOULD NOT be used in
- combination with the type counter64.
-
- In the value set and its semantics, this type is equivalent
- to the Counter64 type of the SMIv2.";
- reference
- "RFC 2578: Structure of Management Information Version 2
- (SMIv2)";
- }
-
- typedef zero-based-counter64 {
- type yang:counter64;
- default "0";
- description
- "The zero-based-counter64 type represents a counter64 that
- has the defined 'initial' value zero.
-
-
-
-
- A schema node of this type will be set to zero (0) on creation
- and will thereafter increase monotonically until it reaches
- a maximum value of 2^64-1 (18446744073709551615 decimal),
- when it wraps around and starts increasing again from zero.
-
- Provided that an application discovers a new schema node
- of this type within the minimum time to wrap, it can use the
- 'initial' value as a delta. It is important for a management
- station to be aware of this minimum time and the actual time
- between polls, and to discard data if the actual time is too
- long or there is no defined minimum time.
-
- In the value set and its semantics, this type is equivalent
- to the ZeroBasedCounter64 textual convention of the SMIv2.";
- reference
- "RFC 2856: Textual Conventions for Additional High Capacity
- Data Types";
- }
-
- typedef gauge32 {
- type uint32;
- description
- "The gauge32 type represents a non-negative integer, which
- may increase or decrease, but shall never exceed a maximum
- value, nor fall below a minimum value. The maximum value
- cannot be greater than 2^32-1 (4294967295 decimal), and
- the minimum value cannot be smaller than 0. The value of
- a gauge32 has its maximum value whenever the information
- being modeled is greater than or equal to its maximum
- value, and has its minimum value whenever the information
- being modeled is smaller than or equal to its minimum value.
- If the information being modeled subsequently decreases
- below (increases above) the maximum (minimum) value, the
- gauge32 also decreases (increases).
-
- In the value set and its semantics, this type is equivalent
- to the Gauge32 type of the SMIv2.";
- reference
- "RFC 2578: Structure of Management Information Version 2
- (SMIv2)";
- }
-
- typedef gauge64 {
- type uint64;
- description
- "The gauge64 type represents a non-negative integer, which
- may increase or decrease, but shall never exceed a maximum
- value, nor fall below a minimum value. The maximum value
- cannot be greater than 2^64-1 (18446744073709551615), and
- the minimum value cannot be smaller than 0. The value of
- a gauge64 has its maximum value whenever the information
- being modeled is greater than or equal to its maximum
- value, and has its minimum value whenever the information
- being modeled is smaller than or equal to its minimum value.
- If the information being modeled subsequently decreases
- below (increases above) the maximum (minimum) value, the
- gauge64 also decreases (increases).
-
- In the value set and its semantics, this type is equivalent
- to the CounterBasedGauge64 SMIv2 textual convention defined
- in RFC 2856";
- reference
- "RFC 2856: Textual Conventions for Additional High Capacity
- Data Types";
- }
-
- /*** collection of identifier-related types ***/
-
- typedef object-identifier {
- type string {
- pattern '(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))'
- + '(\.(0|([1-9]\d*)))*';
- }
- description
- "The object-identifier type represents administratively
- assigned names in a registration-hierarchical-name tree.
-
- Values of this type are denoted as a sequence of numerical
- non-negative sub-identifier values. Each sub-identifier
- value MUST NOT exceed 2^32-1 (4294967295). Sub-identifiers
- are separated by single dots and without any intermediate
- whitespace.
-
- The ASN.1 standard restricts the value space of the first
- sub-identifier to 0, 1, or 2. Furthermore, the value space
- of the second sub-identifier is restricted to the range
- 0 to 39 if the first sub-identifier is 0 or 1. Finally,
- the ASN.1 standard requires that an object identifier
- has always at least two sub-identifiers. The pattern
- captures these restrictions.
-
- Although the number of sub-identifiers is not limited,
- module designers should realize that there may be
- implementations that stick with the SMIv2 limit of 128
- sub-identifiers.
-
- This type is a superset of the SMIv2 OBJECT IDENTIFIER type
- since it is not restricted to 128 sub-identifiers. Hence,
- this type SHOULD NOT be used to represent the SMIv2 OBJECT
- IDENTIFIER type; the object-identifier-128 type SHOULD be
- used instead.";
- reference
- "ISO9834-1: Information technology -- Open Systems
- Interconnection -- Procedures for the operation of OSI
- Registration Authorities: General procedures and top
- arcs of the ASN.1 Object Identifier tree";
- }
-
- typedef object-identifier-128 {
- type object-identifier {
- pattern '\d*(\.\d*){1,127}';
- }
- description
- "This type represents object-identifiers restricted to 128
- sub-identifiers.
-
- In the value set and its semantics, this type is equivalent
- to the OBJECT IDENTIFIER type of the SMIv2.";
- reference
- "RFC 2578: Structure of Management Information Version 2
- (SMIv2)";
- }
-
- typedef yang-identifier {
- type string {
- length "1..max";
- pattern '[a-zA-Z_][a-zA-Z0-9\-_.]*';
- pattern '.|..|[^xX].*|.[^mM].*|..[^lL].*';
- }
- description
- "A YANG identifier string as defined by the 'identifier'
- rule in Section 12 of RFC 6020. An identifier must
- start with an alphabetic character or an underscore
- followed by an arbitrary sequence of alphabetic or
- numeric characters, underscores, hyphens, or dots.
-
- A YANG identifier MUST NOT start with any possible
- combination of the lowercase or uppercase character
- sequence 'xml'.";
- reference
- "RFC 6020: YANG - A Data Modeling Language for the Network
- Configuration Protocol (NETCONF)";
- }
-
- /*** collection of types related to date and time***/
-
- typedef date-and-time {
- type string {
- pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?'
- + '(Z|[\+\-]\d{2}:\d{2})';
- }
- description
- "The date-and-time type is a profile of the ISO 8601
- standard for representation of dates and times using the
- Gregorian calendar. The profile is defined by the
- date-time production in Section 5.6 of RFC 3339.
-
- The date-and-time type is compatible with the dateTime XML
- schema type with the following notable exceptions:
-
- (a) The date-and-time type does not allow negative years.
-
- (b) The date-and-time time-offset -00:00 indicates an unknown
- time zone (see RFC 3339) while -00:00 and +00:00 and Z
- all represent the same time zone in dateTime.
-
- (c) The canonical format (see below) of data-and-time values
- differs from the canonical format used by the dateTime XML
- schema type, which requires all times to be in UTC using
- the time-offset 'Z'.
-
- This type is not equivalent to the DateAndTime textual
- convention of the SMIv2 since RFC 3339 uses a different
- separator between full-date and full-time and provides
- higher resolution of time-secfrac.
-
- The canonical format for date-and-time values with a known time
- zone uses a numeric time zone offset that is calculated using
- the device's configured known offset to UTC time. A change of
- the device's offset to UTC time will cause date-and-time values
- to change accordingly. Such changes might happen periodically
- in case a server follows automatically daylight saving time
- (DST) time zone offset changes. The canonical format for
- date-and-time values with an unknown time zone (usually
- referring to the notion of local time) uses the time-offset
- -00:00.";
- reference
- "RFC 3339: Date and Time on the Internet: Timestamps
- RFC 2579: Textual Conventions for SMIv2
- XSD-TYPES: XML Schema Part 2: Datatypes Second Edition";
- }
-
- typedef timeticks {
- type uint32;
- description
- "The timeticks type represents a non-negative integer that
- represents the time, modulo 2^32 (4294967296 decimal), in
- hundredths of a second between two epochs. When a schema
- node is defined that uses this type, the description of
- the schema node identifies both of the reference epochs.
-
- In the value set and its semantics, this type is equivalent
- to the TimeTicks type of the SMIv2.";
- reference
- "RFC 2578: Structure of Management Information Version 2
- (SMIv2)";
- }
-
- typedef timestamp {
- type yang:timeticks;
- description
- "The timestamp type represents the value of an associated
- timeticks schema node at which a specific occurrence
- happened. The specific occurrence must be defined in the
- description of any schema node defined using this type. When
- the specific occurrence occurred prior to the last time the
- associated timeticks attribute was zero, then the timestamp
- value is zero. Note that this requires all timestamp values
- to be reset to zero when the value of the associated timeticks
- attribute reaches 497+ days and wraps around to zero.
-
- The associated timeticks schema node must be specified
- in the description of any schema node using this type.
-
- In the value set and its semantics, this type is equivalent
- to the TimeStamp textual convention of the SMIv2.";
- reference
- "RFC 2579: Textual Conventions for SMIv2";
- }
-
- /*** collection of generic address types ***/
-
- typedef phys-address {
- type string {
- pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?';
- }
-
-
-
-
- description
- "Represents media- or physical-level addresses represented
- as a sequence octets, each octet represented by two hexadecimal
- numbers. Octets are separated by colons. The canonical
- representation uses lowercase characters.
-
- In the value set and its semantics, this type is equivalent
- to the PhysAddress textual convention of the SMIv2.";
- reference
- "RFC 2579: Textual Conventions for SMIv2";
- }
-
- typedef mac-address {
- type string {
- pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}';
- }
- description
- "The mac-address type represents an IEEE 802 MAC address.
- The canonical representation uses lowercase characters.
-
- In the value set and its semantics, this type is equivalent
- to the MacAddress textual convention of the SMIv2.";
- reference
- "IEEE 802: IEEE Standard for Local and Metropolitan Area
- Networks: Overview and Architecture
- RFC 2579: Textual Conventions for SMIv2";
- }
-
- /*** collection of XML-specific types ***/
-
- typedef xpath1.0 {
- type string;
- description
- "This type represents an XPATH 1.0 expression.
-
- When a schema node is defined that uses this type, the
- description of the schema node MUST specify the XPath
- context in which the XPath expression is evaluated.";
- reference
- "XPATH: XML Path Language (XPath) Version 1.0";
- }
-
- /*** collection of string types ***/
-
- typedef hex-string {
- type string {
- pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?';
- }
- description
- "A hexadecimal string with octets represented as hex digits
- separated by colons. The canonical representation uses
- lowercase characters.";
- }
-
- typedef uuid {
- type string {
- pattern '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-'
- + '[0-9a-fA-F]{4}-[0-9a-fA-F]{12}';
- }
- description
- "A Universally Unique IDentifier in the string representation
- defined in RFC 4122. The canonical representation uses
- lowercase characters.
-
- The following is an example of a UUID in string representation:
- f81d4fae-7dec-11d0-a765-00a0c91e6bf6
- ";
- reference
- "RFC 4122: A Universally Unique IDentifier (UUID) URN
- Namespace";
- }
-
- typedef dotted-quad {
- type string {
- pattern
- '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}'
- + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])';
- }
- description
- "An unsigned 32-bit number expressed in the dotted-quad
- notation, i.e., four octets written as decimal numbers
- and separated with the '.' (full stop) character.";
- }
-}
diff --git a/models/microsemi/src/main/yang/msea-cfm.yang b/models/microsemi/src/main/yang/msea-cfm@2016-02-29.yang
similarity index 100%
rename from models/microsemi/src/main/yang/msea-cfm.yang
rename to models/microsemi/src/main/yang/msea-cfm@2016-02-29.yang
diff --git a/models/microsemi/src/main/yang/msea-sa-filtering.yang b/models/microsemi/src/main/yang/msea-sa-filtering@2016-04-12.yang
similarity index 100%
rename from models/microsemi/src/main/yang/msea-sa-filtering.yang
rename to models/microsemi/src/main/yang/msea-sa-filtering@2016-04-12.yang
diff --git a/models/microsemi/src/main/yang/msea-soam-fm.yang b/models/microsemi/src/main/yang/msea-soam-fm@2016-02-29.yang
similarity index 100%
rename from models/microsemi/src/main/yang/msea-soam-fm.yang
rename to models/microsemi/src/main/yang/msea-soam-fm@2016-02-29.yang
diff --git a/models/microsemi/src/main/yang/msea-soam-pm.yang b/models/microsemi/src/main/yang/msea-soam-pm@2016-02-29.yang
similarity index 100%
rename from models/microsemi/src/main/yang/msea-soam-pm.yang
rename to models/microsemi/src/main/yang/msea-soam-pm@2016-02-29.yang
diff --git a/models/microsemi/src/main/yang/msea-types.yang b/models/microsemi/src/main/yang/msea-types@2016-02-29.yang
similarity index 100%
rename from models/microsemi/src/main/yang/msea-types.yang
rename to models/microsemi/src/main/yang/msea-types@2016-02-29.yang
diff --git a/models/microsemi/src/main/yang/msea-uni-evc-interface.yang b/models/microsemi/src/main/yang/msea-uni-evc-interface@2016-03-17.yang
similarity index 100%
rename from models/microsemi/src/main/yang/msea-uni-evc-interface.yang
rename to models/microsemi/src/main/yang/msea-uni-evc-interface@2016-03-17.yang
diff --git a/models/microsemi/src/main/yang/msea-uni-evc-service.yang b/models/microsemi/src/main/yang/msea-uni-evc-service@2016-03-17.yang
similarity index 100%
rename from models/microsemi/src/main/yang/msea-uni-evc-service.yang
rename to models/microsemi/src/main/yang/msea-uni-evc-service@2016-03-17.yang
diff --git a/models/microsemi/src/main/yang/nc-notifications.yang b/models/microsemi/src/main/yang/nc-notifications.yang
deleted file mode 100644
index 5636aeb..0000000
--- a/models/microsemi/src/main/yang/nc-notifications.yang
+++ /dev/null
@@ -1,95 +0,0 @@
-module nc-notifications {
-
- namespace "urn:ietf:params:xml:ns:netmod:notification";
- prefix "manageEvent";
-
- import ietf-yang-types{ prefix yang; }
- import notifications { prefix ncEvent; }
-
- organization
- "IETF NETCONF WG";
-
- contact
- "netconf@ietf.org";
-
- description
- "Conversion of the 'manageEvent' XSD in the NETCONF
- Notifications RFC.";
-
- reference
- "RFC 5277";
-
- revision 2008-07-14 {
- description "RFC 5277 version.";
- }
-
- container netconf {
- description "Top-level element in the notification namespace";
-
- config false;
-
- container streams {
- description
- "The list of event streams supported by the system. When
- a query is issued, the returned set of streams is
- determined based on user privileges.";
-
- list stream {
- description
- "Stream name, description and other information.";
- key name;
- min-elements 1;
-
- leaf name {
- description
- "The name of the event stream. If this is the default
- NETCONF stream, this must have the value 'NETCONF'.";
- type ncEvent:streamNameType;
- }
-
- leaf description {
- description
- "A description of the event stream, including such
- information as the type of events that are sent over
- this stream.";
- type string;
- mandatory true;
- }
-
- leaf replaySupport {
- description
- "A description of the event stream, including such
- information as the type of events that are sent over
- this stream.";
- type boolean;
- mandatory true;
- }
-
- leaf replayLogCreationTime {
- description
- "The timestamp of the creation of the log used to support
- the replay function on this stream. Note that this might
- be earlier then the earliest available notification in
- the log. This object is updated if the log resets for
- some reason. This object MUST be present if replay is
- supported.";
- type yang:date-and-time; // xsd:dateTime is wrong!
- }
- }
- }
- }
-
- notification replayComplete {
- description
- "This notification is sent to signal the end of a replay
- portion of a subscription.";
- }
-
- notification notificationComplete {
- description
- "This notification is sent to signal the end of a notification
- subscription. It is sent in the case that stopTime was
- specified during the creation of the subscription..";
- }
-
-}
diff --git a/models/microsemi/src/main/yang/netopeer-cfgnetopeer.yang b/models/microsemi/src/main/yang/netopeer-cfgnetopeer.yang
deleted file mode 100644
index 79f1566..0000000
--- a/models/microsemi/src/main/yang/netopeer-cfgnetopeer.yang
+++ /dev/null
@@ -1,72 +0,0 @@
-module netopeer-cfgnetopeer {
- namespace "urn:cesnet:tmc:netopeer:1.0";
- prefix cfgnetopeer;
-
- organization "CESNET, z.s.p.o.";
- contact
- "dkupka@cesnet.cz";
- description
- "Module specifying Netopeer module data model and RPC operation.";
-
- revision 2013-02-14 {
- description
- "Modules are now configurable. Except implemented-rpcs which depends on module data model.";
- }
- revision 2012-11-13 {
- description
- "Removed parts implemented by library (RFC6022).";
- }
- revision 2011-10-20 {
- description
- "Initial revision";
- }
-
- container netopeer {
- container modules {
- list module {
- key "name";
- leaf name {
- type string;
- description
- "Name of module";
- }
- leaf enabled {
- type boolean;
- default false;
- description
- "Specify whether or not the module is allowed to be managed over server.";
- }
- }
- }
- }
- rpc netopeer-reboot {
- description
- "Operation allowing privileged user to restart netopeer-server.";
- input {
- leaf type {
- type enumeration {
- enum "soft";
- enum "hard";
- }
- default "soft";
- description
- "Soft restart only unplugs all device modules and reloads configuration.
- Hard restart also abort all connections and reload the binary.";
- }
- }
- }
- rpc reload-module {
- description
- "Unload and load any loaded module." ;
- input {
- leaf module {
- type leafref {
- path "/netopeer/modules/module/name";
- }
- mandatory true;
- description
- "Name of module to reload.";
- }
- }
- }
-}
diff --git a/models/microsemi/src/main/yang/notifications.yang b/models/microsemi/src/main/yang/notifications.yang
deleted file mode 100644
index 1ae9cc2..0000000
--- a/models/microsemi/src/main/yang/notifications.yang
+++ /dev/null
@@ -1,95 +0,0 @@
-module notifications {
-
- namespace "urn:ietf:params:xml:ns:netconf:notification:1.0";
- prefix "ncEvent";
-
- import ietf-yang-types { prefix yang; }
-
- organization
- "IETF NETCONF WG";
-
- contact
- "netconf@ops.ietf.org";
-
- description
- "Conversion of the 'ncEvent' XSD in the
- NETCONF Notifications RFC.";
-
- reference
- "RFC 5277.";
-
- revision 2008-07-14 {
- description "RFC 5277 version.";
- }
-
- typedef streamNameType {
- description
- "The name of an event stream.";
- type string;
- }
-
- rpc create-subscription {
- description
- "The command to create a notification subscription. It
- takes as argument the name of the notification stream
- and filter. Both of those options limit the content of
- the subscription. In addition, there are two time-related
- parameters, startTime and stopTime, which can be used to
- select the time interval of interest to the notification
- replay feature.";
-
- input {
- leaf stream {
- description
- "An optional parameter that indicates which stream of events
- is of interest. If not present, then events in the default
- NETCONF stream will be sent.";
- type streamNameType;
- default "NETCONF";
- }
-
- anyxml filter {
- description
- "An optional parameter that indicates which subset of all
- possible events is of interest. The format of this
- parameter is the same as that of the filter parameter
- in the NETCONF protocol operations. If not present,
- all events not precluded by other parameters will
- be sent.";
- }
-
- leaf startTime {
- description
- "A parameter used to trigger the replay feature and
- indicates that the replay should start at the time
- specified. If start time is not present, this is not a
- replay subscription.";
- type yang:date-and-time;
- }
-
- leaf stopTime {
- // must ". >= ../startTime";
- description
- "An optional parameter used with the optional replay
- feature to indicate the newest notifications of
- interest. If stop time is not present, the notifications
- will continue until the subscription is terminated.
- Must be used with startTime.";
- type yang:date-and-time;
- }
- }
- }
-
- container notification {
- description "internal struct to start a notification";
- config false;
-
- leaf eventTime {
- mandatory true;
- type yang:date-and-time;
- }
-
- // eventType and any data content goes here
- }
-}
-
diff --git a/models/microsemi/src/main/yang/rfc-2544.yang b/models/microsemi/src/main/yang/rfc-2544.yang
deleted file mode 100644
index fb1a7c0..0000000
--- a/models/microsemi/src/main/yang/rfc-2544.yang
+++ /dev/null
@@ -1,509 +0,0 @@
-module rfc-2544 {
-
- /*** NAMESPACE / PREFIX DEFINITION ***/
-
- namespace "http://www.microsemi.com/rfc2544";
- prefix "rfc2544";
-
- import svc-activation-types {
- prefix sa;
- }
-
- import msea-types {
- prefix msea;
- revision-date 2016-02-29;
- }
-
- /*** META INFORMATION ***/
-
- organization
- "Microsemi Inc., FTD Division";
-
- contact
- "Web URL: http://www.microsemi.com/
- E-mail: info@microsemi.com
- Postal: Microsemi Corporation Corporate Headquarters
- One Enterprise Aliso Viejo,
- CA 92656
- U.S.A.
- Phone: +1 949 380 6100
- Fax: +1 949 215-4996";
-
- description
- "This YANG module defines the interface for RFC 2544 Benchmarking Methodology for Network Interconnect Devices
-
- Copyright 2015 Microsemi Inc.
- All rights reserved.";
-
- revision "2015-10-20" {
- description
- "Initial version - Sean Condon, Microsemi";
- }
-
- /*
- * Typedefs
- */
-
-
- /*
- * Groupings
- */
- grouping frame-size-group {
-
- description "Frame sizes to use in the test";
-
- leaf-list frame-size {
- type sa:frame-size-type;
- max-elements 8;
- units "byte";
- ordered-by user;
- description "A range of frame sizes to use. 512 bytes will be used if nothing is specified";
- }
-
- reference "RFC 2544 Section 9
- All of the described tests SHOULD be performed at a number of frame
- sizes. Specifically, the sizes SHOULD include the maximum and minimum
- legitimate sizes for the protocol under test on the media under test
- and enough sizes in between to be able to get a full characterization
- of the DUT performance. Except where noted, at least five frame
- sizes SHOULD be tested for each test condition.";
- }
-
- grouping throughput-group {
- description
- "Configuration parameters for throughput test.";
-
- leaf step-size {
- type uint8 {
- range 1..10|20|25|30|40|50|100;
- }
- must "current() <= ((../max-rate) - (../min-rate))" {
- error-app-tag "msea-2544-must-1";
- error-message "step-size must be less than or equal to the difference between min- and max-rate";
- }
- units "Mb/s";
- default 10;
- description "The throughput rate step size from 1Mb/s to 1,000Mb/s (1 Gbps)";
- }
-
- leaf min-rate {
- type uint16 {
- range 1..999;
- }
- must "current() < ../max-rate" {
- error-app-tag "msea-2544-must-2";
- error-message "min-rate must not equal or exceed max-rate";
- }
- units "Mb/s";
- default 10;
- description "The minimum throughput rate from 1Mb/s to 1,000Mb/s (1Gbps)
- The test starts at the max-rate and reduces by step-size on each
- iteration until it drops below min-rate. For example with
- max-rate=10, step-size=2 and min-rate=1, tests will be
- performed at 10,8,6,4 and 2 Mb/s";
- }
-
- leaf max-rate {
- type uint16 {
- range 2..1000;
- }
- units "Mb/s";
- default 1000;
- description "The maximum throughput rate from 1Mb/s to 1,000Mb/s (1Gbps)";
- }
-
- leaf trial-duration {
- type uint32 {
- range 1..max;
- }
- default 60;
- units "s";
- description "Trial duration";
- reference "RFC 2544 Section 24
- The duration of the test portion of each trial SHOULD be
- at least 60 seconds.";
- }
- }
-
- grouping afl-group {
- description
- "Extra configuration parameters for throughput and latency test.";
-
- leaf accepted-frame-loss {
- type uint32 {
- range min..100000;
- }
- units "m%";
- default 0;
- description "The acceptable Frame Loss ratio in units of 0.001%";
- }
- }
-
- grouping result-common-group {
- description
- "Common attributes of by-frame-size result set.";
-
- leaf test-status {
- type sa:test-status;
- mandatory true;
- description "The current status of the subset of tests";
- }
-
- leaf frame-size {
- type sa:frame-size-type;
- units "bytes";
- description "The frame size used";
- }
-
- leaf elapsed-time {
- type uint16;
- units "s";
- description "The number of seconds the test has been running";
- }
- }
-
- /*
- * Features
- */
- feature throughput {
- description
- "This feature indicates that the device supports throughput tests";
- reference
- "RFC 2544: Section 26.1";
- }
-
- feature latency {
- description
- "This feature indicates that the device supports Latency tests";
- reference
- "RFC 2544: Section 26.2";
- }
-
- feature frame-loss-rate {
- description
- "This feature indicates that the device supports Frame Loss Rate tests";
- reference
- "RFC 2544: Section 26.3";
- }
-
- feature back-to-back {
- description
- "This feature indicates that the device supports Back-to-Back (burst mode) tests";
- reference
- "RFC 2544: Section 26.4";
- }
-
- container rfc2544-test {
- description
- "A configured set of parameters for an RFC 2544 test";
-
- container mep-config {
- presence "Presence indicates that a MEP has been configured";
-
- uses msea:mep-config-attribs-noref;
-
- leaf remote-mep-id {
- type msea:mep-id-type;
- must "current()/../maintenance-association-end-point != current()" {
- error-message "Remote MEP Id must not be the same as Local MEP Id";
- error-app-tag "msea-svc-must-01";
- }
-
- //mandatory true; //Should not be mandatory in a top level container
- description "The Id of the remote MEP";
- }
-
- container overwrite-pcp {
- presence "Enables PCP Overwrite";
- description "If present allows attributes to be
- specified for the PCP overwrite";
-
- uses sa:overwrite-pcp-attribs;
-
- leaf overwrite-drop-eligible {
- type boolean;
- default false;
- description
- "The Drop Eligible flag in the MEP's TAG is replaced
- with this value if overwrite-pcp is present.";
- }
- }
- }
-
- leaf binary-search-step-duration {
- type uint16 {
- range 1..10;
- }
- default 2;
- units "s";
- description
- "The time in seconds for each step in the Throughput binary search. Range 1 to 10, default 2.";
- reference "RFC 2544 Section 24";
- }
-
-
- container throughput {
- if-feature throughput;
- description "Configuration parameters for the Throughput part of the test";
-
- uses throughput-group;
- uses frame-size-group;
- uses afl-group;
- }
-
- container latency {
- if-feature latency;
- description "Configuration parameters for the Latency part of the test";
-
- uses throughput-group {
- refine trial-duration {
- default 120;
- }
- }
- uses frame-size-group;
- uses afl-group;
- }
-
- container frame-loss {
- if-feature frame-loss-rate;
- description "Configuration parameters for the Frame Loss part of the test";
-
- uses throughput-group;
- uses frame-size-group;
- }
-
- container back-to-back {
- if-feature back-to-back;
- description "Configuration parameters for the Back-to-Back part of the test";
-
- leaf trial-duration {
- type uint32 {
- range 1..10000;
- }
- units "ms";
- default 2000;
- description "The duration of the Back-to-Back test in milliseconds";
- }
-
- leaf iterations {
- type uint16 {
- range 1..max;
- }
- default 50;
- description "The number of times to run the test";
- }
-
- uses frame-size-group;
- }
- }
-
- container rfc2544-result {
- config false;
-
- description "A collection of the results from the RFC 2544 tests";
-
- container throughput {
- if-feature throughput;
-
- description "Results for the Throughput test";
-
- uses sa:results-header-group;
-
- list result-item {
- key frame-size;
-
- description "The list of results by frame size";
-
- reference "RFC 2544: Section 26.1";
-
- uses result-common-group;
-
- leaf frame-rate {
- type uint32;
- units "Mb/s";
- description "The throughput rate achieved for this packet size";
- }
- }
- }
-
- container latency {
- if-feature latency;
-
- description "Results for the Latency test";
-
- uses sa:results-header-group;
-
- list result-item {
- key frame-size;
-
- uses result-common-group;
-
- leaf frame-rate {
- type uint32;
- units "Mb/s";
- description "The throughput rate achieved for this frame size";
- }
-
- leaf frame-delay-min {
- type uint32;
- units "μs";
- description "The Minimum Frame Delay measured at the throughput rate";
- }
-
- leaf frame-delay-max {
- type uint32;
- units "μs";
- description "The Maximum Frame Delay measured at the throughput rate";
- }
-
- leaf frame-delay-avg {
- type uint32;
- units "μs";
- description "The Average Frame Delay measured at the throughput rate";
- }
-
- leaf frame-delay-var-min {
- type uint32;
- units "μs";
- description "The Minimum Frame Delay Variation measured at the throughput rate";
- }
-
- leaf frame-delay-var-max {
- type uint32;
- units "μs";
- description "The Maximum Frame Delay Variation measured at the throughput rate";
- }
-
- leaf frame-delay-var-avg {
- type uint32;
- units "μs";
- description "The Average Frame Delay Variation measured at the throughput rate";
- }
- }
- }
-
- container frame-loss {
- if-feature frame-loss-rate;
-
- description "Results for the Frame Loss test";
- reference "RFC-2544 Section 26.3";
-
- uses sa:results-header-group;
-
- list result-item {
- key frame-size;
-
- description "The frame-loss result set for this frame-size";
-
- uses result-common-group;
-
- leaf frame-steps {
- type uint8;
- description "The number of steps recorded during Frame Loss test. Maximum is 8";
- }
-
- list frame-rate {
- key rate;
- description "A list of the losses at each rate step. This shows up to the 8 most recent steps";
-
- leaf rate {
- type uint32;
- units "Mb/s";
- description "The test rate used for this step";
- }
-
- leaf frame-loss {
- type uint32;
- units "m%";
- description "The percentage frames lost for this rate step (in 0.001% units)";
- }
- }
- }
- }
-
- container back-to-back {
- if-feature back-to-back;
-
- description "Results for the Back-to-Back (burst mode) test";
-
- uses sa:results-header-group;
-
- list result-item {
- key frame-size;
-
- leaf test-status {
- type sa:test-status;
- mandatory true;
- description "The current status of the subset of tests";
- }
-
- leaf frame-size {
- type sa:frame-size-type;
- units "bytes";
- description "The frame size used";
- }
-
- leaf burst-duration {
- type uint16;
- units "ms";
- description "The duration of the burst in milliseconds";
- }
-
- leaf average-burst-frame-count {
- type uint32;
- description "An average of the count of received frames for the test for this frame size";
- }
- }
-
- }
-
- }
-
-
-
- rpc run-rfc2544-test {
-
- description
- "Run the configured RFC 2544 test";
-
- input {
- leaf tests-enabled {
- type bits {
- bit throughput;
- bit latency;
- bit frameLoss;
- bit backToBack;
- }
- default "throughput latency frameLoss backToBack";
- description "Choose the test components to run - by default all are selected";
- }
-
-
- leaf send-subtest-event {
- type boolean;
- default true;
- description "If true then send events for all of the state changes of tests at the 'frame size' level.
- If false events are sent only for state changes in the top level tests e.g. throughput";
- }
- }
- }
-
- rpc stop-rfc2544-test {
- description
- "Stop the running RFC 2544 test";
- }
-
- notification rfc2544-test-updated {
- description
- "A rfc2544-test-updated notification is sent when the state of a test changes.";
-
- uses sa:notification-group;
-
- leaf frame-size {
- type sa:frame-size-type;
- units "bytes";
- description "The frame size that is being tested. If not present then
- the notification pertains to the overall test type";
- }
- }
-}
\ No newline at end of file
diff --git a/models/microsemi/src/main/yang/svc-activation-types.yang b/models/microsemi/src/main/yang/svc-activation-types.yang
deleted file mode 100644
index f82227b..0000000
--- a/models/microsemi/src/main/yang/svc-activation-types.yang
+++ /dev/null
@@ -1,190 +0,0 @@
-module svc-activation-types {
-
- /*** NAMESPACE / PREFIX DEFINITION ***/
-
- namespace "http://www.microsemi.com/svc-activation-types";
- prefix "sa";
-
- import ietf-yang-types {
- prefix yang;
- revision-date 2013-07-15;
- }
-
- import msea-types {
- prefix msea;
- revision-date 2016-02-29;
- }
-
- import msea-cfm {
- prefix msea-cfm;
- revision-date 2016-02-29;
- }
- /*** META INFORMATION ***/
-
- organization
- "Microsemi Inc., FTD Division";
-
- contact
- "Web URL: http://www.microsemi.com/
- E-mail: info@microsemi.com
- Postal: Microsemi Corporation Corporate Headquarters
- One Enterprise Aliso Viejo,
- CA 92656
- U.S.A.
- Phone: +1 949 380 6100
- Fax: +1 949 215-4996";
-
- description
- "This YANG module defines common types that
- are used in both RFC 2544 and ITU-T Y.1564
-
- Copyright 2015 Microsemi Inc.
- All rights reserved.";
-
- revision "2015-10-27" {
- description
- "Initial version - Sean Condon, Microsemi";
- reference "Initial revision";
- }
-
- /*
- * Typedefs
- */
- typedef test-status {
- type enumeration {
- enum disabled {
- value 0;
- description "Test is disabled";
- }
- enum running {
- value 1;
- description "Test is running";
- }
- enum pending {
- value 2;
- description "Test is pending";
- }
- enum stopped {
- value 3;
- description "Test is stopped";
- }
- enum completed {
- value 4;
- description "Test is completed";
- }
- enum failed {
- value 5;
- description "Test is failed";
- }
- }
- description "Enumerated values for the status of a test";
- }
-
- typedef frame-size-type {
- type uint16 {
- range 64..9600;
- }
- description "Frame size in bytes data type";
- }
-
- grouping mep-config-attribs {
- description
- "Attributes related to the configuration of a MEP";
-
- leaf maintenance-domain {
- type leafref {
- path "/msea-cfm:mef-cfm/msea-cfm:maintenance-domain/msea-cfm:id";
-// msea:xref-module "msea-cfm";
- }
- description
- "A reference to a specific Maintenance Domain.";
- }
-
- leaf maintenance-association {
- type leafref {
- path "/msea-cfm:mef-cfm/msea-cfm:maintenance-domain[msea-cfm:id=current()/../maintenance-domain]/msea-cfm:maintenance-association/msea-cfm:id";
-// msea:xref-module "msea-cfm";
- }
- description
- "A reference to a specific Maintenance Association.";
- }
-
- leaf maintenance-association-end-point {
- type leafref {
- path "/msea-cfm:mef-cfm/msea-cfm:maintenance-domain[msea-cfm:id=current()/../maintenance-domain]/msea-cfm:maintenance-association[msea-cfm:id=current()/../maintenance-association]/msea-cfm:maintenance-association-end-point/msea-cfm:mep-identifier";
-// msea:xref-module "msea-cfm";
- }
- description
- "A reference to a specific Maintenance association End Point.";
- }
-
-
- leaf remote-mep-id {
- type leafref {
- path "/msea-cfm:mef-cfm/msea-cfm:maintenance-domain[msea-cfm:id=current()/../maintenance-domain]/msea-cfm:maintenance-association[msea-cfm:id=current()/../maintenance-association]/msea-cfm:remote-meps";
-// msea:xref-module "msea-cfm";
- }
-
- must "current()/../maintenance-association-end-point != current()" {
- error-message "Remote MEP Id must not be the same as Local MEP Id";
- error-app-tag "msea-svc-must-01";
- }
-
- //mandatory true; //Should not be mandatory in a top level container
- description "The Id of the remote MEP";
- }
- }
-
- grouping overwrite-pcp-attribs {
- leaf overwrite-priority {
- type msea:priority-type;
- default 0;
- description
- "The priority in the MEP's TAG is replaced
- with this priority if overwrite-pcp is present";
- }
- }
-
- grouping results-header-group {
- description
- "Common attributes of a result set.";
-
- leaf start-time {
- type yang:date-and-time;
- mandatory true;
- description "Time at which the test was started.";
- }
-
- leaf end-time {
- type yang:date-and-time;
- description "Time at which the test ended.
- Not specified if test has ended.";
- }
-
- leaf test-status {
- type test-status;
- mandatory true;
- description "The status of the test";
- }
- }
-
- grouping notification-group {
- description "Attributes related to notifications";
- leaf new-status {
- type sa:test-status;
- mandatory true;
- description "The new status of the test";
- }
-
- leaf old-status {
- type sa:test-status;
- description "The old status of the test";
- }
-
- leaf test-type {
- type string;
- mandatory true;
- description "Name of the test currently being performed";
- }
- }
-}
\ No newline at end of file
diff --git a/models/microsemi/src/main/yang/y-1564.yang b/models/microsemi/src/main/yang/y-1564.yang
deleted file mode 100644
index 9f40ba8..0000000
--- a/models/microsemi/src/main/yang/y-1564.yang
+++ /dev/null
@@ -1,667 +0,0 @@
-module y-1564 {
-
- /*** NAMESPACE / PREFIX DEFINITION ***/
-
- namespace "http://www.microsemi.com/y1564";
- prefix "y1564";
-
- import svc-activation-types {
- prefix sa;
- }
-
- import msea-types {
- prefix msea;
- revision-date 2016-02-29;
- }
-
- /*** META INFORMATION ***/
-
- organization
- "Microsemi Inc., FTD Division";
-
- contact
- "Web URL: http://www.microsemi.com/
- E-mail: info@microsemi.com
- Postal: Microsemi Corporation Corporate Headquarters
- One Enterprise Aliso Viejo,
- CA 92656
- U.S.A.
- Phone: +1 949 380 6100
- Fax: +1 949 215-4996";
-
- description
- "This YANG module defines the interface for Rec. ITU-T Y.1564
- (03/2011) Ethernet service activation test methodology
-
- Copyright 2015 Microsemi Inc.
- All rights reserved.";
-
- revision "2015-10-29" {
- description
- "Initial version - Sean Condon, Microsemi
- This version does not cover frame reordering (Section 7.2.5)";
- reference "Initial implementation";
- }
-
- /*
- * Typedefs
- */
-
- /*
- * Groupings
- */
- grouping service-attributes-group {
- description
- "Attributes for service definition";
- leaf service-id {
- type uint8 {
- range 1..8;
- }
- mandatory true;
- description "The unique ID of the Service";
- }
- }
- grouping result-attributes-group {
- description "Common attributes in result";
-
- leaf status {
- type sa:test-status;
- mandatory true;
- description "Status of the test - Values are disabled,
- running, pending, stopped, completed or failed";
- }
-
- }
-
-
- grouping pass-fail-group {
- leaf passed {
- type boolean;
- description
- "Flag that indicates whether the test component
- sucessfully met the test criteria.";
- }
-
- leaf fail-reason {
- type enumeration {
- enum notFailed {
- value 0;
- description "Test did not fail";
- }
- enum zeroTxCount {
- value 1;
- description "The test resulted in no transmitted packets";
- }
- enum zeroRxCount {
- value 2;
- description "No packets were received";
- }
- enum exceedFdvThreshold {
- value 3;
- description "The measured maximum Frame Delay Variation value exceeded the allowable threshold";
- }
- enum exceedFtdThreshold {
- value 4;
- description "The measured maximum Frame Transfer Delay value exceeded the allowable threshold";
- }
- enum exceedLossThreshold {
- value 5;
- description "The measured Frame Loss value exceeded the allowable threshold";
- }
- enum exceedAvailThreshold {
- value 6;
- description "The measured maximum Availability value exceeded the allowable threshold";
- }
- enum irAvgTooHigh {
- value 7;
- description "The measured Information Rate is above the maximum allowable rate";
- }
- enum irAvgTooLow {
- value 8;
- description "The measured Information Rate is below the maximum allowable rate";
- }
- enum targetUnknown {
- value 9;
- description "The MAC address of the target MEP was not known";
- }
- }
- }
- }
-
- grouping y1564-test-result-group {
- description "Common attributes in test result";
- leaf tf {
- type uint64;
- description
- "Count of the frames transmitted during the test period.";
- }
-
- leaf rf {
- type uint64;
- description
- "Count of the frames received during the test period.";
- }
-
- leaf fl {
- type uint64;
- description
- "Count of the frames lost during the test period.";
- }
-
- leaf flr {
- type uint32;
- units "m%";
- description "The Frame Loss Ratio achieved. Units are 0.001%";
- }
-
- leaf elapsed {
- type uint16;
- units "s";
- description
- "The number of number of seconds the test has been running";
- }
-
- leaf fs {
- type uint16;
- units byte;
- description "The Frame Size for which these results apply";
- }
-
- leaf ulr-min {
- type uint32;
- units "bit/s";
- description "The minimum Utilised Line Rate achieved";
- }
-
- leaf ulr-max {
- type uint32;
- units "bit/s";
- description "The maximum Utilised Line Rate achieved";
- }
-
- leaf ulr-avg {
- type uint32;
- units "bit/s";
- description "The average Utilised Line Rate achieved";
- }
-
- leaf ulr-meas {
- type uint32;
- units "bit/s";
- description
- "The instantaneous Utilised Line Rate measured
- at the time of this result set";
- }
-
- leaf ftd-min {
- type uint32;
- units "μs";
- description "The minimum Frame Transfer Delay achieved";
- }
-
- leaf ftd-max {
- type uint32;
- units "μs";
- description "The maximum Frame Transfer Delay achieved";
- }
-
- leaf ftd-avg {
- type uint32;
- units "μs";
- description "The average Frame Transfer Delay achieved";
- }
-
- leaf ftd-meas {
- type uint32;
- units "μs";
- description
- "The instantaneous Frame Transfer Delay
- measured at the time of this result set";
- }
-
- leaf fdv-min {
- type uint32;
- units "μs";
- description "The minimum Frame Delay Variation achieved";
- }
-
- leaf fdv-max {
- type uint32;
- units "μs";
- description "The maximum Frame Delay Variation achieved";
- }
-
- leaf fdv-avg {
- type uint32;
- units "μs";
- description "The average Frame Delay Variation achieved";
- }
-
- leaf fdv-meas {
- type uint32;
- units "μs";
- description
- "The instantaneous Frame Delay Variation measured
- at the time of this result set";
- }
- }
-
-
-
- /*
- * Features
- */
- feature emix {
- description
- "This feature indicates that the device supports
- EMIX style of repeating frame rates patterns";
- reference
- "Rec. ITU-T Y.1564 (03/2011) Section 8.1.1";
- }
-
- /*
- * Configuration
- */
- container y1564-test {
- description "The overall configuration of the Y.1564
- tests are done through the 'service' entities";
-
- leaf config-step-duration {
- type uint16 {
- range 1..60;
- }
- units second;
- default 60;
- description "The duration of each step when
- performing Configuration tests";
- reference "Rec. ITU-T Y.1564 (03/2011) Section 8.3";
- }
-
- choice performance-duration-choice {
- description
- "Duration can be chosen from enumerated values or
- specified as a duration in minutes";
- reference "Rec. ITU-T Y.1564 (03/2011) Section 8.2.1";
-
- case fixed-durations-renamed {
- leaf performance-duration-fixed {
- type enumeration {
- enum Test15m {
- value 15;
- description "15 minute test duration";
- }
- enum Test2h {
- value 120;
- description "2 hour test duration";
- }
- enum Test24h {
- value 1440;
- description "24 hour test duration";
- }
- enum Unbounded {
- description "Unbounded test duration";
- }
- }
- default Test15m;
- description "Fixed durations set";
- }
- }
-
-
- case test-duration-minutes {
- leaf performance-duration {
- type uint16 {
- range 1..max;
- }
- units min;
- description
- "The duration of Performance tests specified in minutes";
- reference "Rec. ITU-T Y.1564 (03/2011) Section 8.2.1";
- }
- }
- }
-
- leaf performance-frame-size {
- type sa:frame-size-type;
- units octet;
- default 512;
- description
- "The frame size used for the performance test.
- Frame sizes for configuration are configured at a
- the service level. This is a constant value per service (
- frame size repeating emix values are not supported)";
- reference "Rec. ITU-T Y.1564 (03/2011) Section 8.1.1";
- }
-
- list service-config {
- key service-id;
- description "The services can be configured on this device";
-
- uses service-attributes-group;
-
- leaf enabled {
- type boolean;
- default true;
- description "Toggles whether the service is enabled in tests";
- }
-
-
- container mep-config {
- presence "Presence indicates that a MEP has been configured";
-
- uses msea:mep-config-attribs-noref;
-
- leaf remote-mep-id {
- type msea:mep-id-type;
- must "current()/../maintenance-association-end-point != current()" {
- error-message "Remote MEP Id must not be the same as Local MEP Id";
- error-app-tag "msea-svc-must-01";
- }
-
- //mandatory true; //Should not be mandatory in a top level container
- description "The Id of the remote MEP";
- }
-
- container overwrite-pcp {
- presence "Enables PCP Overwrite";
- description "If present allows attributes to be
- specified for the PCP overwrite";
-
- uses sa:overwrite-pcp-attribs;
-
- }
- }
-
- leaf config-frame-size {
- type sa:frame-size-type;
- units octet;
- default 512;
- description
- "The frame size used for the service configuration test.
- Frame sizes for performance test is configured at a
- higher level. This is a constant value per service (
- frame size repeating emix values are not supported)";
- reference "Rec. ITU-T Y.1564 (03/2011) Section 8.1.1";
- }
-
- leaf cir {
- type uint16 {
- range min..1000;
- }
- units "Mb/s";
- default 1;
- description "Committed Information Rate. If 0 then will return zeros";
- reference "Rec. ITU-T Y.1564 (03/2011) Section 8.1";
- }
-
- leaf eir {
- type uint16 {
- range min..1000;
- }
- units "Mb/s";
- description "Excess Information Rate. If 0 then this test is disabled";
- reference "Rec. ITU-T Y.1564 (03/2011) Section 8.1";
- }
-
- leaf colour-aware {
- type boolean;
- default true;
- description "Indicates if the service is colour aware or not";
- reference "Rec. ITU-T Y.1564 (03/2011) Section 6.2.1";
- }
-
- leaf m-factor {
- type uint16;
- units "kb/s";
- description "The M factor is added to allow for the effect of
- the traffic policer's CBS and EBS settings, and test time.
- Experience will determine the values for M.
- Additional guidance on M is for further study.";
- reference "Rec. ITU-T Y.1564 (03/2011) Section 8.1.2 C.2";
- }
-
- container enable-step-test {
- presence "Enables step test";
- description "If this item is present then a step load test of
- CIR will be performed.
- Otherwise simple validation of CIR will be performed.";
- reference "Rec. ITU-T Y.1564 (03/2011) Section 8.1.2";
-
- leaf step-load-size-override {
- type uint16 {
- range 1..1000;
- }
- units "Mb/s";
- description "A manually specified Step Load size in Mb/s.
- A maximum of 4 steps will be taken. If not specified
- the default behaviour means the CIR rate divided by
- 4 rounded up to nearest Mb/s. When CIR rate is below 4Mb/s
- then a corresponding nuumber of steps will be used";
- reference "Rec. ITU-T Y.1564 (03/2011) Section 8.1";
- }
- }
-
- container enable-policing-test {
- presence "Enables Policing test";
- description "If this item is present then a Policing
- test will be performed.
- Otherwise no Policing will be performed.";
- reference "Rec. ITU-T Y.1564 (03/2011) Section 8.1.2";
- }
-
- container service-acceptance-criteria {
- description "Attributes that tune the Service Acceptance
- Criteria per service.";
-
- leaf accepted-flr {
- type uint32 {
- range min..100000;
- }
- units "m%";
- description "A measured Frame Loss Ratio greater than
- or equal to this value will result in test fail.
- Units are 0.001%. Default is 0";
- reference "Rec. ITU-T Y.1564 (03/2011) Section 8.3";
- }
-
- leaf accepted-ftd {
- type uint32;
- units "μs";
- mandatory true;
- description "A measured Frame Transfer Delay greater than
- or equal to this value will result in test fail.";
- reference "Rec. ITU-T Y.1564 (03/2011) Section 8.3";
- }
-
- leaf accepted-fdv {
- type uint32;
- units "μs";
- mandatory true;
- description "A measured Frame Delay Variation greater than
- or equal to this value will result in test fail.";
- reference "Rec. ITU-T Y.1564 (03/2011) Section 8.3";
- }
-
- leaf accepted-availability {
- type uint32 {
- range min..100000;
- }
- units "m%";
- default 100000;
- description "A measured Availability for a performance
- test must meet or exceed this value. Values are in
- milli-percent. Default is 100%";
- }
- }
- }
- }
-
- container y1564-results {
- config false;
- description "Top level container for results from the tests";
- container configuration {
- description
- "The results of the Y.1564 Configuration tests on each
- service which was enabled when the test was run";
- reference "Rec. ITU-T Y.1564 (03/2011) Section 8.1.3";
-
- list service {
- key service-id;
- description "The results for the services configured on this device";
-
- uses service-attributes-group;
-
- uses sa:results-header-group;
-
- container cir-results {
- description "Results for Committed Information Rate
- part of the test";
-
- leaf steps {
- type uint8;
- description "Indicates the number if steps taken so far.";
- }
-
- list step {
- key step-id;
-
- description "A list of results for each of the steps for
- the CIR test";
-
- leaf step-id {
- type uint8;
- mandatory true;
- description "The index of the step";
- }
-
- uses result-attributes-group;
- uses pass-fail-group;
-
- container green-frames {
- uses y1564-test-result-group;
- description "The details of frames marked green during
- the step of the CIR test";
- }
- }
-
- }
-
- container eir-results {
- description "Results for Excess Information Rate
- part of the test";
- uses result-attributes-group;
- uses pass-fail-group;
-
- container green-frames {
- uses y1564-test-result-group;
- description
- "The details of frames marked green of the EIR test";
- }
-
- container yellow-frames {
- uses y1564-test-result-group;
- description
- "The details of frames marked yellow of the EIR test";
- }
- }
-
- container policer-results {
- presence "Can be omitted if policer test is
- not enabled on this service";
- description "Container for the policer results";
- uses result-attributes-group;
- uses pass-fail-group;
-
- container green-frames {
- uses y1564-test-result-group;
- description
- "The details of frames marked green of the Policer test";
- }
-
- container yellow-frames {
- uses y1564-test-result-group;
- description
- "The details of frames marked yellow of the Policer test";
- }
- }
-
- }
- }
-
- container performance {
- description
- "The results of the Y.1564 Performance tests on each
- service was 'enabled'";
- reference "Rec. ITU-T Y.1564 (03/2011) Section 8.2.2";
-
- uses sa:results-header-group;
-
- list service {
- key service-id;
- description "The services can be configured on this device";
-
- uses service-attributes-group;
-
- uses pass-fail-group;
-
- uses y1564-test-result-group;
-
- leaf avail-sec {
- type uint32;
- units "s";
- description
- "The count of seconds during the test period for which
- service was Available";
- }
- }
- }
- }
-
- /*
- * RPCs
- */
- rpc run-y1564-test {
- description
- "Run the configured Y.1564 test on each service
- that has been marked 'enabled'";
-
- input {
- leaf tests-enabled {
- type bits {
- bit configuration {
- description "Runs the configuration tests";
- }
- bit performance {
- description "Runs the performance tests";
- }
- }
- default "configuration performance";
- description
- "Bit mask to define which parts of the test are run.
- Specify as a set of space separated string values";
- }
- }
- }
-
- rpc stop-y1564-test {
- description
- "Stop the running Y.1564 test on all services";
- }
-
- /*
- * Notifications
- */
- notification y1564-test-updated {
- description
- "A y1564-test-updated notification is sent
- when the state of a test changes.";
-
- uses sa:notification-group;
-
- leaf service-id {
- type uint16;
- mandatory true;
- description "The ID of the Service that is being tested";
- }
- }
-}