From: Jule Anger Date: Wed, 26 Aug 2020 13:08:21 +0000 (+0200) Subject: samba-tool ou: rename 'ou create' to 'ou add' X-Git-Tag: talloc-2.3.2~357 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=419e75cc38706102cc3d52779962e002c3439aee;p=thirdparty%2Fsamba.git samba-tool ou: rename 'ou create' to 'ou add' Keep 'ou create' for compatibility reasons. Signed-off-by: Jule Anger Reviewed-by: Björn Baumbach Reviewed-by: Douglas Bagnall --- diff --git a/python/samba/netcmd/ou.py b/python/samba/netcmd/ou.py index f68cd2f7af2..d83920d9862 100644 --- a/python/samba/netcmd/ou.py +++ b/python/samba/netcmd/ou.py @@ -163,17 +163,17 @@ class cmd_move(Command): (full_old_ou_dn, full_new_parent_dn)) -class cmd_create(Command): - """Create an organizational unit. +class cmd_add(Command): + """Add a new organizational unit. The name of the new ou can be specified as a full DN or without the domainDN component. Examples: - samba-tool ou create 'OU=OrgUnit' - samba-tool ou create 'OU=SubOU,OU=OrgUnit,DC=samdom,DC=example,DC=com' + samba-tool ou add 'OU=OrgUnit' + samba-tool ou add 'OU=SubOU,OU=OrgUnit,DC=samdom,DC=example,DC=com' - The examples show how an administrator would create a new ou 'OrgUnit' + The examples show how an administrator would add a new ou 'OrgUnit' and a new ou 'SubOU' as a child of the ou 'OrgUnit'. """ @@ -208,9 +208,9 @@ class cmd_create(Command): try: samdb.create_ou(full_ou_dn, description=description) except Exception as e: - raise CommandError('Failed to create ou "%s"' % full_ou_dn, e) + raise CommandError('Failed to add ou "%s"' % full_ou_dn, e) - self.outf.write('Created ou "%s"\n' % full_ou_dn) + self.outf.write('Added ou "%s"\n' % full_ou_dn) class cmd_listobjects(Command): @@ -406,7 +406,8 @@ class cmd_ou(SuperCommand): """Organizational Units (OU) management.""" subcommands = {} - subcommands["create"] = cmd_create() + subcommands["add"] = cmd_add() + subcommands["create"] = cmd_add() subcommands["delete"] = cmd_delete() subcommands["move"] = cmd_move() subcommands["rename"] = cmd_rename()