def update_all(self, context): num_i = len(self.instances) LOG.debug("Host %s has %s instances to update" % (self.name, num_i)) failed_instances = [] for instance in self.instances: client = create_guest_client(context, instance['id']) try: client.update_guest() except exception.TroveError as re: LOG.error(re) LOG.error("Unable to update instance: %s" % instance['id']) failed_instances.append(instance['id']) if len(failed_instances) > 0: msg = "Failed to update instances: %s" % failed_instances raise exception.UpdateGuestError(msg)
def update_all(self, context): num_i = len(self.instances) LOG.debug("Host %(name)s has %(num)s instances to update.", { 'name': self.name, 'num': num_i }) failed_instances = [] for instance in self.instances: client = create_guest_client(context, instance['id']) try: client.update_guest() except exception.TroveError as re: LOG.error(re) LOG.error(_("Unable to update instance: %s."), instance['id']) failed_instances.append(instance['id']) if len(failed_instances) > 0: msg = _("Failed to update instances: %s.") % failed_instances raise exception.UpdateGuestError(msg)