Repository: napalm-automation/napalm

Issue:
LLDP interface showing with quotes
### Environment
* Python version:  3.6.8
* NetBox version:  2.7.8
* Napalm version: 2.3.3 and 2.5.0

### Steps to Reproduce
1. Use driver EOS and method get_lldp_neighbors_detail

### Expected Behavior
Napalm return me correct key value pair without quotes

### Observed Behavior
As you can see remote_port key have value with quotation marks (see below):

```
         "Ethernet49/1": [
            {
                "parent_interface": "Ethernet49/1",
                "remote_port": "\"Ethernet49/1\"",  
                "remote_port_description": "SOMETHING DESCRIPTION",
                "remote_system_name": "DC1-SW4",
                "remote_system_description": "Arista Networks EOS version 4.22.3M running on an Arista Networks DCS-7060SX2-48YC6",
                "remote_chassis_id": "98:5D:82:62:BD:ВВ",
                "remote_system_capab": [
                    "bridge",
                    "router"
                ],
                "remote_system_enable_capab": [
                    "bridge",
                    "router"
                ]
            }
        ],

```

LLDP interface showing with quotes
### Environment
* Python version:  3.6.8
* NetBox version:  2.7.8
* Napalm version: 2.3.3 and 2.5.0

### Steps to Reproduce
1. Use driver EOS and method get_lldp_neighbors_detail

### Expected Behavior
Napalm return me correct key value pair without quotes

### Observed Behavior
As you can see remote_port key have value with quotation marks (see below):

```
         "Ethernet49/1": [
            {
                "parent_interface": "Ethernet49/1",
                "remote_port": "\"Ethernet49/1\"",  
                "remote_port_description": "SOMETHING DESCRIPTION",
                "remote_system_name": "DC1-SW4",
                "remote_system_description": "Arista Networks EOS version 4.22.3M running on an Arista Networks DCS-7060SX2-48YC6",
                "remote_chassis_id": "98:5D:82:62:BD:ВВ",
                "remote_system_capab": [
                    "bridge",
                    "router"
                ],
                "remote_system_enable_capab": [
                    "bridge",
                    "router"
                ]
            }
        ],

```



Discussion:
I don't know if I should laugh or cry (or both). Thanks for reporting @inetman28.
@inetman28 That's not a NAPALM bug, because when you issue "show lldp neighbors detail | json" on an Arista switch you will see that the doubled quotation marks come from there. Here's my example output:
`"interfaceId": "\"Gi0/8\"",`
On Cisco NX-OS 7 the output is as follows:
`"port_id": "Gi0/4"`
So it looks like a wrong output on EOS? Maybe you should file a bug report to Arista?
I create support request to support@arista.com (via email). 
I agree, and encourage you to open a case with Arista, however I believe we should correct this on the NAPALM side as well (for regression, moving forward). CC @TheRealBecks @inetman28 
I don't know if I should laugh or cry (or both). Thanks for reporting @inetman28.
@inetman28 That's not a NAPALM bug, because when you issue "show lldp neighbors detail | json" on an Arista switch you will see that the doubled quotation marks come from there. Here's my example output:
`"interfaceId": "\"Gi0/8\"",`
On Cisco NX-OS 7 the output is as follows:
`"port_id": "Gi0/4"`
So it looks like a wrong output on EOS? Maybe you should file a bug report to Arista?
I create support request to support@arista.com (via email). 
I agree, and encourage you to open a case with Arista, however I believe we should correct this on the NAPALM side as well (for regression, moving forward). CC @TheRealBecks @inetman28 

