Repository: napalm-automation/napalm

Issue:
`get_lldp_neighbors_detail()` fails on Arista 7150S
```python
In [1]: from napalm.eos import EOSDriver

In [2]: from getpass import getpass

In [3]: with EOSDriver("arista", "bewing", getpass()) as d:
   ...:     print(d.get_lldp_neighbors_detail())
   ...:
Password:
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-3-85f875e30fe3> in <module>
      1 with EOSDriver("arista", "bewing", getpass()) as d:
----> 2     print(d.get_lldp_neighbors_detail())
      3

/mnt/c/Users/bewing/PycharmProjects/napalm/napalm/eos/eos.py in get_lldp_neighbors_detail(self, interface)
    647                     lldp_neighbors_out[interface] = []
    648                 capabilities = neighbor.get("systemCapabilities", {})
--> 649                 available_capabilities = self._transform_lldp_capab(capabilities.keys())
    650                 enabled_capabilities = self._transform_lldp_capab(
    651                     [capab for capab, enabled in capabilities.items() if enabled]

/mnt/c/Users/bewing/PycharmProjects/napalm/napalm/eos/eos.py in _transform_lldp_capab(self, capabilities)
    616
    617     def _transform_lldp_capab(self, capabilities):
--> 618         return sorted([LLDP_CAPAB_TRANFORM_TABLE[c.lower()] for c in capabilities])
    619
    620     def get_lldp_neighbors_detail(self, interface=""):

/mnt/c/Users/bewing/PycharmProjects/napalm/napalm/eos/eos.py in <listcomp>(.0)
    616
    617     def _transform_lldp_capab(self, capabilities):
--> 618         return sorted([LLDP_CAPAB_TRANFORM_TABLE[c.lower()] for c in capabilities])
    619
    620     def get_lldp_neighbors_detail(self, interface=""):

KeyError: 'stationonly'
```


Discussion:

Resolving patch:
diff --git a/napalm/eos/constants.py b/napalm/eos/constants.py
--- a/napalm/eos/constants.py
+++ b/napalm/eos/constants.py
@@ -9,4 +9,5 @@
     "telephone": "telephone",
     "docsis": "docsis-cable-device",
     "station": "station",
+    "stationonly": "station",
 }


Test patch:
diff --git a/test/eos/mocked_data/test_get_lldp_neighbors_detail/issue903/expected_result.json b/test/eos/mocked_data/test_get_lldp_neighbors_detail/issue903/expected_result.json
new file mode 100644
--- /dev/null
+++ b/test/eos/mocked_data/test_get_lldp_neighbors_detail/issue903/expected_result.json
@@ -0,0 +1,21 @@
+{
+  "Ethernet22": [
+    {
+      "parent_interface": "Ethernet22",
+      "remote_port": "000c.297b.d2a8",
+      "remote_port_description": "eth0",
+      "remote_system_name": "linux",
+      "remote_system_description": "CentOS Linux 7 (Core) Linux 4.9.46 #1 SMP PREEMPT Wed Aug 30 15:24:09 UTC 2017 x86_64",
+      "remote_chassis_id": "00:0C:29:7B:D2:A8",
+      "remote_system_capab": [
+        "bridge",
+        "router",
+        "station",
+        "wlan-access-point"
+      ],
+      "remote_system_enable_capab": [
+        "station"
+      ]
+    }
+  ]
+}
diff --git a/test/eos/mocked_data/test_get_lldp_neighbors_detail/issue903/show_lldp_neighbors__detail.json b/test/eos/mocked_data/test_get_lldp_neighbors_detail/issue903/show_lldp_neighbors__detail.json
new file mode 100644
--- /dev/null
+++ b/test/eos/mocked_data/test_get_lldp_neighbors_detail/issue903/show_lldp_neighbors__detail.json
@@ -0,0 +1,52 @@
+{
+  "lldpNeighbors": {
+    "Ethernet22": {
+      "lldpNeighborInfo": [
+        {
+          "systemCapabilities": {
+            "bridge": false,
+            "wlanAccessPoint": false,
+            "router": false,
+            "stationOnly": true
+          },
+          "lastChangeTime": 1544636077.4653718,
+          "neighborInterfaceInfo": {
+            "portAndProtocolVlanEnabled": {},
+            "linkAggregationStatus": "capableAndDisabled",
+            "unknownTlvs": [],
+            "interfaceIdType": "macAddress",
+            "interfaceId": "000c.297b.d2a8",
+            "interfaceDescription": "eth0",
+            "autoNegCapability": "capableAndEnabled",
+            "autoNegAdvertisedCapabilities": [
+              "1000BASE-T (full-duplex)",
+              "Other"
+            ],
+            "protocolIdentityInfo": [],
+            "portAndProtocolVlanSupported": {},
+            "operMauType": "10GBASE-LR",
+            "vlanNames": {},
+            "linkAggregationInterfaceId": 0,
+            "unknownOrgDefinedTlvs": []
+          },
+          "neighborDiscoveryTime": 1544636077.4653718,
+          "lastContactTime": 1546981809.8182333,
+          "chassisId": "00c.297b.d2a8",
+          "systemName": "linux",
+          "systemDescription": "CentOS Linux 7 (Core) Linux 4.9.46 #1 SMP PREEMPT Wed Aug 30 15:24:09 UTC 2017 x86_64",
+          "ttl": 120,
+          "managementAddresses": [
+            {
+              "oidString": "",
+              "interfaceNumType": "ifIndex",
+              "interfaceNum": 2,
+              "address": "10.199.1.22",
+              "addressType": "ipv4"
+            }
+          ],
+          "chassisIdType": "macAddress"
+        }
+      ]
+    }
+  }
+}