def configNewSR(config, projectpath): """Configure a Software Release as current Software Release Args: config: slaprunner configuration projectpath: path of the directory that contains the software realease to configure Returns: True if all is done well, otherwise return false. """ folder = realpath(config, projectpath) if folder: sup_process.stopProcess(config, 'slapgrid-cp') sup_process.stopProcess(config, 'slapgrid-sr') stopProxy(config) removeProxyDb(config) startProxy(config) removeInstanceRoot(config) param_path = os.path.join(config['etc_dir'], ".parameter.xml") if os.path.exists(param_path): os.remove(param_path) open(os.path.join(config['etc_dir'], ".project"), 'w').write(projectpath) return True else: return False
def stopProxy(config): """Stop Slapproxy server""" sup_process.stopProcess(config, "slapproxy")