@ -1,5 +1,6 @@
use crate ::{
responses ::{
IPAddress ,
VMListResponse ,
BillingCreditResponse ,
LNImageListResponse ,
@ -9,6 +10,8 @@ use crate::{
ZoneListResponse ,
RecordListResponse ,
DynListResponse ,
DynAddResponse ,
DynRemoveResponse ,
SshKeyResponse ,
PlanListResponse ,
RegionListResponse ,
@ -53,6 +56,8 @@ pub enum SshKeySubArgs {
#[ derive(Serialize, Deserialize, Debug, clap::Subcommand) ]
pub enum DynSubArgs {
List ( DynListRequest ) ,
Remove ( DynRemoveRequest ) ,
Add ( DynAddRequest ) ,
}
#[ derive(Serialize, Deserialize, Debug, clap::Subcommand) ]
@ -245,7 +250,9 @@ impl Args {
Self ::Image ( ImageSubArgs ::List ( image_list ) ) = > print_req ( image_list ) ? ,
Self ::Billing ( BillingSubArgs ::Credit ( billing_credit ) ) = > print_req ( billing_credit ) ? ,
Self ::Zone ( ZoneSubArgs ::List ( zone_list ) ) = > print_req ( zone_list ) ? ,
Self ::Dyn ( DynSubArgs ::Add ( dyn_add_req ) ) = > print_req ( dyn_add_req ) ? ,
Self ::Dyn ( DynSubArgs ::List ( dyn_list ) ) = > print_req ( dyn_list ) ? ,
Self ::Dyn ( DynSubArgs ::Remove ( dyn_del ) ) = > print_req ( dyn_del ) ? ,
Self ::Plan ( PlanSubArgs ::List ( plan_list ) ) = > print_req ( plan_list ) ? ,
Self ::Region ( RegionSubArgs ::List ( reg_list ) ) = > print_req ( reg_list ) ? ,
Self ::Email ( EmailSubArgs ::Usage ( email_usage ) ) = > print_req ( email_usage ) ? ,
@ -365,3 +372,16 @@ pub struct EmailUserSetPasswordRequest {
pub struct VmIpListRequest {
vm_id : String ,
}
#[ lunanode_request(response= " DynRemoveResponse " , endpoint= " dns/dyn-remove/ " ) ]
pub struct DynRemoveRequest {
dyn_id : i32 ,
}
#[ lunanode_request(response= " DynAddResponse " , endpoint= " dns/dyn-add/ " ) ]
pub struct DynAddRequest {
/// The data string for the record. This is usually a FQDN, followed by a period. If you wanted to set a record for `dev.example.org`, you would put `dev.example.com.` in this field.
name : String ,
/// An ip address to associate with the FQDN. This type should be stricter: TODO.
ip : String ,
}