summaryrefslogtreecommitdiffstats
path: root/ipalib/util.py
Commit message (Collapse)AuthorAgeFilesLines
* Make data type of certificates more obvious/predictable internally.Rob Crittenden2011-06-211-0/+18
| | | | | | | | | | | | | | | | | | | For the most part certificates will be treated as being in DER format. When we load a certificate we will generally accept it in any format but will convert it to DER before proceeding in normalize_certificate(). This also re-arranges a bit of code to pull some certificate-specific functions out of ipalib/plugins/service.py into ipalib/x509.py. This also tries to use variable names to indicate what format the certificate is in at any given point: dercert: DER cert: PEM nsscert: a python-nss Certificate object rawcert: unknown format ticket 32
* 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
* Add ability to add/remove DNS records when adding/removing a host entry.Rob Crittenden2010-11-231-0/+15
| | | | | | | | | | | | | | | | | | A host in DNS must have an IP address so a valid IP address is required when adding a host. The --force flag will be needed too since you are adding a host that isn't in DNS. For IPv4 it will create an A and a PTR DNS record. IPv6 isn't quite supported yet. Some basic work in the DNS installer is needed to get this working. Once the get_reverse_zone() returns the right value then this should start working and create an AAAA record and the appropriate reverse entry. When deleting a host with the --updatedns flag it will try to remove all records it can find in the zone for this host. ticket 238
* Accept an incoming certificate as either DER or base64 in the service plugin.Rob Crittenden2010-10-081-0/+22
| | | | | | | | | | | | | The plugin required a base64-encoded certificate and always decoded it before processing. This doesn't work with the UI because the json module decodes binary values already. Try to detect if the incoming value is base64-encoded and decode if necessary. Finally, try to pull the cert apart to validate it. This will tell us for sure that the data is a certificate, regardless of the format it came in as. ticket 348
* Remove some additional instances of krbV from ipa-clientRob Crittenden2010-09-101-1/+4
| | | | | | | | | | | Make two krbV imports conditional. These aren't used during a client install so should cause no problems. Also fix the client installer to use the new env option in ipautil.run. We weren't getting the krb5 configuration set in the environment because we were overriding the environment to set the PATH. ticket 136
* Improve serialization to JSON.Pavel Zuna2010-08-121-1/+11
| | | | | | - Make it recursive. - Make Param classes serializable. - Take python native data types into account.
* Make LDAPObject classes JSON serializable.Pavel Zuna2010-08-121-0/+6
|
* Require that hosts be resolvable in DNS. Use --force to ignore warnings.Rob Crittenden2010-08-061-0/+16
| | | | | | | | | | | | | This also requires a resolvable hostname on services as well. I want people to think long and hard about adding things that aren't resolvable. The cert plugin can automatically create services on the user's behalf when issuing a cert. It will always set the force flag to True. We use a lot of made-up host names in the test system, all of which require the force flag now. ticket #25
* Removed util.add_global_options() and frontend.ApplicationJason Gerard DeRose2009-10-141-23/+0
|
* Rename errors2.py to errors.py. Modify all affected files.Pavel Zuna2009-04-231-2/+2
|
* Finish work replacing the errors module with errors2Rob Crittenden2009-04-201-12/+9
| | | | | | 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.
* Utility function to get the local hostnameRob Crittenden2009-02-191-0/+11
|
* Implemented more elegant way for entire plugin module to be conditionally ↵Jason Gerard DeRose2009-02-171-3/+3
| | | | skipped; updated cert.py and ra.py modules to use this
* Removed depreciated xmlrpc_marshal() and xmlrpc_unmarshal() functionsJason Gerard DeRose2009-02-171-27/+0
|
* Remove some duplicated code that was moved to ipaserver and use it Remove ↵Rob Crittenden2009-02-061-0/+5
| | | | some unused files
* Started reworking CLI class into cli pluginJason Gerard DeRose2009-02-031-0/+1
|
* Removed depreciated rpc code from ipalib.util; removed corresponding unit ↵Jason Gerard DeRose2008-12-081-61/+0
| | | | tests in test_util
* Added test_util.test_round_trip() test that tests use of xmlrpc_wrap() and ↵Jason Gerard DeRose2008-11-201-1/+1
| | | | xmlrpc_unwrap() with dumps(), loads(); fixed a bug in xmlrpc_unwrap()
* Added util.xmlrpc_wrap(), util.xmlrpc_unwrap() functions an corresponding ↵Jason Gerard DeRose2008-11-191-0/+64
| | | | unit tests
* Added util.make_repr() function; added corresponding unit testsJason Gerard DeRose2008-11-131-0/+9
|
* Command.get_default() will now fill-in None for all missing non-required paramsJason Gerard DeRose2008-11-121-0/+6
|
* Added custom log formatter util.LogFormatter that makes the human-readable ↵Jason Gerard DeRose2008-10-311-0/+9
| | | | time stamp in UTC
* Logging formats are now env variables; added log_format_stderr_debug format ↵Jason Gerard DeRose2008-10-311-1/+0
| | | | used when env.debug is True
* Reoganized global option functionality to it is easy for any script to use ↵Jason Gerard DeRose2008-10-311-0/+22
| | | | the environment-related global options; lite-xmlrpc.py now uses same global options
* Logging is now configured in API.bootstrap(); removed depreciated ↵Jason Gerard DeRose2008-10-311-33/+0
| | | | util.configure_logging() function
* lite-xmlrpc.py now uses api.bootstrap() property, logs to api.loggerJason Gerard DeRose2008-10-281-2/+1
|
* util.configure_logging() now only configures file logging if it can create ↵Jason Gerard DeRose2008-10-281-5/+7
| | | | the log_dir
* Added util.configure_logging() function; API.bootstrap() now calls ↵Jason Gerard DeRose2008-10-281-1/+35
| | | | util.configure_logging()
* Copied plugin loading function from load_plugins.py to util.py; ↵Jason Gerard DeRose2008-10-271-0/+51
| | | | API.load_plugins() method now calls functions in util
* Implement the host commandsRob Crittenden2008-10-221-0/+9
| | | | | In order for this to work against a v1 database the update host.update needs to be applied
* Added ipalib/util.py with xmlrpc_marshal() and xmlrpc_unmarshal() functions; ↵Jason Gerard DeRose2008-10-021-0/+41
| | | | added corresponding unit tests
* 132: Removed test util.py fileJason Gerard DeRose2008-08-131-57/+0
|
* 125: Added some generic auto-import stuffJason Gerard DeRose2008-08-131-0/+57