summaryrefslogtreecommitdiffstats
path: root/tests/test_ipalib/test_frontend.py
Commit message (Collapse)AuthorAgeFilesLines
* Make an ipa-tests packagePetr Viktorin2013-06-171-1188/+0
| | | | | | | Rename the 'tests' directory to 'ipa-tests', and create an ipa-tests RPM containing the test suite Part of the work for: https://fedorahosted.org/freeipa/ticket/3654
* Add client capabilities, enable messagesPetr Viktorin2013-02-211-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API version the client sends can now be used to check what the client expects or is capable of. All version tests IPA does will be be named and listed in one module, ipalib.capabilities, which includes a function to test a specific capability against an API version. Similarly to Python's __future__ module, capabilities.py also serves as documentation of backwards-incompatible changes to the API. The first capability to be defined is "messages". Recent enough clients can accept a list of warnings or other info under the "messages" key in the result dict. If a JSON client does not send the API version, it is assumed this is a testing client (e.g. curl from the command line). Such a client "has" all capabilities, but it will always receive a warning mentioning that forward compatibility is not guaranteed. If a XML client does not send the API version, it is assumed it uses the API version before capabilities were introduced. (This is to keep backwards compatibility with clients containing bug https://fedorahosted.org/freeipa/ticket/3294) Whenever a capability is added, the API version must be incremented. To ensure that, capabilities are written to API.txt and checked by `makeapi --validate`. Design page: http://freeipa.org/page/V3/Messages Ticket: https://fedorahosted.org/freeipa/ticket/2732
* Add the version option to all CommandsPetr Viktorin2013-02-211-27/+31
| | | | | | | | | | | | | | | | | | | | | | | | | Several Commands were missing the 'version' option. Add it to those that were missing it. Do not remove the version option before calling commands. This means methods such as execute(), forward(), run() receive it. Several of these needed `**options` added to their signatures. Commands in the Cert plugin passed any unknown options to the underlying functions, these are changed to pass what's needed explicitly. Some commands in DNS and Batch plugins now pass version to commands they call. When the option is not given, fill it in automatically. (In a subsequent commit, a warning will be added in this case). Note that the public API did not change: all RPC calls already accepted a version option. There's no need for an API version bump (even though API.txt changes substantially). Design page: http://freeipa.org/page/V3/Messages Tickets: https://fedorahosted.org/freeipa/ticket/2732 https://fedorahosted.org/freeipa/ticket/3294
* Improve output validationPetr Viktorin2012-06-251-2/+18
| | | | | | | | | | | We only checked the length of Command output dictionaries. A misspelled key in would not be caught. Fix the problem by checking if the sets of keys are equal. Add a test. Split the test methods into more manageable pieces. https://fedorahosted.org/freeipa/ticket/2860
* Fail on unknown Command optionsPetr Viktorin2012-06-201-0/+5
| | | | | | | | | | | | | | | | | | When unknown keyword arguments are passed to a Command, raise an error instead of ignoring them. Options used when IPA calls its commands internally are listed in a new Command attribute called internal_options, and allowed. Previous patches (0b01751c, c45174d6, c5689e7f) made IPA not use unknown keyword arguments in its own commands and tests, but since that some violations were reintroduced in permission_find and tests. Fix those. Tests included; both a frontend unittest and a XML-RPC test via the ping plugin (which was untested previously). https://fedorahosted.org/freeipa/ticket/2509
* Finalize plugin initialization on demand.Jan Cholasta2011-11-221-1/+2
| | | | | | | | | | | | This patch changes the way plugins are initialized. Instead of finalizing all the plugins at once, plugins are finalized only after they are accessed (currently applies to Command, Object and Attribute subclasses, only in CLI by default). This change provides significant performance boost, as only the plugins that are actually used are finalized. ticket 1336
* Add ability to specify DNS reverse zone name by IP network address.Jan Cholasta2011-07-151-0/+27
| | | | | | | In order for this to work, chaining of parameters through default_from is made possible. ticket 1474
* Fix i18n related failures in unit tests.Pavel Zuna2011-03-011-1/+1
|
* Add API version and have server reject incompatible clients.Rob Crittenden2011-01-141-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | This patch contains 2 parts. The first part is a small utility to create and validate the current API. To do this it needs to load ipalib which on a fresh system introduces a few problems, namely that it relies on a python plugin to set the default encoding to utf8. For our purposes we can skip that. It is also important that any optional plugins be loadable so the API can be examined. The second part is a version exchange between the client and server. The version has a major and a minor version. The major verion is updated whenever existing API changes. The minor version is updated when new API is added. A request will be rejected if either the major versions don't match or if the client major version is higher than then server major version (though by implication new API would return a command not found if allowed to proceed). To determine the API version of the server from a client use the ping command. ticket 584
* Change FreeIPA license to GPLv3+Jakub Hrozek2010-12-201-5/+5
| | | | | | | | | | The changes include: * Change license blobs in source files to mention GPLv3+ not GPLv2 only * Add GPLv3+ license text * Package COPYING not LICENSE as the license blobs (even the old ones) mention COPYING specifically, it is also more common, I think https://fedorahosted.org/freeipa/ticket/239
* Use context to decide which name to return on RequirementsErrorsRob Crittenden2010-10-281-0/+2
| | | | | | | | | | | | | | When a Requirement fails we throw an exception including the name of the field that is missing. To make the command-line friendlier we have a cli_name defined which may or may not match the LDAP attribute. This can be confusing if you are using ipalib directly because the attribute name missing may not match what is actually required (desc vs description is a good example). If you use the context 'cli' then it will throw exceptions using cli_name. If you use any other context it will use the name of the attribute. ticket 187
* Command.output_params not contains params in Command.paramsJason Gerard DeRose2010-02-111-0/+27
|
* Remove __public__ and __proxy__ hold-overs from Plugin classJason Gerard DeRose2010-01-281-16/+0
|
* Take 2: Extensible return values and validation; steps toward a single ↵Jason Gerard DeRose2009-12-101-12/+194
| | | | output_for_cli(); enable more webUI stuff
* Removed util.add_global_options() and frontend.ApplicationJason Gerard DeRose2009-10-141-37/+0
|
* Fix unit tests for plugins using baseldap classes.Pavel Zuna2009-10-051-1/+0
|
* Removed PluginProxy and all its usesJason Gerard DeRose2009-08-051-1/+1
|
* Fix bug in Encoder where tuples were encoded into lists. Fix Encoder and ↵Pavel Zuna2009-06-101-0/+3
| | | | Command.args_options_2_entry unit tests.
* Completed Param.use_in_context() functionality, which is now used by Command ↵Jason Gerard DeRose2009-05-211-4/+101
| | | | and Object
* Rename errors2.py to errors.py. Modify all affected files.Pavel Zuna2009-04-231-7/+7
|
* Finish work replacing the errors module with errors2Rob Crittenden2009-04-201-1/+1
| | | | | | Once this is committed we can start the process of renaming errors2 as errors. I thought that combinig this into one commit would be more difficult to review.
* Add unit test for ipalib.frontend.Command.args_options_2_entry.Pavel Zuna2009-02-241-1/+32
|
* More work on xmlrpc stuff, started migrated more code to use errors2 instead ↵Jason Gerard DeRose2009-02-031-3/+1
| | | | of errors
* Further migration toward new xmlrcp code; fixed problem with unicode ↵Jason Gerard DeRose2009-02-031-2/+0
| | | | Fault.faultString; fixed problem where ServerProxy method was not called correctly
* Added Object.params_minus() method; various small tweaksJason Gerard DeRose2009-02-031-0/+20
|
* Removed depreciated Command.args_to_kw() method; updated CLI to use ↵Jason Gerard DeRose2009-02-031-36/+4
| | | | Command.args_options_2_params() instead
* Added Command.args_options_2_params() method and its unit testsJason Gerard DeRose2009-02-031-2/+49
|
* Command.takes_options and Command.takes_args class attributes can now also ↵Jason Gerard DeRose2009-02-031-2/+2
| | | | be a callable
* All unit tests now working (except for doctests and Rob's xmlrpc tests)Jason Gerard DeRose2009-01-141-18/+15
|
* New Param: got most of unit tests ported (still have 6 errors); haven't ↵Jason Gerard DeRose2009-01-141-50/+26
| | | | ported doctests yet
* New Param: removed more depreciated 'import ipa_types'Jason Gerard DeRose2009-01-141-1/+1
|
* Removed depreciated code from frontend.py; frontend.py no longer imports ↵Jason Gerard DeRose2009-01-141-414/+0
| | | | ipa_types
* Fixed Warning messages about log dir in unit testJason Gerard DeRose2008-12-081-21/+7
|
* Added unit test for Param.ispassword() methodJason Gerard DeRose2008-11-181-0/+16
|
* Command.get_defaults() now returns param.default if param.type is a BoolJason Gerard DeRose2008-11-171-4/+4
|
* env plugin now subclasses from RemoteOrLocalJason Gerard DeRose2008-11-141-5/+5
|
* Added frontend.LocalOrRemote command base class for commands like envJason Gerard DeRose2008-11-141-1/+55
|
* Change Param.__repr__() so it returns the exact expression that could create ↵Jason Gerard DeRose2008-11-131-0/+12
| | | | it; added unit test for Param.__repre__()
* output_for_cli signature is now output_for_cli(textui, result, *args, **options)Jason Gerard DeRose2008-11-121-10/+9
|
* API.env is now an Env instance rather than an Environment instanceJason Gerard DeRose2008-10-271-4/+6
|
* Fixed bug in DefaultFrom where impleied keys were using entire ↵Jason Gerard DeRose2008-10-201-0/+10
| | | | func_code.co_varnames instead of an approprate slice
* Added new Param.flags attribute (set with flags=foo kwarg)Jason Gerard DeRose2008-10-171-0/+3
|
* Reworking Environment, moved it to config.pyMartin Nagy2008-10-171-2/+2
|
* Added Object.get_dn() method; added corresponding unit testsJason Gerard DeRose2008-10-131-0/+14
|
* Param now takes cli_name kwarg that sets Param.cli_name attributeJason Gerard DeRose2008-10-131-0/+2
|
* Base Command.execute() method now raises NotImplementedError; updated unit testsJason Gerard DeRose2008-10-081-0/+3
|
* PEP 257: cleaned up docstrings in test_frontend.pyJason Gerard DeRose2008-10-081-45/+76
|
* Renamed tests/tstutil.py to tests/util.pyJason Gerard DeRose2008-10-071-2/+2
|
* Moved tstutil.py into base of tests so it can be used by all test ↵Jason Gerard DeRose2008-10-071-2/+2
| | | | subpackages more easily
* Cleaned up package and module level docstrings for everything in tests/Jason Gerard DeRose2008-10-071-1/+1
|