update attributes.editable partially

Bug #1283135 reported by Dima Shulyak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
Low
Dima Shulyak

Bug Description

Now ClusterAttributesHandler updates whole section of the Attributes.

If we have full set of attributes from release and receive PUT with:
{"editable": {"storage": {"osd_pool_size": {"value": 3}, "volumes_ceph": {"value": true}}}}

attributes.editable will contain only received data and no default one.

Though we rely on ui logic to send all data all the time and cant rely on some of this parameters in our tests.

Proper fix for this: use postgresql.JSON field type which supports nested dict updates, but only added in sqlalchemy 0.9

So "good enough" will be get all info, update necessery parts and recommit it.

Tags: fuel-web
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

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

Changed in fuel:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/77530
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=7769a9fbbd325f41ddd24f201c3f8debbae77a1c
Submitter: Jenkins
Branch: master

commit 7769a9fbbd325f41ddd24f201c3f8debbae77a1c
Author: Dima Shulyak <email address hidden>
Date: Mon Mar 3 11:13:59 2014 +0200

    Update editable attributes partially

    If we receive from PUT smth like:
    {"editable": {"storage": {"osd_pool_size": {"value": 3},
    "volumes_ceph": {"value": true}}}}

    attributes.editable will contain only received data and no default one

    Changing paste.TestApp for webtest.TestApp cause TestApp does not have
    PATCH method available

    Change-Id: I259ee806c9464cb82b391e9c3b633e5e7f5f11d3
    Closes-Bug: #1283135

Changed in fuel:
status: In Progress → Fix Committed
tags: added: in progress
Revision history for this message
Anastasia Palkina (apalkina) wrote :

Verifies on ISO #34
"build_id": "2014-03-19_01-01-16",
"mirantis": "yes",
"build_number": "34",
"nailgun_sha": "ffd36bc479a6d5e1ce285982259ddefa9dce2602",
"ostf_sha": "31c8316d4d9762f280da9e360d3d42e88464aac1",
"fuelmain_sha": "d494e5cf2b8399899f00b5079eec1c5f70c0b66f",
"astute_sha": "f52db1262401cfb2beaf41e7d6eeaeb456d5fe95",
"release": "5.0",
"fuellib_sha": "da114aa7b484ea62a34843c54353a012743b9d96"

curl -X PATCH http://10.20.0.2:8000/api/clusters/2/attributes -d '{"editable": {"storage": {"osd_pool_size": {"value": 3}, "volumes_ceph": {"value": true}}}}'

"volumes_ceph": {"value": false} -> "volumes_ceph": {"value": true}
"osd_pool_size": {"value": 2} -> "osd_pool_size": {"value": 3}

tags: removed: in progress
Changed in fuel:
status: Fix Committed → Fix Released
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.