[Pulp-list] Implementing Support for New Types - Directory Loading

Jay Medrano jay.medrano at neulion.com
Fri May 20 15:03:19 UTC 2016

Hello folks,

I’m trying to add support for a new type
and I’m using the “directory loading” method and I’m placing files directly
under /usr/lib/pulp/plugins for testing. The problem is I can’t seem to get
Pulp to recognize my new importer. This is what my importer directory looks


*|-- importer.py*

*`-- __init__.py*

I’ve got some really basic code in my importer.py file and I’ve already
added a types definition under /usr/lib/pulp/plugins/types followed by a
‘sudo -u apache pulp-manage-db’ call.

*from pulp.plugins.importer import Importer*

*def entry_point():*

*    return MyContentImporter, {}*

*class MyContentImporter(Importer):*

*    @classmethod*

*    def metadata(cls):*

*        return {*

*            'id' : 'my_importer',*

*            'display_name' : 'My Artifact',*

*            'types' : ['my_artifact'],*

*        }*

*    def validate_config(self, repo, config):*

*      return True, ''*

This is the error I’m getting.

*2016-05-20 10:41:17,476 - ERROR - Exception occurred:*

*        href:      /pulp/api/v2/repositories/*

*        method:    POST*

*        status:    400*

*        error:     The importer type my_importer does not exist*

*        traceback: None*

*        data:      {u'args': [], u'error': {u'code': u'PLP1008', u'data':
{u'importer_type_id': u'my_importer'}, u'description': u'The importer type
my_importer does not exist', u'sub_errors': []}}*

Any help to get my importer to be recognized would be greatly appreciated.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20160520/617ee0b0/attachment.htm>

More information about the Pulp-list mailing list