Karbor api validation does not allow additional parameters required for retention_protect

Bug #1818582 reported by Mohamed El Gindi on 2019-03-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Karbor
Undecided
Mohamed El Gindi

Bug Description

Some new features have been integrated in karbor, which require additional parameters. More specifically, retention periods and max backups:

https://docs.openstack.org/karbor/rocky/specs/adding-more-protection-parameters-retention-period.html

The functionality is there, but karbor api validation doesn't allow the added parameters.

How to repro:
1. Create plan
2. Create trigger
3. Create a scheduled operation for retention_protect

It gives the following error:

Invalid input for field/attribute operation_definition. Value: {u'max_backups': u'3', u'provider_id': u'ac9b986e-cd0a-49fb-9513-9d93a4d9dac8', u'retention_duration': u'10', u'plan_id': u'0d4bec3a-fd5b-4a55-9199-495043c5a88d'}. Additional properties are not allowed (u'max_backups', u'retention_duration' were unexpected) (HTTP 400) (Request-ID: req-99844489-b51a-4b65-a84e-e1539a33716b)

Mohamed El Gindi (gindi) on 2019-03-05
summary: Karbor api validation does not allow additional parameters required for
- new functionality
+ retention_protect
Revision history for this message
Mohamed El Gindi (gindi) wrote :
Changed in karbor:
assignee: nobody → Mohamed El Gindi (gindi)
Mohamed El Gindi (gindi) on 2019-03-05
Changed in karbor:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to karbor (master)

Reviewed: https://review.openstack.org/640907
Committed: https://git.openstack.org/cgit/openstack/karbor/commit/?id=71a76951754d051f1501095b572a9045192908e2
Submitter: Zuul
Branch: master

commit 71a76951754d051f1501095b572a9045192908e2
Author: Mohamed El Gindi <email address hidden>
Date: Tue Mar 5 16:11:17 2019 -0800

    Fix to allow more parameters for retention_protect

    Scheduled operations might take additional parameters/properties due to
    addition of new feature 'retention_protect'

    This is to allow more parameters like max_backups and retention_duration
    in scheduledoperation command without api validation giving an error

    Closes-Bug #1818582

    Change-Id: Idf520ed0e5b1625448910278da9dbbf711e5f381
    Co-Authored-By: Jiao Pengju <email address hidden>

Changed in karbor:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers