def configure_plugins(request): # Rescan Plugins ## Find new, remove missing plugins pluginmanager.rescan() ctx = RequestContext(request, {}) config_publishers(request, ctx) return render_to_response("rundb/configure/plugins.html", context_instance=ctx)
def InstallDeb(pathToDeb, actualFileName = None): """ Install a misc. package[Ex:ion-chefupdates] from a deb package file :param pathToDeb: A path to the deb file which will be installed. """ # do some sanity checks on the package if not os.path.exists(pathToDeb): raise Exception("No file at " + pathToDeb) # call the ion plugin deb install script which handles the misc deb packages installation p = subprocess.Popen(["sudo", "/opt/ion/iondb/bin/ion_package_install_deb.py", pathToDeb, "miscDeb"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() # raise if any error if p.returncode: logger.debug("System Error at iondb.rundb.configure.updateProduct.InstallDeb : %s" % err) if "SystemError" in err: err = ("Invalid file (%s) uploaded or file corrupted. Please check the file and try again." % actualFileName) elif "conflicts" in err or "not part of the offcycle" in err: err = err else: err = ("Something went wrong. Check the file (%s) uploaded and try again. " "If problem exists again, please consult with your Torrent Suite administrator." % actualFileName) raise Exception(err) if 'ion-plugin' in actualFileName: pluginmanager.rescan()
def add_remove_plugins(): from iondb.plugins.manager import pluginmanager pluginmanager.rescan()