Skip to content

Commit

Permalink
Return health monitor values based on type
Browse files Browse the repository at this point in the history
Neutron CLI queries for health monitor show returns all
the HTTP/HTTPS specific default values even if the type
is PING or TCP. Return values based on the type of the
healthmonitor

Change-Id: I7e7ccc65d26130b79cccbc16f180c0c298195dda
Partial-Bug: #1374116
  • Loading branch information
rrugge committed Apr 21, 2015
1 parent 1b1b33d commit f140be8
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -42,9 +42,13 @@ def make_dict(self, health_monitor, fields=None):
'status': self._get_object_status(health_monitor)}

props = health_monitor.get_loadbalancer_healthmonitor_properties()
monitor_type = getattr(props, 'monitor_type')
for key, mapping in self._loadbalancer_health_type_mapping.iteritems():
value = getattr(props, key)
if value is not None:
if monitor_type not in ('HTTP', 'HTTPS'):
if mapping in ('http_method', 'url_path', 'expected_codes'):
continue
res[mapping] = value

pool_ids = []
Expand Down

0 comments on commit f140be8

Please sign in to comment.