Merged
Conversation
cataggar
commented
Nov 28, 2021
|
|
||
| let accounts = batch_account::list(config, subscription_id).await?; | ||
| let accounts = client.batch_account().list(subscription_id).into_future().await?; |
| let pools = pool::list_by_batch_account(config, &resource_group_name, &account_name, None, None, None, subscription_id).await?; | ||
| let pools = client | ||
| .pool() | ||
| .list_by_batch_account(resource_group_name, account_name, subscription_id) |
|
|
||
| let vms = virtual_machines::list_all(config, subscription_id, None).await?; | ||
| let vms = client.virtual_machines().list_all(subscription_id).into_future().await?; |
|
|
||
| let accounts = storage_accounts::list(config, subscription_id).await?; | ||
| let accounts = client.storage_accounts().list(subscription_id).into_future().await?; |
|
|
||
| let clouds = private_clouds::list_in_subscription(config, subscription_id).await?; | ||
| let clouds = client.private_clouds().list_in_subscription(subscription_id).into_future().await?; |
cataggar
commented
Nov 28, 2021
| @@ -74,7 +73,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { | |||
| }; | |||
|
|
|||
| println!("creating task"); | |||
| task::add(&config, &job_id, &task, None, None, None, None).await?; | |||
| client.task().add(job_id, task).into_future().await?; | |||
| @@ -50,7 +49,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { | |||
| }; | |||
|
|
|||
| println!("creating job"); | |||
| job::add(&config, &job_params, None, None, None, None).await?; | |||
| client.job().add(job_params).into_future().await?; | |||
2 tasks
This was referenced Nov 28, 2021
Closed
Contributor
|
This made my project that uses an SVC crate significantly less cumbersome. Specifically, I was using svc/batch. My code went from this: let result = task::get(&config, &job_id, &task_id, None, None, None, None, None, None, None, None, None, None).await;To this: let result = batch_client.task().get(&job_id, &task_id).into_future().await; |
bmc-msft
approved these changes
Nov 29, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is executing on the plan in #520 to use
into_futurefor generated services. It is a major update. This PR:OperationConfig&OperationConfigBuilderwithClientandClientBuilder. Fixes generate Clients for services #50.Builderthat implementsinto_future.into_futureis implemented as originally specified in #510 with:I think the API shape remains the same, but it does not follow what was later specified. It specifies:
Builder::contextnot yet supportedBuilder::insertnot yet supportedIntoFutureis not yet implementedI'd prefer to make those adjustments and additions in another PR.