1. 09 Nov, 2004 1 commit
    • Leigh B. Stoller's avatar
      Here is a fun little change. Lacking native perl SSL XMLRPC tools, I · a7482569
      Leigh B. Stoller authored
      put together a little library that provides the illusion of nativeness.
      sslxmlrpc_client.py.in: New "rawmode" (-r) option. Instead of the
      usual command line operation, input raw XMLRPC goo and send that over
      to the server. The raw XMLRPC reply goo is spit out on stdout. In
      other words, it is up to the caller to generate the XML stuff, and
      convert back from XML to a reply structure.
      libxmlrpc.pm.in: A new perl library that exports one real method
      called, interestingly enough, CallMethod($$$). The first and second
      arguments are the module and method to invoke in the RPC server. The
      third argument is an arbitrary perl data structure to convert into XML
      and pass to the server. For example:
      	libxmlrpc::CallMethod("experiment", "state",
      	                      {"proj" => "testbed", "exp" => "myemulab"});
      The return value of CallMethod is whatever data structure the server
      returned, or undef if there is an internal error or if the RPC fails
      with a transport error (one of the errors in emulabclient.py).
      In case it is not obvious, CallMethod converts the argument to XML
      using the RPC:XML perl module, forks off a child to run
      sslxmlrpc_client.py.in in rawmode, sends it the XML on its stdin,
      reads back the XML for the reply from its stdout, and converts that to
      a perl data structure to return to the caller.
      The more interesting use of this new goo is to invoke the new
      "elabinelab" module in the RPC server, which exports some new methods
      to support elabinelab. The idea is that the inner boss will invoke
      routines (like setup/destroy vlans, or power cycle) using the RPC
      server, and the SSL key of the creator of the inner emulab. This will
      be described in more detail when I check in those changes.
      There is also a Config() method that is used to set the SSL cert path,
      debugging, verbosity, etc. You can take a look if you are interested.
      This can be arbitrarily fancy, but I don't need this for many things.
  2. 25 Aug, 2004 1 commit
  3. 03 Aug, 2004 1 commit
    • Leigh B. Stoller's avatar
      A couple more minor changes before I turn the new stuff loose. · 8fddf3ce
      Leigh B. Stoller authored
      * Added a wrapper class so that you can invoke methods as
        experiment.swapexp or node.reboot. So instead of invoking as
        /XMLRPC/experiment can calling swapexp, you can call the server as
        /XMLRPC and call experiment.swapexp. This allows you to use a single
        connection to talk to different parts of the API. Note this is standard
        (or is it defacto) syntax in XMLRPC.
      * Changed the demonstration client to talk the server this way.
      * Changed paperbag to allow this as well; the xmlrpc server is invoked with
        no args, which tells it to export the wrapper interface instead of a
        specific module interface.
      * A few more cleanups in the server, more permission checks, etc.
  4. 21 Jun, 2004 1 commit
  5. 12 May, 2004 1 commit
    • Leigh B. Stoller's avatar
      Minor change so that I can feed dictionaries on the command line, as · 9049532a
      Leigh B. Stoller authored
      would be required to use delay_config or link_config. For example:
      	sshxmlrpc_client.py link_config proj=testbed exp=two-wireless \
      		link=lan0 "params={'a': 4}"
      Note last argument, which is eval'ed into a dictionary before it is
      sent across in the RPC. This is done whenever first character of the
      value is a "{" ... otherwise it is treated as a literal.
  6. 07 May, 2004 1 commit
  7. 23 Mar, 2004 2 commits
    • Leigh B. Stoller's avatar
      Add some silly options for testbed developers: · 8af58167
      Leigh B. Stoller authored
      * -a: This already existed; it modifies the path given to the server
        so that people without a paperbag shell can run the rpc server.
      * -z: Modify the path above so that it runs the server from the
        current user's devel tree instead of the main tree.
      * -x <user>: Instead of the current user's devel tree, use another
        devel tree.
      So, to run my own server:
      	/usr/testbed/devel/stoller/bin/sshxmlrpc_client.py -a -z
      To run Rob's devel server:
      	/usr/testbed/devel/stoller/bin/sshxmlrpc_client.py -a -z -x ricci
      Sorry for all this sillyness.
    • Leigh B. Stoller's avatar
  8. 18 Mar, 2004 1 commit
  9. 17 Mar, 2004 3 commits
  10. 16 Mar, 2004 1 commit
  11. 15 Mar, 2004 1 commit
  12. 10 Mar, 2004 1 commit