当前位置: 首页>>代码示例>>Python>>正文


Python RepoPublishConduit.get_repo_scratchpad方法代码示例

本文整理汇总了Python中pulp.plugins.conduits.repo_publish.RepoPublishConduit.get_repo_scratchpad方法的典型用法代码示例。如果您正苦于以下问题:Python RepoPublishConduit.get_repo_scratchpad方法的具体用法?Python RepoPublishConduit.get_repo_scratchpad怎么用?Python RepoPublishConduit.get_repo_scratchpad使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pulp.plugins.conduits.repo_publish.RepoPublishConduit的用法示例。


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

示例1: _init_publisher

# 需要导入模块: from pulp.plugins.conduits.repo_publish import RepoPublishConduit [as 别名]
# 或者: from pulp.plugins.conduits.repo_publish.RepoPublishConduit import get_repo_scratchpad [as 别名]
    def _init_publisher(self):

        repo = Repository(self.repo_id, working_dir=self.working_dir)
        self.repo = repo

        conduit = RepoPublishConduit(repo.id, YUM_DISTRIBUTOR_ID)
        conduit.last_publish = mock.Mock(return_value=None)
        conduit.get_repo_scratchpad = mock.Mock(return_value={})

        config_defaults = {'http': True,
                           'https': True,
                           'relative_url': None,
                           'http_publish_dir': os.path.join(self.published_dir, 'http'),
                           'https_publish_dir': os.path.join(self.published_dir, 'https')}
        config = PluginCallConfiguration(None, None)
        config.default_config.update(config_defaults)

        self.publisher = publish.BaseYumRepoPublisher(repo, conduit, config, YUM_DISTRIBUTOR_ID,
                                                      working_dir=self.working_dir)
        self.publisher.get_checksum_type = mock.Mock(return_value=None)

        # mock out the repomd_file_context, so _publish_<step> can be called
        # outside of the publish() method
        self.publisher.repomd_file_context = mock.MagicMock()
        self.publisher.all_steps = mock.MagicMock()
开发者ID:dkliban,项目名称:pulp_rpm,代码行数:27,代码来源:test_publish.py

示例2: setUp

# 需要导入模块: from pulp.plugins.conduits.repo_publish import RepoPublishConduit [as 别名]
# 或者: from pulp.plugins.conduits.repo_publish.RepoPublishConduit import get_repo_scratchpad [as 别名]
 def setUp(self):
     self.working_directory = tempfile.mkdtemp()
     self.content_dir = os.path.join(self.working_directory, 'content')
     self.working_dir = os.path.join(self.working_directory, 'work')
     os.makedirs(self.working_dir)
     self.repo = Repository(id='foo', working_dir=self.working_dir)
     config = PluginCallConfiguration(None, None)
     conduit = RepoPublishConduit(self.repo.id, 'foo_repo')
     conduit.get_repo_scratchpad = Mock(return_value={u'tags': {}})
     self.parent = steps.PluginStep('test-step', self.repo, conduit, config)
开发者ID:beav,项目名称:pulp_ostree,代码行数:12,代码来源:test_steps.py

示例3: setUp

# 需要导入模块: from pulp.plugins.conduits.repo_publish import RepoPublishConduit [as 别名]
# 或者: from pulp.plugins.conduits.repo_publish.RepoPublishConduit import get_repo_scratchpad [as 别名]
 def setUp(self):
     self.temp_dir = tempfile.mkdtemp()
     self.working_directory = os.path.join(self.temp_dir, 'working')
     self.publish_directory = os.path.join(self.temp_dir, 'publish')
     self.content_directory = os.path.join(self.temp_dir, 'content')
     os.makedirs(self.working_directory)
     os.makedirs(self.publish_directory)
     os.makedirs(self.content_directory)
     repo = Repository('foo_repo_id', working_dir=self.working_directory)
     config = PluginCallConfiguration(None, None)
     conduit = RepoPublishConduit(repo.id, 'foo_repo')
     conduit.get_repo_scratchpad = Mock(return_value={u'tags': {}})
     self.parent = PublishStep('test-step', repo, conduit, config)
开发者ID:TomasTomecek,项目名称:pulp_docker,代码行数:15,代码来源:test_publish_steps.py

示例4: _init_publisher

# 需要导入模块: from pulp.plugins.conduits.repo_publish import RepoPublishConduit [as 别名]
# 或者: from pulp.plugins.conduits.repo_publish.RepoPublishConduit import get_repo_scratchpad [as 别名]
    def _init_publisher(self):

        repo = Repository(self.repo_id, working_dir=self.working_dir)

        conduit = RepoPublishConduit(repo.id, YUM_DISTRIBUTOR_ID)
        conduit.get_repo_scratchpad = mock.Mock(return_value={})

        config_defaults = {
            "http": True,
            "https": True,
            "relative_url": None,
            "http_publish_dir": os.path.join(self.published_dir, "http"),
            "https_publish_dir": os.path.join(self.published_dir, "https"),
        }
        config = PluginCallConfiguration(None, None)
        config.default_config.update(config_defaults)

        self.publisher = publish.Publisher(repo, conduit, config)

        # mock out the repomd_file_context, so _publish_<step> can be called
        # outside of the publish() method
        self.publisher.repomd_file_context = mock.MagicMock()
开发者ID:pombredanne,项目名称:rcm-pulp-rpm,代码行数:24,代码来源:test_publish.py


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