コード例 #1
0
ファイル: unit.py プロジェクト: BrnoPCmaniak/pulp
    def __init__(self, context, name='remove', description=DESC_REMOVE, method=None,
                 type_id=None, **kwargs):
        """
        :param context: client context
        :type  context: pulp.client.extensions.core.ClientContext
        :param name: The name of the command
        :type name: str
        :param description: the textual discription that will be displayed in the shell
        :type description: str
        :param method: method that will be fun when the command is invoked
        :type  method: function
        :param type_id: The type of units that this remove command supports
        :type type_id: str
        """

        # Handle odd constructor in UnitAssociationCriteriaCommand
        kwargs['name'] = name
        kwargs['description'] = description

        # We're not searching, we're using it to specify units
        kwargs['include_search'] = False

        method = method or self.run

        PollingCommand.__init__(self, name, description, method, context)
        UnitAssociationCriteriaCommand.__init__(self, method, **kwargs)

        self.type_id = type_id
        self.max_units_displayed = DISPLAY_UNITS_DEFAULT_MAXIMUM
コード例 #2
0
ファイル: unit.py プロジェクト: tomlanyon/pulp
    def __init__(self,
                 context,
                 name='copy',
                 description=DESC_COPY,
                 method=None,
                 type_id=None,
                 **kwargs):

        # Handle odd constructor in UnitAssociationCriteriaCommand
        kwargs['name'] = name
        kwargs['description'] = description

        # We're not searching, we're using it to specify units
        kwargs['include_search'] = False

        method = method or self.run

        PollingCommand.__init__(self, name, description, method, context)
        UnitAssociationCriteriaCommand.__init__(self, method, **kwargs)

        self.type_id = type_id
        self.context = context
        self.prompt = context.prompt

        self.add_option(OPTION_FROM_REPO)
        self.add_option(OPTION_TO_REPO)
コード例 #3
0
    def __init__(self,
                 context,
                 name='remove',
                 description=DESC_REMOVE,
                 method=None,
                 type_id=None,
                 **kwargs):
        """
        :param context: client context
        :type  context: pulp.client.extensions.core.ClientContext
        :param name: The name of the command
        :type name: str
        :param description: the textual discription that will be displayed in the shell
        :type description: str
        :param method: method that will be fun when the command is invoked
        :type  method: function
        :param type_id: The type of units that this remove command supports
        :type type_id: str
        """

        # Handle odd constructor in UnitAssociationCriteriaCommand
        kwargs['name'] = name
        kwargs['description'] = description

        # We're not searching, we're using it to specify units
        kwargs['include_search'] = False

        method = method or self.run

        PollingCommand.__init__(self, name, description, method, context)
        UnitAssociationCriteriaCommand.__init__(self, method, **kwargs)

        self.type_id = type_id
        self.max_units_displayed = DISPLAY_UNITS_DEFAULT_MAXIMUM
コード例 #4
0
    def __init__(self, context, name=None, description=None):
        name = name or 'bind'
        description = description or _('binds a consumer to a repository')
        PollingCommand.__init__(self, name, description, self.run, context)

        self.add_option(OPTION_REPO_ID)
        self.add_consumer_option()
        self.add_distributor_option()
コード例 #5
0
ファイル: bind.py プロジェクト: ashcrow/pulp
    def __init__(self, context, name=None, description=None):
        name = name or 'bind'
        description = description or _('binds a consumer to a repository')
        PollingCommand.__init__(self, name, description, self.run, context)

        self.add_option(OPTION_REPO_ID)
        self.add_consumer_option()
        self.add_distributor_option()
コード例 #6
0
 def __init__(self, context):
     PollingCommand.__init__(self, 'uninstall', _('uninstall packages'),
                             self.run, context)
     self.create_option('--name',
                        _('package name; may repeat for multiple packages'),
                        required=True,
                        allow_multiple=True,
                        aliases=['-n'])
