Skip to content

Instantly share code, notes, and snippets.

@crc32a
Created July 12, 2016 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crc32a/f9b7b24635f892334e6d5ac9a4746e69 to your computer and use it in GitHub Desktop.
Save crc32a/f9b7b24635f892334e6d5ac9a4746e69 to your computer and use it in GitHub Desktop.
def _is_degraded(self, obj, exclude=None):
exclude = exclude or []
if "provisioning_status" not in exclude:
if obj.provisioning_status == constants.ERROR:
return True
if "operating_status" not in exclude:
if ((obj.operating_status != lb_const.ONLINE) and
(obj.operating_status != lb_const.NO_MONITOR)):
return True
return False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment