Ejemplo n.º 1
0
            {
                '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',
            },
Ejemplo n.º 2
0
            {
                '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',
            },