def processCMDBManifest(pf):
	""" create the autodeploy file system from a released repository
	supposes a structure as in svn BuildDeliverables
	"""
	repoPath = pf.get("manifest.repository.root")
	manifest = CMDBManifest(pf.get("manifest.file"))
	releaseId = manifest.getReleaseId()
	pscs = manifest.getPSCs()
	deployables = []
	# cater for different transport protocols - right now only file
	antFile = AntCopyProject("antBuildtmpFS.xml", pf.get("manifest.repository.protocol"))
	antFile.setName("createtmpfs")
	antFile.deleteDir("tmp/" + releaseId)
	# cater for getting metadata in different ways - right now only config registry
	metadata = DeploymentMetadata(pf.get("manifest.metadata.source"), pf.get("manifest.metadata.file"))
	for psc in pscs:
		deployable = metadata.getMetadataForPSC(psc)
		if deployable:
			deployables.append(deployable)
			source = repoPath + "/" + deployable["repo-path"]
			pattern = "**/**"
			target = "tmp/" + releaseId + "/" + deployable["name"] + "_" + deployable["version"]
			antFile.copyDir(source, pattern, target)
			# generic name for config folder DC-SR-ORAPP-XX_ROOT hard-coded
			antFile.copyDir(target + "/config", "**", "tmp/" + releaseId + "/DC-SR-ORAPP-XX_ROOT/PSCConfig")
	createAutodeployProperties(antFile, releaseId, deployables)
Exemplo n.º 2
0
	def testGetReleaseId(self):
		print "TestCMDBManifest : testGetReleaseId"
		man = CMDBManifest(self.testfile)
		id = man.getReleaseId()
		self.assertEqual(id, "GWA_00_03_00_09")