deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ronelle Landy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DTACLOUD-418) Missing href-attribute in JSON output
Date Thu, 17 Jan 2013 14:36:23 GMT

    [ https://issues.apache.org/jira/browse/DTACLOUD-418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13556214#comment-13556214
] 

Ronelle Landy commented on DTACLOUD-418:
----------------------------------------

Applying patch set 258 above, and doing a GET on /api/instance/inst_id, the XML and JSON match
- short of one element - 'create_image' - it's missing on the XML. JSON and XML responses
are copied below:

{"instance":
{"private_addresses":[{"type":"hostname","address":"img1.inst1.private.com"}],
"href":"http://cloud-qe-7.idm.lab.bos.redhat.com:3001/api/instances/inst1",
"authentication_type":"key",
"storage_volumes":[],
"realm":{"href":"http://cloud-qe-7.idm.lab.bos.redhat.com:3001/api/realms/us","rel":"realm","id":"us"},
"image":{"href":"http://cloud-qe-7.idm.lab.bos.redhat.com:3001/api/images/img3","rel":"image","id":"img3"},
"state":"RUNNING",
"hardware_profile":{"href":"http://cloud-qe-7.idm.lab.bos.redhat.com:3001/api/hardware_profiles/m1-small","rel":"hardware_profile","properties":{},"id":"m1-small"},
"actions":[{"href":"http://cloud-qe-7.idm.lab.bos.redhat.com:3001/api/instances/inst1/reboot","method":"post","rel":"reboot"},
{"href":"http://cloud-qe-7.idm.lab.bos.redhat.com:3001/api/instances/inst1/stop","method":"post","rel":"stop"},
{"href":"http://cloud-qe-7.idm.lab.bos.redhat.com:3001/api/instances/inst1/run;id=inst1","method":"post","rel":"run"},
{"href":"http://cloud-qe-7.idm.lab.bos.redhat.com:3001/api/images;instance_id=inst1","method":"post","rel":"create_image"}],
"owner":"mockuser",
"name":"MockUserInstance",
"public_addresses":[{"type":"hostname","address":"img1.inst1.public.com"}],
"id":"inst1",
"create_image":true}
}
 
 
<instance href='http://cloud-qe-7.idm.lab.bos.redhat.com:3001/api/instances/inst1' id='inst1'>
  <name>MockUserInstance</name>
  <owner_id>mockuser</owner_id>
  <image href='http://cloud-qe-7.idm.lab.bos.redhat.com:3001/api/images/img3' id='img3'></image>
  <realm href='http://cloud-qe-7.idm.lab.bos.redhat.com:3001/api/realms/us' id='us'></realm>
  <state>RUNNING</state>
  <hardware_profile href='http://cloud-qe-7.idm.lab.bos.redhat.com:3001/api/hardware_profiles/m1-small'
id='m1-small'>
  </hardware_profile>
  <actions>
    <link href='http://cloud-qe-7.idm.lab.bos.redhat.com:3001/api/instances/inst1/reboot'
method='post' rel='reboot' />
    <link href='http://cloud-qe-7.idm.lab.bos.redhat.com:3001/api/instances/inst1/stop'
method='post' rel='stop' />
    <link href='http://cloud-qe-7.idm.lab.bos.redhat.com:3001/api/instances/inst1/run;id=inst1'
method='post' rel='run' />
    <link href='http://cloud-qe-7.idm.lab.bos.redhat.com:3001/api/images;instance_id=inst1'
method='post' rel='create_image' />
  </actions>
  <public_addresses><address type='hostname'>img1.inst1.public.com</address></public_addresses>
  <private_addresses><address type='hostname'>img1.inst1.private.com</address></private_addresses>
  <storage_volumes></storage_volumes>
  <authentication type='key'>
  </authentication>
</instance> 

I'm inclined to ACK the patch set because it addresses what's missing from JSON and work whether
the XML should include 'create_image' in another issue.
                
> Missing href-attribute in JSON output
> -------------------------------------
>
>                 Key: DTACLOUD-418
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-418
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server
>         Environment: Debian 6.0.6, ruby 1.9.2p0, deltacloud development
>            Reporter: Christian Karnath
>            Assignee: Michal Fojtik
>
> The 'href' attribute was present in Deltacloud 1.0.2 but it is missing in the current
development version when specifying JSON as an output format:
> Requesting /api/instances against deltacloud 1.0.2 returned:
> {
>     "instances": {
>         "instance": {
>             "name": null,
>             "owner_id": "mockuser",
>             "image": { … },
>             "realm": { … },
>             "state": "RUNNING",
>             "hardware_profile": { … },
>             "actions": { … },
>             "public_addresses": { … },
>             "private_addresses": { … },
>             "storage_volumes": null,
>             "authentication": { … },
>             "href": "https://192.168.23.101:3001/api/instances/inst0",
>             "id": "inst0"
>         }
>     }
> }
> Requesting /api/instances against deltacloud development version returns:
> {
>     "instances": [
>         {
>             "id": "inst1",
>             "name": "MockUserInstance",
>             "state": "RUNNING",
>             "owner": "mockuser",
>             "image": { … },
>             "realm": { … },
>             "actions": [ … ],
>             "instance_profile": { … },
>             "public_addresses": [ … ],
>             "private_addresses": [ … ],
>             "launch_time": null,
>             "create_image": true,
>             "storage_volumes": [ ]
>         }
>     ]
> }
> It seems that /api/images, /api/realms and so on are also inconsistent with the corresponding
xml representation (which includes the 'href'-attribute).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message