deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marios Andreou (Commented) (JIRA)" <>
Subject [jira] [Commented] (DTACLOUD-181) json output from creating an image (from a stopped instance) in RHEV-M does not return readable hardware profiles
Date Wed, 28 Mar 2012 09:27:39 GMT


Marios Andreou commented on DTACLOUD-181:

Issue is verified and reproducible. The issue is specific to the listing of hardware_profiles
within an Image, but is not confined to the rhevm driver (I could also reproduce with ec2
driver for example). An easier reproducer is to simply GET a specific Image with json format:

curl --user "user:pass" http://localhost:3001/api/images/88ead4c9-3488-4f2b-87fb-1cc1d70b65ca?format=json

With the attached patch applied output looks like:

       ok\n    ","description":"","hardware_profiles":[{"SERVER":{"href":"http://localhost:3001/api/hardware_profiles/SERVER"}},{"DESKTOP":{"href":"http://localhost:3001/api/hardware_profiles/DESKTOP"}}],"name":"test1","id":"88ead4c9-3488-4f2b-87fb-1cc1d70b65ca","owner_id":"admin@internal"}}

i.e. "hardware_profiles": [  {"hwp1_name": {"href":"uri_for_hwp1"}}, {"hwp2_name": {"href":"uri_for_hwp2"}}
consistent with the xml output, we provide name and ref to each hwp compatible with the given

Waiting for review before pushing patch to master.
> json output from creating an image (from a stopped instance) in RHEV-M does not return
readable hardware profiles
> -----------------------------------------------------------------------------------------------------------------
>                 Key: DTACLOUD-181
>                 URL:
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server
>         Environment: deltacloud commit version: 59659586a6783bd4c851056813ed8369d08d4589
- clone: from 
> Fedora 16
> rhevm 3.X
>            Reporter: Ronelle Landy
>            Assignee: Marios Andreou
>            Priority: Minor
>         Attachments: 0001-Fixes-DTACLOUD_181-json-output-of-HardareProfile-wit.patch
> Found when verifying DTACLOUD-170:
> The json output from creating an image from a STOPPED instance in rhevm returns the hardware
profiles as:
> #<Deltacloud::HardwareProfile:0x7fa438754db8>
> The XML output from the same operation returns the hardware profiles as:
> <hardware_profile href=';
id='SERVER' rel='hardware_profile'></hardware_profile>
> The complete output in both json and xml are copied below. Logging this as a sepate issue
to DTACLOUD-170 as it is far more minor.
> >> Output in json
>  curl -X POST -F "name=rlandyImage" -F "description=Image description" -F "instance_id=59f35d07-093c-46a5-814b-d0c6084ef8c9"
--user "uname:password" ""
> {"image":{"owner_id":"xxx","href":"","actions":[{"create_instance":{"method":"post","href":"/api/instances;image_id=c4ddf46e-3abb-4bce-962e-2b55d4a01594"}}],"architecture":"x86_64","state":"\n
locked\n ","name":"rlandyImage","id":"c4ddf46e-3abb-4bce-962e-2b55d4a01594","description":"Image
> [rlandy@localhost /]$
> >> Output in xml
> [rlandy@localhost /]$ curl -X POST -F "name=rlandyImageXml" -F "description=Image description"
-F "instance_id=59f35d07-093c-46a5-814b-d0c6084ef8c9" --user "uname:password" ""
> <?xml version='1.0' encoding='utf-8' ?>
> <image href=';
>   <name>rlandyImageXml</name>
>   <owner_id>xxx</owner_id>
>   <description>Image description</description>
>   <architecture>x86_64</architecture>
>   <state>locked</state>
>   <hardware_profiles>
>     <hardware_profile href=';
id='SERVER' rel='hardware_profile'></hardware_profile>
>     <hardware_profile href=';
id='DESKTOP' rel='hardware_profile'></hardware_profile>
>   </hardware_profiles>
>   <actions>
>     <link href=';image_id=9c8777bf-8d65-40e8-8bd4-e6ddf42f7b2f&#39;
method='post' rel='create_instance' />
>   </actions>
> </image>

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message