From 6f4264a72efe3995d92cff631cf1886f7b5bdaf3 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sun, 11 Sep 2011 17:31:38 +0200 Subject: s4:samba-tool/domain.py - rename arguments "domain" -> "domain-level", "forest" -> "forest-level" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This should clarify the scope of them. Reviewed-by: Jelmer Autobuild-User: Matthias Dieter Wallnöfer Autobuild-Date: Sun Sep 11 20:12:52 CEST 2011 on sn-devel-104 --- source4/scripting/python/samba/netcmd/domain.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'source4/scripting') diff --git a/source4/scripting/python/samba/netcmd/domain.py b/source4/scripting/python/samba/netcmd/domain.py index 20beea0fb5..d76b092aba 100644 --- a/source4/scripting/python/samba/netcmd/domain.py +++ b/source4/scripting/python/samba/netcmd/domain.py @@ -129,16 +129,16 @@ class cmd_domain_level(Command): Option("-H", "--URL", help="LDB URL for database or target server", type=str, metavar="URL", dest="H"), Option("--quiet", help="Be quiet", action="store_true"), - Option("--forest", type="choice", choices=["2003", "2008", "2008_R2"], + Option("--forest-level", type="choice", choices=["2003", "2008", "2008_R2"], help="The forest function level (2003 | 2008 | 2008_R2)"), - Option("--domain", type="choice", choices=["2003", "2008", "2008_R2"], + Option("--domain-level", type="choice", choices=["2003", "2008", "2008_R2"], help="The domain function level (2003 | 2008 | 2008_R2)") ] takes_args = ["subcommand"] - def run(self, subcommand, H=None, forest=None, domain=None, quiet=False, - credopts=None, sambaopts=None, versionopts=None): + def run(self, subcommand, H=None, forest_level=None, domain_level=None, + quiet=False, credopts=None, sambaopts=None, versionopts=None): lp = sambaopts.get_loadparm() creds = credopts.get_credentials(lp, fallback_machine=True) @@ -238,12 +238,12 @@ class cmd_domain_level(Command): elif subcommand == "raise": msgs = [] - if domain is not None: - if domain == "2003": + if domain_level is not None: + if domain_level == "2003": new_level_domain = DS_DOMAIN_FUNCTION_2003 - elif domain == "2008": + elif domain_level == "2008": new_level_domain = DS_DOMAIN_FUNCTION_2008 - elif domain == "2008_R2": + elif domain_level == "2008_R2": new_level_domain = DS_DOMAIN_FUNCTION_2008_R2 if new_level_domain <= level_domain and level_domain_mixed == 0: @@ -295,12 +295,12 @@ class cmd_domain_level(Command): level_domain = new_level_domain msgs.append("Domain function level changed!") - if forest is not None: - if forest == "2003": + if forest_level is not None: + if forest_level == "2003": new_level_forest = DS_DOMAIN_FUNCTION_2003 - elif forest == "2008": + elif forest_level == "2008": new_level_forest = DS_DOMAIN_FUNCTION_2008 - elif forest == "2008_R2": + elif forest_level == "2008_R2": new_level_forest = DS_DOMAIN_FUNCTION_2008_R2 if new_level_forest <= level_forest: raise CommandError("Forest function level can't be smaller equal to the actual one!") -- cgit