use std::env;
#[cfg(feature = "image")]
#[tokio::main(flavor = "current_thread")]
async fn main() {
env_logger::init();
let os = openstack::Cloud::from_env()
.await
.expect("Failed to create an identity provider from the environment");
let id = env::args().nth(1).expect("Provide a server ID");
let image = os.get_image(id).await.expect("Cannot get an image");
println!("ID = {}, Name = {}", image.id(), image.name());
}
#[cfg(not(feature = "image"))]
fn main() {
panic!("This example cannot run with 'image' feature disabled");
}