167 lines
8.3 KiB
Diff
167 lines
8.3 KiB
Diff
From 9bfa905e722767de1c075e281012a152e7abc190 Mon Sep 17 00:00:00 2001
|
|
From: Jan Cholasta <jcholast@redhat.com>
|
|
Date: Fri, 3 Aug 2012 03:04:58 -0400
|
|
Subject: [PATCH 75/79] Add --{set,add,del}attr options to commands which are
|
|
missing them.
|
|
|
|
ticket 2963
|
|
---
|
|
API.txt | 22 +++++++++++++++++-----
|
|
VERSION | 2 +-
|
|
ipalib/plugins/automember.py | 4 ++--
|
|
ipalib/plugins/host.py | 2 +-
|
|
ipalib/plugins/service.py | 2 +-
|
|
ipalib/plugins/trust.py | 2 +-
|
|
6 files changed, 23 insertions(+), 11 deletions(-)
|
|
|
|
diff --git a/API.txt b/API.txt
|
|
index e71b79a799837cde2c1e4a5a83c20c8e23fd650f..6f14fccc3762503a66034794ad2fd9370748318d 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 8d9efe6573bd148f2e74961c6ce7247f9bc3393d..11ecb6dec2d1f306ea5dc43e247f20f9683fa41a 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 bf4cb355ced9760399bf05ceb3ef5d045570c0de..7ccb0bb2f91a3380edb1af73c83906a0ba96c92d 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 9680d7c024ea8976f92a71bf576d6712c44a2bcf..e8967b8c0df4c348be01ec6c9e94571d5674ca3f 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 4f3051aa4d5ba6dfc1768190f3662180353a5006..7cb7b80306e4ac748555096928e6d616a808802a 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 792e6cac2a2f9ebb61f84cc74d01be325995863e..acb65b388eea123b89394cd75bb3dd051b412f74 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)'),
|
|
--
|
|
1.7.11.2
|
|
|