• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python models._import_all_the_way函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中pulp.server.db.migrate.models._import_all_the_way函数的典型用法代码示例。如果您正苦于以下问题:Python _import_all_the_way函数的具体用法?Python _import_all_the_way怎么用?Python _import_all_the_way使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了_import_all_the_way函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: test_migrate

    def test_migrate(self):
        migration = _import_all_the_way('pulp_rpm.migrations.0009_iso_importer_config_keys')

        # Run the migration
        migration.migrate()

        # Verify the proxy repo
        proxy = self.repo_importers.find_one({'repo_id': 'proxy'})
        self.assertEqual(proxy['importer_type_id'], 'iso_importer')
        self.assertEqual(proxy['last_sync'], '2013-04-09T16:57:06-04:00')
        self.assertEqual(proxy['scheduled_syncs'], [])
        self.assertEqual(proxy['scratchpad'], None)
        self.assertEqual(dict(proxy['config']), {
            u'proxy_username': u'rbarlow',
            u'feed': u'http://pkilambi.fedorapeople.org/test_file_repo/',
            u'proxy_host': u'localhost', u'proxy_password': u'password',
            u'proxy_port': 3128, u'id': u'proxy'})
        self.assertEqual(proxy['id'], 'iso_importer')

        # Verify the test repo
        test = self.repo_importers.find_one({'repo_id': 'test'})
        self.assertEqual(test['importer_type_id'], 'iso_importer')
        self.assertEqual(dict(test['config']), {
            u'max_downloads': 42,
            u'feed': u'http://feed.com/isos',
            u'proxy_host': u'proxy.com', u'proxy_username': u'jeeves',
            u'remove_missing': False, u'validate': True})
        self.assertEqual(test['id'], 'iso_importer')

        # verify that the yum repo wasn't touched
        a_yum_repo = self.repo_importers.find_one({'repo_id': 'a_yum_repo'})
        self.assertEqual(a_yum_repo['importer_type_id'], 'yum_importer')
        self.assertEqual(dict(a_yum_repo['config']),
                         {u'feed_url': u'This should not change.'})
开发者ID:bechtoldt,项目名称:pulp_rpm,代码行数:34,代码来源:test_0009_iso_importer_config_keys.py


示例2: test_move_directory_contents

    def test_move_directory_contents(self):
        test_old_publish_dir = tempfile.mkdtemp(prefix='test_0002_migration_old')
        old_http_publish_dir = os.path.join(test_old_publish_dir, 'http', 'repos')
        old_https_publish_dir = os.path.join(test_old_publish_dir, 'https', 'repos')
        os.makedirs(old_http_publish_dir)
        os.makedirs(old_https_publish_dir)

        test_new_publish_dir = tempfile.mkdtemp(prefix='test_0002_migration_new')
        test_new_publish_puppet_dir = os.path.join(test_new_publish_dir, 'puppet')
        # on a real system, this dir is created by the rpm
        os.mkdir(test_new_publish_puppet_dir)

        new_http_publish_dir = os.path.join(test_new_publish_puppet_dir, 'http', 'repos')
        new_https_publish_dir = os.path.join(test_new_publish_puppet_dir, 'https', 'repos')
        # put a file in the top-level dir to ensure it gets copied over too.
        # It is not typical to have a file there but we should move it over
        # just in case.
        open(os.path.join(test_old_publish_dir, 'some_file'), 'w').close()

        migration = _import_all_the_way('pulp_puppet.plugins.migrations.0002_puppet_'
                                        'publishing_directory_change')

        migration.move_directory_contents(test_old_publish_dir, test_new_publish_puppet_dir)

        self.assertTrue(os.path.exists(new_http_publish_dir))
        self.assertTrue(os.path.exists(new_https_publish_dir))
        self.assertTrue(os.path.exists(os.path.join(test_new_publish_puppet_dir, 'some_file')))
        # bz 1153072 - user needs to clear this dir manually
        self.assertTrue(os.path.exists(test_old_publish_dir))
        for (root, files, dirs) in os.walk(test_old_publish_dir):
            self.assertTrue(files == [])
            self.assertTrue(dirs == [])
开发者ID:bmbouter,项目名称:pulp_puppet,代码行数:32,代码来源:test_0002_puppet_publishing_directory_change.py


