def complete_uninstallation(): print(os.linesep) msg = "This Kubernetes environment" warnings = Log.get_warning_count() errors = Log.get_error_count() if errors > 0 and warnings > 0: msg = "{0} had {1} error(s) and {2} warning(s) during the uninstall process for MapR".format( msg, errors, warnings) Log.error(msg) elif errors > 0 and warnings == 0: msg = "{0} had {1} error(s) during the uninstall process for MapR".format( msg, errors) Log.error(msg) elif errors == 0 and warnings > 0: msg = "{0} had {1} warnings(s) during the uninstall process for MapR".format( msg, warnings) Log.warning(msg) else: msg = "{0} has had MapR successfully uninstalled".format(msg) Log.info(msg, True) if errors > 0 or warnings > 0: msg = "Please check the bootstrap log file for this session here: {0}".format( Log.get_log_filename()) Log.warning(msg) Log.info("")
def complete_installation(): print(os.linesep) msg = "This Kubernetes environment" warnings = Log.get_warning_count() errors = Log.get_error_count() if errors > 0 and warnings > 0: msg = "{0} had {1} error(s) and {2} warning(s) during the bootstraping process for MapR".format( msg, errors, warnings) Log.error(msg) elif errors > 0 and warnings == 0: msg = "{0} had {1} error(s) during the bootstraping process for MapR".format( msg, errors) Log.error(msg) elif errors == 0 and warnings > 0: msg = "{0} had {1} warnings(s) during the bootstraping process for MapR".format( msg, warnings) Log.warning(msg) else: msg = "{0} has been successfully bootstrapped for MapR".format(msg) Log.info(msg, True) Log.info( "MapR components can now be created via the newly installed operators", True) if errors > 0 or warnings > 0: msg = "Please check the bootstrap log file for this session here: {0}".format( Log.get_log_filename()) Log.warning(msg) Log.info("")
def is_available(self): if not self.enabled: return False if self.available is None: Log.info("Checking Google cloud availability. One moment...", True) results, status = OSCommand.run2( ["command -v gcloud", "gcloud compute instances list"]) self.available = True if status == 0 else False if not self.available: Log.warning( "Google Cloud SDK not found or not configured correctly. Quit bootstrapper, install and " "confgure Google Cloud SDK and restart bootstrapper. See: https://cloud.google.com/sdk/. " "More information on the error in the bootstrapper log here: " + Log.get_log_filename()) Log.warning(results) return self.available