コード例 #7
0
 def __init__(self, context):
     PollingCommand.__init__(self, 'install', _('install packages'),
                             self.run, context)
     self.create_option('--name',
                        _('package name; may repeat for multiple packages'),
                        required=True,
                        allow_multiple=True,
                        aliases=['-n'])
     self.create_flag('--import-keys', _('import GPG keys as needed'))
コード例 #8
0
ファイル: bind.py プロジェクト: ashcrow/pulp
    def __init__(self, context, name=None, description=None):
        name = name or 'unbind'
        description = description or _('removes the binding between a consumer and a repository')
        PollingCommand.__init__(self, name, description, self.run, context)

        self.add_option(OPTION_REPO_ID)
        self.add_consumer_option()
        self.add_distributor_option()

        self.add_flag(FLAG_FORCE)
コード例 #9
0
    def __init__(self, context, name=None, description=None):
        name = name or 'unbind'
        description = description or _(
            'removes the binding between a consumer and a repository')
        PollingCommand.__init__(self, name, description, self.run, context)

        self.add_option(OPTION_REPO_ID)
        self.add_consumer_option()
        self.add_distributor_option()

        self.add_flag(FLAG_FORCE)
コード例 #10
0
 def __init__(self, context):
     PollingCommand.__init__(
         self,
         'uninstall',
         _('uninstall packages'),
         self.run,
         context)
     self.create_option(
         '--name',
         _('package name; may repeat for multiple packages'),
         required=True,
         allow_multiple=True,
         aliases=['-n'])
コード例 #11
0
ファイル: unit.py プロジェクト: cliffy94/pulp
    def __init__(self, context, name='remove', description=DESC_REMOVE, method=None, type_id=None, **kwargs):

        # Handle odd constructor in UnitAssociationCriteriaCommand
        kwargs['name'] = name
        kwargs['description'] = description

        # We're not searching, we're using it to specify units
        kwargs['include_search'] = False

        method = method or self.run

        PollingCommand.__init__(self, name, description, method, context)
        UnitAssociationCriteriaCommand.__init__(self, method, **kwargs)

        self.type_id = type_id
コード例 #12
0
 def __init__(self, context):
     PollingCommand.__init__(
         self,
         'install',
         _('install packages'),
         self.run,
         context)
     self.create_option(
         '--name',
         _('package name; may repeat for multiple packages'),
         required=True,
         allow_multiple=True,
         aliases=['-n'])
     self.create_flag(
         '--import-keys',
         _('import GPG keys as needed'))
コード例 #13
0
ファイル: unit.py プロジェクト: bartwo/pulp
    def __init__(self, context, name="copy", description=DESC_COPY, method=None, type_id=None, **kwargs):

        # Handle odd constructor in UnitAssociationCriteriaCommand
        kwargs["name"] = name
        kwargs["description"] = description

        # We're not searching, we're using it to specify units
        kwargs["include_search"] = False

        method = method or self.run

        PollingCommand.__init__(self, name, description, method, context)
        UnitAssociationCriteriaCommand.__init__(self, method, **kwargs)

        self.type_id = type_id
        self.context = context
        self.prompt = context.prompt

        self.add_option(OPTION_FROM_REPO)
        self.add_option(OPTION_TO_REPO)
コード例 #14
0
ファイル: unit.py プロジェクト: tomlanyon/pulp
    def __init__(self,
                 context,
                 name='remove',
                 description=DESC_REMOVE,
                 method=None,
                 type_id=None,
                 **kwargs):

        # Handle odd constructor in UnitAssociationCriteriaCommand
        kwargs['name'] = name
        kwargs['description'] = description

        # We're not searching, we're using it to specify units
        kwargs['include_search'] = False

        method = method or self.run

        PollingCommand.__init__(self, name, description, method, context)
        UnitAssociationCriteriaCommand.__init__(self, method, **kwargs)

        self.type_id = type_id