示例3: setUp

    def setUp(self):
        super(Migration0004Tests, self).setUp()

        # Special way to import modules that start with a number
        self.migration = _import_all_the_way(
            'pulp_rpm.plugins.migrations.0004_pkg_group_category_repoid')

        factory.initialize()
        api.initialize(False)
        types_db.update_database([TYPE_DEF_GROUP, TYPE_DEF_CATEGORY])

        # Create the repositories necessary for the tests
        self.source_repo_id = 'source-repo'  # where units were copied from with the bad code
        self.dest_repo_id = 'dest-repo'  # where bad units were copied to

        source_repo = model.Repository(repo_id=self.source_repo_id)
        source_repo.save()
        dest_repo = model.Repository(repo_id=self.dest_repo_id)
        dest_repo.save()

        source_importer = model.Importer(self.source_repo_id, 'yum_importer', {})
        source_importer.save()

        dest_importer = model.Importer(self.dest_repo_id, 'yum_importer', {})
        dest_importer.save()
开发者ID:FlorianHeigl,项目名称:pulp_rpm,代码行数:25,代码来源:test_0004_migrate.py


示例4: test_migrate

    def test_migrate(self):
        # Let's set up some package groups, some with the new way, and some with the old way
        # We'll only put the name and conditional_package_names attributes since the
        # migration only touches those fields
        package_groups = [
            {"name": "v1_style_1", "conditional_package_names" : {'a': 1, 'b': 2}},
            {"name": "v1_style_2", "conditional_package_names" : {'b': 1, 'c': 3}},
            {"name": "v2_style", "conditional_package_names" : [['d', 4], ['e', 5]]}]
        for package_group in package_groups:
            self.package_group_collection.insert(package_group)
        migration = _import_all_the_way(
            'pulp_rpm.migrations.0012_conditional_package_names_v1_v2_upgrade')

        # Run the migration
        migration.migrate()

        # Inspect the package groups
        expected_package_groups = [
            {"name": "v1_style_1", "conditional_package_names" : [['a', 1], ['b', 2]]},
            {"name": "v1_style_2", "conditional_package_names" : [['b', 1], ['c', 3]]},
            {"name": "v2_style", "conditional_package_names" : [['d', 4], ['e', 5]]}]
        for expected_package_group in expected_package_groups:
            package_group = self.package_group_collection.find_one(
                {'name': expected_package_group['name']})
            self.assertTrue(isinstance(package_group['conditional_package_names'], list))
            self.assertEqual(len(package_group['conditional_package_names']),
                             len(expected_package_group['conditional_package_names']))
            # Since dictionaries don't have ordering, we cannot assert that the expected
            # list is the same as the actual list. Instead, we assert that the lengths are
            # the same, and that all the expected items appear in the actual
            for pair in expected_package_group['conditional_package_names']:
                self.assertTrue(pair in package_group['conditional_package_names'])
开发者ID:bechtoldt,项目名称:pulp_rpm,代码行数:32,代码来源:test_0012_conditional_package_names_v1_v2_upgrade.py


示例5: setUp

    def setUp(self):
        super(Migration0004Tests, self).setUp()

        # Special way to import modules that start with a number
        self.migration = _import_all_the_way(
            'pulp_rpm.plugins.migrations.0004_pkg_group_category_repoid')

        factory.initialize()
        types_db.update_database([TYPE_DEF_GROUP, TYPE_DEF_CATEGORY])

        # Create the repositories necessary for the tests
        self.source_repo_id = 'source-repo'  # where units were copied from with the bad code
        self.dest_repo_id = 'dest-repo'  # where bad units were copied to

        source_repo = Repo(self.source_repo_id, '')
        Repo.get_collection().insert(source_repo, safe=True)

        dest_repo = Repo(self.dest_repo_id, '')
        Repo.get_collection().insert(dest_repo, safe=True)

        source_importer = RepoImporter(self.source_repo_id, 'yum_importer', 'yum_importer', {})
        RepoImporter.get_collection().insert(source_importer, safe=True)

        dest_importer = RepoImporter(self.dest_repo_id, 'yum_importer', 'yum_importer', {})
        RepoImporter.get_collection().insert(dest_importer, safe=True)
开发者ID:AndreaGiardini,项目名称:pulp_rpm,代码行数:25,代码来源:test_0004_migrate.py


示例6: test_fix_distribution_units

    def test_fix_distribution_units(self):
        migration = _import_all_the_way('pulp_rpm.plugins.migrations.0015_fix_distributor_units')

        mock_collection = mock.MagicMock()
        mock_collection.find.return_value = FAKE_DIST_UNITS
        migration._fix_distribution_units(mock_collection)
        mock_collection.find.assert_called_once_with({'files': {'$exists': True}})
        mock_collection.update.assert_called_once_with({'_id': u'6ec94809-6d4f-48cf-9077-88d003eb284e'},
                                                       {'$set': {'files': []}}, safe=True)
