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
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)
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()
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'])
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'))
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)
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)
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'])
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
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'))
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)