Repository: napalm-automation/napalm

Issue:
`EOSDriver.get_environment()` throws keyError on 7010T
Arista 7010T switches have unmanaged power supplies and are missing the "powerOutput" key:

```python
In [4]: d.get_environment()
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-4-b99851033f4f> in <module>()
----> 1 d.get_environment()

~/.pyenv/versions/3.7.0/lib/python3.7/site-packages/napalm/eos/eos.py in get_environment(self)
    545                     'status': data['state'] == 'ok',
    546                     'capacity': data['capacity'],
--> 547                     'output': data['outputPower']
    548                 }
    549         cpu_lines = cpu_output.splitlines()

KeyError: 'outputPower'
```

Looking at the other codebases, it appears we want to set the output to -1 in this case?


Raw JSON from a 7010T:
```json
{'powerSupplies': {'1': {'uptime': 1531344080.3479242,
   'modelName': 'PWR-00194-01',
   'capacity': 65.0,
   'fans': {},
   'tempSensors': {},
   'managed': False,
   'state': 'ok'},
  '2': {'fans': {},
   'modelName': 'PWR-00194-01',
   'capacity': 65.0,
   'tempSensors': {},
   'managed': False,
   'state': 'powerLoss'}}}
```


Discussion:

Resolving patch:
diff --git a/napalm/eos/eos.py b/napalm/eos/eos.py
--- a/napalm/eos/eos.py
+++ b/napalm/eos/eos.py
@@ -542,9 +542,9 @@ def extract_temperature_data(data):
         if not is_veos:
             for psu, data in power_output['powerSupplies'].items():
                 environment_counters['power'][psu] = {
-                    'status': data['state'] == 'ok',
-                    'capacity': data['capacity'],
-                    'output': data['outputPower']
+                    'status': data.get('state', 'ok') == 'ok',
+                    'capacity': data.get('capacity', -1.0),
+                    'output': data.get('outputPower', -1.0),
                 }
         cpu_lines = cpu_output.splitlines()
         # Matches either of


