MCPcopy Create free account
hub / github.com/apache/cloudstack / is_primary

Method is_primary

systemvm/debian/opt/cloud/bin/cs/CsDatabag.py:128–133  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

126 return "unknown"
127
128 def is_primary(self):
129 if not self.is_redundant():
130 return False
131 if "redundant_state" in self.idata():
132 return self.idata()['redundant_state'] == "PRIMARY"
133 return False
134
135 def set_fault_state(self):
136 self.idata()['redundant_state'] = "FAULT"

Callers 3

post_config_changeMethod · 0.80
_redundant_onMethod · 0.80
processMethod · 0.80

Calls 2

is_redundantMethod · 0.95
idataMethod · 0.95

Tested by

no test coverage detected