Option("-q", "--quiet", help="Be quiet", action="store_true"),
Option("-v", "--verbose", help="Be verbose", action="store_true"),
Option("--function-level", type="choice", metavar="FUNCTION_LEVEL",
- choices=["2008_R2", "2012", "2012_R2"],
- help="The schema file to upgrade to. Default is (Windows) 2012_R2.",
- default="2012_R2"),
+ choices=["2008_R2", "2012", "2012_R2", "2016"],
+ help="The functional level to prepare for. Default is (Windows) 2016.",
+ default="2016"),
Option("--forest-prep", action="store_true",
help="Run the forest prep (by default, both the domain and forest prep are run)."),
Option("--domain-prep", action="store_true",
cleanup_output_directories()
{
remove_directory $PREFIX_ABS/2012R2_schema
+ remove_directory $PREFIX_ABS/2019_schema
remove_directory $PREFIX_ABS/$RELEASE
remove_directory $PREFIX_ABS/$OLD_RELEASE
}
PROVISION_OPTS="--use-ntvfs --host-ip6=::1 --host-ip=127.0.0.1"
+provision_2019()
+{
+ $PYTHON $BINDIR/samba-tool domain provision $PROVISION_OPTS --domain=REALM --realm=REALM.COM --targetdir=$PREFIX_ABS/2019_schema --base-schema=2019 --host-name=FLPREP
+}
+
provision_2012r2()
{
$PYTHON $BINDIR/samba-tool domain provision $PROVISION_OPTS --domain=REALM --realm=REALM.COM --targetdir=$PREFIX_ABS/2012R2_schema --base-schema=2012_R2 --host-name=FLPREP
ldapcmp_ignore "msDS-ClaimPossibleValues" "$RELEASE" "2012R2_schema"
}
-functional_prep()
+functional_prep_2016()
+{
+ $PYTHON $BINDIR/samba-tool domain functionalprep -H tdb://$PREFIX_ABS/2019_schema/private/sam.ldb --function-level=2016
+}
+
+functional_prep_2012R2()
{
$PYTHON $BINDIR/samba-tool domain functionalprep -H tdb://$PREFIX_ABS/2012R2_schema/private/sam.ldb --function-level=2012_R2
}
testit "provision_2012R2_schema" provision_2012r2 || failed=$(expr $failed + 1)
# Perform functional prep up to 2012 R2 level
-testit "functional_prep" functional_prep || failed=$(expr $failed + 1)
+testit "functional_prep_2012R2" functional_prep_2012R2 || failed=$(expr $failed + 1)
# check that the databases are now the same
testit "check_databases_same" ldapcmp || failed=$(expr $failed + 1)
cleanup_output_directories
+# Provision a DC based on 2019 schema
+testit "provision_2019_schema" provision_2019 || failed=$(expr $failed + 1)
+
+# Perform functional prep up to 2016 level
+testit "functional_prep_2016" functional_prep_2016 || failed=$(expr $failed + 1)
+
+cleanup_output_directories
+
exit $failed