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

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

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