mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-23 05:49:07 +02:00
[management] Add support for disabling resources and routing peers in networks (#3154)
* sync openapi changes Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com> * add option to disable network resource(s) Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com> * add network resource enabled state from api Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com> * fix tests Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com> * add option to disable network router(s) Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com> * fix tests Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com> * Add tests Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com> * migrate old network resources and routers Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com> --------- Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
This commit is contained in:
@@ -288,6 +288,12 @@ func getMigrations(ctx context.Context) []migrationFunc {
|
||||
func(db *gorm.DB) error {
|
||||
return migration.MigrateSetupKeyToHashedSetupKey[types.SetupKey](ctx, db)
|
||||
},
|
||||
func(db *gorm.DB) error {
|
||||
return migration.MigrateNewField[resourceTypes.NetworkResource](ctx, db, "enabled", true)
|
||||
},
|
||||
func(db *gorm.DB) error {
|
||||
return migration.MigrateNewField[routerTypes.NetworkRouter](ctx, db, "enabled", true)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user