开发者ID:asmacdo,项目名称:pulp_rpm,代码行数:9,代码来源:test_0015_fix_distributor_units.py


示例7: setUp

    def setUp(self):
        super(BaseMigrationTests, self).setUp()

        self.distributors_collection = RepoDistributor.get_collection()

        self.root_test_dir = tempfile.mkdtemp(prefix='test_0016_migration_')
        self.http_publish_dir = os.path.join(self.root_test_dir, 'http', 'repos')
        self.https_publish_dir = os.path.join(self.root_test_dir, 'https', 'repos')

        self.migration_module = _import_all_the_way(MIGRATION_MODULE)
开发者ID:hjensas,项目名称:pulp_rpm,代码行数:10,代码来源:test_0016_new_yum_distributor.py


示例8: test_migrate

    def test_migrate(self):
        migration = _import_all_the_way('pulp_rpm.migrations.0013_errata_from_str')

        # Run the migration
        migration.migrate()

        # Verify that this one's "from_str" got changed to "from"
        old = self.collection.find_one({'id': 'RHEA-2012:0003'})
        self.assertEqual(old.get('from', None), '[email protected]')
        self.assertFalse('from_str' in old)

        # Verify that this one's "from" is still "from"
        new = self.collection.find_one({'id': 'RHEA-2012:0004'})
        self.assertEqual(new.get('from', None), '[email protected]')
        self.assertFalse('from_str' in new)
开发者ID:bechtoldt,项目名称:pulp_rpm,代码行数:15,代码来源:test_0013_errata_from_str.py


示例9: test_migration

 def test_migration(self, mock_query_manager, mock_calc_checksum):
     migration = _import_all_the_way('pulp_puppet.plugins.migrations.0001_puppet_'
                                     'module_unit_checksum')
     storage_path = '/foo/storage'
     mock_calc_checksum.return_value = "foo_checksum"
     unit = {'_storage_path': storage_path}
     mock_query_manager.return_value.get_content_unit_collection.return_value.find.return_value \
         = MockCursor([unit])
     migration.migrate()
     mock_calc_checksum.assert_called_once_with(storage_path)
     mock_query_manager.return_value.get_content_unit_collection.return_value.\
         save.assert_called_once()
     target_unit = mock_query_manager.return_value.get_content_unit_collection.return_value. \
         save.call_args[0][0]
     self.assertEquals(target_unit['checksum'], 'foo_checksum')
     self.assertEquals(target_unit['checksum_type'], constants.DEFAULT_HASHLIB)
开发者ID:aeria,项目名称:pulp_puppet,代码行数:16,代码来源:test_0001_puppet_module_unit_checksum.py


示例10: test_fix_distribution_units_multifile

    def test_fix_distribution_units_multifile(self):
        """
        verify that we don't remove files that are OK
        """
        migration = _import_all_the_way('pulp_rpm.plugins.migrations.0015_fix_distributor_units')

        mock_collection = mock.MagicMock()
        mock_collection.find.return_value = FAKE_DIST_UNITS_MULTIFILE
        migration._fix_distribution_units(mock_collection)
        mock_collection.find.assert_called_once_with({'files': {'$exists': True}})
        mock_collection.update.assert_called_once_with({'_id': u'6ec94809-6d4f-48cf-9077-88d003eb284e'},
                                                       {'$set':
                                                        {'files': [{'downloadurl': 'http ://fake-url/os/another_file',
                                                                    'item_type': 'distribution',
                                                                    'fileName': 'another_file'}]}},
                                                       safe=True)
开发者ID:asmacdo,项目名称:pulp_rpm,代码行数:16,代码来源:test_0015_fix_distributor_units.py


