No validation for trigger update

Bug #1747559 reported by Eric Xie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Karbor
Fix Released
Undecided
liushuai

Bug Description

In trigger creation, there are validations for input parameters.
But in trigger update with the same trigger info, there are none.

Trigger info:
{"trigger_info": {
    "name": "Trigger update",
    "type": "time",
    "properties": {
      "format": "calendar",
      "pattern": "BEGIN:VEVENT\\nRRULE:FREQ=HOURLY;INTERVAL=1;\\nEND:VEVENT",
      "start_time": "2018-02-07 08:50:00",
      "end_time": "2018-02-10 08:30:00",
      "window": 1900
    }
  }
}

POST http://172.23.59.102/data-protect/v1/9d0bfb331dcd4d67a9cef16a290b760e/triggers
It returns:
{
    "badRequest": {
        "message": "The trigger windows 1900 must be between 900 and 1800",
        "code": 400
    }
}

PUT http://172.23.59.102/data-protect/v1/9d0bfb331dcd4d67a9cef16a290b760e/triggers/172fab09-2f8d-425f-aec1-73cf7df40b35
It returns:
{
    "trigger_info": {
        "properties": {
            "pattern": "BEGIN:VEVENT\\nRRULE:FREQ=HOURLY;INTERVAL=1;\\nEND:VEVENT",
            "start_time": "2018-02-07 08:50:00",
            "end_time": "2018-02-10 08:30:00",
            "window": "1900",
            "format": "calendar"
        },
        "type": "time",
        "id": "172fab09-2f8d-425f-aec1-73cf7df40b35",
        "name": "Trigger update"
    }
}

Eric Xie (eric-xie)
Changed in karbor:
assignee: nobody → Eric Xie (eric-xie)
liushuai (liushuai503)
Changed in karbor:
assignee: Eric Xie (eric-xie) → liushuai (liushuai503)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to karbor (master)

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

Changed in karbor:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on karbor (master)

Change abandoned by liushuai (<email address hidden>) on branch: master
Review: https://review.openstack.org/620884

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to karbor (master)

Reviewed: https://review.openstack.org/647306
Committed: https://git.openstack.org/cgit/openstack/karbor/commit/?id=29fc94118417b5411f7f5a07597d516b2ccab244
Submitter: Zuul
Branch: master

commit 29fc94118417b5411f7f5a07597d516b2ccab244
Author: liushuai <email address hidden>
Date: Mon Mar 25 15:29:53 2019 +0800

    add validation for trigger update

    Change-Id: I4a191759013136c4a8577a446df495990d9dc8e4
    Closes-Bug: #1747559

Changed in karbor:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/karbor 1.4.0

This issue was fixed in the openstack/karbor 1.4.0 release.

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.