summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-09-11 17:31:38 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2011-09-11 20:12:52 +0200
commit6f4264a72efe3995d92cff631cf1886f7b5bdaf3 (patch)
treea8bf25b524c1bb938bdae9a6e875980c5e0b1b0f
parent7e460a04f79c9056b7b0b6c927caa2db96229633 (diff)
downloadsamba-6f4264a72efe3995d92cff631cf1886f7b5bdaf3.tar.gz
samba-6f4264a72efe3995d92cff631cf1886f7b5bdaf3.tar.bz2
samba-6f4264a72efe3995d92cff631cf1886f7b5bdaf3.zip
s4:samba-tool/domain.py - rename arguments "domain" -> "domain-level", "forest" -> "forest-level"
This should clarify the scope of them. Reviewed-by: Jelmer Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Sun Sep 11 20:12:52 CEST 2011 on sn-devel-104
-rw-r--r--source4/scripting/python/samba/netcmd/domain.py24
1 files changed, 12 insertions, 12 deletions
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!")