XML-RPC: Implement XML-RPC handling for remote administration
authorMichal Novotny <minovotn@redhat.com>
Wed, 3 Oct 2012 21:44:31 +0000 (23:44 +0200)
committerMichal Novotny <minovotn@redhat.com>
Wed, 3 Oct 2012 21:58:27 +0000 (23:58 +0200)
commit7ff0c54b25c2cd55721b84fd297a800eabb70fb3
treecb7c552a4a87e7a8531f6ce17bef59c871b80c42
parentefa949dcb1dcb5af098c2134b484f181eb37faaa
XML-RPC: Implement XML-RPC handling for remote administration

This will be later used for the Android application to access
the php-virt-control instances directly from your phone.

The architecture is following:
1. The scope/namespace is defined in the XmlRPC.php and is
   recognized to a real class
2. The method called has the "rpc_" prefix to identify it's
   for the XML-RPC. The method syntax is having ID of the user,
   libvirt instance object and also the input data array, i.e.

     function rpc_foo($idUser, $lv, $data) {...}

   The data array is having all the data from XMLRPC data params
   element set.

   The necessary information consist of API key and connection
   information for the libvirt instance (libvirt connection URI
   and possible username and password, e.g. for SASL auth).
3. The output of the rpc_*() function is being either array or
   a simple string which is formatted to the valid XMLRPC reply
   data elements.

For XMLRPC testing please see the xmlrpc-test.py python script.

Signed-off-by: Michal Novotny <minovotn@redhat.com>
15 files changed:
classes/XmlRPC.php [new file with mode: 0644]
classes/database-mysql.php
classes/database.php
classes/language.php
classes/libvirt-domain.php
classes/libvirt-info.php
classes/libvirt-network.php
classes/loggerBase.php
dialog-login.php
init.php
lang/cs.php
lang/en.php
pages/users.php
xmlrpc-test.py [new file with mode: 0755]
xmlrpc.php [new file with mode: 0644]