示例11: test_migrate

    def test_migrate(self):
        migration = _import_all_the_way("pulp_rpm.plugins.migrations.0009_iso_importer_config_keys")

        # Run the migration
        migration.migrate()

        # Verify the proxy repo
        proxy = self.repo_importers.find_one({"repo_id": "proxy"})
        self.assertEqual(proxy["importer_type_id"], "iso_importer")
        self.assertEqual(proxy["last_sync"], "2013-04-09T16:57:06-04:00")
        self.assertEqual(proxy["scheduled_syncs"], [])
        self.assertEqual(proxy["scratchpad"], None)
        self.assertEqual(
            dict(proxy["config"]),
            {
                u"proxy_username": u"rbarlow",
                u"feed": u"http://pkilambi.fedorapeople.org/test_file_repo/",
                u"proxy_host": u"localhost",
                u"proxy_password": u"password",
                u"proxy_port": 3128,
                u"id": u"proxy",
            },
        )
        self.assertEqual(proxy["id"], "iso_importer")

        # Verify the test repo
        test = self.repo_importers.find_one({"repo_id": "test"})
        self.assertEqual(test["importer_type_id"], "iso_importer")
        self.assertEqual(
            dict(test["config"]),
            {
                u"max_downloads": 42,
                u"feed": u"http://feed.com/isos",
                u"proxy_host": u"proxy.com",
                u"proxy_username": u"jeeves",
                u"remove_missing": False,
                u"validate": True,
            },
        )
        self.assertEqual(test["id"], "iso_importer")

        # verify that the yum repo wasn't touched
        a_yum_repo = self.repo_importers.find_one({"repo_id": "a_yum_repo"})
        self.assertEqual(a_yum_repo["importer_type_id"], "yum_importer")
        self.assertEqual(dict(a_yum_repo["config"]), {u"feed_url": u"This should not change."})
开发者ID:pombredanne,项目名称:pulp_rpm,代码行数:45,代码来源:test_0009_iso_importer_config_keys.py


示例12: test_migrate

    def test_migrate(self):
        # Test
        migration = _import_all_the_way('pulp_rpm.plugins.migrations.0010_yum_importer_config_keys')
        migration.migrate()

        # Verify
        proxy = self.repo_importers.find_one({'repo_id': 'proxy'})
        self.assertTrue('proxy_url' not in proxy['config'])
        self.assertTrue('proxy_user' not in proxy['config'])
        self.assertTrue('proxy_pass' not in proxy['config'])
        self.assertEqual(proxy['config']['proxy_host'], 'localhost')
        self.assertEqual(proxy['config']['proxy_username'], 'user-1')
        self.assertEqual(proxy['config']['proxy_password'], 'pass-1')

        mixed = self.repo_importers.find_one({'repo_id': 'mixed'})
        self.assertTrue('feed_url' not in mixed['config'])
        self.assertTrue('ssl_verify' not in mixed['config'])
        self.assertTrue('num_threads' not in mixed['config'])
        self.assertTrue('verify_checksum' not in mixed['config'])
        self.assertTrue('remove_old' not in mixed['config'])
        self.assertTrue('num_old_packages' not in mixed['config'])
        self.assertEqual(mixed['config']['feed'], 'http://localhost/repo')
        self.assertEqual(mixed['config']['ssl_validation'], True)
        self.assertEqual(mixed['config']['max_downloads'], 42)
        self.assertEqual(mixed['config']['validate'], True)
        self.assertEqual(mixed['config']['remove_missing'], False)
        self.assertEqual(mixed['config']['retain_old_count'], 3)
        self.assertEqual(mixed['config']['skip'], ['rpm'])
        self.assertEqual(mixed['config']['max_speed'], 1024)

        remove = self.repo_importers.find_one({'repo_id': 'remove'})
        self.assertTrue('newest' not in remove['config'])
        self.assertTrue('verify_size' not in remove['config'])
        self.assertTrue('purge_orphaned' not in remove['config'])
        self.assertEqual(remove['config']['feed'], 'localhost')

        no_touch = self.repo_importers.find_one({'repo_id': 'no-touch'})
        self.assertEqual(no_touch['config']['feed'], 'localhost')
        self.assertEqual(no_touch['config']['newest'], True)
        self.assertEqual(no_touch['config']['verify_size'], True)
        self.assertEqual(no_touch['config']['purge_orphaned'], True)
开发者ID:AndreaGiardini,项目名称:pulp_rpm,代码行数:41,代码来源:test_0010_migrate.py


