Exemplo n.º 1
0
func processEpgEvent(netPlugin *plugin.NetPlugin, opts core.InstanceInfo, ID string, isDelete bool) error {
	log.Infof("Received processEpgEvent")
	var err error

	netPlugin.Lock()
	defer func() { netPlugin.Unlock() }()

	operStr := ""
	if isDelete {
		operStr = "delete"
	} else {
		err = netPlugin.UpdateEndpointGroup(ID)
		operStr = "update"
	}
	if err != nil {
		log.Errorf("Epg %s failed. Error: %s", operStr, err)
	} else {
		log.Infof("Epg %s succeeded", operStr)
	}

	return err
}