From c6730b92a5b81969c5fdf91d1f476ee83bb2705b Mon Sep 17 00:00:00 2001 From: Matt Canning Date: Thu, 6 Dec 2018 18:01:30 +0000 Subject: [PATCH] Status should be available for GSLBRegionPoolEntry objects --- dyn/tm/services/gslb.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dyn/tm/services/gslb.py b/dyn/tm/services/gslb.py index d5e5e28..5a18599 100644 --- a/dyn/tm/services/gslb.py +++ b/dyn/tm/services/gslb.py @@ -244,6 +244,7 @@ def __init__(self, zone, fqdn, region_code, address, *args, **kwargs): self._address = address self._label = self._weight = self._serve_mode = None self._task_id = None + self._status = None uri = '/GSLBRegionPoolEntry/{}/{}/{}/{}/' self.uri = uri.format(self._zone, self._fqdn, self._region_code, @@ -409,8 +410,17 @@ def to_json(self): output['weight'] = self._weight if self._serve_mode: output['serve_mode'] = self._serve_mode + if self._status: + output['status'] = self._status return output + @property + def status(self): + """The current state of the pool entry. Will be one of 'unk', 'up', + or 'down' + """ + return self._status + def delete(self): """Delete this :class:`GSLBRegionPoolEntry` from the DynECT System""" api_args = {}