return nsr[field]
raise NotFound("failed to find {} in ns {}".format(field, ns_name))
+
+ def heal(
+ self,
+ ns_name,
+ heal_dict,
+ wait=False,
+ timeout=None,
+ ):
+ """Heals a NS"""
+ self._logger.debug("")
+ self._client.get_token()
+ try:
+ op_data = heal_dict
+ if timeout:
+ op_data["timeout_ns_heal"] = timeout
+ op_id = self.exec_op(ns_name, op_name="heal", op_data=op_data, wait=wait)
+ print(str(op_id))
+ except ClientException as exc:
+ message = "failed to heal ns {}:\nerror:\n{}".format(ns_name, str(exc))
+ raise ClientException(message)