Unistore/datamigration: Take namespace from command line flag (#106724)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
This commit is contained in:
@@ -154,6 +154,11 @@ var adminCommands = []*cli.Command{
|
||||
Usage: "Non interactive mode. Just run the migration.",
|
||||
Value: false,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "namespace",
|
||||
Usage: "That's the Unified Storage Namespace.",
|
||||
Value: "default",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -32,7 +32,9 @@ import (
|
||||
|
||||
// ToUnifiedStorage converts dashboards+folders into unified storage
|
||||
func ToUnifiedStorage(c utils.CommandLine, cfg *setting.Cfg, sqlStore db.DB) error {
|
||||
namespace := "default" // TODO... from command line
|
||||
// Take namespace from command line
|
||||
namespace := c.String("namespace")
|
||||
|
||||
ns, err := authlib.ParseNamespace(namespace)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user