Files
ziti/controller/persistence/migration_v14.go
T
Shawn Carey 2110aba5c1 host.v1 configuration type schema changes (#631)
- Rename host.v1 dialIntercepted* properties to forward*
- Add allowed* properties to whitelist destinations that are dialed via forward*
- Add allowedSourceAddresses, which serves as a whitelist for source IPs/CIDRs and informs the hosting tunneler of the local routes to establish when hosting a service
2021-04-13 07:48:47 -04:00

25 lines
828 B
Go

package persistence
import (
"github.com/openziti/foundation/storage/boltz"
log "github.com/sirupsen/logrus"
)
func (m *Migrations) createInterceptV1ConfigType(step *boltz.MigrationStep) {
cfg, _ := m.stores.ConfigType.LoadOneByName(step.Ctx.Tx(), interceptV1ConfigType.Name)
if cfg == nil {
step.SetError(m.stores.ConfigType.Create(step.Ctx, interceptV1ConfigType))
} else {
log.Debugf("'%s' config type already exists. not creating.", interceptV1ConfigType.Name)
}
}
func (m *Migrations) createHostV1ConfigType(step *boltz.MigrationStep) {
cfg, _ := m.stores.ConfigType.LoadOneByName(step.Ctx.Tx(), hostV1ConfigType.Name)
if cfg == nil {
step.SetError(m.stores.ConfigType.Create(step.Ctx, hostV1ConfigType))
} else {
log.Debugf("'%s' config type already exists. not creating.", hostV1ConfigType.Name)
}
}