Skip to content

Conversation

@weidongxu-microsoft
Copy link
Member

@weidongxu-microsoft weidongxu-microsoft commented Jun 12, 2020

Currently, try replace Deployment.beginCreate and ResourceGroups.beginDelete with this approach.

Note that there is case which is much more complicated than this, those with dependency resources need to be created before LRO, and following-up operation after LRO.

Comment on lines 248 to 251
while (pollResponse.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) {
SdkContext.sleep(1000);
pollResponse = acceptedDeployment.getSyncPoller().poll();
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Support polling by user.

*
* @return the final result.
*/
T getFinalResult();
Copy link
Member Author

@weidongxu-microsoft weidongxu-microsoft Jun 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plan is to make this call return the resource, after LRO and after all following-up operations finished.

@weidongxu-microsoft weidongxu-microsoft marked this pull request as ready for review June 15, 2020 16:01
}

@Override
public PollResponse<Void> poll() {
Copy link
Member Author

@weidongxu-microsoft weidongxu-microsoft Jun 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next plan is to give a concrete class for this current Void in PollResponse, to provide more information about the poll, e.g. poll url, response body, etc.

But that would require more changes in core-management, so it would likely be delayed to another PR.

@weidongxu-microsoft weidongxu-microsoft changed the title mgmt, draft begin operation with syncpoll mgmt, support begin operation with syncpoll Jun 16, 2020
@weidongxu-microsoft weidongxu-microsoft merged commit f904782 into Azure:master Jun 23, 2020
@weidongxu-microsoft weidongxu-microsoft deleted the mgmt_draft_begin_op branch June 23, 2020 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants