Skip to content
This repository was archived by the owner on Feb 10, 2018. It is now read-only.

Commit da7da3f

Browse files
authored
Merge pull request #69 from napalm-automation/develop
Release 0.4.2 - master
2 parents 175a0b0 + a813463 commit da7da3f

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

napalm_junos/junos.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,10 @@ def get_environment(self):
283283
except KeyError:
284284
environment_data['temperature'] = {}
285285
environment_data['temperature'][sensor_object] = {}
286-
287-
environment_data['temperature'][sensor_object]['temperature'] = \
288-
float(structured_object_data['temperature'])
286+
# Check we have a temperature field in this class (See #66)
287+
if structured_object_data['temperature']:
288+
environment_data['temperature'][sensor_object]['temperature'] = \
289+
float(structured_object_data['temperature'])
289290
# Set a default value (False) to the key is_critical and is_alert
290291
environment_data['temperature'][sensor_object]['is_alert'] = False
291292
environment_data['temperature'][sensor_object]['is_critical'] = False

napalm_junos/utils/junos_views.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -369,11 +369,12 @@ junos_bgp_rib_table:
369369
view: junos_bgp_rib_view
370370

371371
junos_bgp_rib_view:
372-
active_prefix_count: {active-prefix-count: int}
373-
received_prefix_count: {received-prefix-count: int}
374-
accepted_prefix_count: {accepted-prefix-count: int}
375-
suppressed_prefix_count: {suppressed-prefix-count: int}
376-
advertised_prefix_count: {advertised-prefix-count: int}
372+
fields:
373+
active_prefix_count: {active-prefix-count: int}
374+
received_prefix_count: {received-prefix-count: int}
375+
accepted_prefix_count: {accepted-prefix-count: int}
376+
suppressed_prefix_count: {suppressed-prefix-count: int}
377+
advertised_prefix_count: {advertised-prefix-count: int}
377378

378379
###
379380
### ARP Table

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
setup(
1414
name="napalm-junos",
15-
version="0.4.1",
15+
version="0.4.2",
1616
packages=find_packages(),
1717
author="David Barroso, Mircea Ulinic",
1818

0 commit comments

Comments
 (0)