Пример #1
0
func (s *instanceTest) newSubnet(cidr, space string, id uint) *bytes.Buffer {
	var sub gomaasapi.CreateSubnet
	sub.DNSServers = []string{"192.168.1.2"}
	sub.Name = cidr
	sub.Space = space
	sub.GatewayIP = "192.168.1.1"
	sub.CIDR = cidr
	sub.ID = id
	return s.subnetJSON(sub)
}
Пример #2
0
func defaultSubnet() gomaasapi.CreateSubnet {
	var s gomaasapi.CreateSubnet
	s.DNSServers = []string{"192.168.1.2"}
	s.Name = "maas-eth0"
	s.Space = "space-0"
	s.GatewayIP = "192.168.1.1"
	s.CIDR = "192.168.1.0/24"
	s.ID = 1
	return s
}