summaryrefslogtreecommitdiffstats
path: root/ipaclient
Commit message (Collapse)AuthorAgeFilesLines
...
* Port all setup.py to setuptoolsChristian Heimes2016-10-203-80/+50
| | | | | | | | | | | All setup.py files are now using setuptools through a common file ipasetup.py. The file is auto-generated and contain all common settings. Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
* Move ipa.1 man fileChristian Heimes2016-10-171-1/+0
| | | | | | | | setuptools does not support data_files any more. The ipa(1) man page is now handled like the remaining man pages. Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Petr Spacek <pspacek@redhat.com>
* Pylint: fix the rest of unused local variablesMartin Basti2016-10-111-2/+0
| | | | Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
* Pylint: remove unused variables from installers and scriptsMartin Basti2016-10-062-14/+2
| | | | Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* Pylint: enable check for unused-variablesMartin Basti2016-09-273-0/+6
| | | | | | | | | | | | | | | Unused variables may: * make code less readable * create dead code * potentialy hide issues/errors Enabled check should prevent to leave unused variable in code Check is locally disabled for modules that fix is not clear or easy or have too many occurences of unused variables Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* Remove unused variables in the codeMartin Basti2016-09-274-11/+5
| | | | | | | | | | | This commit removes unused variables or rename variables as "expected to be unused" by using "_" prefix. This covers only cases where fix was easy or only one unused variable was in a module Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* Prompt for forwarder in dnsforwardzone-addTomas Krizek2016-09-261-0/+5
| | | | | | | | | | When the command ipa dnsforwardzone-add is invoked without specifying the forwarder as an argument and the forward policy is not set to none, prompt for DNS forwarder. https://fedorahosted.org/freeipa/ticket/6169 Reviewed-By: Petr Spacek <pspacek@redhat.com>
* pylint: fix old-style-classJan Barta2016-09-221-1/+1
| | | | | Reviewed-By: Tomas Krizek <tkrizek@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
* Fix regression introduced in ipa-certupdateFlorence Blanc-Renaud2016-09-091-1/+4
| | | | | | | | The fix for 6288 was overwritten by commit 08b768313020c45bfa82d67cd214afabf605f4b3. https://fedorahosted.org/freeipa/ticket/6288 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* schema cache: Store and check info for pre-schema serversDavid Kupka2016-09-063-91/+128
| | | | | | | | | | | | | Cache CommandError answer to schema command to avoid sending the command to pre-schema servers every time. This information expires after some time (1 hour) in order to start using schema as soon as the server is upgraded. https://fedorahosted.org/freeipa/ticket/6095 Signed-off-by: Jan Cholasta <jcholast@redhat.com> Signed-off-by: David Kupka <dkupka@redhat.com> Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
* dns: fix crash in interactive mode against old serversJan Cholasta2016-09-061-1/+61
| | | | | | | | | | Add a client-side fallback of the dnsrecord_split_parts command for old servers to avoid CommandError in dnsrecord_add and dnsrecord_mod CLI interactive mode. https://fedorahosted.org/freeipa/ticket/6203 Reviewed-By: Martin Basti <mbasti@redhat.com>
* dns: prompt for missing record parts in CLIJan Cholasta2016-09-061-14/+16
| | | | | | | | | Fix the code which determines if a record part is required and thus should be prompted not to wrongfully consider all record parts to be optional. https://fedorahosted.org/freeipa/ticket/6203 Reviewed-By: Martin Basti <mbasti@redhat.com>
* dns: normalize record type read interactively in dnsrecord_addJan Cholasta2016-09-061-0/+2
| | | | | | | | | | | | | When dnsrecord_add is called without options in interactive mode, it prompts the user to enter a record type. The record type is expected to be upper case further in the code, which causes non-upper case values not to work correctly. Fix this issue by upper casing the value after it is read. https://fedorahosted.org/freeipa/ticket/6203 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Track lightweight CAs on replica installationFraser Tweedale2016-09-061-44/+9
| | | | | | | | | | Add Certmonger tracking requests for lightweight CAs on replica installation. As part of this change, extract most of the lightweight CA tracking code out of ipa-certupdate and into cainstance. Fixes: https://fedorahosted.org/freeipa/ticket/6019 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Fix ipa-certupdate for CA-less installationFlorence Blanc-Renaud2016-09-061-3/+4
| | | | | | | | | | | | | | | | | In a CA-less installation, ipa-certupdate fails with the error message: $ ipa-certupdate trying https://vm-180.abc.idm.lab.eng.brq.redhat.com/ipa/session/json Forwarding 'ca_is_enabled' to json server 'https://vm-180.abc.idm.lab.eng.brq.redhat.com/ipa/session/json' Forwarding 'ca_find/1' to json server 'https://vm-180.abc.idm.lab.eng.brq.redhat.com/ipa/session/json' CA is not configured The ipa-certupdate command failed. The issue happens because ipa-certupdate tries to call ca_find even on a CA_less deployment. The fix skips the call to ca_find in this case. https://fedorahosted.org/freeipa/ticket/6288 Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
* Handled empty hostname in server-del commandAbhijeet Kasurde2016-08-241-2/+6
| | | | | | | | Fixes: https://fedorahosted.org/freeipa/ticket/6248 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* migrate-ds: Mention --enable-migration in error message about migration modePetr Spacek2016-08-221-1/+2
| | | | | | https://fedorahosted.org/freeipa/ticket/6234 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Corrected minor spell check in AD Trust information doc messagesAbhijeet Kasurde2016-08-223-3/+3
| | | | | Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
* schema cache: Fallback to 'en_us' when locale is not availableDavid Kupka2016-08-181-3/+9
| | | | | | https://fedorahosted.org/freeipa/ticket/6204 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* compat: Fix ping command callDavid Kupka2016-08-171-1/+1
| | | | | | | | Remove extra argument from client.forward call. https://fedorahosted.org/freeipa/ticket/6095 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* schema check: Check current client language against cached oneDavid Kupka2016-08-171-1/+8
| | | | | | https://fedorahosted.org/freeipa/ticket/6204 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* schema cache: Read schema instead of rewriting it when SchemaUpToDateDavid Kupka2016-08-171-22/+24
| | | | | | https://fedorahosted.org/freeipa/ticket/6048 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* client: Do not create instance just to check isinstanceDavid Kupka2016-08-173-12/+11
| | | | | | | | | Checking that classes are idenical gives the same result and avoids unnecessary instantiation. https://fedorahosted.org/freeipa/ticket/6048 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* schema cache: Store API schema cache in memoryDavid Kupka2016-08-171-23/+28
| | | | | | | | | | Read whole cache into memory and keep it there for lifetime of api object. This removes the need to repetitively open/close the cache and speeds up every access to it. https://fedorahosted.org/freeipa/ticket/6048 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* schema cache: Read server info only onceDavid Kupka2016-08-171-10/+19
| | | | | | | | | Do not open/close the file with every access to plugins. Extensive access to filesystem may cause significant slowdown. https://fedorahosted.org/freeipa/ticket/6048 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* frontent: Add summary class property to CommandOverrideDavid Kupka2016-08-171-0/+6
| | | | | | | | Avoid creating instance of overriden command to get its summary. https://fedorahosted.org/freeipa/ticket/6048 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Access data for help separatelyDavid Kupka2016-08-171-19/+18
| | | | | | | | | | To avoid the need to read all data for a plugin from cache and actualy use the separately stored help data it must be requested and returned separately. https://fedorahosted.org/freeipa/ticket/6048 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* schema cache: Do not read fingerprint and format from cacheDavid Kupka2016-08-171-26/+5
| | | | | | | | | | Fingerprint can be obtained from schema filename of from ServerInfo instance. Use FORMAT in path to avoid openening schema just to read its format. https://fedorahosted.org/freeipa/ticket/6048 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* schema cache: Do not reset ServerInfo dirty flagDavid Kupka2016-08-171-1/+2
| | | | | | | | | Once dirty flag is set to True it must not be set back to False. Otherwise changes are not written back to file. https://fedorahosted.org/freeipa/ticket/6048 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* client: add missing output params to client-side commandsJan Cholasta2016-08-102-0/+30
| | | | | | | | | | | | Add output params for the otptoken-add-yubikey, vault-add, vault-mod, vault-archive and vault-retrieve commands. This fixes the commands not having any output in CLI. https://fedorahosted.org/freeipa/ticket/6182 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: David Kupka <dkupka@redhat.com>
* parameters: move the `confirm` kwarg to ParamJan Cholasta2016-08-101-1/+1
| | | | | | | | | | | | | | | | | | | Whether a parameter is treated like password is determined by the `password` class attribute defined in the Param class. Whether the CLI will asks for confirmation of a password parameter depends on the value of the `confirm` kwarg of the Password class. Move the `confirm` kwarg from the Password class to the Param class, so that it can be used by any Param subclass which has the `password` class attribute set to True. This fixes confirmation of the --key option of otptoken-add, which is a Bytes subclass with `password` set to True. https://fedorahosted.org/freeipa/ticket/6174 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: David Kupka <dkupka@redhat.com>
* Fix ipa hbactest outputFlorence Blanc-Renaud2016-08-041-1/+3
| | | | | | | | | | | | | | | | ipa hbactest command produces a Traceback (TypeError: cannot concatenate 'str' and 'bool' objects) This happens because hbactest overrides output_for_cli but does not properly handle the output for 'value' field. 'value' contains a boolean but it should not be displayed (refer to ipalib/frontend.py, Command.output_for_cli()). Note that the issue did not appear before because the 'value' field had a flag no_display. https://fedorahosted.org/freeipa/ticket/6157 Reviewed-By: Martin Basti <mbasti@redhat.com>
* vault: add missing salt option to vault_modJan Cholasta2016-08-041-1/+1
| | | | | | | | | The option was accidentally removed in commit 4b119e21a2f93ca16c5edf3d1058552b44feeaf8. https://fedorahosted.org/freeipa/ticket/6154 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* compat: Save server's API version in for pre-schema serversDavid Kupka2016-08-033-94/+97
| | | | | | | | | | | | When client comunicates with server that doesn't support 'schema' command it needs to determine its api version to be able to use the right compat code. Storing information about server version reduces the need to call 'env' or 'ping' command only to first time the server is contacted. https://fedorahosted.org/freeipa/ticket/6069 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* schema: Generate bits for help load them on requestDavid Kupka2016-08-031-12/+42
| | | | | | | | | | Store name, summary, topic_topic and exclude in single entry in cache for all commands. These data are needed for help and storing and loading them together allows fast help response. https://fedorahosted.org/freeipa/ticket/6048 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* schema: Introduce schema cache formatDavid Kupka2016-08-031-0/+10
| | | | | | | | | | | Information about schema cache format is stored in every cache item. When schema cache format changes in incompatible way format will be increased. When format stored in cache doesn't match currently used format the entry in cache is ignored. https://fedorahosted.org/freeipa/ticket/6048 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* frontend: Change doc, summary, topic and NO_CLI to class propertiesDavid Kupka2016-08-035-36/+104
| | | | | | | | | Avoid need to instantiate all commands just to get information for displaying help. https://fedorahosted.org/freeipa/ticket/6048 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* schema: Speed up schema cacheDavid Kupka2016-08-031-124/+177
| | | | | | | | | | | | | Check presence of schema in cache (and download it if necessary) on __init__ instead of with each __getitem__ call. Prefill internal dictionary with empty record for each command to be able to quickly determine if requested command exist in schema or not. Rest of schema data are read from cache on first attempt to retrive them. https://fedorahosted.org/freeipa/ticket/6048 https://fedorahosted.org/freeipa/ticket/6069 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* vault: Catch correct exception in decryptDavid Kupka2016-08-031-1/+1
| | | | | | | | ValueError is raised when decryption fails. https://fedorahosted.org/freeipa/ticket/6160 Reviewed-By: David Kupka <dkupka@redhat.com>
* compat: fix ping callJan Cholasta2016-07-281-1/+1
| | | | | | | | | Copy & paste accident caused the ping command to be called with an unwanted argument, which results in an exception. Remove the argument to fix it. https://fedorahosted.org/freeipa/ticket/6129
* client: fix hiding of commands which lack server supportJan Cholasta2016-07-283-6/+12
| | | | | | | | | | Rather than checking the server counterpart's NO_CLI, which may be False even for commands supported on the server, check wheter the server counterpart is a command defined on the server or a local placeholder. https://fedorahosted.org/freeipa/ticket/6089 Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
* Revert "Enable vault-* commands on client"Jan Cholasta2016-07-281-0/+16
| | | | | | | | This reverts commit 9feeaca9fb552229638ce98086aa75905a45b48d. https://fedorahosted.org/freeipa/ticket/6089 Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
* frontend: copy command arguments to output params on clientJan Cholasta2016-07-201-0/+4
| | | | | | | | | | | | | | | In commit f554078291d682d59956998af97f7d3066fbe7e7 we stopped copying command arguments to output params in order to remove redundancies and reduce API schema in size. Since then, output params were removed from API schema completely and are reconstructed on the client. Not including arguments in output params hides failed members from member commands' CLI output. To fix this, copy arguments to output params again, but only on the client side. https://fedorahosted.org/freeipa/ticket/6026 Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
* vault-add: set the default vault type on the client side if none was givenMartin Babinsky2016-07-131-0/+5
| | | | | | | | | | | | `vault-add` commands does much processing depending on the vault type even before the request is forwarded to remote server. Since default values for parameters are now filled only on server side, the client-side logic would fail if the vault type was not explicitly given. In this case we have to retrieve and use the default vault type from schema. https://fedorahosted.org/freeipa/ticket/6047 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* Removed unused method parameter from migrate-dsStanislav Laznicka2016-07-131-1/+1
| | | | | | | | | An extra parameter on client side command override of migrate-ds output was causing errors. https://fedorahosted.org/freeipa/ticket/6034 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Enable vault-* commands on clientMartin Basti2016-07-121-16/+0
| | | | | | | | | | | | | Client plugins fot vault commands were disabled by NO_CLI=True, inherited from vault_add_interal, that is always NO_CLI=True. Introduced by this commit 8278da6967dbe425b4e0c6cf37dc1c53052525b2 Removed NO_CLI=True from client side plugins for vault. https://fedorahosted.org/freeipa/ticket/6035 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
* schema: Perform the check for schema update when force_schema_check is TrueDavid Kupka2016-07-011-1/+6
| | | | | | https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* ipalib: introduce Principal parameterMartin Babinsky2016-07-011-0/+2
| | | | | | | | | | | This patch introduces a separate Principal parameter that allows the framework to syntactically validate incoming/outcoming principals by using a single shared codebase. https://fedorahosted.org/freeipa/ticket/3864 Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* client: add support for pre-schema serversJan Cholasta2016-07-01196-103/+139688
| | | | | | | | | | | | | | | Bundle remote plugin interface definitions for servers which lack API schema support. These server API versions are included: * 2.49: IPA 3.1.0 on RHEL/CentOS 6.5+, * 2.114: IPA 4.1.4 on Fedora 22, * 2.156: IPA 4.2.0 on RHEL/CentOS 7.2 and IPA 4.2.4 on Fedora 23, * 2.164: IPA 4.3.1 on Fedora 23. For servers with other API versions, the closest lower API version is used. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* client: do not crash when overriding remote command as methodJan Cholasta2016-07-011-2/+8
| | | | | | | | | Do not crash during API initialization when overriding remote command that is not a method with MethodOverride. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>