Change states_to_check() to return OrderedDict
Previously it returned a simple dictionary. However, this means that the function (potentially) gives different ordering of states to check between Py27 and Py35, but more importantly, different to the order of the required_relations. This provides a fix for that.
This commit is contained in:
@@ -582,14 +582,15 @@ class OpenStackCharm(object):
|
||||
after the first failure. This means that it doesn't check (say)
|
||||
available if connected is not available.
|
||||
"""
|
||||
states_to_check = {
|
||||
relation: [("{}.connected".format(relation),
|
||||
"blocked",
|
||||
"'{}' missing".format(relation)),
|
||||
("{}.available".format(relation),
|
||||
"waiting",
|
||||
"'{}' incomplete".format(relation))]
|
||||
for relation in self.required_relations}
|
||||
states_to_check = collections.OrderedDict()
|
||||
for relation in self.required_relations:
|
||||
states_to_check[relation] = [
|
||||
("{}.connected".format(relation),
|
||||
"blocked",
|
||||
"'{}' missing".format(relation)),
|
||||
("{}.available".format(relation),
|
||||
"waiting",
|
||||
"'{}' incomplete".format(relation))]
|
||||
return states_to_check
|
||||
|
||||
def check_services_running(self):
|
||||
|
||||
Reference in New Issue
Block a user