if(domain == ""): print("USAGE createDomain -domain=<domain name>") destination = base_dir+"/domain/configuration/" domainFile = getDomainFile(domain) profiles = domainFile.find('{urn:jboss:domain:1.4}profiles') for profile in profiles.iter('{urn:jboss:domain:1.4}profile'): name = profile.get('name') if(name == 'full-ha'): copyProfile = deepcopy(profile) copyProfile.set('name',profileName) profiles.append(copyProfile) domainFile.write("domain.xml") if(os.path.isfile(destination+"domain.xml")): shutil.move(destination+"domain.xml", destination+"domain.xml.ORIG") if(os.path.isfile("domain.xml")): shutil.copy("domain.xml", destination+"domain.xml") shutil.move("domain.xml","domain.xml."+domain+".template") if(not(os.path.isfile("Domains/"+domain+".properties"))): pm.create("Domains/"+domain+".properties") old_domains = pm.getValue("domains") if(old_domains.find(domain) == -1): new_domains = ValueUtils.addToValues(domain, old_domains, ',') pm.updateValue("""Domains/domains.properties""", "domains", new_domains) print("RIAVVIARE IL DOMAIN CONTROLLER! \nCAMBIARE UTENTE E PASSWORD NELLA SEZIONE MESSAGING PRIMA DI AVVIARE")