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

Python extensions.PulpCliCommand类代码示例

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

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



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

示例1: __init__

    def __init__(self, context, strategy, name=NAME_CREATE, description=DESC_CREATE):
        PulpCliCommand.__init__(self, name, description, self.run)
        self.context = context
        self.strategy = strategy

        self.add_option(OPT_SCHEDULE)
        self.add_option(OPT_FAILURE_THRESHOLD)
开发者ID:ashcrow,项目名称:pulp,代码行数:7,代码来源:schedule.py


示例2: __init__

    def __init__(self, context):
        desc = 'creates a new repository that is configured to sync and publish RPM related content'
        PulpCliCommand.__init__(self, 'create', desc, self.create)

        self.context = context

        add_repo_options(self, False)
开发者ID:ehelms,项目名称:pulp,代码行数:7,代码来源:pulp_cli.py


示例3: __init__

    def __init__(self, context, name, description):
        PulpCliCommand.__init__(self, name, description, self.create)
        self.context = context
        self.prompt = context.prompt

        d = "identifies the repository the package category will be created in"
        self.create_option("--repo-id", _(d), required=True)

        d = "id of this package category"
        self.create_option("--category-id", _(d), aliases=["-i"], required=True)

        d = "name of this package category"
        self.create_option("--name", _(d), aliases=["-n"], required=True)

        d = "description of this package category"
        self.create_option("--description", _(d), aliases=["-d"], required=True)

        d = "display order for this package category"
        self.create_option("--display-order", _(d), allow_multiple=False, required=False, default=0)

        d = "package group ids to include in this package category"
        self.create_option("--group", _(d), aliases=["-g"], allow_multiple=True, required=False)

        d = "display extra information about the creation process"
        self.create_flag("-v", _(d))
开发者ID:jlsherrill,项目名称:pulp,代码行数:25,代码来源:pulp_cli.py


示例4: __init__

 def __init__(self, context, name, description):
     PulpCliCommand.__init__(self, name, description, self.unbind)
     self.context = context
     self.prompt = context.prompt
     self.add_option(PulpCliOption('--repo-id', 'repository id', required=True))
     self.add_option(PulpCliFlag('--force', 'delete the binding immediately and discontinue '
                                            'tracking consumer actions'))
开发者ID:AndreaGiardini,项目名称:pulp_rpm,代码行数:7,代码来源:pulp_cli.py


示例5: __init__

    def __init__(self, method, name=None, description=None, filtering=True,
                 include_search=True, *args, **kwargs):
        """
        :param name: name used to invoke the command
        :type  name: str
        :param description: user-readable text describing the command
        :type  description: str
        :param method:  A method to call when this command is executed. See
                        okaara docs for more info
        :type  method:  callable
        :param filtering:   if True, the command will add all filtering options
        :type  filtering:   bool
        :param include_search: if True, the command will add all non-filter
                               criteria options such as limit, seek, sort, etc.
        :type  include_search: bool
        """
        name = name or kwargs.pop('name', None) or 'search'
        description = description or kwargs.pop('description', None) or _SEARCH_DESCRIPTION

        PulpCliCommand.__init__(self, name, description, method, **kwargs)

        # Hang on to these so unit tests can verify the command is configuration
        self.filtering = filtering
        self.include_search = include_search

        if filtering:
            self.add_filtering()
        if include_search:
            self.add_display_criteria_options()
开发者ID:CUXIDUMDUM,项目名称:pulp,代码行数:29,代码来源:criteria.py


示例6: __init__

    def __init__(self, context, strategy, name, description):
        PulpCliCommand.__init__(self, name, description, self.add)
        self.context = context
        self.strategy = strategy

        self.create_option('--schedule', SCHEDULE_DESCRIPTION, aliases=['-s'], required=True)
        self.create_option('--failure-threshold', FAILURE_THRESHOLD_DESCRIPTION, aliases=['-f'], required=False)
开发者ID:ehelms,项目名称:pulp,代码行数:7,代码来源:schedule.py


