Java API fails when updating an object with read-only fields

Bug #1786022 reported by Filip Chmielewski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
Trunk
New
High
Filip Chmielewski

Bug Description

Updating an ApplicationPolicySet objects whose 'all_applications' field is not set to null (i.e. is set to true or false) fails with HTTP 400 BAD REQUEST error. This is probably caused by the 'all_applications' field being read-only.

Tags: go-api
information type: Proprietary → Public
Revision history for this message
Filip Chmielewski (iridiumoxide) wrote :

This request, generated by the Java API, causes a HTTP 400 BAD REQUEST:

{"application-policy-set":{"all_applications":false,
"id_perms":{"permissions":{"owner":"contrail-api",
"owner_access":7,
"group":"admin",
"group_access":7,
"other_access":7},
"uuid":{"uuid_mslong":10568520829334802247,
"uuid_lslong":12400281644562375008},
"enable":true,
"description":"",
"user_visible":true},
"perms2":{"owner":"cloud-admin",
"owner_access":7,
"global_access":0,
"share":[]},
"display_name":"new-aps",
"firewall_policy_refs":[{"to":["default-domain",
"vCenter",
"NewPolicy"],
"attr":{"sequence":"0"},
"uuid":"617a27c5-721b-4c6d-ab47-dfe05f5fd619"},
{"to":["default-domain",
"vCenter",
"new-fp"],
"attr":{"sequence":"1"}}],
"name":"new-aps",
"uuid":"92aaedb3-29d1-4f47-ac16-a674caefe160",
"fq_name":["default-domain",
"vCenter",
"new-aps"],
"parent_type":"project",
"parent_uuid":"e2ed1657-f61b-4977-b83b-8998d4a9581f"}}

This request updates the object with HTTP 200 OK:

{"application-policy-set":{
"id_perms":{"permissions":{"owner":"contrail-api",
"owner_access":7,
"group":"admin",
"group_access":7,
"other_access":7},
"uuid":{"uuid_mslong":10568520829334802247,
"uuid_lslong":12400281644562375008},
"enable":true,
"description":"",
"user_visible":true},
"perms2":{"owner":"cloud-admin",
"owner_access":7,
"global_access":0,
"share":[]},
"display_name":"new-aps",
"firewall_policy_refs":[{"to":["default-domain",
"vCenter",
"NewPolicy"],
"attr":{"sequence":"0"},
"uuid":"617a27c5-721b-4c6d-ab47-dfe05f5fd619"},
{"to":["default-domain",
"vCenter",
"new-fp"],
"attr":{"sequence":"1"}}],
"name":"new-aps",
"uuid":"92aaedb3-29d1-4f47-ac16-a674caefe160",
"fq_name":["default-domain",
"vCenter",
"new-aps"],
"parent_type":"project",
"parent_uuid":"e2ed1657-f61b-4977-b83b-8998d4a9581f"}}

The only difference is the 'all_applications' field. It is set to 'false' before the update.

Jeba Paulaiyan (jebap)
tags: added: go-api
summary: - Java API fails when requesting update of ApplicationPolicySet object
+ Java API fails when updating an object with read-only fields
description: updated
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.