ONOS-7647 - add mock tests for ciena driver

Change-Id: I6e5b0d1333c5d138c2fb3bcdbf9b9ccecc86ce54
diff --git a/drivers/ciena/c5162/src/test/resources/templates/responses/device_1_2_3_4/link-info.j2 b/drivers/ciena/c5162/src/test/resources/templates/responses/device_1_2_3_4/link-info.j2
new file mode 100644
index 0000000..de34f9e
--- /dev/null
+++ b/drivers/ciena/c5162/src/test/resources/templates/responses/device_1_2_3_4/link-info.j2
@@ -0,0 +1,577 @@
+<?xml version="1.0" encoding="utf-8"?>
+<rpc-reply xmlns:ncx="http://netconfcentral.org/ns/yuma-ncx"
+           xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
+           message-id="6"
+           ncx:last-modified="2018-05-07T04:10:32Z"
+           ncx:etag="147">
+  <data>
+    <interfaces xmlns="http://openconfig.net/yang/interfaces">
+      <interface>
+        <name>1</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>2</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>3</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>4</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>5</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>6</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>7</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>8</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>9</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>10</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>11</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>12</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>13</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>14</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>15</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>16</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>17</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>18</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>19</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>20</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>21</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>22</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>23</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>24</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>25</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>26</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>27</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>28</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>29</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>30</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>31</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>32</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>33</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>34</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>35</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>36</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>37</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>38</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>39</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>40</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <chassis-id-subtype>mac-address</chassis-id-subtype>
+            <chassis-id>1C1161EDB400</chassis-id>
+            <port-id-subtype>interface-name</port-id-subtype>
+            <port-id>40</port-id>
+            <port-desc>SFP 10 Gig Ethernet Port</port-desc>
+            <system-name>Tokyo-5162</system-name>
+            <system-description>5162</system-description>
+            <system-capability-supported>bridge</system-capability-supported>
+            <system-capability-enabled>bridge</system-capability-enabled>
+            <dot3-remote-entry>
+              <auto-neg-supported>true</auto-neg-supported>
+              <auto-neg-enabled>false</auto-neg-enabled>
+              <oper-mau-type>33</oper-mau-type>
+              <port-class>p-class-pd</port-class>
+              <mdi-supported>false</mdi-supported>
+              <mdi-enabled>false</mdi-enabled>
+              <pair-controlable>false</pair-controlable>
+              <agg-status>capable</agg-status>
+              <max-frame-size>1526</max-frame-size>
+            </dot3-remote-entry>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>41</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <chassis-id-subtype>mac-address</chassis-id-subtype>
+            <chassis-id>1C1161D07880</chassis-id>
+            <port-id-subtype>interface-name</port-id-subtype>
+            <port-id>43</port-id>
+            <port-desc>QSFP28 100 Gig Ethernet Port</port-desc>
+            <system-name>Paris-5170</system-name>
+            <system-description>CN5170</system-description>
+            <system-capability-supported>bridge</system-capability-supported>
+            <system-capability-enabled>bridge</system-capability-enabled>
+            <dot3-remote-entry>
+              <auto-neg-supported>true</auto-neg-supported>
+              <auto-neg-enabled>false</auto-neg-enabled>
+              <oper-mau-type>0</oper-mau-type>
+              <port-class>p-class-pd</port-class>
+              <mdi-supported>false</mdi-supported>
+              <mdi-enabled>false</mdi-enabled>
+              <pair-controlable>false</pair-controlable>
+              <agg-status>capable</agg-status>
+              <max-frame-size>1526</max-frame-size>
+            </dot3-remote-entry>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>42</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ettp</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>mgmtbr0</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ip</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>S5_S10</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ip</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>S9_S10</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ip</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>L3VPN_RED_1</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ip</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>L3VPN_BLUE</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ip</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+      <interface>
+        <name>L3VPN_GREEN</name>
+        <config>
+          <type xmlns="http://ciena.com/ns/yang/ciena-openconfig-interfaces">ip</type>
+        </config>
+        <state>
+          <lldp-remote-port-operational xmlns="urn:ciena:params:xml:ns:yang:ciena-pn::ciena-ieee-lldp">
+            <dot3-remote-entry/>
+          </lldp-remote-port-operational>
+        </state>
+      </interface>
+    </interfaces>
+  </data>
+</rpc-reply>
\ No newline at end of file