Implement images resource

This commit is contained in:
stSolo
2022-03-05 12:31:51 +03:00
parent 95cd7cb820
commit edf7728cb5
4 changed files with 464 additions and 0 deletions

View File

@@ -667,3 +667,31 @@ type SshKeyConfig struct {
SshKey string
UserShell string
}
//
// images api
//
const imageCreateAPI = "/restmachine/cloudapi/image/create"
const imageGetAPI = "/restmachine/cloudapi/image/get"
const imageDeleteAPI = "/restmachine/cloudapi/image/delete"
const imageEditNameAPI = "/restmachine/cloudapi/image/rename"
const imageLinkAPI = "/restmachine/cloudapi/image/link"
type Image struct {
ImageId int `json:"imageId"`
Name string `json:"name"`
Url string `json:"url"`
Gid int `json:"gid"`
Boottype string `json:"boottype"`
Imagetype string `json:"imagetype"`
Drivers []string `json:"drivers"`
Hotresize bool `json:"hotresize"`
Username string `json:"username"`
Password string `json:"password"`
AccountId int `json:"accountId"`
UsernameDL string `json:"usernameDL"`
PasswordDL string `json:"passwordDL"`
SepId int `json:"sepId"`
PoolName string `json:"poolName"`
Architecture string `json:"architecture"`
}