Trees | Indices | Help |
---|
|
1 # 2 # Common dumper stuff 3 # 4 # Copyright (c) 2008--2017 Red Hat, Inc. 5 # 6 # This software is licensed to you under the GNU General Public License, 7 # version 2 (GPLv2). There is NO WARRANTY for this software, express or 8 # implied, including the implied warranties of MERCHANTABILITY or FITNESS 9 # FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2 10 # along with this software; if not, see 11 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. 12 # 13 # Red Hat trademarks are not licensed under GPLv2. No permission is 14 # granted to use or replicate Red Hat trademarks that are incorporated 15 # in this software or its documentation. 16 # 17 # 18 19 import os 20 21 import xmlSource 22 from spacewalk.common.rhnLib import hash_object_id 23 from spacewalk.server.importlib.backendOracle import SQLBackend 24 from spacewalk.server.importlib.channelImport import ChannelImport, ChannelFamilyImport 25 from spacewalk.server.importlib.packageImport import PackageImport, SourcePackageImport 26 from spacewalk.server.importlib import archImport 27 from spacewalk.server.importlib import productNamesImport 28 from spacewalk.server.importlib import orgImport 29 30 43 44 # get_backend() returns a shared instance of an Oracle backend 45 46 49 50 # Functions for dumping packages 51 5254 # returns the package path (for exporter/importer only) 55 # not to be confused with where the package lands on the satellite itself. 56 if not sources: 57 template = "%s/rpms/%s/%s.rpm" 58 else: 59 template = "%s/srpms/%s/%s.rpm" 60 return os.path.normpath(template % (mountPoint, hash_object_id(obj_id, 2), obj_id))61 62 63 # pylint: disable=W023265 66 """virtual class - redefines endContainerCallback""" 67 # pylint: disable=E1101,E0203,W0201 68 # this class has no __init__ for the purpose 69 # it's used in multiple inheritance mode and inherited classes should 70 # use __init__ from the other base class 71 72 importer_class = object 7378 7981 importer_class = orgImport.OrgImport 82 87 9197 98 106 107 110 111 114 115 118 119 122 12393 importer = self.importer_class(self.batch, get_backend(), 94 self.master_label, self.create_orgs) 95 importer.run() 96 self.batch = []124 -class ServerPackageArchCompatContainer(diskImportLibContainer, xmlSource.ServerPackageArchCompatContainer):126 127128 -class ServerChannelArchCompatContainer(diskImportLibContainer, xmlSource.ServerChannelArchCompatContainer):130 131132 -class ChannelPackageArchCompatContainer(diskImportLibContainer, xmlSource.ChannelPackageArchCompatContainer):134 135136 -class ServerGroupServerArchCompatContainer(diskImportLibContainer, xmlSource.ServerGroupServerArchCompatContainer):138 139141 importer_class = ChannelFamilyImport142 143145 importer_class = ChannelImport146 147149 importer_class = PackageImport150 151153 importer_class = SourcePackageImport154
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Wed Mar 4 07:37:50 2020 | http://epydoc.sourceforge.net |