Exemplo n.º 1
0
    def getDVDPallets(self):
        # packages = [('test', 'ver', 'rel', 'diskId'),
        #		('test2', 'ver2', 'rel', 'diskId')]

        #check if CD is mounted and get list
        packages = []
        media = stack.media.Media()

        media.mountCD()
        rollfile = stack.file.RollFile('/dev/null')
        name, version, release, arch, diskid, foreign = \
         rollfile.getRollInfo()
        diskid = media.getId()

        timestamp, name, arch, disknum, version = media.getCDInfo()
        diskid = media.getId()

        if name in ['RHEL', 'CentOS']:
            release = stack.release
            packages.append((name, version, release, diskid))
        else:
            rolls = media.getRollsFromCD()
            for name, version, release, arch in rolls:
                packages.append((name, version, release, diskid))

        return packages
Exemplo n.º 2
0
	def getDVDPallets(self):
		# packages = [('test', 'ver', 'rel', 'diskId'),
		#		('test2', 'ver2', 'rel', 'diskId')]

		#check if CD is mounted and get list
		packages = []
		media = stack.media.Media()

		media.mountCD()
		rollfile = stack.file.RollFile('/dev/null')
		name, version, release, arch, diskid, foreign = \
			rollfile.getRollInfo()
		diskid = media.getId()

		timestamp, name, arch, disknum, version = media.getCDInfo()
		diskid = media.getId()
		
		if name in [ 'RHEL', 'CentOS' ]:
			release = stack.release
			packages.append((name, version, release, diskid))
		else:
			rolls = media.getRollsFromCD()
			for name, version, release, arch in rolls:
				packages.append((name, version, release, diskid))

		return packages
Exemplo n.º 3
0
	def OnDVDLoad(self, event):
		media = stack.media.Media()
		media.mountCD()

		#get more pallets
		packages = []

		rolls = media.getRollsFromCD()
		disk_id = media.getId()
		for w in rolls:
			packages.append((w[0], w[1], disk_id))

		for i in packages:
			if i[0] == None:
				continue
			index = self.page.list1.InsertStringItem(sys.maxint, i[0])
			self.page.list1.SetStringItem(index, 1, i[1])
			self.page.list1.SetStringItem(index, 2, i[2])
			self.page.list1.SetStringItem(index, 3, '')
Exemplo n.º 4
0
	def OnDVDLoad(self, event):
		media = stack.media.Media()
		media.mountCD()

		#get more pallets
		packages = []

		rolls = media.getRollsFromCD()
		disk_id = media.getId()
		for w in rolls:
			packages.append((w[0], w[1], disk_id))

		for i in packages:
			if i[0] == None:
				continue
			index = self.page.list1.InsertStringItem(sys.maxint, i[0])
			self.page.list1.SetStringItem(index, 1, i[1])
			self.page.list1.SetStringItem(index, 2, i[2])
			self.page.list1.SetStringItem(index, 3, '')