v3 security groups's attribute without prefix in create's response

Bug #1223309 reported by Alex Xu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Simon Chang

Bug Description

Both for xml and json:

{
    "server": {
        "admin_pass": "%(password)s",
        "id": "%(id)s",
        "links": [
            {
                "href": "http://openstack.example.com/v3/servers/%(uuid)s",
                "rel": "self"
            },
            {
                "href": "http://openstack.example.com/servers/%(uuid)s",
                "rel": "bookmark"
            }
        ],
        "security_groups": [{"name": "test"}]
    }
}

<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_pass="%(password)s">
  <metadata/>
  <atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
  <atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>
  <security_groups>
   <security_group name="test" />
  </security_groups>
</server>

'security_groups' should be 'os-security-groups:security_groups'

Tags: api
Alex Xu (xuhj)
tags: added: api
Tiago Mello (timello)
Changed in nova:
assignee: nobody → Tiago Rodrigues de Mello (timello)
Changed in nova:
status: New → Confirmed
milestone: none → icehouse-1
importance: Undecided → Medium
Revision history for this message
Christopher Yeoh (cyeoh-0) wrote :

Hi Tiago, are you still working on this? Please set it to unassigned if you're not

Tiago Mello (timello)
Changed in nova:
assignee: Tiago Rodrigues de Mello (timello) → nobody
Rohan (kanaderohan)
Changed in nova:
assignee: nobody → Rohan (kanaderohan)
Revision history for this message
Rohan (kanaderohan) wrote :

I have finished adding prefix to JSON responses, I am facing namespace issues in the XML.

When actually testing the XML part, i can see the "os-security-groups:security_groups" prefix

But while running the integrated unit tests, the tests fail. I have updated both doc/v3/api-samples/ and nova/tests/integrated/v3/api-samples to reflect the prefix addition

I have also added a "nsmap={ALIAS: SecurityGroups.namespace}" while making the SlaveTemplate in nova/api/openstack/compute/plugins/v3/security_groups.py .

cannot figure a way out. Need help.

Unit tests log : http://paste.openstack.org/show/53649/

Rohan (kanaderohan)
Changed in nova:
assignee: Rohan (kanaderohan) → nobody
Changed in nova:
milestone: icehouse-1 → none
milestone: none → icehouse-2
Simon Chang (changsimon)
Changed in nova:
assignee: nobody → Simon Chang (changsimon)
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-2 → icehouse-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-3 → icehouse-rc1
Tracy Jones (tjones-i)
Changed in nova:
milestone: icehouse-rc1 → next
tags: added: icehouse-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/77369
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c19ea390ecbe045728444d49f40920329a1d0743
Submitter: Jenkins
Branch: master

commit c19ea390ecbe045728444d49f40920329a1d0743
Author: Simon Chang <email address hidden>
Date: Sat Mar 1 17:14:38 2014 -0500

    Added os-security-groups prefix

    Added os-security-groups prefix to the security_groups attribute in json response.

    Change-Id: Id2a4a92da0c9751abc5c37f06fc2484ba80a8a09
    Closes-Bug: #1223309

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
tags: added: icehouse-backport-potential
removed: icehouse-rc-potential
Yaguang Tang (heut2008)
tags: removed: icehouse-backport-potential
Thierry Carrez (ttx)
Changed in nova:
milestone: next → none
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.