Ask Your Question
0

Robustly determine updated_time or time format

asked 2017-03-16 10:10:27 -0500

Tori gravatar image

updated 2017-03-16 10:10:56 -0500

Hi,

When kicking off a series of tasks, e,g upgrade of VMs, via a Java client that calls the HEAT HTTP API, i timestamp the start of the operation

upgradeTime = String.valueOf(Calendar.getInstance().getTimeInMillis());
execution.setVariable("upgradeTime", upgradeTime);

I kick off many parallel stack mark_unhealthy/update commands. I know that the command has been accepted by openstack (200x response). However I cannot guarantee that the operation has been kicked off yet.As below I can see that the stack_status is UPDATE_COMPLETE but this is the result of a previous operation and fools my code into thinking the update is complete. I can retrieve the updated_time value from the response but i cannot robustly predict what "format" this will be in to convert this to a java friendly date object to compare

    "links": [{"href": "h
ttp://131.160.197.5:8004/v1/7aa5994885fb4a91a0b7976f019b59bc/stacks/mstt_fd2d6a87-f20e-497e-b109-097b28357508/b678b3a8-16f7-480d-8d01-1f657442b158", "rel": "self"}], "capabilities": [], "notification_topics": [], "updated_time": "2017-03-1
6T13:14:28", :

Any helpful ideas much appreciated.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-03-16 11:01:27 -0500

Tori gravatar image

updated 2017-03-16 11:02:13 -0500

I can see that time and date format is specified in API here: https://developer.openstack.org/api-ref/orchestration/v1/index.html?expanded=show-stack-details-detail (https://developer.openstack.org/api-r...)

Thanks...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-03-16 10:10:27 -0500

Seen: 34 times

Last updated: Mar 16 '17