示例7: __init__

    def __init__(self, context, name, description):
        PulpCliCommand.__init__(self, name, description, self.history)
        self.context = context
        self.prompt = context.prompt

        d = ('limits displayed history entries to the given type; supported types: '
             '("consumer_registered", "consumer_unregistered", "repo_bound", "repo_unbound",'
             '"content_unit_installed", "content_unit_uninstalled", "unit_profile_changed", '
             '"added_to_group", "removed_from_group")')
        self.add_option(PulpCliOption('--event-type', _(d), required=False))
        self.add_option(PulpCliOption(
            '--limit',
            'limits displayed history entries to the given amount (must be greater than zero)',
            required=False))
        self.add_option(PulpCliOption(
            '--sort',
            'indicates the sort direction ("ascending" or "descending") based on the entry\'s '
            'timestamp',
            required=False))
        self.add_option(PulpCliOption(
            '--start-date',
            'only return entries that occur on or after the given date in iso8601 format '
            '(yyyy-mm-ddThh:mm:ssZ)',
            required=False))
        self.add_option(PulpCliOption(
            '--end-date',
            'only return entries that occur on or before the given date in iso8601 format '
            '(yyyy-mm-ddThh:mm:ssZ)',
            required=False))
开发者ID:BrnoPCmaniak,项目名称:pulp,代码行数:29,代码来源:cli.py


示例8: __init__

    def __init__(self, context, name, description):
        PulpCliCommand.__init__(self, name, description, self.unbind)
        self.context = context
        self.prompt = context.prompt

        self.add_option(PulpCliOption('--repo-id', 'repository id', required=True))
        self.add_option(PulpCliOption('--distributor-id', 'distributor id', required=True))
开发者ID:ehelms,项目名称:pulp,代码行数:7,代码来源:pulp_cli.py


示例9: __init__

    def __init__(self, name, description, method, context, poll_frequency_in_seconds=None):
        """
        :param name: command name
        :type  name: str
        :param description: command description
        :type  description: str
        :param method: method that will be fun when the command is invoked
        :type  method: function
        :param context: client context
        :type  context: pulp.client.extensions.core.ClientContext
        :param poll_frequency_in_seconds: time between polling calls to the server
        :type  poll_frequency_in_seconds: float
        """
        PulpCliCommand.__init__(self, name, description, method)
        self.context = context
        self.prompt = context.prompt

        self.poll_frequency_in_seconds = poll_frequency_in_seconds
        if poll_frequency_in_seconds is None:
            self.poll_frequency_in_seconds = float(self.context.config['output']['poll_frequency_in_seconds'])

        self.add_flag(FLAG_BACKGROUND)

        #list of tasks we already know about
        self.known_tasks = set()
开发者ID:CUXIDUMDUM,项目名称:pulp,代码行数:25,代码来源:polling.py


示例10: __init__

    def __init__(self, context):
        d = _('login and download a session certificate')
        PulpCliCommand.__init__(self, 'login', d, self.login)

        self.context = context

        self.create_option('--username', _('server account username'), aliases=['-u'], required=True)
        self.create_option('--password', _('server account password'), aliases=['-p'], required=False)
开发者ID:cliffy94,项目名称:pulp,代码行数:8,代码来源:pulp_cli.py


示例11: __init__

    def __init__(self, context, name, description):
        PulpCliCommand.__init__(self, name, description, self.unregister)
        self.context = context
        self.prompt = context.prompt

        d = 'if specified, the local consumer identification certificate will be '\
            'removed even if the server cannot be contacted'
        self.create_flag('--force', _(d))
开发者ID:juwu,项目名称:pulp,代码行数:8,代码来源:pulp_cli.py


示例12: __init__

    def __init__(self, context, name, description):
        PulpCliCommand.__init__(self, name, description, self.run)
        self.context = context

        # Add options and groups
        add_required_group(self)
        add_erratum_group(self)
        add_display_group(self, FIELDS_ERRATA)
        add_pagination_group(self)
开发者ID:stpierre,项目名称:pulp,代码行数:9,代码来源:pulp_cli.py