示例13: test_move_directory_contents_and_rename

    def test_move_directory_contents_and_rename(self):
        test_old_publish_dir = tempfile.mkdtemp(prefix='test_0002_migration_old')
        old_http_publish_dir = os.path.join(test_old_publish_dir, 'http', 'repos')
        old_https_publish_dir = os.path.join(test_old_publish_dir, 'https', 'repos')
        os.makedirs(old_http_publish_dir)
        os.makedirs(old_https_publish_dir)

        test_new_publish_dir = tempfile.mkdtemp(prefix='test_0002_migration_new')
        new_http_publish_dir = os.path.join(test_new_publish_dir, 'puppet', 'http', 'repos')
        new_https_publish_dir = os.path.join(test_new_publish_dir, 'puppet', 'https', 'repos')

        migration = _import_all_the_way('pulp_puppet.plugins.migrations.0002_puppet_'
                                        'publishing_directory_change')
        migration.move_directory_contents_and_rename(test_old_publish_dir,
                                                     test_new_publish_dir,
                                                     os.path.basename(test_old_publish_dir),
                                                     'puppet')

        self.assertTrue(os.path.exists(new_http_publish_dir))
        self.assertTrue(os.path.exists(new_https_publish_dir))
        self.assertFalse(os.path.exists(test_old_publish_dir))
开发者ID:asmacdo,项目名称:pulp_puppet,代码行数:21,代码来源:test_0002_puppet_publishing_directory_change.py


示例14: test_migrate

    def test_migrate(self):
        # Setup
        for type_id in (TYPE_ID_RPM, TYPE_ID_SRPM, TYPE_ID_DRPM):
            self.add_sample_data(type_id)

        # Test
        migration = _import_all_the_way('pulp_rpm.plugins.migrations.0008_version_sort_index')
        migration.migrate()

        # Verify

        # The migration should cover these three types, so make sure they were all included
        for type_id in (TYPE_ID_RPM, TYPE_ID_SRPM, TYPE_ID_DRPM):
            collection = types_db.type_units_collection(type_id)

            test_me = collection.find_one({'version': '1.1'})
            self.assertEqual(test_me['version_sort_index'], version_utils.encode('1.1'))
            self.assertEqual(test_me['release_sort_index'], version_utils.encode('1.1'))

            # Make sure the script didn't run on units that already have the indexes
            test_me = collection.find_one({'version': '3.1'})
            self.assertEqual(test_me['version_sort_index'], 'fake')
            self.assertEqual(test_me['release_sort_index'], 'fake')
开发者ID:dkliban,项目名称:pulp_rpm,代码行数:23,代码来源:test_0008_version_sort_index.py


示例15: _import_all_the_way

"""
This module contains tests for pulp.server.db.migrations.0015_load_content_types.
"""
import unittest
from mock import Mock, call, patch

from pulp.server.db.migrate.models import _import_all_the_way

migration = _import_all_the_way('pulp.server.db.migrations.'
                                '0016_remove_repo_content_unit_owner_type_and_id')


class TestMigrate(unittest.TestCase):

    @patch.object(migration.connection, 'get_database')
    def test_migrate_no_collection_in_db(self, mock_get_database):
        """
        Test doing nothing, no actual tests since if it tries to do any work it will raise
        """
        mock_get_database.return_value.collection_names.return_value = []
        migration.migrate()

    @patch.object(migration.connection, 'get_database')
    @patch.object(migration, 'remove_duplicates')
    def test_migrate_removes_duplicates(self, mock_remove_duplicates, mock_get_database):
        """
        Test that the migration calls the remove_duplicates method & drops the
        owner_type and owner_id fields from the repo_content_units collection
        """
        mock_get_database.return_value.collection_names.return_value = ['repo_content_units']
        collection = mock_get_database.return_value['repo_content_units']
开发者ID:alanoe,项目名称:pulp,代码行数:31,代码来源:test_0016_remvoe_repo_content_unit_owner_type_and_id.py


示例16: test__import_all_the_way

 def test__import_all_the_way(self):
     """
     Make sure that models._import_all_the_way() gives back the most specific module.
     """
     module = models._import_all_the_way('unit.server.db.migration_packages.z.0001_test')
     self.assertEqual(module.__name__, 'unit.server.db.migration_packages.z.0001_test')
开发者ID:credativ,项目名称:pulp,代码行数:6,代码来源:test_manage.py


示例17: test_migration

 def test_migration(self, mock_listdir, mock_path_exists, mock_move_directory):
     migration = _import_all_the_way('pulp_puppet.plugins.migrations.0002_puppet_'
                                     'publishing_directory_change')
     migration.migrate()
     mock_listdir.assert_called_once_with('/var/www/pulp_puppet')
     mock_path_exists.assert_called_once_with('/var/www/pulp_puppet')
开发者ID:bmbouter,项目名称:pulp_puppet,代码行数:6,代码来源:test_0002_puppet_publishing_directory_change.py


示例18: _import_all_the_way

"""
This module contains tests for pulp.server.db.migrations.0014_pulp_user_metadata.
"""
import unittest

import mock

