added ability to also order regular servers (previously only auctioned ones)
This commit is contained in:
@@ -1,11 +1,23 @@
|
||||
/// --- Get all available products (servers) that we can order and print them in a table
|
||||
// let available_server_products = hetzner.get_server_ordering_product_overview();
|
||||
// let available_server_products = hetzner.get_server_products();
|
||||
// available_server_products.pretty_print();
|
||||
|
||||
/// --- List the details from a specific sever product based on the ID
|
||||
// let example_server_product = hetzner.get_server_ordering_product_by_id("AX41-NVMe");
|
||||
// let example_server_product = hetzner.get_server_product_by_id("AX41-NVMe");
|
||||
// print(example_server_product);
|
||||
|
||||
/// --- Order a server
|
||||
// 1. Grab the SSH key to pass to the deployment
|
||||
let ssh_key = hetzner.get_ssh_key("e0:73:80:26:80:46:f0:c8:bb:74:f4:d0:2d:10:2d:6f");
|
||||
// 2. Use the builder to bundle the details on what to order
|
||||
let order_builder = new_server_builder("AX41-NVMe")
|
||||
.with_authorized_keys([ssh_key.fingerprint])
|
||||
.with_test(true);
|
||||
|
||||
let ordered_server_transaction = hetzner.order_server(order_builder);
|
||||
print(ordered_server_transaction);
|
||||
|
||||
|
||||
/// --- List all the transactions from the past 30 days
|
||||
// let transactions_last_30 = hetzner.get_transactions();
|
||||
// print(transactions_last_30);
|
||||
@@ -32,7 +44,7 @@
|
||||
|
||||
/// --- Order an auction server
|
||||
// 1. Grab the SSH key to pass to the deployment
|
||||
let ssh_key = hetzner.get_ssh_key("e0:73:80:26:80:46:f0:c8:bb:74:f4:d0:2d:10:2d:6f");
|
||||
// let ssh_key = hetzner.get_ssh_key("e0:73:80:26:80:46:f0:c8:bb:74:f4:d0:2d:10:2d:6f");
|
||||
// 2. Use the builder to bundle the details on what to order
|
||||
// let order_builder = new_auction_server_builder(2741558)
|
||||
// .with_authorized_keys([ssh_key.fingerprint])
|
||||
|
Reference in New Issue
Block a user