Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The class GlanceTask does not match the resposne data #877

Open
whaon opened this issue Nov 2, 2016 · 8 comments
Open

The class GlanceTask does not match the resposne data #877

whaon opened this issue Nov 2, 2016 · 8 comments
Labels

Comments

@whaon
Copy link
Contributor

whaon commented Nov 2, 2016

the resposne is like below:

 "result": {
        "image_id": "2b61ed2b-f800-4da0-99ff-396b742b8646"
    },

but the class GlanceTask is:

String result;

this will cause a com.fasterxml.jackson.databind.JsonMappingException

@whaon
Copy link
Contributor Author

whaon commented Nov 2, 2016

I consider to use a map to handle this,what do you think?

@auhlig
Copy link
Member

auhlig commented Nov 2, 2016

I couldn't find the result attribute in the docs http://developer.openstack.org/api-ref/image/v2/#tasks . Could you share more info @whaon ?

@whaon
Copy link
Contributor Author

whaon commented Nov 3, 2016

the whole resposne is:

{
    "created_at": "2016-06-29T16:13:07Z",
    "expires_at": "2016-07-01T16:13:07Z",
    "id": "805f47d2-8814-4cd7-bef3-37037389a998",
    "input": {
        "image_properties": {
            "container_format": "ovf",
            "disk_format": "vhd"
        },
        "import_from": "https://apps.openstack.org/excellent-image",
        "import_from_format": "qcow2"
    },
    "message": "",
    "owner": "02a7fb2dd4ef434c8a628c511dcbbeb6",
    "result": {
        "image_id": "2b61ed2b-f800-4da0-99ff-396b742b8646"
    },
    "schema": "/v2/schemas/task",
    "self": "/v2/tasks/805f47d2-8814-4cd7-bef3-37037389a998",
    "status": "success",
    "type": "import",
    "updated_at": "2016-06-29T16:13:07Z"
}

just search the image_id: 2b61ed2b-f800-4da0-99ff-396b742b8646 and you will find it

@vinodborole
Copy link
Contributor

Agreed with @whaon for status as 'processing' and 'failure' the "result": null while for success it is "result": {
"image_id": "2b61ed2b-f800-4da0-99ff-396b742b8646"
}

@whaon is it possible for you send a PR for this, thanks again!

@vinodborole vinodborole added the bug label Nov 3, 2016
@whaon
Copy link
Contributor Author

whaon commented Nov 3, 2016

@vinodborole yes,I have done the work for the issue #877 and #878
but I have another PR #876 for fixing issue #875
I will submit an extra PR after the PR #876 be merged

@auhlig
Copy link
Member

auhlig commented Dec 23, 2016

Hey @whaon,
What is the status of the PRs mentioned above?

@hrchu
Copy link

hrchu commented Feb 20, 2017

I encounter this problem, when will the new version release?

@auhlig
Copy link
Member

auhlig commented Feb 20, 2017

You can use the latest snapshot, @hrchu.
Maybe we cut a new release after the pending PRs are merged, in particular #926.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants