{ 'os': 'Red Hat Linux', 'release': '7.2', 'arch': 'i386', 'channel': 'redhat-linux-i386-7.2', }, { 'os': 'Red Hat Linux', 'release': '6.2', 'arch': 'i386', 'channel': 'redhat-linux-i386-6.2', }, ] for dcm in dcms: x = DistChannelMap() x.populate(dcm) batch.append(x) rhnSQL.initDB() backend.init() dcmimp = DistChannelMapImport(batch, backend) dcmimp.run() sys.exit(0) if 0: batch = Collection() families = [ { 'name': 'Cisco Linux', 'label': 'cisco', 'product_url': 'http://www.redhat.com/products/ADSFASDFASDF', },