Jessica Wang created CLOUDSTACK-1057:
----------------------------------------

             Summary: regression of changeServiceForVirtualMachine API - fails 
to find service offering by serviceOfferingId parameter
                 Key: CLOUDSTACK-1057
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-1057
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
          Components: API
    Affects Versions: 4.1.0
            Reporter: Jessica Wang
            Priority: Critical
             Fix For: 4.1.0


steps to reproduce the bug:

(1) cloudstack UI > Instances tab > click an instance > Details tab > click 
"Change Service" option, 
a dialog box pops up whose compute offering dropdown lists service offerings 
from this API call 

http://localhost:8080/client/api?command=listServiceOfferings&VirtualMachineId=3b0160d7-3df1-4501-962d-ae11351fcf07&response=json&sessionkey=bp6DFJQWYDFBuj5OpqRr5p575uQ%3D&_=1359065161959
{
    "listserviceofferingsresponse": {
        "count": 1,
        "serviceoffering": [
            {
                "id": "4d9050a3-d862-4a9d-8bae-4aa57ced7908",
                "name": "Medium Instance",
                "displaytext": "Medium Instance",
                "cpunumber": 1,
                "cpuspeed": 1000,
                "memory": 1024,
                "created": "2013-01-23T14:57:15-0800",
                "storagetype": "shared",
                "offerha": false,
                "limitcpuuse": false,
                "issystem": false,
                "defaultuse": false
            }
        ]
    },
    "cloudstack-version": "4.1.0-SNAPSHOT"
}

as in attachment "2013-01-24-A.jpg"


(2) clicking OK button on the dialog:

http://localhost:8080/client/api?command=changeServiceForVirtualMachine&id=3b0160d7-3df1-4501-962d-ae11351fcf07&serviceOfferingId=4d9050a3-d862-4a9d-8bae-4aa57ced7908&response=json&sessionkey=bp6DFJQWYDFBuj5OpqRr5p575uQ%3D&_=1359065000838
{
    "changeserviceforvirtualmachineresponse": {
        "errorcode": 431,
        "cserrorcode": 9999,
        "errortext": "Unable to execute API command 
changeserviceforvirtualmachine due to invalid value. Invalid parameter 
value=4d9050a3-d862-4a9d-8bae-4aa57ced7908 due to incorrect long value, entity 
not found, or an annotation bug."
    },
    "cloudstack-version": "4.1.0-SNAPSHOT"
}


as in attachment "2013-01-24-B.jpg"

The API call shouldn't fail. 
The parameter value("4d9050a3-d862-4a9d-8bae-4aa57ced7908") is valid. The 
parameter value comes from the API call response in (1).


--
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

Reply via email to