summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2012-08-03 03:04:58 -0400
committerMartin Kosek <mkosek@redhat.com>2012-08-03 10:18:30 +0200
commit9bfa905e722767de1c075e281012a152e7abc190 (patch)
tree0313b8c6585e833d265e3a23c6a37a255fb2bf0e
parentc58836f29dbff9bda9ecb307329fc11942b9d0e0 (diff)
downloadfreeipa-9bfa905e722767de1c075e281012a152e7abc190.tar.gz
freeipa-9bfa905e722767de1c075e281012a152e7abc190.tar.xz
freeipa-9bfa905e722767de1c075e281012a152e7abc190.zip
Add --{set,add,del}attr options to commands which are missing them.
ticket 2963
-rw-r--r--API.txt22
-rw-r--r--VERSION2
-rw-r--r--ipalib/plugins/automember.py4
-rw-r--r--ipalib/plugins/host.py2
-rw-r--r--ipalib/plugins/service.py2
-rw-r--r--ipalib/plugins/trust.py2
6 files changed, 23 insertions, 11 deletions
diff --git a/API.txt b/API.txt
index e71b79a79..6f14fccc3 100644
--- a/API.txt
+++ b/API.txt
@@ -101,9 +101,11 @@ output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
output: Entry('result', <type 'dict'>, Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None))
output: Output('value', <type 'unicode'>, None)
command: automember_add
-args: 1,5,3
+args: 1,7,3
arg: Str('cn', cli_name='automember_rule')
option: Str('description', attribute=True, cli_name='desc', multivalue=False, required=False)
+option: Str('setattr*', cli_name='setattr', exclude='webui')
+option: Str('addattr*', cli_name='addattr', exclude='webui')
option: StrEnum('type', values=(u'group', u'hostgroup'))
option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui')
option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui')
@@ -177,9 +179,13 @@ output: ListOfEntries('result', (<type 'list'>, <type 'tuple'>), Gettext('A list
output: Output('count', <type 'int'>, None)
output: Output('truncated', <type 'bool'>, None)
command: automember_mod
-args: 1,5,3
+args: 1,9,3
arg: Str('cn', cli_name='automember_rule')
option: Str('description', attribute=True, autofill=False, cli_name='desc', multivalue=False, required=False)
+option: Str('setattr*', cli_name='setattr', exclude='webui')
+option: Str('addattr*', cli_name='addattr', exclude='webui')
+option: Str('delattr*', cli_name='delattr', exclude='webui')
+option: Flag('rights', autofill=True, default=False)
option: StrEnum('type', values=(u'group', u'hostgroup'))
option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui')
option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui')
@@ -1652,7 +1658,7 @@ output: Output('notmatched', (<type 'list'>, <type 'tuple'>, <type 'NoneType'>),
output: Output('error', (<type 'list'>, <type 'tuple'>, <type 'NoneType'>), None)
output: Output('value', <type 'bool'>, None)
command: host_add
-args: 1,16,3
+args: 1,18,3
arg: Str('fqdn', attribute=True, cli_name='hostname', multivalue=False, primary_key=True, required=True)
option: Str('description', attribute=True, cli_name='desc', multivalue=False, required=False)
option: Str('l', attribute=True, cli_name='locality', multivalue=False, required=False)
@@ -1664,6 +1670,8 @@ option: Flag('random', attribute=False, autofill=True, cli_name='random', defaul
option: Bytes('usercertificate', attribute=True, cli_name='certificate', multivalue=False, required=False)
option: Str('macaddress', attribute=True, cli_name='macaddress', csv=True, multivalue=True, pattern='^([a-fA-F0-9]{2}[:|\\-]?){5}[a-fA-F0-9]{2}$', required=False)
option: Bytes('ipasshpubkey', attribute=True, cli_name='sshpubkey', multivalue=True, required=False)
+option: Str('setattr*', cli_name='setattr', exclude='webui')
+option: Str('addattr*', cli_name='addattr', exclude='webui')
option: Flag('force', autofill=True, default=False)
option: Flag('no_reverse', autofill=True, default=False)
option: Str('ip_address?')
@@ -2727,10 +2735,12 @@ output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
output: Entry('result', <type 'dict'>, Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None))
output: Output('value', <type 'unicode'>, None)
command: service_add
-args: 1,6,3
+args: 1,8,3
arg: Str('krbprincipalname', attribute=True, cli_name='principal', multivalue=False, primary_key=True, required=True)
option: Bytes('usercertificate', attribute=True, cli_name='certificate', multivalue=False, required=False)
option: StrEnum('ipakrbauthzdata', attribute=True, cli_name='pac_type', csv=True, multivalue=True, required=False, values=(u'MS-PAC', u'PAD'))
+option: Str('setattr*', cli_name='setattr', exclude='webui')
+option: Str('addattr*', cli_name='addattr', exclude='webui')
option: Flag('force', autofill=True, default=False)
option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui')
option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui')
@@ -3190,8 +3200,10 @@ output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
output: Entry('result', <type 'dict'>, Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None))
output: Output('value', <type 'unicode'>, None)
command: trust_add
-args: 1,8,3
+args: 1,10,3
arg: Str('cn', attribute=True, cli_name='realm', multivalue=False, primary_key=True, required=True)
+option: Str('setattr*', cli_name='setattr', exclude='webui')
+option: Str('addattr*', cli_name='addattr', exclude='webui')
option: StrEnum('trust_type', autofill=True, cli_name='type', default=u'ad', values=(u'ad',))
option: Str('realm_admin?', cli_name='admin')
option: Password('realm_passwd?', cli_name='password', confirm=False)
diff --git a/VERSION b/VERSION
index 8d9efe657..11ecb6dec 100644
--- a/VERSION
+++ b/VERSION
@@ -79,4 +79,4 @@ IPA_DATA_VERSION=20100614120000
# #
########################################################
IPA_API_VERSION_MAJOR=2
-IPA_API_VERSION_MINOR=40
+IPA_API_VERSION_MINOR=41
diff --git a/ipalib/plugins/automember.py b/ipalib/plugins/automember.py
index bf4cb355c..7ccb0bb2f 100644
--- a/ipalib/plugins/automember.py
+++ b/ipalib/plugins/automember.py
@@ -233,7 +233,7 @@ class automember_add(LDAPCreate):
__doc__ = _("""
Add an automember rule.
""")
- takes_options = group_type
+ takes_options = LDAPCreate.takes_options + group_type
takes_args = automember_rule
msg_summary = _('Added automember rule "%(value)s"')
@@ -440,7 +440,7 @@ class automember_mod(LDAPUpdate):
Modify an automember rule.
""")
takes_args = automember_rule
- takes_options = group_type
+ takes_options = LDAPUpdate.takes_options + group_type
msg_summary = _('Modified automember rule "%(value)s"')
def execute(self, *keys, **options):
diff --git a/ipalib/plugins/host.py b/ipalib/plugins/host.py
index 9680d7c02..e8967b8c0 100644
--- a/ipalib/plugins/host.py
+++ b/ipalib/plugins/host.py
@@ -364,7 +364,7 @@ class host_add(LDAPCreate):
has_output_params = LDAPCreate.has_output_params + host_output_params
msg_summary = _('Added host "%(value)s"')
member_attributes = ['managedby']
- takes_options = (
+ takes_options = LDAPCreate.takes_options + (
Flag('force',
label=_('Force'),
doc=_('force host name even if not in DNS'),
diff --git a/ipalib/plugins/service.py b/ipalib/plugins/service.py
index 4f3051aa4..7cb7b8030 100644
--- a/ipalib/plugins/service.py
+++ b/ipalib/plugins/service.py
@@ -271,7 +271,7 @@ class service_add(LDAPCreate):
msg_summary = _('Added service "%(value)s"')
member_attributes = ['managedby']
has_output_params = LDAPCreate.has_output_params + output_params
- takes_options = (
+ takes_options = LDAPCreate.takes_options + (
Flag('force',
label=_('Force'),
doc=_('force principal name even if not in DNS'),
diff --git a/ipalib/plugins/trust.py b/ipalib/plugins/trust.py
index 792e6cac2..acb65b388 100644
--- a/ipalib/plugins/trust.py
+++ b/ipalib/plugins/trust.py
@@ -115,7 +115,7 @@ def make_trust_dn(env, trust_type, dn):
class trust_add(LDAPCreate):
__doc__ = _('Add new trust to use')
- takes_options = (
+ takes_options = LDAPCreate.takes_options + (
StrEnum('trust_type',
cli_name='type',
label=_('Trust type (ad for Active Directory, default)'),