Test patch:
diff --git a/test/eos/mocked_data/test_get_environment/issue810_7010t/expected_result.json b/test/eos/mocked_data/test_get_environment/issue810_7010t/expected_result.json
new file mode 100644
--- /dev/null
+++ b/test/eos/mocked_data/test_get_environment/issue810_7010t/expected_result.json
@@ -0,0 +1,73 @@
+{
+  "fans": {
+    "1": {
+      "status": true
+    },
+    "2": {
+      "status": true
+    }
+  },
+  "temperature": {
+    "TempSensor1": {
+      "temperature": 37.751111950905496,
+      "is_alert": false,
+      "is_critical": false
+    },
+    "TempSensor2": {
+      "temperature": 36.0,
+      "is_alert": false,
+      "is_critical": false
+    },
+    "TempSensor3": {
+      "temperature": 35.875,
+      "is_alert": false,
+      "is_critical": false
+    },
+    "TempSensor4": {
+      "temperature": 27.0,
+      "is_alert": false,
+      "is_critical": false
+    },
+    "TempSensor5": {
+      "temperature": 22.75,
+      "is_alert": false,
+      "is_critical": false
+    },
+    "TempSensor6": {
+      "temperature": 51.473600000000005,
+      "is_alert": false,
+      "is_critical": false
+    },
+    "TempSensor7": {
+      "temperature": 52.016000000000005,
+      "is_alert": false,
+      "is_critical": false
+    },
+    "TempSensor8": {
+      "temperature": 50.3888,
+      "is_alert": false,
+      "is_critical": false
+    }
+  },
+  "power": {
+    "1": {
+      "status": true,
+      "capacity": 65.0,
+      "output": -1.0
+    },
+    "2": {
+      "status": false,
+      "capacity": 65.0,
+      "output": -1.0
+    }
+  },
+  "cpu": {
+    "0": {
+      "%usage": 10.3
+    }
+  },
+  "memory": {
+    "available_ram": 3886752,
+    "used_ram": 3780968
+  }
+}
diff --git a/test/eos/mocked_data/test_get_environment/issue810_7010t/show_environment_cooling.json b/test/eos/mocked_data/test_get_environment/issue810_7010t/show_environment_cooling.json
new file mode 100644
--- /dev/null
+++ b/test/eos/mocked_data/test_get_environment/issue810_7010t/show_environment_cooling.json
@@ -0,0 +1,45 @@
+{
+  "overrideFanSpeed": 0,
+  "coolingMode": "automatic",
+  "powerSupplySlots": [],
+  "fanTraySlots": [
+    {
+      "status": "ok",
+      "fans": [
+        {
+          "status": "ok",
+          "uptime": 1531344413.6203134,
+          "maxSpeed": 12500,
+          "lastSpeedStableChangeTime": 1531344461.821326,
+          "configuredSpeed": 40,
+          "actualSpeed": 40,
+          "speedStable": true,
+          "label": "1/1"
+        }
+      ],
+      "speed": 40,
+      "label": "1"
+    },
+    {
+      "status": "ok",
+      "fans": [
+        {
+          "status": "ok",
+          "uptime": 1531344413.620448,
+          "maxSpeed": 12500,
+          "lastSpeedStableChangeTime": 1531344461.8213885,
+          "configuredSpeed": 40,
+          "actualSpeed": 40,
+          "speedStable": true,
+          "label": "2/1"
+        }
+      ],
+      "speed": 40,
+      "label": "2"
+    }
+  ],
+  "shutdownOnInsufficientFans": true,
+  "ambientTemperature": 22.75,
+  "systemStatus": "coolingOk",
+  "airflowDirection": "backToFrontAirflow"
+}
diff --git a/test/eos/mocked_data/test_get_environment/issue810_7010t/show_environment_power.json b/test/eos/mocked_data/test_get_environment/issue810_7010t/show_environment_power.json
new file mode 100644
--- /dev/null
+++ b/test/eos/mocked_data/test_get_environment/issue810_7010t/show_environment_power.json
@@ -0,0 +1,21 @@
+{
+  "powerSupplies": {
+    "1": {
+      "uptime": 1531344080.347931,
+      "modelName": "PWR-00194-01",
+      "capacity": 65.0,
+      "fans": {},
+      "tempSensors": {},
+      "managed": false,
+      "state": "ok"
+    },
+    "2": {
+      "fans": {},
+      "modelName": "PWR-00194-01",
+      "capacity": 65.0,
+      "tempSensors": {},
+      "managed": false,
+      "state": "powerLoss"
+    }
+  }
+}
diff --git a/test/eos/mocked_data/test_get_environment/issue810_7010t/show_environment_temperature.json b/test/eos/mocked_data/test_get_environment/issue810_7010t/show_environment_temperature.json
new file mode 100644
--- /dev/null
+++ b/test/eos/mocked_data/test_get_environment/issue810_7010t/show_environment_temperature.json
@@ -0,0 +1,128 @@
+{
+  "cardSlots": [],
+  "powerSupplySlots": [],
+  "shutdownOnOverheat": true,
+  "tempSensors": [
+    {
+      "maxTemperature": 42.202647053106695,
+      "maxTemperatureLastChange": 1531744107.3946292,
+      "hwStatus": "ok",
+      "currentTemperature": 37.751111950905496,
+      "description": "Cpu temp sensor",
+      "overheatThreshold": 105.0,
+      "criticalThreshold": 115.0,
+      "inAlertState": false,
+      "relPos": "1",
+      "alertCount": 0,
+      "pidDriverCount": 0,
+      "isPidDriver": false,
+      "name": "TempSensor1"
+    },
+    {
+      "maxTemperature": 40.0,
+      "maxTemperatureLastChange": 1532562297.5917792,
+      "hwStatus": "ok",
+      "currentTemperature": 36.0,
+      "description": "Front internal sensor",
+      "overheatThreshold": 75.0,
+      "criticalThreshold": 85.0,
+      "inAlertState": false,
+      "relPos": "2",
+      "alertCount": 0,
+      "pidDriverCount": 0,
+      "isPidDriver": false,
+      "name": "TempSensor2"
+    },
+    {
+      "maxTemperature": 39.25,
+      "maxTemperatureLastChange": 1532029012.2993102,
+      "hwStatus": "ok",
+      "currentTemperature": 35.875,
+      "description": "Front external sensor",
+      "overheatThreshold": 60.0,
+      "criticalThreshold": 75.0,
+      "inAlertState": false,
+      "relPos": "3",
+      "alertCount": 0,
+      "pidDriverCount": 0,
+      "isPidDriver": false,
+      "name": "TempSensor3"
+    },
+    {
+      "maxTemperature": 31.0,
+      "maxTemperatureLastChange": 1532633354.0643,
+      "hwStatus": "ok",
+      "currentTemperature": 27.0,
+      "description": "Rear internal sensor",
+      "overheatThreshold": 75.0,
+      "criticalThreshold": 85.0,
+      "inAlertState": false,
+      "relPos": "4",
+      "alertCount": 0,
+      "pidDriverCount": 0,
+      "isPidDriver": false,
+      "name": "TempSensor4"
+    },
+    {
+      "maxTemperature": 26.0,
+      "maxTemperatureLastChange": 1532453101.851557,
+      "hwStatus": "ok",
+      "currentTemperature": 22.75,
+      "description": "Rear external sensor",
+      "overheatThreshold": 60.0,
+      "criticalThreshold": 75.0,
+      "inAlertState": false,
+      "relPos": "5",
+      "alertCount": 0,
+      "pidDriverCount": 0,
+      "isPidDriver": false,
+      "name": "TempSensor5"
+    },
+    {
+      "maxTemperature": 55.2704,
+      "maxTemperatureLastChange": 1532633848.5057478,
+      "hwStatus": "ok",
+      "currentTemperature": 51.473600000000005,
+      "description": "Switch ASIC Center",
+      "overheatThreshold": 100.0,
+      "criticalThreshold": 110.0,
+      "inAlertState": false,
+      "relPos": "6",
+      "alertCount": 0,
+      "pidDriverCount": 0,
+      "isPidDriver": false,
+      "name": "TempSensor6"
+    },
+    {
+      "maxTemperature": 55.8128,
+      "maxTemperatureLastChange": 1532632510.879678,
+      "hwStatus": "ok",
+      "currentTemperature": 52.016000000000005,
+      "description": "Switch ASIC Lower Left Corner",
+      "overheatThreshold": 100.0,
+      "criticalThreshold": 110.0,
+      "inAlertState": false,
+      "relPos": "7",
+      "alertCount": 0,
+      "pidDriverCount": 0,
+      "isPidDriver": false,
+      "name": "TempSensor7"
+    },
+    {
+      "maxTemperature": 54.18560000000001,
+      "maxTemperatureLastChange": 1532636022.9700015,
+      "hwStatus": "ok",
+      "currentTemperature": 50.3888,
+      "description": "Switch ASIC Upper Right Edge",
+      "overheatThreshold": 100.0,
+      "criticalThreshold": 110.0,
+      "inAlertState": false,
+      "relPos": "8",
+      "alertCount": 0,
+      "pidDriverCount": 0,
+      "isPidDriver": false,
+      "name": "TempSensor8"
+    }
+  ],
+  "systemStatus": "temperatureOk"
+}
diff --git a/test/eos/mocked_data/test_get_environment/issue810_7010t/show_processes_top_once.text b/test/eos/mocked_data/test_get_environment/issue810_7010t/show_processes_top_once.text
new file mode 100644
--- /dev/null
+++ b/test/eos/mocked_data/test_get_environment/issue810_7010t/show_processes_top_once.text
@@ -0,0 +1,305 @@
+top - 17:19:10 up 67 days, 19:57,  0 users,  load average: 0.74, 0.66, 0.74
+Tasks: 298 total,   1 running, 297 sleeping,   0 stopped,   0 zombie
+%Cpu(s):  8.5 us,  1.4 sy,  0.0 ni, 89.7 id,  0.0 wa,  0.3 hi,  0.1 si,  0.0 st
+KiB Mem:   3886752 total,  3780968 used,   105784 free,   218720 buffers
+KiB Swap:        0 total,        0 used,        0 free,  2016280 cached
+
+  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
+ 3361 root      20   0  519m 126m 104m S  45.4  3.3   4551:22 StrataCounters
+11060 network_  20   0 14308 7656 6684 R  27.2  0.2   0:00.12 top
+ 1693 root      20   0  587m 291m 222m S   9.1  7.7 586:17.02 Sysdb
+ 2309 root      20   0  583m  98m  71m S   4.5  2.6 214:41.31 Aaa
+ 2512 root      20   0  506m  91m  73m S   4.5  2.4 389:57.29 Smbus
+ 3339 root      20   0  503m  81m  62m S   4.5  2.2 634:22.10 AgentMonitor
+    1 root      20   0  8428 5840 4356 S   0.0  0.2   8:35.44 systemd
+    2 root      20   0     0    0    0 S   0.0  0.0   0:00.46 kthreadd
+    3 root      20   0     0    0    0 S   0.0  0.0   3:12.96 ksoftirqd/0
+    5 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 kworker/0:0H
+    7 root      20   0     0    0    0 S   0.0  0.0  51:24.65 rcu_preempt
+    8 root      20   0     0    0    0 S   0.0  0.0   0:00.24 rcu_sched
+    9 root      20   0     0    0    0 S   0.0  0.0   0:00.00 rcu_bh
+   10 root      rt   0     0    0    0 S   0.0  0.0   0:17.40 migration/0
+   11 root      rt   0     0    0    0 S   0.0  0.0   6:03.87 watchdog/0
+   12 root      rt   0     0    0    0 S   0.0  0.0   5:55.78 watchdog/1
+   13 root      rt   0     0    0    0 S   0.0  0.0   0:17.00 migration/1
+   14 root      20   0     0    0    0 S   0.0  0.0   3:34.56 ksoftirqd/1
+   16 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 kworker/1:0H
+   17 root      rt   0     0    0    0 S   0.0  0.0   5:49.03 watchdog/2
+   18 root      rt   0     0    0    0 S   0.0  0.0   0:16.55 migration/2
+   19 root      20   0     0    0    0 S   0.0  0.0   3:08.29 ksoftirqd/2
+   21 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 kworker/2:0H
+   22 root      rt   0     0    0    0 S   0.0  0.0   5:49.26 watchdog/3
+   23 root      rt   0     0    0    0 S   0.0  0.0   0:16.82 migration/3
+   24 root      20   0     0    0    0 S   0.0  0.0   3:10.40 ksoftirqd/3
+   26 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 kworker/3:0H
+   27 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 khelper
+   28 root      20   0     0    0    0 S   0.0  0.0   0:00.00 kdevtmpfs
+   29 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 netns
+   30 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 perf
+   31 root      20   0     0    0    0 S   0.0  0.0   0:01.05 khungtaskd
+   32 root      20   0     0    0    0 S   0.0  0.0   5:35.38 khungtaskd2
+   33 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 writeback
+   34 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 crypto
+   35 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 bioset
+   36 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 kblockd
+   37 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 ata_sff
+   38 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 edac-poller
+   39 root      20   0     0    0    0 S   0.0  0.0   0:00.18 dst_gc_task
+   40 root      20   0     0    0    0 S   0.0  0.0   0:00.00 arp_cache-prd
+   42 root      20   0     0    0    0 S   0.0  0.0   3:21.02 icmp_unreachabl
+   43 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 rpciod
+   47 root      20   0     0    0    0 S   0.0  0.0   0:01.37 kswapd0
+   48 root      20   0     0    0    0 S   0.0  0.0   0:00.00 fsnotify_mark
+   49 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 nfsiod
+   54 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 pcielwd
+   56 root      20   0     0    0    0 S   0.0  0.0   0:00.00 scsi_eh_0
+   57 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 scsi_tmf_0
+   58 root      20   0     0    0    0 S   0.0  0.0   0:00.00 scsi_eh_1
+   59 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 scsi_tmf_1
+   63 root     -51   0     0    0    0 S   0.0  0.0   0:00.00 irq/16-mmc0
+   64 root      20   0     0    0    0 S   0.0  0.0   0:00.00 ndisc_cache-prd
+   65 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 ipv6_addrconf
+   66 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 ecc_log_wq
+   67 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 deferwq
+   70 root      20   0     0    0    0 S   0.0  0.0   0:05.73 mmcqd/0
+   71 root      20   0     0    0    0 S   0.0  0.0   0:00.02 mmcqd/0boot0
+   72 root      20   0     0    0    0 S   0.0  0.0   0:00.02 mmcqd/0boot1
+   73 root      20   0     0    0    0 S   0.0  0.0   0:00.05 mmcqd/0rpmb
+  312 root       0 -20     0    0    0 S   0.0  0.0   0:01.72 loop0
+  360 root      20   0 12124 4064 3496 S   0.0  0.1   0:00.61 systemd-udevd
+  511 root      20   0     0    0    0 S   0.0  0.0   0:00.13 kworker/u8:1
+  540 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 kvm-irqfd-clean
+  940 root      20   0  5968 3544 2892 S   0.0  0.1   0:39.25 crond
+  944 root      20   0  6032 3892 3428 S   0.0  0.1   0:38.79 systemd-logind
+  945 dbus      20   0 13988 8524 7728 S   0.0  0.2   0:32.73 dbus-daemon
+  967 root      20   0  4408 2652 2452 S   0.0  0.1   0:00.00 mcelog
+ 1247 root      20   0     0    0    0 S   0.0  0.0   0:00.02 kworker/1:0
+ 1380 root      20   0 90428 9676 5776 S   0.0  0.2   0:00.00 watchdog
+ 1382 root      15  -5 92476 9068 5168 S   0.0  0.2  17:22.89 wdog-cld
+ 1437 root      20   0  8580 5496 2832 S   0.0  0.1   0:00.00 python
+ 1438 root      20   0  8564 5568 2892 S   0.0  0.1   0:00.00 python
+ 1440 root      20   0 11360 7148 6648 S   0.0  0.2   0:00.94 ConnMgr
+ 1441 root       0 -20  4388 3196 2980 S   0.0  0.1  25:21.45 TimeAgent
+ 1503 root      20   0  501m  48m  31m S   0.0  1.3   0:00.01 netnsd-watcher
+ 1505 root      20   0  501m  48m  30m S   0.0  1.3   0:01.21 netnsd-server
+ 1514 root      20   0  522m  56m  34m S   0.0  1.5   0:00.01 ProcMgr-master
+ 1515 root      20   0  523m  58m  35m S   0.0  1.5   1408:26 ProcMgr-worker
+ 1527 root      20   0  8056 5024 2900 S   0.0  0.1   0:01.42 python
+ 1528 root      20   0  4344 1388 1228 S   0.0  0.0   0:00.18 inotifywait
+ 1539 root      20   0  8056 5112 2988 S   0.0  0.1   0:00.01 python
+ 1540 root      20   0  4344 1484 1328 S   0.0  0.0   0:00.00 inotifywait
+ 1552 root      20   0  8060 5060 2936 S   0.0  0.1   0:00.00 python
+ 1553 root      20   0  4416 2324 2108 S   0.0  0.1   0:00.00 inotifywait
+ 1636 root      20   0  4216  176    0 S   0.0  0.0 203:12.52 EosOomAdjust
+ 1647 root      20   0     0    0    0 S   0.0  0.0   5:45.06 rbfd_vrf_cleanu
+ 1692 root      20   0  4208 2308 2132 S   0.0  0.1  18:45.03 SlabMonitor
+ 1786 root      20   0  527m  95m  70m S   0.0  2.5   9:16.49 StageMgr
+ 1788 root      20   0  729m 404m 286m S   0.0 10.7   6005:31 ConfigAgent
+ 1799 root      20   0  544m 151m 122m S   0.0  4.0  26:07.82 Fru
+ 1807 root      20   0  532m 146m 116m S   0.0  3.9  20:02.73 Launcher
+ 2294 root      20   0  566m 141m 107m S   0.0  3.7 666:47.06 SuperServer
+ 2310 root      20   0  4408 1516 1340 S   0.0  0.0   0:00.02 netns
+ 2312 root      20   0  501m  46m  28m S   0.0  1.2   0:00.01 netnsd-session
+ 2314 root      20   0  514m 129m 108m S   0.0  3.4  14:22.37 Ira
+ 2321 root      20   0  4408 1460 1284 S   0.0  0.0   0:00.02 netns
+ 2323 root      20   0  501m  46m  28m S   0.0  1.2   0:00.01 netnsd-session
+ 2324 root      20   0  508m 116m  96m S   0.0  3.1  12:51.04 MaintenanceMode
+ 2331 root      20   0  4408 1460 1284 S   0.0  0.0   0:00.01 netns
+ 2332 root      20   0  501m  46m  28m S   0.0  1.2   0:00.01 netnsd-session
+ 2333 root      20   0  511m 124m 103m S   0.0  3.3  12:05.80 Bfd
+ 2424 root      20   0  527m  95m  70m S   0.0  2.5 223:45.18 PhyEthtool
+ 2464 root      20   0  4408 1476 1300 S   0.0  0.0   0:00.01 netns
+ 2469 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2471 root      20   0  504m  83m  65m S   0.0  2.2  11:22.03 PciBus
+ 2475 root      20   0  4408 1464 1284 S   0.0  0.0   0:00.01 netns
+ 2480 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2483 root      20   0  503m  79m  61m S   0.0  2.1   8:11.81 ReloadCauseAgen
+ 2487 root      20   0  4408 1504 1328 S   0.0  0.0   0:00.01 netns
+ 2492 root      20   0  501m  46m  28m S   0.0  1.2   0:00.01 netnsd-session
+ 2500 root      20   0  515m  94m  75m S   0.0  2.5  46:38.41 Scd
+ 2506 root      20   0  4408 1496 1316 S   0.0  0.0   0:00.02 netns
+ 2509 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2520 root      20   0  4408 1520 1340 S   0.0  0.0   0:00.01 netns
+ 2522 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2524 root      20   0  513m 123m 103m S   0.0  3.3  32:52.44 Ebra
+ 2563 root      20   0 11432 3112 2376 S   0.0  0.1   0:00.01 nginx
+ 2565 nobody    20   0 21152  12m  10m S   0.0  0.3 144:03.11 nginx
+ 2604 root      20   0  4408 1504 1328 S   0.0  0.0   0:00.01 netns
+ 2606 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2607 root      20   0  504m  85m  66m S   0.0  2.2  59:44.43 Max6658
+ 2608 root      20   0  4408 1492 1316 S   0.0  0.0   0:00.01 netns
+ 2609 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2610 root      20   0  504m  80m  62m S   0.0  2.1   8:05.56 PowerManager
+ 2612 root      20   0  4408 1492 1316 S   0.0  0.0   0:00.01 netns
+ 2613 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2614 root      20   0  504m  85m  67m S   0.0  2.3   8:54.05 FanDetector
+ 2620 root      20   0  4408 1480 1300 S   0.0  0.0   0:00.02 netns
+ 2622 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2626 root      20   0  507m 118m  98m S   0.0  3.1  14:57.67 StrataCentral
+ 2631 root      20   0  4408 1484 1308 S   0.0  0.0   0:00.01 netns
+ 2633 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2635 root      20   0  503m  83m  64m S   0.0  2.2   8:25.16 GpioLed
+ 2646 root      20   0  4408 1532 1356 S   0.0  0.0   0:00.01 netns
+ 2647 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2648 root      20   0  506m  89m  71m S   0.0  2.4  39:14.18 Thermostat
+ 2650 root      20   0  4408 1492 1316 S   0.0  0.0   0:00.01 netns
+ 2651 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2652 root      20   0  504m  89m  70m S   0.0  2.4 194:52.85 StandbyCpld
+ 2784 root      20   0  4408 1452 1276 S   0.0  0.0   0:00.01 netns
+ 2785 root      20   0  501m  46m  28m S   0.0  1.2   0:00.01 netnsd-session
+ 2787 root      20   0  506m 109m  90m S   0.0  2.9  10:35.32 LacpTxAgent
+ 2790 root      20   0  4408 1504 1328 S   0.0  0.0   0:00.01 netns
+ 2792 root      20   0  501m  46m  28m S   0.0  1.2   0:00.01 netnsd-session
+ 2793 root      20   0  506m 107m  88m S   0.0  2.8  12:25.25 PortSec
+ 2801 root      20   0  5592 2572 2272 S   0.0  0.1   0:02.43 xinetd
+ 2805 root      20   0  4408 1492 1316 S   0.0  0.0   0:00.01 netns
+ 2808 root      20   0  501m  46m  28m S   0.0  1.2   0:00.01 netnsd-session
+ 2810 root      20   0  544m 155m 104m S   0.0  4.1  43:56.09 StrataVlanTopo
+ 2812 root      20   0  4408 1508 1328 S   0.0  0.0   0:00.01 netns
+ 2814 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2815 root      20   0  507m 111m  91m S   0.0  2.9 307:03.62 StpTxRx
+ 2819 root      20   0  4408 1524 1344 S   0.0  0.0   0:00.01 netns
+ 2820 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2821 root      20   0  509m 135m 113m S   0.0  3.6  30:43.60 Lag
+ 2827 root      20   0  531m 116m  91m S   0.0  3.1  53:33.14 XcvrAgent
+ 2832 root      20   0  4408 1460 1284 S   0.0  0.0   0:00.01 netns
+ 2834 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2835 root      20   0  505m 105m  86m S   0.0  2.8  10:34.53 StpTopology
+ 2837 root      20   0  4408 1492 1316 S   0.0  0.0   0:00.01 netns
+ 2842 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2843 root      20   0  510m 121m 101m S   0.0  3.2  80:25.82 Acl
+ 2855 root      20   0  4408 1532 1356 S   0.0  0.0   0:00.01 netns
+ 2858 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2859 root      20   0  507m  95m  77m S   0.0  2.5  98:47.81 Stp
+ 2861 root      20   0  4408 1504 1328 S   0.0  0.0   0:00.01 netns
+ 2862 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2863 root      20   0  517m 136m 114m S   0.0  3.6  13:52.88 StrataLag
+ 2866 root      20   0  4204  176    0 S   0.0  0.0   0:00.00 conlogd
+ 2867 root      20   0  5392 3372 3128 S   0.0  0.1   0:00.00 sh
+ 2868 root      20   0  4284 2696 2500 S   0.0  0.1   0:00.04 agetty
+ 2869 root      20   0  4216 2388 2212 S   0.0  0.1   0:00.04 mingetty
+ 2871 root      20   0  4264 1376 1228 S   0.0  0.0   2:33.21 tail
+ 2872 root      20   0  4828 2232 2040 S   0.0  0.1   0:00.00 sed
+ 2879 root      20   0  4408 1484 1308 S   0.0  0.0   0:00.01 netns
+ 2880 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2881 root      20   0  504m  85m  66m S   0.0  2.2  10:55.30 KernelNetworkIn
+ 2882 root      20   0  4408 1520 1344 S   0.0  0.0   0:00.01 netns
+ 2883 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2884 root      20   0 3823m 217m 162m S   0.0  5.7  39:24.24 StrataL3
+ 2887 root      20   0  4408 1524 1344 S   0.0  0.0   0:00.01 netns
+ 2891 root      20   0  501m  46m  28m S   0.0  1.2   0:00.01 netnsd-session
+ 2893 root      20   0  531m 156m 136m S   0.0  4.1  35:01.16 StrataL2
+ 2919 root      20   0  4408 1508 1328 S   0.0  0.0   0:00.01 netns
+ 2922 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2926 root      20   0  518m 136m 115m S   0.0  3.6  14:15.02 Arp
+ 2932 root      20   0  4408 1536 1356 S   0.0  0.0   0:00.01 netns
+ 2934 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2936 root      20   0  507m 102m  82m S   0.0  2.7  22:34.20 Qos
+ 2950 root      20   0  4408 1480 1304 S   0.0  0.0   0:00.01 netns
+ 2951 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2952 root      20   0  706m 255m 171m S   0.0  6.7  20249:50 Strata
+ 2961 root      20   0  4408 1496 1316 S   0.0  0.0   0:00.01 netns
+ 2962 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2963 root      20   0  508m 104m  85m S   0.0  2.7   9:33.30 TopoAgent
+ 2965 root      20   0  4408 1504 1328 S   0.0  0.0   0:00.01 netns
+ 2966 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 2967 root      20   0  511m 119m  96m S   0.0  3.2  10:46.92 KernelFib
+ 2968 root      20   0  276m 177m 151m S   0.0  4.7 436:38.94 Rib
+ 2976 root      20   0 34308 5000 3780 S   0.0  0.1   1:48.08 rsyslogd
+ 3250 ntp       20   0 16716  10m 9464 S   0.0  0.3   0:23.71 ntpd
+ 3297 root      20   0  4408 1504 1328 S   0.0  0.0   0:00.02 netns
+ 3299 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3300 root      20   0  507m 115m  95m S   0.0  3.0  52:11.14 Lldp
+ 3305 root      20   0  4408 1536 1356 S   0.0  0.0   0:00.02 netns
+ 3308 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3309 root      20   0  507m 119m  99m S   0.0  3.1  10:43.10 McastCommon
+ 3310 root      20   0  556m 199m 166m S   0.0  5.3 811:40.01 Snmp
+ 3315 root      20   0  4408 1480 1304 S   0.0  0.0   0:00.02 netns
+ 3316 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3317 root      20   0  503m  80m  62m S   0.0  2.1  39:11.40 Kabini
+ 3318 root      20   0  4408 1504 1324 S   0.0  0.0   0:00.01 netns
+ 3319 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3320 root      20   0  506m 102m  83m S   0.0  2.7  11:19.67 LedPolicy
+ 3325 root      20   0  4408 1508 1328 S   0.0  0.0   0:00.02 netns
+ 3326 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3328 root      20   0  510m 118m  96m S   0.0  3.1  74:57.90 EventMgr
+ 3331 root      20   0  4408 1500 1324 S   0.0  0.0   0:00.01 netns
+ 3332 root      20   0  501m  46m  28m S   0.0  1.2   0:00.01 netnsd-session
+ 3333 root      20   0  539m 103m  78m S   0.0  2.7  64:25.14 CapiApp
+ 3335 root      20   0  4408 1504 1328 S   0.0  0.0   0:00.02 netns
+ 3337 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3352 root      20   0  4408 1408 1228 S   0.0  0.0   0:00.02 netns
+ 3356 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3371 root      20   0  4408 1524 1344 S   0.0  0.0   0:00.01 netns
+ 3373 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3374 root      20   0  518m 127m 107m S   0.0  3.4 148:24.98 Sflow
+ 3378 root      20   0  4408 1496 1316 S   0.0  0.0   0:00.02 netns
+ 3380 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3381 root      20   0  502m  32m  13m S   0.0  0.8   8:17.21 Tunnel
+ 3382 root      20   0  4408 1536 1356 S   0.0  0.0   0:00.01 netns
+ 3383 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3384 root      20   0  507m 111m  91m S   0.0  2.9  10:35.33 McastCommon6
+ 3391 root      20   0  4408 1516 1340 S   0.0  0.0   0:00.01 netns
+ 3392 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3393 root      20   0  506m  84m  65m S   0.0  2.2  11:07.18 PowerSupplyFixe
+ 3396 root      20   0  4408 1500 1324 S   0.0  0.0   0:00.01 netns
+ 3398 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3399 root      20   0  508m 113m  94m S   0.0  3.0  11:01.06 StrataMirror
+ 3406 root      20   0  4408 1480 1304 S   0.0  0.0   0:00.01 netns
+ 3408 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3409 root      20   0  504m  89m  71m S   0.0  2.4  10:54.07 L2Rib
+ 3410 root      20   0  4408 1464 1284 S   0.0  0.0   0:00.02 netns
+ 3411 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3412 root      20   0  506m  87m  68m S   0.0  2.3  10:05.39 Sol
+ 3413 root      20   0  4408 1508 1332 S   0.0  0.0   0:00.01 netns
+ 3414 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3415 root      20   0  512m 126m 106m S   0.0  3.3  10:59.52 DhcpRelay
+ 3419 root      20   0  4408 1520 1344 S   0.0  0.0   0:00.01 netns
+ 3421 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3423 root      20   0  503m  82m  64m S   0.0  2.2  10:06.63 FpgaAgent
+ 3425 root      20   0  4408 1504 1328 S   0.0  0.0   0:00.02 netns
+ 3427 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3428 root      20   0  504m  80m  61m S   0.0  2.1   8:04.55 PowerFuse
+ 3429 root      20   0  534m 131m 105m S   0.0  3.5  40:13.43 IgmpSnooping
+ 3441 root      20   0  4408 1504 1328 S   0.0  0.0   0:00.01 netns
+ 3442 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3443 root      20   0  512m 124m 104m S   0.0  3.3  11:53.67 PimBidirDf
+ 3446 root      20   0  4408 1492 1316 S   0.0  0.0   0:00.01 netns
+ 3447 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3448 root      20   0  506m 109m  90m S   0.0  2.9   9:42.58 KernelMfib
+ 3449 root      20   0  4408 1500 1324 S   0.0  0.0   0:00.01 netns
+ 3451 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3452 root      20   0  505m  97m  78m S   0.0  2.6   9:08.70 Msdp
+ 3453 root      20   0  4408 1500 1324 S   0.0  0.0   0:00.01 netns
+ 3455 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3456 root      20   0  508m 121m 102m S   0.0  3.2  11:56.70 Pim
+ 3458 root      20   0  4408 1504 1328 S   0.0  0.0   0:00.01 netns
+ 3459 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3460 root      20   0  507m 118m  99m S   0.0  3.1  10:41.93 Igmp
+ 3466 root      20   0  4408 1508 1328 S   0.0  0.0   0:00.01 netns
+ 3467 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3468 root      20   0  507m 113m  94m S   0.0  3.0  10:01.66 IgmpHostProxy
+ 3472 root      20   0  4408 1508 1328 S   0.0  0.0   0:00.01 netns
+ 3476 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3477 root      20   0  508m 127m 107m S   0.0  3.4  11:24.15 PimBsr
+ 3478 root      20   0  4408 1496 1316 S   0.0  0.0   0:00.01 netns
+ 3480 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3481 root      20   0  518m 151m 129m S   0.0  4.0  20:13.23 Pimsm
+ 3483 root      20   0  4408 1504 1328 S   0.0  0.0   0:00.01 netns
+ 3484 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3485 root      20   0  509m 130m 110m S   0.0  3.4  11:20.38 PimReg
+ 3489 root      20   0  4408 1508 1328 S   0.0  0.0   0:00.01 netns
+ 3492 root      20   0  501m  46m  28m S   0.0  1.2   0:00.02 netnsd-session
+ 3493 root      20   0  512m 126m 106m S   0.0  3.3  11:25.66 PimBidir
+ 4094 root      20   0     0    0    0 S   0.0  0.0   0:00.07 kworker/1:1
+ 5066 root      20   0     0    0    0 S   0.0  0.0   0:00.05 kworker/3:3
+ 9917 root      20   0     0    0    0 S   0.0  0.0   0:00.01 kworker/0:1
+10750 root      20   0     0    0    0 S   0.0  0.0   0:00.00 kworker/3:0
+13165 root      20   0  271m 169m 147m S   0.0  4.5 104:58.08 Rib-vrf-TEST
+13186 root      20   0  4408 1892 1660 S   0.0  0.0   0:00.73 dnsmasq
+13213 root      20   0 16392 6568 3268 S   0.0  0.2  63:12.22 snmpd
+21821 root      20   0     0    0    0 S   0.0  0.0   0:00.18 kworker/3:2
+21822 root      20   0     0    0    0 S   0.0  0.0   0:00.16 kworker/2:2
+24536 root      20   0     0    0    0 S   0.0  0.0   0:00.21 kworker/0:0
+24989 root      20   0     0    0    0 S   0.0  0.0   0:03.57 kworker/u8:0
+26530 root      20   0     0    0    0 S   0.0  0.0   0:00.06 kworker/2:3
diff --git a/test/eos/mocked_data/test_get_environment/issue810_7010t/show_version.json b/test/eos/mocked_data/test_get_environment/issue810_7010t/show_version.json
new file mode 100644
--- /dev/null
+++ b/test/eos/mocked_data/test_get_environment/issue810_7010t/show_version.json
@@ -0,0 +1,15 @@
+{
+  "uptime": 5860361.78,
+  "modelName": "DCS-7010T-48-R",
+  "internalVersion": "4.20.7M-8944203.4207M",
+  "systemMacAddress": "28:99:3a:23:92:09",
+  "serialNumber": "SSJ12345678",
+  "memTotal": 3886752,
+  "bootupTimestamp": 1531344080.0,
+  "memFree": 2582420,
+  "version": "4.20.7M",
+  "architecture": "i386",
+  "isIntlVersion": false,
+  "internalBuildId": "c673df71-201a-43a3-8d66-9f28c0ac92fc",
+  "hardwareRevision": "12.00"
+}