Changeset 529

Show
Ignore:
Timestamp:
02/18/07 15:17:01 (2 years ago)
Author:
hollow
Message:

update all xmlrpc methods except vxdb

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/doc/manual/rpcref/helper.tex

    r522 r529  
    55\section{helper.netup} 
    66 
    7 This method is used to initially set all necessary network configuration 
    8 during startup. 
     7This method is used to setup necessary network configuration during startup of 
     8virtual servers. It is called by \texttt{vshelper} once the kernel has created 
     9the network context. This method is not supposed to be called by a user or 
     10administrator. 
    911 
    1012\begin{rpcsynopsis}{helper.netup}{int xid} 
     
    1921 
    2022\rpcnoerrors 
     23 
     24 
     25% helper.restart 
     26\section{helper.restart} 
     27 
     28This method is used to remember reboot requests from vitrtual servers. It is 
     29called by \texttt{vshelper} once virtual servers have issued a reboot system 
     30call. After the request has been stored in VXDB the kernel terminates all 
     31processes belonging to the virtual server, and calls \texttt{helper.shutdown} 
     32afterwards.  This method is not supposed to be called by a user or 
     33administrator. 
     34 
     35\begin{rpcsynopsis}{helper.restart}{int xid} 
     36\rpcparam{xid}{Unique context ID} 
     37\end{rpcsynopsis} 
     38 
     39\begin{rpcaccess} 
     40\rpccapability{HELPER} and \rpcnoownerchecks. 
     41\end{rpcaccess} 
     42 
     43\rpcreturnnil 
     44 
     45\rpcnoerrors 
     46 
     47 
     48% helper.shutdown 
     49\section{helper.shutdown} 
     50 
     51This method is used to cleanup state data after virtual server shutdown. If a 
     52reboot request has been recorded in VXDB by \texttt{helper.restart} the virtual 
     53server is started again. This method is not supposed to be called by a user or 
     54administrator. 
     55 
     56\begin{rpcsynopsis}{helper.shutdown}{int xid} 
     57\rpcparam{xid}{Unique context ID} 
     58\end{rpcsynopsis} 
     59 
     60\begin{rpcaccess} 
     61\rpccapability{HELPER} and \rpcnoownerchecks. 
     62\end{rpcaccess} 
     63 
     64\rpcreturnnil 
     65 
     66\rpcnoerrors 
     67 
     68 
     69 
     70% helper.startup 
     71\section{helper.startup} 
     72 
     73This method is used to setup necessary configuration during startup. This 
     74includes all configuration except network configuration, which is handled in 
     75\texttt{helper.netup}. % FIXME: cross-ref to explanation of startup procedure 
     76 
     77\begin{rpcsynopsis}{helper.startup}{int xid} 
     78\rpcparam{xid}{Unique context ID} 
     79\end{rpcsynopsis} 
     80 
     81\begin{rpcaccess} 
     82\rpccapability{HELPER} and \rpcnoownerchecks. 
     83\end{rpcaccess} 
     84 
     85\rpcreturnnil 
     86 
     87\rpcnoerrors 
  • trunk/doc/manual/rpcref/vcd.tex

    r522 r529  
    11\chapter{Daemon Administration Methods} 
    22 
     3 
     4% vcd.login 
     5\section{vcd.login} 
     6 
     7This method is used to authenticate against the user database. Internally it is 
     8a no-op method, since every method call must be authenticated. This is only 
     9usefull for GUIs or web panels, to let users login without actually doing 
     10something. 
     11 
     12\rpcsynopsisempty{vcd.login} 
     13 
     14\begin{rpcaccess} 
     15\rpcnocapability and \rpcnoownerchecks. 
     16\end{rpcaccess} 
     17 
     18\rpcreturnnil 
     19 
     20\rpcnoerrors 
     21 
     22 
     23% vcd.status 
     24\section{vcd.status} 
     25 
     26This method is used to retreive internal daemon statistics. The daemon stores a 
     27lot of runtime information in VXDB that can be used by system administrators or 
     28user to check the daemon or account healthiness respectively. 
     29 
     30\rpcsynopsisempty{vcd.status} 
     31 
     32\begin{rpcaccess} 
     33\rpccapability{INFO} and \rpcnoownerchecks. 
     34\end{rpcaccess} 
     35 
     36\rpcreturnnil 
     37 
     38\rpcnoerrors 
     39 
     40 
     41 
     42% vcd.user.caps.add 
     43\section{vcd.user.caps.add} 
     44 
     45This method is used to add capabilities to the internal user database. 
     46 
     47\begin{rpcsynopsis}{vcd.user.caps.add}{string username, string cap} 
     48\rpcparam{username}{Unique username} 
     49\rpcparam{cap}{Capability to add} 
     50\end{rpcsynopsis} 
     51 
     52\begin{rpcaccess} 
     53\rpccapability{AUTH} and \rpcnoownerchecks. 
     54\end{rpcaccess} 
     55 
     56\rpcreturnnil 
     57 
     58\rpcnoerrors 
     59 
     60 
     61% vcd.user.caps.get 
     62\section{vcd.user.caps.get} 
     63 
     64This method is used to get information about configured capabilities in the 
     65internal user database. 
     66 
     67\begin{rpcsynopsis}{vcd.user.caps.get}{string username} 
     68\rpcparam{username}{Unique username} 
     69\end{rpcsynopsis} 
     70 
     71\begin{rpcaccess} 
     72\rpccapability{AUTH} and \rpcnoownerchecks. 
     73\end{rpcaccess} 
     74 
     75\rpcreturnsimple{an \texttt{array} of \texttt{string}s - on for each 
     76        capability - } 
     77 
     78\rpcnoerrors 
     79 
     80 
     81% vcd.user.caps.remove 
     82\section{vcd.user.caps.remove} 
     83 
     84This method is used to remove information about configured capabilities from 
     85the internal user database. 
     86 
     87\begin{rpcsynopsis}{vcd.user.caps.remove}{string username, string cap} 
     88\rpcparam{username}{Unique username} 
     89\rpcparam{cap}{Capability to remove} 
     90\end{rpcsynopsis} 
     91 
     92\begin{rpcaccess} 
     93\rpccapability{AUTH} and \rpcnoownerchecks. 
     94\end{rpcaccess} 
     95 
     96\rpcreturnnil 
     97 
     98\rpcnoerrors 
     99 
     100 
     101% vcd.user.get 
     102\section{vcd.user.get} 
     103 
     104This method is used to get information about configured users in the internal 
     105user database. 
     106 
     107\begin{rpcsynopsis}{vcd.user.get}{string username} 
     108\rpcparam{username}{Unique username} 
     109\end{rpcsynopsis} 
     110 
     111\begin{rpcaccess} 
     112\rpccapability{AUTH} and \rpcnoownerchecks. 
     113\end{rpcaccess} 
     114 
     115\begin{rpcreturncomplex}{\texttt{struct}}{string password, bool admin} 
     116\rpcreturnparam{password}{Password hash for the specified user} 
     117\rpcreturnparam{admin}{Set the administrator flag for the specified user} 
     118\end{rpcreturncomplex} 
     119 
     120 
     121% vcd.user.remove 
     122\section{vcd.user.remove} 
     123 
     124This method is used to remove information about configured users from the 
     125internal user database. 
     126 
     127\begin{rpcsynopsis}{vcd.user.remove}{string username} 
     128\rpcparam{username}{Unique username} 
     129\end{rpcsynopsis} 
     130 
     131\begin{rpcaccess} 
     132\rpccapability{AUTH} and \rpcnoownerchecks. 
     133\end{rpcaccess} 
     134 
     135\rpcreturnnil 
     136 
     137\rpcnoerrors 
     138 
     139 
     140% vcd.user.set 
     141\section{vcd.user.set} 
     142 
     143This method is used to set (add \& change) information about configured users 
     144in the internal user database. 
     145 
     146\begin{rpcsynopsis}{vcd.user.set}{string username, string password, 
     147        bool admin} 
     148\rpcparam{username}{Unique username} 
     149\rpcparam{password}{Password for the specified user (if user already exists 
     150        this value may be empty to not change the password)} 
     151\rpcparam{admin}{Set the administrator flag for the specified user} 
     152\end{rpcsynopsis} 
     153 
     154\begin{rpcaccess} 
     155\rpccapability{AUTH} and \rpcnoownerchecks. 
     156\end{rpcaccess} 
     157 
     158\rpcreturnnil 
     159 
     160\rpcnoerrors 
     161 
     162 
  • trunk/doc/manual/rpcref/vx.tex

    r522 r529  
    88\section{vx.create} 
    99 
     10% FIXME: add cross-ref to template explanation 
    1011This method is used to create a new virtual server using a template cache. 
    1112 
     
    2122 
    2223\begin{rpcaccess} 
    23 \rpccapability{CREATE} and \rpcownerchecks. % FIXME: talk about this in intro 
    24 \end{rpcaccess} 
    25  
    26 \rpcreturnnil 
    27  
     24\rpccapability{CREATE} and \rpcownerchecks. The administrator passes owner 
     25check even if the specified virtual server does not exist, in order to be able 
     26to create new ones. This differs slightly from the normal owner check 
     27behaviour. 
     28\end{rpcaccess} 
     29 
     30\rpcreturnnil 
     31 
     32% FIXME: update errors 
    2833\begin{rpcerrors} 
    2934\rpcerror{MEINVAL}{An empty template cache name was supplied, or the supplied 
     
    8691 
    8792 
     93% vx.load 
     94\section{vx.load} 
     95 
     96This method is used to receive the current load average, i.e. the number of 
     97jobs in the run queue (state R) or waiting for disk I/O (state D) averaged over 
     981, 5, and 15 minutes. 
     99 
     100\begin{rpcsynopsis}{vx.load}{string name} 
     101\rpcparam{name}{Unique virtual server name} 
     102\end{rpcsynopsis} 
     103 
     104\begin{rpcaccess} 
     105\rpccapability{INFO} and \rpcownerchecks. 
     106\end{rpcaccess} 
     107 
     108\begin{rpcreturncomplex}{a \texttt{struct}}{string 1m, string 5m, string 15m} 
     109\rpcreturnparam{1m}{Load average in the last minute} 
     110\rpcreturnparam{5m}{Load average in the last 5 minutes} 
     111\rpcreturnparam{15m}{Load average in the last 15 minutes} 
     112\end{rpcreturncomplex} 
     113 
     114\rpcnoerrors 
     115 
     116 
    88117% vx.reboot 
    89118\section{vx.reboot} 
    90119 
     120% FIXME: add cross-ref to reboot explanation 
    91121This method is used as a wrapper to vx.exec using the configured 
    92122\texttt{reboot} command. 
     
    135165\section{vx.rename} 
    136166 
    137 This method is used to rename a virtual server in the configuration database and 
    138 filesystem. 
     167This method is used to rename a virtual server in the configuration database. 
     168This does not involve filesystem changes, in particular, the virtual servers 
     169root filesystem is not moved or renamed. 
    139170 
    140171\begin{rpcsynopsis}{vx.rename}{string name, string newname} 
     
    150181 
    151182\begin{rpcerrors} 
     183% FIXME: MERUNNING only needed in vx.move? 
    152184\rpcerror{MERUNNING}{The specified virtual server is currently running, 
    153185        therefore it cannot be renamed} 
     
    157189 
    158190 
     191% vx.restart 
     192\section{vx.restart} 
     193 
     194This method is used to restart virtual servers. It has the same effect as 
     195\texttt{vx.reboot} except that it waits for the virtual server to stop and 
     196startup again, which cannot be acomplished by the former. Technically, this is 
     197a combination of \texttt{vx.stop} and \texttt{vx.start} only. 
     198 
     199\begin{rpcsynopsis}{vx.restart}{string name} 
     200\rpcparam{name}{Unique virtual server name} 
     201\end{rpcsynopsis} 
     202 
     203\begin{rpcaccess} 
     204\rpccapability{INIT} and \rpcownerchecks. 
     205\end{rpcaccess} 
     206 
     207\rpcreturnnil 
     208 
     209\begin{rpcerrors} 
     210\rpcerror{MESTOPPED}{The specified virtual server is currently not running, 
     211        therefore it cannot be stopped} 
     212\end{rpcerrors} 
     213 
     214 
    159215% vx.start 
    160216\section{vx.start} 
     
    191247\end{rpcaccess} 
    192248 
    193 \begin{rpcreturncomplex}{\texttt{struct}}{bool running
     249\begin{rpcreturncomplex}{\texttt{struct}}{bool running, int nproc, int uptime
    194250\rpcreturnparam{running}{This value is set to true if the specified virtual 
    195251        server is currently running, false otherwise} 
     252\rpcreturnparam{nproc}{This value is set to the number of processes inside the 
     253        specified virtual server, if it is running, 0 otherwise} 
     254\rpcreturnparam{uptime}{This value is set to the uptime in seconds of the 
     255        specified virtual server, if it is running, 0 otherwise} 
    196256\end{rpcreturncomplex} 
    197257