Project

Profile

Help

Task #2181

closed

Create basic implementation of base classes of the plugin interface

Added by bmbouter over 7 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
master
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Sprint:
Sprint 8
Quarter:

Description

This task is to create a PR with a basic object definition of the following 4 object types:

Importer
Distributor
Profiler
Cataloger

This PR should wholesale replace all previous pulp.platform Python modules so that these implementations are the only ones left after it is merged. As such the following Python packages should be deleted all together:
pulp.plugins.conduits
pulp.plugins.migration
pulp.plugins.types
all pulp.plugins.*.py files

These should be left unmodified for now:
pulp.plugins.file
pulp.plugins.loader
pulp.plugins.rsync
pulp.plugins.util

[0]: https://github.com/pulp/pulp/tree/6868481c1a0eeab06d1f18330e7fd7dc533d8007/server/pulp/plugins

Actions #1

Updated by amacdona@redhat.com over 7 years ago

I would like to consider adding a new aspect to the plugin API: giving them a space to expose REST endpoints. This would give the plugin writer more freedom to implement the APIs they attempt to mimic. An example of a long term improvement would be that we could merge Crane into the regular pulp_docker plugin.

This should be pretty trivial to do using Django's `include` feature.

Actions #2

Updated by semyers over 7 years ago

wrote:

I would like to consider adding a new aspect to the plugin API: giving them a space to expose REST endpoints. This would give the plugin writer more freedom to implement the APIs they attempt to mimic. An example of a long term improvement would be that we could merge Crane into the regular pulp_docker plugin.

This should be pretty trivial to do using Django's `include` feature.

I generally like this idea, but with one minor change, which is that the views provided directly by plugins might well be REST endpoints, but could potentially be any django view, and should maybe not be exposed under the '/api/v3/' endpoint.

Actions #3

Updated by bmbouter over 7 years ago

wrote:

I would like to consider adding a new aspect to the plugin API: giving them a space to expose REST endpoints. This would give the plugin writer more freedom to implement the APIs they attempt to mimic. An example of a long term improvement would be that we could merge Crane into the regular pulp_docker plugin.

+1 to doing something which could bring Crane into the pulp_docker plugin.

Can the planning for inclusion of REST API endpoints in the plugin API become its own Redmine task. I'm planning to reserve this one for the creation of the pulp.plugin base classes. I'm doing a rewrite to the task contents to have it read as such and I don't want this idea to get lost.

wrote:

This should be pretty trivial to do using Django's `include` feature.

Agreed

Actions #4

Updated by bmbouter over 7 years ago

  • Subject changed from Plan a redesign the base classes of the plugin interface to Create basic implementation of base classes of the plugin interface
  • Description updated (diff)
Actions #5

Updated by bmbouter over 7 years ago

Here is what I was thinking for the design. The base objects in pulp.plugins should consider these approaches:

Validation interface

Instantiation

  • The platform will instantiate the concrete object, e.g. YumImporter which would be a subclass of Importer
  • An instantiated object, e.g. YumImporter will have all data from the rest call generically bound to it
  • The platform will call the validation interface on the concrete object before calling into it

Call Pattern

  • Few or no arguments will be passed along with the call into the concrete object which hands control over to the plugin code
  • All data will be bound ahead of time as part of instantiation
Actions #6

Updated by jcline@redhat.com over 7 years ago

  • Groomed changed from No to Yes
Actions #7

Updated by jortel@redhat.com over 7 years ago

  • Sprint/Milestone set to 26
Actions #8

Updated by bmbouter over 7 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to bmbouter
Actions #9

Updated by bmbouter over 7 years ago

  • Status changed from ASSIGNED to POST

Added by bmbouter over 7 years ago

Revision 06ed427a | View on GitHub

Creates basic pulp.plugin package

This PR adds the following base objects as part of the plugin API.

  • Cataloger
  • Importer
  • Profiler
  • Publisher

It also imports the following objects from pulp.platform.models for usage by plugins:

  • ProgressBar
  • ProgressSpinner
  • Repository
  • RepositoryContent

It removes several modules from the old pulp.plugins package.

closes #2181 https://pulp.plan.io/issues/2181

Added by bmbouter over 7 years ago

Revision 06ed427a | View on GitHub

Creates basic pulp.plugin package

This PR adds the following base objects as part of the plugin API.

  • Cataloger
  • Importer
  • Profiler
  • Publisher

It also imports the following objects from pulp.platform.models for usage by plugins:

  • ProgressBar
  • ProgressSpinner
  • Repository
  • RepositoryContent

It removes several modules from the old pulp.plugins package.

closes #2181 https://pulp.plan.io/issues/2181

Actions #10

Updated by bmbouter over 7 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #11

Updated by semyers over 7 years ago

  • Platform Release set to master
Actions #12

Updated by bmbouter about 6 years ago

  • Sprint set to Sprint 8
Actions #13

Updated by bmbouter about 6 years ago

  • Sprint/Milestone deleted (26)
Actions #14

Updated by daviddavis about 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #15

Updated by bmbouter about 5 years ago

  • Tags deleted (Pulp 3)
Actions #16

Updated by bmbouter over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF