loading from json setup in tests
This commit is contained in:
@@ -2,6 +2,7 @@ package topology
|
||||
|
||||
import (
|
||||
"pkg/storage"
|
||||
_ "fmt"
|
||||
)
|
||||
|
||||
type Server struct {
|
||||
@@ -11,6 +12,12 @@ type Server struct {
|
||||
Port int
|
||||
PublicUrl string
|
||||
}
|
||||
func NewServer(id NodeId) *Server{
|
||||
s := &Server{}
|
||||
s.Node.Id = id
|
||||
s.volumes = make(map[storage.VolumeId]*storage.VolumeInfo)
|
||||
return s
|
||||
}
|
||||
func (s *Server) CreateOneVolume(r int, vid storage.VolumeId) storage.VolumeId {
|
||||
s.AddVolume(&storage.VolumeInfo{Id:vid, Size: 32*1024*1024*1024})
|
||||
return vid
|
||||
|
||||
Reference in New Issue
Block a user