from pulp.server import constants
from pulp.server.db.migrate.models import _import_all_the_way


migration = _import_all_the_way('pulp.server.db.migrations.0014_pulp_user_metadata')


class TestMigrate(unittest.TestCase):
    """
    Test the migrate() function.
    """
    @mock.patch('pulp.server.db.migrations.0014_pulp_user_metadata.database.type_units_collection')
    @mock.patch('pulp.server.db.migrations.0014_pulp_user_metadata.factory.plugin_manager')
    def test_migrate(self, plugin_manager, type_units_collection):
        """
        Ensure that migrate() runs the correct queries on the correct collections.
        """
        types = [{'id': 'type_a'}, {'id': 'type_2'}]

        class MockPluginManager(object):
            def types(self):
                return types

        plugin_manager.return_value = MockPluginManager()
开发者ID:alanoe,项目名称:pulp,代码行数:31,代码来源:test_0014_pulp_user_metadata.py


示例19: _import_all_the_way

# -*- coding: utf-8 -*-

import copy
import json
import unittest

import mock
from pulp.server.db.migrate.models import _import_all_the_way

from pulp_rpm.plugins.db.models import RPM, SRPM


migration = _import_all_the_way("pulp_rpm.plugins.migrations.0011_new_importer")


class TestMigrateNewImporter(unittest.TestCase):
    def setUp(self):
        self.rpm_unit = copy.deepcopy(RPM_UNIT)
        self.srpm_unit = copy.deepcopy(SRPM_UNIT)

    @mock.patch.object(migration, "_migrate_collection")
    def test_types(self, mock_add):
        migration.migrate()
        self.assertEqual(mock_add.call_count, 2)
        mock_add.assert_any_call(RPM.TYPE)
        mock_add.assert_any_call(SRPM.TYPE)

    @mock.patch("pulp.plugins.types.database.type_units_collection")
    def test_adds_size(self, mock_collection):
        mock_collection.return_value.find.return_value = [self.rpm_unit]
        self.assertFalse("size" in self.rpm_unit)
开发者ID:asmacdo,项目名称:pulp_rpm,代码行数:31,代码来源:test_0011_migrate_new_importer.py


示例20: _import_all_the_way

"""
This module contains unit tests for pulp_rpm.plugins.migrations.0017_merge_sha_sha1.py.
"""
import unittest

from pulp.server.db.migrate.models import _import_all_the_way
from pymongo import collection, errors
import mock

migration = _import_all_the_way('pulp_rpm.plugins.migrations.0017_merge_sha_sha1')


SUM_NONE_ERRATA = [
    {u'issued': u'2012-01-27 16:08:06', u'references': [], u'_content_type_id': u'erratum',
     u'id': u'RHEA-2012:0002', u'from': u'[email protected]', u'severity': u'',
     u'title': u'Sea_Erratum', u'_ns': u'units_erratum', u'version': u'1',
     u'reboot_suggested': True, u'type': u'security',
     u'pkglist': [
         {u'packages': [
             {u'src': u'http://www.fedoraproject.org', u'name': u'walrus', u'sum': None,
              u'filename': u'walrus-0.71-1.noarch.rpm', u'epoch': u'0', u'version': u'0.71',
              u'release': u'1', u'reboot_suggested': u'False', u'arch': u'noarch'},
             {u'src': u'http://www.fedoraproject.org', u'name': u'penguin', u'sum': None,
              u'filename': u'penguin-0.9.1-1.noarch.rpm', u'epoch': u'0', u'version': u'0.9.1',
              u'release': u'1', u'reboot_suggested': u'False', u'arch': u'noarch'},
             {u'src': u'http://www.fedoraproject.org', u'name': u'shark', u'sum': None,
              u'filename': u'shark-0.1-1.noarch.rpm', u'epoch': u'0', u'version': u'0.1',
              u'release': u'1', u'reboot_suggested': u'False', u'arch': u'noarch'}],
          u'name': u'1', u'short': u''}],
     u'status': u'stable', u'updated': u'', u'description': u'Sea_Erratum',
     u'_last_updated': 1416857488, u'pushcount': u'', u'_storage_path': None, u'rights': u'',
开发者ID:ATIX-AG,项目名称:pulp_rpm,代码行数:31,代码来源:test_0017_merge_sha_sha1.py



注:本文中的pulp.server.db.migrate.models._import_all_the_way函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python models.get_migration_packages函数代码示例发布时间:2022-05-25
下一篇:
Python manage.main函数代码示例发布时间:2022-05-25
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap