Commit Graph
194 Commits
Author SHA1 Message Date
Rob Crittenden 1df10a88cd Add support for client failover to the ipa command-line.
This adds a new global option to the ipa command, -f/--no-fallback. If this
is included then just the server configured in /etc/ipa/default.conf is used.
Otherwise that is tried first then all servers in DNS with the ldap SRV record
are tried.

Create a new Local() Command class for local-only commands. The help
command is one of these. It shouldn't need a remote connection to execute.

ticket #15
2010-08-16 10:35:27 -04:00
Rob Crittenden 35cbbde5bf Fix RPC tests. The method comes back as a unicode from xmlrpclib. 2010-08-06 15:32:53 -04:00
Rob Crittenden 252b73fb3e Skip the i18n test if the test language has not been built 2010-08-06 15:32:00 -04:00
Rob Crittenden e874b41c5b Fix this test to work from source tree root
It would work if you ran the test from its location in tests/test_ipalib
but this isn't the most common method. If you want to run it individually
you can do:

$  ./make-test tests/test_ipalib/test_text.py
2010-08-06 13:11:05 -04:00
Rob Crittenden b7ca3d68c2 Drop our own PKCS#10 ASN.1 decoder and use the one from python-nss
This patch:
- bumps up the minimum version of python-nss
- will initialize NSS with nodb if a CSR is loaded and it isn't already
  init'd
- will shutdown NSS if initialized in the RPC subsystem so we use right db
- updated and added a few more tests

Relying more on NSS introduces a bit of a problem. For NSS to work you
need to have initialized a database (either a real one or no_db). But once
you've initialized one and want to use another you have to close down the
first one.  I've added some code to nsslib.py to do just that. This could
potentially have some bad side-effects at some point, it works ok now.
2010-07-29 10:50:10 -04:00
Rob Crittenden 563c7cde40 Add some basic tests for ipalib/x509 2010-07-29 10:45:11 -04:00
root a3d1b17559 Add weekly periodic schedule to AccessTime param type.
Fix bug #588414
2010-05-04 13:39:42 -04:00
Rob Crittenden 3698dca8e3 Add test cases for AccessTime param and fix some problems in AccessTime 2010-05-03 14:07:34 -06:00
John Dennis 5b9d1ee180 Add gettext translation test using test language. 2010-04-16 10:56:48 -04:00
Jason Gerard DeRose 918721c1d0 XML-RPC signature change 2010-03-30 15:10:58 -04:00
Jason Gerard DeRose c350f84134 Finish deferred translation mechanism 2010-03-16 11:41:22 -06:00
John Dennis b75d06e189 localize doc strings
A number of doc strings were not localized, wrap them in _().
Some messages were not localized, wrap them in _()

Fix a couple of failing tests:
The method name in RPC should not be unicode.
The doc attribute must use the .msg attribute for comparison.

Also clean up imports of _() The import should come from
ipalib or ipalib.text, not ugettext from request.
2010-03-08 21:10:36 -07:00
Rob Crittenden 766757e4d4 Fix unicode failures in Env tests and dn failures in XML-RPC tests 2010-02-26 12:31:11 -05:00
Jason Gerard DeRose 8c46e09735 Translatable Param.label, Param.doc 2010-02-24 02:47:39 -07:00
Jason Gerard DeRose 47f2e618f9 Fix non XML-RPC tests 2010-02-19 18:10:37 -05:00
Jason Gerard DeRose 069763c5c6 Add Object.label class attribute, enable in webUI 2010-02-12 17:07:37 -05:00
Rob Crittenden 338578d10a Allow one-character Param names
This is done explicitly to support the l/localityname attribute.
2010-02-12 13:14:29 -07:00
Jason Gerard DeRose dc2f246d47 Command.output_params not contains params in Command.params 2010-02-11 14:56:10 -05:00
Jason Gerard DeRose c43b69e77c Add support for the 'no_create', 'no_update', and 'no_search' Param flags 2010-02-05 14:32:04 -05:00
Jason Gerard DeRose 1d6cc1bb7b Remove __public__ and __proxy__ hold-overs from Plugin class 2010-01-28 13:32:00 -05:00
Pavel Zuna 0023ffb881 Fix backend.Executioner unit test.
Before the patch that allows to create unshared instances of Connectible
objects, all Connection object were deleted at once in destroy_context().
It made sense at the time, because there was always at most one Connection
per Connectible subclass and Connectible.disconnect() was called only
internally by the Executioner class. Now that we can make arbitrary
connections, it makes more sense to delete the Connection object when
Connectible.disconnect() is called.
2010-01-13 13:39:50 -05:00
Jason Gerard DeRose b6e4972e7f Take 2: Extensible return values and validation; steps toward a single output_for_cli(); enable more webUI stuff 2009-12-10 08:29:15 -07:00
John Dennis 5d2bbf5325 Reading INT parameter class should respect radix prefix
This modifies the original patch by including a unit test, handling floats
when passed as unicode, and handling large magnitude values beyond maxint.

