Project

Profile

Help

Task #2181

Create basic implementation of base classes of the plugin interface

Added by bmbouter about 3 years ago. Updated 6 months ago.

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

100%

Platform Release:
master
Blocks Release:
Backwards Incompatible:
Yes
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 8

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

Associated revisions

Revision 06ed427a View on GitHub
Added by bmbouter about 3 years ago

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

Revision 06ed427a View on GitHub
Added by bmbouter about 3 years ago

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

Revision 06ed427a View on GitHub
Added by bmbouter about 3 years ago

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

History

#1 Updated by amacdona@redhat.com about 3 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.

#2 Updated by semyers about 3 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.

#3 Updated by bmbouter about 3 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

#4 Updated by bmbouter about 3 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)

#5 Updated by bmbouter about 3 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

#6 Updated by jcline@redhat.com about 3 years ago

  • Groomed changed from No to Yes

#7 Updated by jortel@redhat.com about 3 years ago

  • Sprint/Milestone set to 26

#8 Updated by bmbouter about 3 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to bmbouter

#9 Updated by bmbouter about 3 years ago

  • Status changed from ASSIGNED to POST

#10 Updated by bmbouter about 3 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#11 Updated by semyers about 3 years ago

  • Platform Release set to master

#12 Updated by bmbouter over 1 year ago

  • Sprint set to Sprint 8

#13 Updated by bmbouter over 1 year ago

  • Sprint/Milestone deleted (26)

#14 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#15 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF