forked from Fediversity/Fediversity
data model: migration
This commit is contained in:
parent
6c2022d064
commit
34529a7de4
2 changed files with 27 additions and 0 deletions
|
@ -46,6 +46,10 @@ in
|
|||
module = { };
|
||||
runtime-environment = config.runtime-environments.bar;
|
||||
};
|
||||
migrations.boo = {
|
||||
deployment = config.deployments.baz;
|
||||
runtime-environment = config.runtime-environments.bar;
|
||||
};
|
||||
}
|
||||
);
|
||||
in
|
||||
|
@ -54,12 +58,14 @@ in
|
|||
has-runtime-environment = lib.isAttrs example.runtime-environments.bar.single-ssh-host.module;
|
||||
has-application = lib.isAttrs example.applications.foo.module;
|
||||
has-deployment = lib.isAttrs example.deployments.baz.module;
|
||||
has-migration = lib.isAttrs example.migrations.boo.deployment;
|
||||
};
|
||||
expected = {
|
||||
has-runtime-configuration = true;
|
||||
has-runtime-environment = true;
|
||||
has-application = true;
|
||||
has-deployment = true;
|
||||
has-migration = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -127,6 +127,23 @@ let
|
|||
}
|
||||
];
|
||||
};
|
||||
migration = submoduleWith {
|
||||
description = "Migration of a Fediversity deployment to a Fediversity run-time environment";
|
||||
modules = [
|
||||
{
|
||||
options = {
|
||||
deployment = mkOption {
|
||||
description = "Deployment to migrate";
|
||||
type = deployment;
|
||||
};
|
||||
runtime-environment = mkOption {
|
||||
description = "Run-time environment to migrate the deployment to";
|
||||
type = runtime-environment;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
options = {
|
||||
|
@ -146,5 +163,9 @@ in
|
|||
description = "Deployment of a configuration of applications to a run-time environment";
|
||||
type = attrsOf deployment;
|
||||
};
|
||||
migrations = mkOption {
|
||||
description = "Migrations from Fediversity deployments to Fediversity run-time environments";
|
||||
type = attrsOf migration;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue