def create_core_configuration(options): if os.path.exists(core_conf_dir(options.vo)): logger.info("VOMS core service configuration for VO %s already exists.", options.vo) if not options.dry_run and options.enable_conf_backup: backup_dir_contents(core_conf_dir(options.vo)) else: ## FIXME: set permissions os.makedirs(core_conf_dir(options.vo)) create_voms_conf(options)
def do_remove(options): check_remove_options(options) setup_defaults(options) if not options.skip_voms_admin: if not os.path.exists(admin_conf_dir(options.vo)): logger.error("The VOMS Admin service for VO %s is not configured on this host.", options.vo) else: if options.undeploy_database: if not options.skip_database: undeploy_database(options) else: logger.warning("Database will not be dropped since --skip-database option is set.") logger.info("Removing VOMS Admin service configuration") remove_dir_and_contents(admin_conf_dir(options.vo)) if not options.skip_voms_core: if not os.path.exists(core_conf_dir(options.vo)): logger.error("The VOMS core service for VO %s is not configured on this host.", options.vo) else: logger.info("Removing VOMS core service configuration") remove_dir_and_contents(core_conf_dir(options.vo))