Resolving patch:
diff --git a/napalm/eos/eos.py b/napalm/eos/eos.py
--- a/napalm/eos/eos.py
+++ b/napalm/eos/eos.py
@@ -679,7 +679,9 @@ def get_lldp_neighbors_detail(self, interface=""):
                 lldp_neighbors_out[interface].append(
                     {
                         "parent_interface": interface,  # no parent interfaces
-                        "remote_port": neighbor_interface_info.get("interfaceId", ""),
+                        "remote_port": neighbor_interface_info.get(
+                            "interfaceId", ""
+                        ).replace('"', ""),
                         "remote_port_description": neighbor_interface_info.get(
                             "interfaceDescription", ""
                         ),


Test patch:
diff --git a/test/eos/mocked_data/test_get_lldp_neighbors_detail/issue1153/expected_result.json b/test/eos/mocked_data/test_get_lldp_neighbors_detail/issue1153/expected_result.json
new file mode 100644
--- /dev/null
+++ b/test/eos/mocked_data/test_get_lldp_neighbors_detail/issue1153/expected_result.json
@@ -0,0 +1,58 @@
+{
+  "Ethernet1/1": [
+    {
+      "parent_interface": "Ethernet1/1",
+      "remote_port": "1ce7.1003.5413",
+      "remote_port_description": "eth0",
+      "remote_system_name": "some-server",
+      "remote_system_description": "Ubuntu 18.04.3 LTS Linux 5.0.0-36-generic #39~18.04.1-Ubuntu SMP Tue Nov 12 11:09:50 UTC 2019 x86_64",
+      "remote_chassis_id": "1C:E7:10:03:54:13",
+      "remote_system_capab": [
+        "bridge",
+        "router",
+        "station",
+        "wlan-access-point"
+      ],
+      "remote_system_enable_capab": [
+        "bridge",
+        "router"
+      ]
+    }
+  ],
+  "Ethernet26/1": [
+    {
+      "parent_interface": "Ethernet26/1",
+      "remote_port": "et-0/0/20",
+      "remote_port_description": "et-0/0/20",
+      "remote_system_name": "some-other-switch",
+      "remote_system_description": "boom boom",
+      "remote_chassis_id": "04:43:10:03:54:13",
+      "remote_system_capab": [
+        "bridge",
+        "router"
+      ],
+      "remote_system_enable_capab": [
+        "bridge",
+        "router"
+      ]
+    }
+  ],
+  "Ethernet27/1": [
+    {
+      "parent_interface": "Ethernet27/1",
+      "remote_port": "et-0/0/20",
+      "remote_port_description": "et-0/0/20",
+      "remote_system_name": "some-switch",
+      "remote_system_description": "blah blih bleh",
+      "remote_chassis_id": "FC:66:10:03:54:13",
+      "remote_system_capab": [
+        "bridge",
+        "router"
+      ],
+      "remote_system_enable_capab": [
+        "bridge",
+        "router"
+      ]
+    }
+  ]
+}
diff --git a/test/eos/mocked_data/test_get_lldp_neighbors_detail/issue1153/show_lldp_neighbors__detail.json b/test/eos/mocked_data/test_get_lldp_neighbors_detail/issue1153/show_lldp_neighbors__detail.json
new file mode 100644
--- /dev/null
+++ b/test/eos/mocked_data/test_get_lldp_neighbors_detail/issue1153/show_lldp_neighbors__detail.json
@@ -0,0 +1,265 @@
+{
+    "lldpNeighbors": {
+        "Ethernet23/1": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet1/1": {
+            "lldpNeighborInfo": [
+                {
+                    "systemCapabilities": {
+                        "bridge": true,
+                        "wlanAccessPoint": false,
+                        "router": true,
+                        "stationOnly": false
+                    },
+                    "lastChangeTime": 1584043134.2644186,
+                    "neighborInterfaceInfo": {
+                        "portAndProtocolVlanEnabled": {},
+                        "linkAggregationStatus": "capableAndEnabled",
+                        "unknownTlvs": [],
+                        "interfaceIdType": "macAddress",
+                        "interfaceId": "1ce7.1003.5413",
+                        "interfaceDescription": "eth0",
+                        "autoNegCapability": "capableAndEnabled",
+                        "autoNegAdvertisedCapabilities": [
+                            "1000BASE-X (full-duplex)",
+                            "Other"
+                        ],
+                        "protocolIdentityInfo": [],
+                        "portAndProtocolVlanSupported": {},
+                        "operMauType": "Unknown",
+                        "vlanNames": {},
+                        "linkAggregationInterfaceId": 4,
+                        "unknownOrgDefinedTlvs": []
+                    },
+                    "neighborDiscoveryTime": 1584043104.2394743,
+                    "lastContactTime": 1586942201.0405219,
+                    "chassisId": "1ce7.1003.5413",
+                    "systemName": "some-server",
+                    "systemDescription": "Ubuntu 18.04.3 LTS Linux 5.0.0-36-generic #39~18.04.1-Ubuntu SMP Tue Nov 12 11:09:50 UTC 2019 x86_64",
+                    "ttl": 120,
+                    "managementAddresses": [
+                        {
+                            "oidString": "",
+                            "interfaceNumType": "ifIndex",
+                            "interfaceNum": 4,
+                            "address": "10.0.0.1",
+                            "addressType": "ipv4"
+                        },
+                        {
+                            "oidString": "",
+                            "interfaceNumType": "ifIndex",
+                            "interfaceNum": 4,
+                            "address": "fe80::1",
+                            "addressType": "ipv6"
+                        }
+                    ],
+                    "chassisIdType": "macAddress"
+                }
+            ]
+        },
+        "Ethernet1/2": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet1/3": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet1/4": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet23/4": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet22/1": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet22/2": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet22/3": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet22/4": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet23/3": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet7/2": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet7/3": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet7/1": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet21/3": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet21/2": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet7/4": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet6/3": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet6/2": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet6/1": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet20/2": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet20/3": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet20/1": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet27/4": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet27/1": {
+            "lldpNeighborInfo": [
+                {
+                    "systemCapabilities": {
+                        "bridge": true,
+                        "router": true
+                    },
+                    "lastChangeTime": 1582799101.9668741,
+                    "neighborInterfaceInfo": {
+                        "portAndProtocolVlanEnabled": {},
+                        "linkAggregationStatus": "capableAndDisabled",
+                        "unknownTlvs": [],
+                        "interfaceIdType": "interfaceName",
+                        "interfaceId": "\"et-0/0/20\"",
+                        "interfaceDescription": "et-0/0/20",
+                        "autoNegCapability": "notCapable",
+                        "autoNegAdvertisedCapabilities": [],
+                        "maxFrameSize": 9192,
+                        "portAndProtocolVlanSupported": {},
+                        "operMauType": "Unknown",
+                        "medInfo": {
+                            "capabilities": {
+                                "deviceType": "networkConnectivity",
+                                "networkPolicy": true,
+                                "inventory": false,
+                                "capabilities": true,
+                                "extendedPd": false,
+                                "extendedPse": true,
+                                "location": true
+                            },
+                            "networkPolicies": []
+                        },
+                        "vlanNames": {},
+                        "protocolIdentityInfo": [],
+                        "linkAggregationInterfaceId": 0,
+                        "unknownOrgDefinedTlvs": [
+                            {
+                                "ouiStr": "00-90-69",
+                                "subType": 1,
+                                "tlvLines": [
+                                    "57 48 33 36 31 39 31 32 30 34 38 31"
+                                ]
+                            }
+                        ]
+                    },
+                    "neighborDiscoveryTime": 1582799101.9668741,
+                    "lastContactTime": 1586942203.153205,
+                    "chassisId": "fc66.1003.5413",
+                    "systemName": "some-switch",
+                    "systemDescription": "blah blih bleh",
+                    "ttl": 120,
+                    "managementAddresses": [
+                        {
+                            "oidString": "0.1.3.6.1.2.1.31.1.1.1.1.17",
+                            "interfaceNumType": "ifIndex",
+                            "interfaceNum": 17,
+                            "address": "10.0.0.1",
+                            "addressType": "ipv4"
+                        }
+                    ],
+                    "chassisIdType": "macAddress"
+                }
+            ]
+        },
+        "Ethernet27/3": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet27/2": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet26/4": {
+            "lldpNeighborInfo": []
+        },
+        "Ethernet26/1": {
+            "lldpNeighborInfo": [
+                {
+                    "systemCapabilities": {
+                        "bridge": true,
+                        "router": true
+                    },
+                    "lastChangeTime": 1582796476.2745652,
+                    "neighborInterfaceInfo": {
+                        "portAndProtocolVlanEnabled": {},
+                        "linkAggregationStatus": "capableAndDisabled",
+                        "unknownTlvs": [],
+                        "interfaceIdType": "interfaceName",
+                        "interfaceId": "\"et-0/0/20\"",
+                        "interfaceDescription": "et-0/0/20",
+                        "autoNegCapability": "notCapable",
+                        "autoNegAdvertisedCapabilities": [],
+                        "maxFrameSize": 9192,
+                        "portAndProtocolVlanSupported": {},
+                        "operMauType": "Unknown",
+                        "medInfo": {
+                            "capabilities": {
+                                "deviceType": "networkConnectivity",
+                                "networkPolicy": true,
+                                "inventory": false,
+                                "capabilities": true,
+                                "extendedPd": false,
+                                "extendedPse": true,
+                                "location": true
+                            },
+                            "networkPolicies": []
+                        },
+                        "vlanNames": {},
+                        "protocolIdentityInfo": [],
+                        "linkAggregationInterfaceId": 0,
+                        "unknownOrgDefinedTlvs": [
+                            {
+                                "ouiStr": "00-90-69",
+                                "subType": 1,
+                                "tlvLines": [
+                                    "57 48 33 36 31 39 31 32 30 32 33 35"
+                                ]
+                            }
+                        ]
+                    },
+                    "neighborDiscoveryTime": 1582796476.2745652,
+                    "lastContactTime": 1586942215.243252,
+                    "chassisId": "0443.1003.5413",
+                    "systemName": "some-other-switch",
+                    "systemDescription": "boom boom",
+                    "ttl": 120,
+                    "managementAddresses": [
+                        {
+                            "oidString": "0.1.3.6.1.2.1.31.1.1.1.1.17",
+                            "interfaceNumType": "ifIndex",
+                            "interfaceNum": 17,
+                            "address": "10.0.0.2",
+                            "addressType": "ipv4"
+                        }
+                    ],
+                    "chassisIdType": "macAddress"
+                }
+            ]
+        }
+    }
+}
diff --git a/test/eos/mocked_data/test_get_lldp_neighbors_detail/normal/expected_result.json b/test/eos/mocked_data/test_get_lldp_neighbors_detail/normal/expected_result.json
--- a/test/eos/mocked_data/test_get_lldp_neighbors_detail/normal/expected_result.json
+++ b/test/eos/mocked_data/test_get_lldp_neighbors_detail/normal/expected_result.json
@@ -408,7 +408,7 @@
         "bridge",
         "router"
       ],
-      "remote_port": "\"597\"",
+      "remote_port": "597",
       "parent_interface": "Ethernet47",
       "remote_system_capab": [
         "bridge",