示例13: __init__

    def __init__(self, context, name, description):
        PulpCliCommand.__init__(self, name, description, self.cancel)
        self.context = context

        d = 'removes the client-side tracking file for the upload regardless of ' \
        'whether or not it was able to be deleted on the server; this should ' \
        'only be used in the event that the server\'s knowledge of an upload ' \
        'has been removed'
        self.create_flag('--force', _(d))
开发者ID:jlsherrill,项目名称:pulp,代码行数:9,代码来源:pulp_cli.py


示例14: __init__

    def __init__(self, context):
        PulpCliSection.__init__(self, 'sync', _('run, schedule, or view the status of sync operations'))
        self.context = context
        self.prompt = context.prompt

        # Run an Immediate Sync
        run_command = PulpCliCommand('run', _('triggers an immediate sync of a specific repository'), self.run)
        run_command.add_option(PulpCliOption('--id', _('identifies the repository to sync'), required=True))
        self.add_command(run_command)
开发者ID:stpierre,项目名称:pulp,代码行数:9,代码来源:pulp_cli.py


示例15: __init__

    def __init__(self, context):
        """
        :param context: The client context.
        :type context: pulp.client.extensions.core.ClientContext
        """
        PulpCliCommand.__init__(self, self.NAME, self.DESCRIPTION, self.status)

        self.context = context
        self.api = context.server.server_status
开发者ID:BrnoPCmaniak,项目名称:pulp,代码行数:9,代码来源:admin_status.py


示例16: __init__

    def __init__(self, context, name, description):
        PulpCliCommand.__init__(self, name, description, self.unbind)
        self.context = context
        self.prompt = context.prompt

        self.add_option(PulpCliOption("--repo-id", "repository id", required=True))
        self.add_option(PulpCliOption("--distributor-id", "distributor id", required=True))
        self.add_option(
            PulpCliFlag("--force", _("delete the binding immediately and discontinue tracking consumer actions"))
        )
开发者ID:pieska,项目名称:pulp,代码行数:10,代码来源:pulp_cli.py


示例17: __init__

    def __init__(self, context, upload_manager, name='cancel', description=DESC_CANCEL, method=None):

        if method is None:
            method = self.run

        PulpCliCommand.__init__(self, name, description, method)

        self.context = context
        self.prompt = context.prompt
        self.upload_manager = upload_manager
开发者ID:CUXIDUMDUM,项目名称:pulp,代码行数:10,代码来源:upload.py


示例18: __init__

    def __init__(self, context, upload_manager, name="resume", description=DESC_RESUME, method=None):

        if method is None:
            method = self.run

        PulpCliCommand.__init__(self, name, description, method)

        self.context = context
        self.prompt = context.prompt
        self.upload_manager = upload_manager
开发者ID:mccun934,项目名称:pulp,代码行数:10,代码来源:upload.py


示例19: __init__

    def __init__(self, context, name, description):
        PulpCliCommand.__init__(self, name, description, self.publish)
        self.context = context

        # In the RPM client, there is currently only one distributor for a
        # repository, so we don't need to ask them for the distributor ID (yet).
        self.create_option('--repo-id', _('identifies the repository to publish'), required=True)

        d = 'if specified, the CLI process will end but the publish will continue on '\
            'the server; the progress can be later displayed using the status command'
        self.create_flag('--bg', _(d))
开发者ID:ehelms,项目名称:pulp,代码行数:11,代码来源:publish.py


示例20: __init__

    def __init__(self, options_bundle=None, include_sync=True, include_ssl=True, include_proxy=True,
                 include_throttling=True, include_unit_policy=True):
        PulpCliCommand.__init__(self, 'mixin', '', self.run)
        importer_config.ImporterConfigMixin.__init__(self,
                                                     options_bundle=options_bundle,
                                                     include_sync=include_sync,
                                                     include_ssl=include_ssl,
                                                     include_proxy=include_proxy,
                                                     include_throttling=include_throttling,
                                                     include_unit_policy=include_unit_policy)

        self.last_parsed_config = None
开发者ID:AndreaGiardini,项目名称:pulp,代码行数:12,代码来源:test_commands_importer_config.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python extensions.PulpCliOptionGroup类代码示例发布时间:2022-05-25
下一篇:
Python consumer_utils.load_consumer_id函数代码示例发布时间: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