コード例 #1
0
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)
コード例 #2
0
ファイル: testmanifest.py プロジェクト: nstreet/autodeploy
	def testGetPSCs(self):
		print "TestCMDBManifest : testGetPSCs"
		man = CMDBManifest(self.testfile)
		pscs = man.getPSCs()
		self.assertEqual(len(pscs), 2)
		self.assertEqual(pscs[0][0], "ENTERPRISECONTRACTSANDSCHEMAS")
		self.assertEqual(pscs[0][1], "03_08_04_00")
		self.assertEqual(pscs[1][0], "REFERENCEDATALOOKUPSERVICE")
		self.assertEqual(pscs[1][1], "02_00_02_00")
		self.assertEqual(man.releaseId, "GWA_00_03_00_09")
コード例 #3
0
ファイル: testmanifest.py プロジェクト: nstreet/autodeploy
	def testGetReleaseId(self):
		print "TestCMDBManifest : testGetReleaseId"
		man = CMDBManifest(self.testfile)
		id = man.getReleaseId()
		self.assertEqual(id, "GWA_00_03_00_09")