mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-25 10:16:12 +08:00
- instance snapshot
- instance clone - create form snapshot don't reset passwd
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package modules
|
||||
|
||||
import "yunion.io/x/onecloud/pkg/mcclient/modulebase"
|
||||
|
||||
var (
|
||||
InstanceSnapshots modulebase.ResourceManager
|
||||
)
|
||||
|
||||
func init() {
|
||||
InstanceSnapshots = NewComputeManager("instance_snapshot", "instance_snapshots",
|
||||
[]string{"ID", "Name",
|
||||
"Status", "GuestId",
|
||||
"ServerConfig",
|
||||
},
|
||||
[]string{},
|
||||
)
|
||||
|
||||
registerCompute(&InstanceSnapshots)
|
||||
}
|
||||
@@ -232,6 +232,17 @@ type ServerCloneOptions struct {
|
||||
Eip string `help:"associate with an existing EIP when server is created" json:"eip,omitempty"`
|
||||
}
|
||||
|
||||
type ServerCreateFromInstanceSnapshot struct {
|
||||
InstaceSnapshotId string `help:"Instace snapshot id or name"`
|
||||
NAME string `help:"Name of newly server" json:"name"`
|
||||
AutoStart bool `help:"Auto start server after it is created"`
|
||||
AllowDelete bool `help:"Unlock server to allow deleting"`
|
||||
|
||||
EipBw int `help:"allocate EIP with bandwidth in MB when server is created" json:"eip_bw,omitzero"`
|
||||
EipChargeType string `help:"newly allocated EIP charge type" choices:"traffic|bandwidth" json:"eip_charge_type,omitempty"`
|
||||
Eip string `help:"associate with an existing EIP when server is created" json:"eip,omitempty"`
|
||||
}
|
||||
|
||||
type ServerCreateOptions struct {
|
||||
ServerConfigs
|
||||
|
||||
@@ -259,6 +270,7 @@ type ServerCreateOptions struct {
|
||||
TaskNotify *bool `help:"Setup task notify" json:"-"`
|
||||
DryRun *bool `help:"Dry run to test scheduler" json:"-"`
|
||||
UserDataFile string `help:"user_data file path" json:"-"`
|
||||
InstanceSnapshot string `help:"instance snapshot" json:"instance_snapshot"`
|
||||
|
||||
OsType string `help:"os type, e.g. Linux, Windows, etc."`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user