mirror of
https://codeberg.org/spire/dispenser.git
synced 2026-06-03 10:04:07 +02:00
start vultr with ipv6
This commit is contained in:
parent
27757a48e4
commit
756aea0d3b
2 changed files with 5 additions and 0 deletions
|
|
@ -77,6 +77,7 @@ pub struct Server {
|
||||||
pub id: String,
|
pub id: String,
|
||||||
pub created: DateTime<Utc>,
|
pub created: DateTime<Utc>,
|
||||||
pub ip: IpAddr,
|
pub ip: IpAddr,
|
||||||
|
pub ip_v6: Option<IpAddr>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ impl Cloud for Vultr {
|
||||||
label: petname(2, "-"),
|
label: petname(2, "-"),
|
||||||
app_id: self.get_app_id("docker").await?,
|
app_id: self.get_app_id("docker").await?,
|
||||||
sshkey_id: &key_ids,
|
sshkey_id: &key_ids,
|
||||||
|
enable_ipv6: true,
|
||||||
})
|
})
|
||||||
.send()
|
.send()
|
||||||
.await
|
.await
|
||||||
|
|
@ -189,6 +190,7 @@ struct VultrCreateParams<'a> {
|
||||||
label: String,
|
label: String,
|
||||||
app_id: u16,
|
app_id: u16,
|
||||||
sshkey_id: &'a [&'a str],
|
sshkey_id: &'a [&'a str],
|
||||||
|
enable_ipv6: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
|
|
@ -213,6 +215,7 @@ struct VultrInstanceResponse {
|
||||||
os: String,
|
os: String,
|
||||||
ram: u64,
|
ram: u64,
|
||||||
main_ip: IpAddr,
|
main_ip: IpAddr,
|
||||||
|
v6_main_ip: Option<IpAddr>,
|
||||||
region: String,
|
region: String,
|
||||||
vcpu_count: u16,
|
vcpu_count: u16,
|
||||||
date_created: DateTime<Utc>,
|
date_created: DateTime<Utc>,
|
||||||
|
|
@ -231,6 +234,7 @@ impl From<VultrInstanceResponse> for Server {
|
||||||
id: instance.id,
|
id: instance.id,
|
||||||
created: instance.date_created,
|
created: instance.date_created,
|
||||||
ip: instance.main_ip,
|
ip: instance.main_ip,
|
||||||
|
ip_v6: instance.v6_main_ip,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue