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

Mihai Ibanescu mihai.ibanescu at gmail.com
Wed May 25 15:49:59 UTC 2016


Did you run pulp-manage-db?

sudo -u apache pulp-manage-db

On Fri, May 20, 2016 at 11:03 AM, Jay Medrano <jay.medrano at neulion.com>
wrote:

> Hello folks,
>
>
>
> I’m trying to add support for a new type
> <http://pulp.readthedocs.io/en/2.7-release/dev-guide/newtypesupport/plugin/common.html#plugin-directory>,
> 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
> like.
>
>
>
> *my_importer/*
>
> *|-- 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.
>
>
>
> Thanks,
>
>
>
> Jay
>
> _______________________________________________
> Pulp-list mailing list
> Pulp-list at redhat.com
> https://www.redhat.com/mailman/listinfo/pulp-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20160525/971a8a09/attachment.htm>


More information about the Pulp-list mailing list