Skip to content

Commit

Permalink
Update virtualserver.go
Browse files Browse the repository at this point in the history
  • Loading branch information
GJSBRT committed Apr 18, 2023
1 parent f3dd541 commit e7c56c4
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions dutchis/virtualserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,20 +213,22 @@ func resourceVirtualServerRead(d *schema.ResourceData, meta interface{}) error {
logger.Error().Err(err).Msg("Failed to read HTTP response")
return err
}

logger.Debug().Msg("Received response: " + string(body))

type VirtualServer struct {
Success bool `json:"success"`
Data struct {
UUID string `json:"uuid"`
Name string `json:"name"`
Class string `json:"class"`
Status string `json:"status"`
Node string `json:"node"`
Cpus int `json:"cpus"`
Maxmem int `json:"maxmem"`
Maxdisk int `json:"maxdisk"`
Installing bool `json:"installing"`
} `json:"data"`
Data struct {
UUID string `json:"uuid"`
Name string `json:"name"`
Class string `json:"class"`
Status string `json:"status"`
Node string `json:"node"`
Cpus int `json:"cpus"`
Maxmem int `json:"maxmem"`
Maxdisk int `json:"maxdisk"`
Installing bool `json:"installing,omitempty"`
} `json:"data"`
}

var virtualserver VirtualServer
Expand Down

0 comments on commit e7c56c4

Please sign in to comment.