make configs settable
This commit is contained in:
parent
3789178234
commit
163f11c397
3 changed files with 40 additions and 0 deletions
|
|
@ -34,9 +34,17 @@ func (s *Server) body() (httpbody, error) {
|
|||
userdata, err := s.UserData.String()
|
||||
body["ciuserdata"] = userdata
|
||||
for i, n := range s.NetDevices {
|
||||
if n == nil {
|
||||
body["net"+strconv.Itoa(i)] = ""
|
||||
continue
|
||||
}
|
||||
body["net"+strconv.Itoa(i)] = n.String()
|
||||
}
|
||||
for i, ip := range s.IPConfig {
|
||||
if ip == nil {
|
||||
body["ipconfig"+strconv.Itoa(i)] = ""
|
||||
continue
|
||||
}
|
||||
body["ipconfig"+strconv.Itoa(i)] = ip.String()
|
||||
}
|
||||
return body, err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue