Tech Debt: Separate plan version from API version

Bug #1291114 reported by Angus Salkeld
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Solum
Fix Released
Medium
Pierre Padrixe (stannie)

Bug Description

At the moment the plan schema is defined by wsme objects in api/controllers/datamodel/plan.py

I don't see how we can support plan versions independently to the rest API

This is largely a problem with WSME objects as the are very "fixed" and don't allow you to return different types to the ones you
specify (afaik).

e.g.

    @exception.wrap_controller_exception
    @wsme_pecan.wsexpose(plan.Plan, body=plan.Plan, status_code=201)
    def post(self, data):

the body is of type Plan

Qu: can we have a base Plan that implements __new__ and based on the plan version creates Planv11 or Planv12?

Slightly wilder ideas:

 A) Completely remove the plans/ resources and the python-solumclient posts the plan directly to swift and the assembly
      validates the plan using voluptuous (or similar)

 B) Keep the plans/ resource but make the input wtyet.text and validate the plan entirely ourselves (don't use wsme for plans)

(personally I am for "A")

Revision history for this message
Julien Vey (vey-julien) wrote :

I'm ok for A, it makes more sense. We already have "raw_content" in plan which is a little strange when you're new on the project.

But can you describe what the typical workflow of getting an application up and running will be ? And where the "git hook" part will be plugged and triggered ?

1. POST Plan
2. POST Assembly -> get back trigger URL
3. POST to trigger url
4. ....

Am I right ?

Revision history for this message
Noorul Islam K M (noorul) wrote :

I think we decided to have only on version for m1.

Revision history for this message
Noorul Islam K M (noorul) wrote :

s/on/one

Angus Salkeld (asalkeld)
Changed in solum:
importance: Undecided → Medium
status: New → Triaged
Adrian Otto (aotto)
summary: - don't fix the plan version to the API version
+ Tech Debt: Separate plan version from API version
Changed in solum:
assignee: nobody → Murali Allada (murali-allada)
Revision history for this message
Angus Salkeld (asalkeld) wrote :

This is partly solved by Pierre's commit: https://review.openstack.org/#/c/96804
The next part would be to support a "version" attribute and depending on that
validate the plan accordingly.

Changed in solum:
assignee: Murali Allada (murali-allada) → Pierre Padrixe (stannie) (pierre-padrixe)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to solum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/98167

Changed in solum:
status: Triaged → In Progress
Adrian Otto (aotto)
Changed in solum:
milestone: none → juno-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to solum (master)

Reviewed: https://review.openstack.org/98167
Committed: https://git.openstack.org/cgit/stackforge/solum/commit/?id=2359f9b644b903b27cc1de906b59607e4920bd95
Submitter: Jenkins
Branch: master

commit 2359f9b644b903b27cc1de906b59607e4920bd95
Author: Pierre Padrixe <email address hidden>
Date: Thu Jun 5 18:07:50 2014 +0200

    Add Plan versioning management

    * Version can now be passed in attribute of the Plan YAML File.
    Version attribute is a mandatory field.
    * According to the version specified, the appropriate WSME Plan
    and Plan Handler are created and called.
    * Plan validation is done by the WSME framework.
    * How to add a new Plan version (e.g with version 2) ?
     - Add your Plan_v2 WSME object in datamodels
     - Add your Plan_v2_handler in handlers
     - Add init_plan_v2 method in Plan controller.

    Change-Id: I7fcc6e11391b9f026768a4afafaaa638c43ec303
    Closes-Bug: #1291114

Changed in solum:
status: In Progress → Fix Committed
Adrian Otto (aotto)
Changed in solum:
status: Fix Committed → Fix Released
tags: added: plan-improvements-versionning-and-yaml-support
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.