ONOS-7629 - minimal support for Ciena 51xx devices
Change-Id: I19408f558c1766686b8e567ae27e3077db782cf3
diff --git a/drivers/ciena/c5162/src/main/resources/templates/requests/link-info.j2 b/drivers/ciena/c5162/src/main/resources/templates/requests/link-info.j2
new file mode 100644
index 0000000..b43f85f
--- /dev/null
+++ b/drivers/ciena/c5162/src/main/resources/templates/requests/link-info.j2
@@ -0,0 +1,16 @@
+<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+ <get>
+ <filter type="subtree">
+ <oc-if:interfaces xmlns:oc-if="http://openconfig.net/yang/interfaces" xmlns:c-pn="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+ <oc-if:interface>
+ <oc-if:config>
+ <tt:type xmlns:tt="http://ciena.com/ns/yang/ciena-openconfig-interfaces" />
+ </oc-if:config>
+ <oc-if:state>
+ <c-pn:lldp-remote-port-operational/>
+ </oc-if:state>
+ </oc-if:interface>
+ </oc-if:interfaces>
+ </filter>
+ </get>
+</rpc>
\ No newline at end of file
diff --git a/drivers/ciena/c5162/src/main/resources/templates/requests/logicalPort.j2 b/drivers/ciena/c5162/src/main/resources/templates/requests/logicalPort.j2
new file mode 100644
index 0000000..2e7223e
--- /dev/null
+++ b/drivers/ciena/c5162/src/main/resources/templates/requests/logicalPort.j2
@@ -0,0 +1,11 @@
+<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+ <get>
+ <filter type="subtree">
+ <oc-if:interfaces xmlns:oc-if="http://openconfig.net/yang/interfaces">
+ <oc-if:interface>
+ <oc-if:name>{{port-number}}</oc-if:name>
+ </oc-if:interface>
+ </oc-if:interfaces>
+ </filter>
+ </get>
+</rpc>
\ No newline at end of file
diff --git a/drivers/ciena/c5162/src/main/resources/templates/requests/logicalPorts.j2 b/drivers/ciena/c5162/src/main/resources/templates/requests/logicalPorts.j2
new file mode 100644
index 0000000..bd2a0c0
--- /dev/null
+++ b/drivers/ciena/c5162/src/main/resources/templates/requests/logicalPorts.j2
@@ -0,0 +1,9 @@
+<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+ <get>
+ <filter type="subtree">
+ <oc-if:interfaces xmlns:oc-if="http://openconfig.net/yang/interfaces">
+ <oc-if:interface/>
+ </oc-if:interfaces>
+ </filter>
+ </get>
+</rpc>
diff --git a/drivers/ciena/c5162/src/main/resources/templates/requests/port-admin-state.j2 b/drivers/ciena/c5162/src/main/resources/templates/requests/port-admin-state.j2
new file mode 100644
index 0000000..3d0b02b
--- /dev/null
+++ b/drivers/ciena/c5162/src/main/resources/templates/requests/port-admin-state.j2
@@ -0,0 +1,17 @@
+<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+ <edit-config>
+ <target>
+ <running />
+ </target>
+ <config>
+ <interfaces xmlns="http://openconfig.net/yang/interfaces" xmlns:ncx="http://netconfcentral.org/ns/yuma-ncx">
+ <interface>
+ <name>{{port-number}}</name>
+ <config>
+ <admin-status xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">{{admin-state}}</admin-status>
+ </config>
+ </interface>
+ </interfaces>
+ </config>
+ </edit-config>
+</rpc>
\ No newline at end of file
diff --git a/drivers/ciena/c5162/src/main/resources/templates/requests/port-stats.j2 b/drivers/ciena/c5162/src/main/resources/templates/requests/port-stats.j2
new file mode 100644
index 0000000..e416a9e
--- /dev/null
+++ b/drivers/ciena/c5162/src/main/resources/templates/requests/port-stats.j2
@@ -0,0 +1,16 @@
+<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+ <get>
+ <filter type="subtree">
+ <oc-if:interfaces xmlns:oc-if="http://openconfig.net/yang/interfaces">
+ <oc-if:interface>
+ <oc-if:config>
+ <tt:type xmlns:tt="http://ciena.com/ns/yang/ciena-openconfig-interfaces" />
+ </oc-if:config>
+ <oc-if:state>
+ <oc-if:counters />
+ </oc-if:state>
+ </oc-if:interface>
+ </oc-if:interfaces>
+ </filter>
+ </get>
+</rpc>
\ No newline at end of file
diff --git a/drivers/ciena/c5162/src/main/resources/templates/requests/softwareVersion.j2 b/drivers/ciena/c5162/src/main/resources/templates/requests/softwareVersion.j2
new file mode 100644
index 0000000..4b17bb4
--- /dev/null
+++ b/drivers/ciena/c5162/src/main/resources/templates/requests/softwareVersion.j2
@@ -0,0 +1,11 @@
+<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+ <get>
+ <filter type="subtree">
+ <ciena-software-mgmt:software-state xmlns:ciena-software-mgmt="http://www.ciena.com/ns/yang/ciena-software-mgmt">
+ <ciena-software-mgmt:running-package>
+ <ciena-software-mgmt:package-version/>
+ </ciena-software-mgmt:running-package>
+ </ciena-software-mgmt:software-state>
+ </filter>
+ </get>
+</rpc>
diff --git a/drivers/ciena/c5162/src/main/resources/templates/requests/systemInfo.j2 b/drivers/ciena/c5162/src/main/resources/templates/requests/systemInfo.j2
new file mode 100644
index 0000000..ba8203f
--- /dev/null
+++ b/drivers/ciena/c5162/src/main/resources/templates/requests/systemInfo.j2
@@ -0,0 +1,22 @@
+<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+ <get>
+ <filter type="subtree">
+ <oc-platform:components xmlns:oc-platform="http://openconfig.net/yang/platform">
+ <oc-platform:component>
+ <oc-platform:name>5162</oc-platform:name>
+ <oc-platform:state>
+ <oc-platform:name/>
+ <oc-platform:mfg-name/>
+ <oc-platform:serial-no/>
+ <oc-platform:version/>
+ </oc-platform:state>
+ <oc-platform:properties>
+ <oc-platform:property>
+ <oc-platform:name>base-mac</oc-platform:name>
+ </oc-platform:property>
+ </oc-platform:properties>
+ </oc-platform:component>
+ </oc-platform:components>
+ </filter>
+ </get>
+</rpc>