diff options
author | Jule Anger <ja@sernet.de> | 2020-08-26 15:07:40 +0200 |
---|---|---|
committer | Douglas Bagnall <dbagnall@samba.org> | 2020-10-01 01:18:41 +0000 |
commit | f38336ac0ebc3246464c0f975b430c7b73cf329d (patch) | |
tree | ee7675ed5fd7fca547fadd83e8a23163cfb6e2b4 /python | |
parent | 6686235819bc68fa47dcce0138b76263fc3ff9e5 (diff) | |
download | samba-f38336ac0ebc3246464c0f975b430c7b73cf329d.tar.gz |
samba-tool contact: rename 'contact create' to 'contact add'
Keep 'contact create' for compatibility reasons.
Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'python')
-rw-r--r-- | python/samba/netcmd/contact.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/python/samba/netcmd/contact.py b/python/samba/netcmd/contact.py index 99c9d4c3d47..d3eeb23be64 100644 --- a/python/samba/netcmd/contact.py +++ b/python/samba/netcmd/contact.py @@ -40,10 +40,10 @@ from samba.compat import get_bytes from . import common -class cmd_create(Command): - """Create a new contact. +class cmd_add(Command): + """Add a new contact. - This command creates a new contact in the Active Directory domain. + This command adds a new contact to the Active Directory domain. The name of the new contact can be specified by the first argument 'contactname' or the --given-name, --initial and --surname arguments. @@ -52,16 +52,16 @@ class cmd_create(Command): is optional. A dot ('.') will be appended to the initials automatically. Example1: - samba-tool contact create "James T. Kirk" --job-title=Captain \\ + samba-tool contact add "James T. Kirk" --job-title=Captain \\ -H ldap://samba.samdom.example.com -UAdministrator%Passw1rd - The example shows how to create a new contact in the domain against a remote + The example shows how to add a new contact to the domain against a remote LDAP server. Example2: - samba-tool contact create --given-name=James --initials=T --surname=Kirk + samba-tool contact add --given-name=James --initials=T --surname=Kirk - The example shows how to create a new contact in the domain against a local + The example shows how to add a new contact to the domain against a local server. The resulting name is "James T. Kirk". """ @@ -149,9 +149,9 @@ class cmd_create(Command): mobilenumber=mobile_number, physicaldeliveryoffice=physical_delivery_office) except Exception as e: - raise CommandError("Failed to create contact", e) + raise CommandError("Failed to add contact", e) - self.outf.write("Contact '%s' created successfully\n" % ret_name) + self.outf.write("Contact '%s' added successfully\n" % ret_name) class cmd_delete(Command): @@ -851,7 +851,8 @@ class cmd_contact(SuperCommand): """Contact management.""" subcommands = {} - subcommands["create"] = cmd_create() + subcommands["add"] = cmd_add() + subcommands["create"] = cmd_add() subcommands["delete"] = cmd_delete() subcommands["edit"] = cmd_edit() subcommands["list"] = cmd_list() |