Ejemplo n.º 1
0
 def restore(self):
     with fuel_client.set_auth_context(self.context):
         nodes = objects.Node.get_all()
         for node in nodes:
             node_util.restart_mcollective(node)
     content = self.archive.extractfile(self.filename)
     if content is not None:
         orig_status = json.load(content)
         new_status = mcollective.get_mco_ping_status()
         offline = mcollective.compair_mco_ping_statuses(orig_status,
                                                         new_status)
         if offline:
             LOG.warning("Some nodes went offline after the upgrade of the "
                         "master node (check them manually): %s",
                         ", ".join(offline))
Ejemplo n.º 2
0
def test_compair_mco_ping_statuses(mocker, orig, new, offline):
    assert mcollective.compair_mco_ping_statuses(orig, new) == offline