The INT parameter class was not respecting any radix prefix (e.g. 0x) the user
may have supplied. This patch implements _convert_scalar method for the Int
class so that we can pass the special radix base of zero to the int constructor
telling it to determine the radix from the prefix (if present).
2009-11-23 16:53:43 -05:00
Rob Crittenden 680bf7c548 _convert_scalar() should throw an error if passed a tuple or list
A parameter needs to have multivalue set in order to work on lists/tuples
and even then _convert_scalar() will be sent one value at a time.
2009-11-17 09:36:38 -07:00
Jason Gerard DeRose b35849b47d Change Password param so (password, confirm_password) can be passed to _convert_scalar() 2009-10-18 00:35:05 -06:00
Jason Gerard DeRose 5c9437b9e6 Removed util.add_global_options() and frontend.Application 2009-10-14 15:07:17 -06:00
Jason Gerard DeRose f58ff2921d Giant webui patch take 2 2009-10-13 11:28:00 -06:00
Pavel Zuna e01b1b8f99 Fix unit tests for plugins using baseldap classes. 2009-10-05 15:59:09 -04:00
Jason Gerard DeRose c0f558d98b Removed PluginProxy and all its uses 2009-08-05 12:18:51 -04:00
Pavel Zuna 89993d9939 Fix Encoder.decode test. 2009-07-02 13:33:02 -04:00
Pavel Zuna cda0f85ce5 Fix bug in Encoder where tuples were encoded into lists. Fix Encoder and Command.args_options_2_entry unit tests. 2009-06-10 11:51:10 -04:00
Jason Gerard DeRose 7e58b29a92 Completed Param.use_in_context() functionality, which is now used by Command and Object 2009-05-21 14:32:45 -04:00
Jason Gerard DeRose 4f9224774f Added Param 'include' and 'exclude' kwargs; added frontend.UsesParams base class with methods implementing the filtering to restrict params to only certain contexts 2009-05-19 13:49:15 -06:00
Pavel Zuna 9437fc669e Add Encoder base class and method decorators to encode arguments/decode return values. Also - unit tests. 2009-05-19 09:56:39 -04:00
Jason Gerard DeRose ae38a2461f Force xmlrpc tests to run with in_tree=True so config files in /etc/ipa/ don't get read; cleaned up config.Env automagic with regard to running in-tree vs. installed 2009-05-11 16:17:08 -04:00
Pavel Zuna 7d0bd4b895 Rename errors2.py to errors.py. Modify all affected files. 2009-04-23 10:29:14 -04:00
Rob Crittenden 64fa3dd4c3 Finish work replacing the errors module with errors2
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.
2009-04-20 13:58:26 -04:00
Rob Crittenden a8a2664190 Add new type List that converts delimited values into a tuple 2009-03-20 09:29:44 -04:00
Jason Gerard DeRose 13ff27e9ec Fixed Executioner.execute() so that its 'name' argument doesn't conflict with a param called 'name' (which is a valid param name) 2009-03-13 10:31:00 -04:00
Rob Crittenden dbbae00b17 Add maxvalue and minvalue kwargs and rules to Int and Float 2009-03-03 17:49:15 -05:00
Pavel Zuna 8041cd038b Add unit test for ipalib.frontend.Command.args_options_2_entry. 2009-02-24 14:40:47 -05:00
Jason Gerard DeRose b5b2e55be5 Add pattern matching to Str and Bytes 2009-02-17 16:03:08 -05:00
Jason Gerard DeRose 18cecdc515 Removed depreciated xmlrpc_marshal() and xmlrpc_unmarshal() functions 2009-02-17 16:03:08 -05:00
Jason Gerard DeRose 231f0bd65a Finished reworked cli.CLI class into cli.cli plugin 2009-02-03 15:29:04 -05:00
Jason Gerard DeRose 66b6029e40 Ported xmlclient to subclass from Connectible 2009-02-03 15:29:03 -05:00
Jason Gerard DeRose 0cfb0e191a Removed the depreciated Context and LazyContext classes 2009-02-03 15:29:03 -05:00
Jason Gerard DeRose f7375bb609 Added stuff for managing connections and new Executioner backend base class 2009-02-03 15:29:03 -05:00
Jason Gerard DeRose 114b6b8577 Added some missing parameter unit tests; added docstring about Command._repr_iter() and Param.safe_value() 2009-02-03 15:29:02 -05:00
Jason Gerard DeRose 244346dbcb More work on xmlrpc stuff, started migrated more code to use errors2 instead of errors 2009-02-03 15:29:01 -05:00
Jason Gerard DeRose 24b6cb89d4 Further migration toward new xmlrcp code; fixed problem with unicode Fault.faultString; fixed problem where ServerProxy method was not called correctly 2009-02-03 15:29:01 -05:00