Ejemplo n.º 1
0
func (self *Network) Write() error {
	if self.Key == "" {
		log.Errorf("Empty key while trying to Write network object")
		return errors.New("Empty key")
	}

	return modeldb.WriteObj("network", self.Key, self)
}
Ejemplo n.º 2
0
func (self *Tenant) Write() error {
	if self.Key == "" {
		log.Errorf("Empty key while trying to Write tenant object")
		return errors.New("Empty key")
	}

	return modeldb.WriteObj("tenant", self.Key, self)
}