added pool finder

This commit is contained in:
ston1th 2020-06-04 21:37:23 +02:00
commit 59ad9d8ec5
3 changed files with 53 additions and 11 deletions

View file

@ -18,6 +18,7 @@ type Server struct {
ID string `json:"vmid"`
Name string `json:"name"`
Node string
Pool string
Status ServerStatus `json:"status"`
Resources Resources
NetDevices NetworkDevices
@ -58,8 +59,8 @@ func (s *Server) InstanceID() string {
return NewURL("", s.Node, s.ID)
}
func (s *Server) K8sID(pool string) string {
return NewURL(pool, "", s.ID)
func (s *Server) K8sID() string {
return NewURL(s.Pool, "", s.ID)
}
type Resources struct {