def do_add_admin(options): email = None if options.admin_cert: cert = X509Helper(options.admin_cert) dn = cert.subject ca = cert.issuer if not options.admin_ignore_cert_email: email = cert.email else: dn = options.admin_dn ca = options.admin_ca email = options.admin_email if not email: print "WARNING: No email was specified for this administrator! The new administrator will not receive VOMS Admin notifications" cmd = "%s java -cp %s %s --command add-admin --vo %s --dn '%s' --ca '%s'" % (get_oracle_env(), build_classpath(), VOMSDefaults.schema_deployer_class, options.vo, dn, ca) if email: cmd += " --email '%s' " % email status = os.system(cmd) sys.exit(os.WEXITSTATUS(status))
def do_basic_command(options,command): cmd = "%s java -cp %s %s --command %s --vo %s" % (get_oracle_env(), build_classpath(), VOMSDefaults.schema_deployer_class, command, options.vo) status = os.system(cmd) sys.exit(os.WEXITSTATUS(status))
def do_remove_admin(options): if options.admin_cert: cert = X509Helper(options.admin_cert) dn = cert.subject ca = cert.issuer else: dn = options.admin_dn ca = options.admin_ca cmd = "%s java -cp %s %s --command remove-admin --vo %s --dn '%s' --ca '%s' " % (get_oracle_env(), build_classpath(), VOMSDefaults.schema_deployer_class, options.vo, dn, ca) status = os.system(cmd) sys.exit(os.WEXITSTATUS(status))