Hello there,

this is what I get:

~# ./xml-rpc-api2html http://localhost:8005
<html>
<head><title>XML API for http://localhost:8005</title>
</head>
<body>
<h1>XML-RPC API for http://localhost:8005</h1>

See http://www.linuxdoc.org/HOWTO/XML-RPC-HOWTO/index.html for instructions
on using XML-RPC with Perl, Python, Java, C, C++, PHP, etc.
<h2>Methods</h2>
<hr>

<h3>system.listMethods</h3>
  system.listMethods() => ['add', 'subtract', 'multiple']  Returns a list
  of the methods supported by the server.<hr>

<h3>system.methodHelp</h3>
  system.methodHelp('add') => "Adds two integers together"  Returns a
  string containing documentation for the specified method.<hr>

<h3>system.methodSignature</h3>
  system.methodSignature('add') => [double, int, int]  Returns a list
  describing the signature of the method. In the above example, the add
  method takes two integers as arguments and returns a double result.  This
  server does NOT support system.methodSignature.<hr>

<h3>xend.domain</h3>
  <hr>

<h3>xend.domain.configure</h3>
  Configure an existing domain.  <br><b>param: </b> vmconfig: vm
  configuration<hr>

<h3>xend.domain.cpu_sedf_get</h3>
  Get Simple EDF scheduler parameters for a domain.<hr>

<h3>xend.domain.cpu_sedf_set</h3>
  Set Simple EDF scheduler parameters for a domain.<hr>

<h3>xend.domain.create</h3>
  <hr>

<h3>xend.domain.destroy</h3>
  Terminate domain immediately.<hr>

<h3>xend.domain.destroyDevice</h3>
  <hr>

<h3>xend.domain.device_configure</h3>
  <hr>

<h3>xend.domain.device_create</h3>
  <hr>

<h3>xend.domain.dump</h3>
  Dump domain core.<hr>

<h3>xend.domain.getDeviceSxprs</h3>
  <hr>

<h3>xend.domain.getRestartCount</h3>
  <hr>

<h3>xend.domain.getVCPUInfo</h3>
  <hr>

<h3>xend.domain.ioport_range_disable</h3>
  Disable access to a range of IO ports for a domain  <br><b>param: </b>
  first: first IO port <br><b>param: </b> last: last IO port
  <br><b>returns: </b>: 0 on success, -1 on error<hr>

<h3>xend.domain.ioport_range_enable</h3>
  Enable access to a range of IO ports for a domain  <br><b>param: </b>
  first: first IO port <br><b>param: </b> last: last IO port
  <br><b>returns: </b>: 0 on success, -1 on error<hr>

<h3>xend.domain.lookup</h3>
  <hr>

<h3>xend.domain.lookup_by_name_nr</h3>
  <hr>

<h3>xend.domain.lookup_by_name_or_id</h3>
  <hr>

<h3>xend.domain.lookup_by_name_or_id_nr</h3>
  <hr>

<h3>xend.domain.lookup_nr</h3>
  <hr>

<h3>xend.domain.maxmem_set</h3>
  Set the memory limit for a domain.  <br><b>param: </b> mem: memory limit
  (in MiB) <br><b>returns: </b>: 0 on success, -1 on error<hr>

<h3>xend.domain.migrate</h3>
  Start domain migration.<hr>

<h3>xend.domain.pause</h3>
  Pause domain execution.<hr>

<h3>xend.domain.pincpu</h3>
  Set which cpus vcpu can use  <br><b>param: </b> cpumap:  string repr of
  list of usable cpus<hr>

<h3>xend.domain.restore</h3>
  <hr>

<h3>xend.domain.restore_fd</h3>
  Restore a domain from the given file descriptor.<hr>

<h3>xend.domain.save</h3>
  Start saving a domain to file.  <br><b>param: </b> dst:      destination
  file<hr>

<h3>xend.domain.sched_credit_get</h3>
  Get credit scheduler parameters for a domain.<hr>

<h3>xend.domain.sched_credit_set</h3>
  Set credit scheduler parameters for a domain.<hr>

<h3>xend.domain.send_sysrq</h3>
  <hr>

<h3>xend.domain.setMemoryTarget</h3>
  <hr>

<h3>xend.domain.setName</h3>
  <hr>

<h3>xend.domain.setVCpuCount</h3>
  <hr>

<h3>xend.domain.shadow_control</h3>
  Shadow page control.<hr>

<h3>xend.domain.shadow_mem_get</h3>
  Get shadow pagetable memory allocation.<hr>

<h3>xend.domain.shadow_mem_set</h3>
  Set shadow pagetable memory allocation.<hr>

<h3>xend.domain.shutdown</h3>
  <hr>

<h3>xend.domain.unpause</h3>
  Unpause domain execution.<hr>

<h3>xend.domain.waitForDevices</h3>
  <hr>

<h3>xend.domains</h3>
  <hr>

<h3>xend.node.dmesg.clear</h3>
  <hr>

<h3>xend.node.dmesg.info</h3>
  <hr>

<h3>xend.node.info</h3>
  <hr>

<h3>xend.node.log</h3>
  <hr>

Ian Norton-Badrul wrote:
> Ah, I forgot it was broken, 
>
> here use my modified version: (attached)
>
> Ian
>
> On Wed, Mar 21, 2007 at 05:58:44PM +0100, Alexandre Chapellon wrote:
>   
>>    Here is what I get
>>
>>    ~# xml-rpc-api2txt [1]http://localhost:8005
>>    XML-RPC API for [2]http://localhost:8005
>>
>>    See [3]http://www.linuxdoc.org/HOWTO/XML-RPC-HOWTO/index.html for
>>    instructions
>>    on using XML-RPC with Perl, Python, Java, C, C++, PHP, etc.
>>
>>    Can't use string ("signatures not supported") as an ARRAY ref while
>>    "strict refs" in use at /usr/bin/xml-rpc-api2txt line 118.
>>
>>    doesn't seem very good, does it?
>>
>>    Ian Norton-Badrul wrote:
>>
>>  On Wed, Mar 21, 2007 at 04:03:55PM +0100, Alexandre Chapellon wrote:
>>
>>
>>  Ian Norton-Badrul wrote:
>>
>>
>>  Hi Alex,
>>
>>  I belive the xmlrpc server listens on port 8006
>>
>>
>>
>>  Apparently not as if I comment the line "(xend-tcp-xmlrpc-server yes)"
>>  there is no more 8005 port listening according to netstat, in addition
>>  xenman specify a port in the dialog box when you add a new node which
>>  is 8005 by default
>>
>>  Any other Idea?
>>
>>  Do  you (or anyone else) have it working with debian and xen 3.0.3?
>>
>>
>>  My xen 3.0.3 (27th sept 2006) is also listening on 8005 ( ubuntu dapper 
>> server )
>>  My 3.0.4 machine ( ubuntu dapper desktop ) is listening on 8006.
>>
>>  Can you install xml-rpc-api2txt (apt-get install) and point it at
>>  [4]http://localhost:8005
>>
>>  Regards
>>
>>  Ian
>>
>>
>>
>>  Ian
>>
>>  On Wed, Mar 21, 2007 at 03:01:17PM +0100, Alexandre Chapellon wrote:
>>
>>
>>
>>    Ian Norton-Badrul wrote:
>>
>>  Hi Alex,
>>
>>
>>
>>    Hi and first thanks for this fast answer
>>
>>  What version of xen are you running on your remote system? And are you
>>  sure that machine has the xml rpc server running?
>>
>>
>>    I'm running Xen 3.0.3-1 (debian package)
>>    And I have activated xml rpc as show below:
>>    (xend-tcp-xmlrpc-server yes)
>>
>>    By the way netstat shows its listenning on lo:8005... as you can see
>>
>>    ~#netstat -tan
>>    Connexions Internet actives (serveurs et etablies)
>>    Proto Recv-Q Send-Q Adresse locale          Adresse distante        Etat
>>    tcp        0      0 0.0.0.0:8000            0.0.0.0:*               LISTEN
>>    tcp        0      0 0.0.0.0:8002            0.0.0.0:*               LISTEN
>>    tcp        0      0 127.0.0.1:8005          0.0.0.0:*               LISTEN
>>    tcp        0      0 0.0.0.0:9102            0.0.0.0:*               LISTEN
>>    tcp6       0      0 :::22                   :::*                    LISTEN
>>    tcp6       0    128 ::ffff:172.20.255.60:22 ::ffff:172.30.0.1:37519
>>    ESTABLISHED
>>
>>    Am I right?
>>
>>  Ian
>>
>>  On Wed, Mar 21, 2007 at 01:59:49PM +0100, Alexandre Chapellon wrote:
>>
>>
>>  Hy all!
>>
>>  I'm interresting in using xenman to manage my Domain0 and and domU upon
>>  several machines.
>>  Unfortunatly, when I try to connect to a remote node I get a Domain0 not
>>  found in the gui and the following error in the console where I launch
>>  xemna (using sudo xenman):
>>
>>  got expat error  no element found: line 1, column 0
>>
>>  The localhost seems to be working but not the remote ones...
>>
>>  I have configured ssh so that It uses login/pass to connect and tcpdump
>>  shows traffic on the loopback interface when I connect:
>>
>>  16:02:06.662754 IP 127.0.0.1.1134 > 127.0.0.1.8005: . ack 53 win 4099
>>  <nop,nop,timestamp 106887986 106887986>16:02:06.662853 IP 127.0.0.1.8005
>>   > 127.0.0.1.1134: P 53:90(37) ack 298 win 4096 <nop,nop,timestamp
>>  106887986 106887986>
>>  16:02:06.662860 IP 127.0.0.1.1134 > 127.0.0.1.8005: . ack 90 win 4099
>>  <nop,nop,timestamp 106887986 106887986>16:02:06.662920 IP 127.0.0.1.8005
>>   > 127.0.0.1.1134: P 90:114(24) ack 298 win 4096 <nop,nop,timestamp
>>  106887986 106887986>
>>  16:02:06.662926 IP 127.0.0.1.1134 > 127.0.0.1.8005: . ack 114 win 4099
>>  <nop,nop,timestamp 106887986 106887986>
>>  16:02:06.662984 IP 127.0.0.1.8005 > 127.0.0.1.1134: P 114:136(22) ack
>>  298 win 4096 <nop,nop,timestamp 106887986 106887986>
>>  16:02:06.662991 IP 127.0.0.1.1134 > 127.0.0.1.8005: . ack 136 win 4099
>>  <nop,nop,timestamp 106887986 106887986>
>>  16:02:06.663036 IP 127.0.0.1.8005 > 127.0.0.1.1134: P 136:138(2) ack 298
>>  win 4096 <nop,nop,timestamp 106887986 106887986>
>>  16:02:06.663042 IP 127.0.0.1.1134 > 127.0.0.1.8005: . ack 138 win 4099
>>  <nop,nop,timestamp 106887986 106887986>
>>  16:02:06.663083 IP 127.0.0.1.8005 > 127.0.0.1.1134: P 138:2339(2201) ack
>>  298 win 4096 <nop,nop,timestamp 106887986 106887986>
>>  16:02:06.663089 IP 127.0.0.1.1134 > 127.0.0.1.8005: . ack 2339 win 4650
>>  <nop,nop,timestamp 106887986 106887986>
>>
>>
>>  What did I miss?
>>
>>  -------------------------------------------------------------------------
>>  Take Surveys. Earn Cash. Influence the Future of IT
>>  Join SourceForge.net's Techsay panel and you'll get the chance to share your
>>  opinions on IT & business topics through brief surveys-and earn cash
>>  
>> [1][5]http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>  _______________________________________________
>>  XenMan-Users mailing list
>>  [EMAIL PROTECTED]
>>  [3][7]https://lists.sourceforge.net/lists/listinfo/xenman-users
>>
>>
>>  References
>>
>>    Visible links
>>    1. 
>> [8]http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>    2. [9]mailto:XenMan-Users@lists.sourceforge.net
>>    3. [10]https://lists.sourceforge.net/lists/listinfo/xenman-users
>>
>>
>> References
>>
>>    Visible links
>>    1. http://localhost:8005/
>>    2. http://localhost:8005/
>>    3. http://www.linuxdoc.org/HOWTO/XML-RPC-HOWTO/index.html
>>    4. http://localhost:8005/
>>    5. 
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>    6. mailto:[EMAIL PROTECTED]
>>    7. https://lists.sourceforge.net/lists/listinfo/xenman-users
>>    8. 
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>    9. mailto:XenMan-Users@lists.sourceforge.net
>>   10. https://lists.sourceforge.net/lists/listinfo/xenman-users
>>     
>> ------------------------------------------------------------------------
>>
>> #!/usr/bin/perl -w
>> #
>> # A handy little script for printing out an XML-RPC API as a
>> # nicely-formatted text file. (I wrote this in Perl because of all the
>> # spiffy report-generation features.)
>> #
>> # You'll need to get Ken MacLeod's Frontier::RPC2 module from CPAN to use
>> # this.
>> #
>> # Eric Kidd <[EMAIL PROTECTED]>
>> #
>> # This script is part of xmlrpc-c, and may be used and distributed under
>> # the same terms as the rest of the package.
>>
>> use strict;
>>
>> # One global variable for use with Perl's format routines, and one for
>> # use inside an 'exec' block.
>> use vars qw/$helptext $method_list/;
>>
>> # Try to load our Perl XML-RPC bindings, but fail gracefully.
>> eval {
>>     require Frontier::Client;
>> };
>> if ($@) {
>>     print STDERR <<"EOD";
>> This script requires Ken MacLeod\'s Frontier::RPC2 module. You can get this
>> from CPAN or from his website at http://bitsko.slc.ut.us/~ken/xml-rpc/ .
>>
>> For installation instructions, see the XML-RPC HOWTO at:
>>     http://www.linuxdoc.org/HOWTO/XML-RPC-HOWTO/index.html
>>
>> EOD
>>     exit 1;
>> }
>>
>> # Parse our command-line arguments.
>> if (@ARGV != 1 || $ARGV[0] eq "--help") {
>>     print STDERR "Usage: xml-rpc-api2txt serverURL\n";
>>     exit 1;
>> }
>>
>> my $server = Frontier::Client->new(url => $ARGV[0]);
>>
>> # Try (very carefully) to get our a list of methods from the server.
>> local $method_list;
>> eval {
>>     $method_list = $server->call('system.listMethods');
>> };
>> if ($@) {
>>     print STDERR <<"EOD";
>> An error occurred while trying to talk to the XML-RPC server:
>>
>>   $@
>>
>> This may have been caused by several things--the server might not support
>> introspection, it might not be an XML-RPC server, or your network might be
>> down. Try the following:
>>
>>   xml-rpc-api2txt http://xmlrpc-c.sourceforge.net/api/sample.php
>>
>> EOD
>>     exit 1;
>> }
>>
>> # Enter the methods into a hashtable.
>> my @methods = sort @$method_list;
>> my %method_table;
>> foreach my $method (@methods) {
>>     $method_table{$method} = {};
>> }
>>
>> # Get more information for the hash table. Since we need to make lots and
>> # lots of very small XML-RPC calls, we'd like to use system.multicall to
>> # reduce the latency.
>> if (defined $method_table{'system.multicall'}) {
>>
>>     # This is messy but fast. Everybody hates HTTP round-trip lag, right?
>>     my @call;
>>     foreach my $method (@methods) {
>>      push @call, {methodName => 'system.methodSignature',
>>                   params => [$method]};
>>      push @call, {methodName => 'system.methodHelp',
>>                   params => [$method]};
>>     }
>>     my @result = @{$server->call('system.multicall', [EMAIL PROTECTED])};
>>     for (my $i = 0; $i < @methods; $i++) {
>>      my $method = $methods[$i];
>>      $method_table{$method}->{'signatures'} = $result[2*$i]->[0];
>>      $method_table{$method}->{'help'} = $result[2*$i+1]->[0];
>>     }
>> } else {
>>
>>     # This is easy but slow (especially over backbone links).
>>     foreach my $method (@methods) {
>>      my $signature = $server->call('system.methodSignature', $method);
>>      my $help = $server->call('system.methodHelp', $method);
>>      $method_table{$method}->{'signatures'} = $signature;
>>      $method_table{$method}->{'help'} = $help;
>>     }
>> }
>>
>> # Now, we need to dump the API.
>> print <<"EOD";
>> <html>
>> <head><title>XML API for $ARGV[0]</title>
>> </head>
>> <body>
>> <h1>XML-RPC API for $ARGV[0]</h1>
>>
>> See http://www.linuxdoc.org/HOWTO/XML-RPC-HOWTO/index.html for instructions
>> on using XML-RPC with Perl, Python, Java, C, C++, PHP, etc.
>> EOD
>>
>> print qq|<h2>Methods</h2>
>> <hr>
>> |;
>>
>> foreach my $method (@methods) {
>>     print "\n<h3>$method</h3>\n";
>>     my $methodinfo = "";
>>     # Print a synopsis of the function.
>>     if ($method_table{$method}->{'signatures'} eq 'undef') {
>>      # No documentation. Bad server. No biscuit.
>>      $methodinfo = "unknown $method (...)\n";
>>     } else {
>>          if ( $method_table{$method}->{'signatures'} =~ /^ARRAY/ ){
>>                  for my $signature 
>> (@{$method_table{$method}->{'signatures'}}) {
>>                          if ( $signature =~ /^ARRAY/ ){
>>                                  my $return_type = shift @$signature;
>>                                  my $arguments = join(", ", @$signature);
>>                                  $methodinfo .= "\n<tt>$return_type $method 
>> ($arguments)</tt>\n";
>>                          }
>>                  }
>>          }
>>     }
>>     if ( $methodinfo ne "" ){
>>         print "$methodinfo\n";
>>     }
>>
>>     my $help = $method_table{$method}->{'help'};
>>     if ($help =~ /\n/) {
>>      # Text has already been broken into lines by the server, so just
>>      # indent it by two spaces and hope for the best.
>>      my @lines = split(/\n/, $help);
>>      my $help = "  " . join("\n  ", @lines);
>>      if ( $help =~ /[a-zA-Z0-9]/ ){
>>          print "$help\n";
>>         }
>>     } else {
>>      # Print our help text in a nicely-wrapped fashion using Perl's
>>      # formatting routines.
>>      $helptext = $method_table{$method}->{'help'};
>>      $helptext =~ s/\\n/\n/g;
>>      $helptext =~ s/\\'/'/g;
>>      
>>      $helptext =~ s/[EMAIL PROTECTED]/<br><b>param: <\/b>/g;
>>              $helptext =~ s/[EMAIL PROTECTED]/<br><b>returns: <\/b>/g; 
>>         $helptext =~ s/[EMAIL PROTECTED]/<br><b>return type: <\/b>/g;
>>
>>      $helptext .= "<hr>";
>>
>>      write;
>>     }
>> }
>>
>> format STDOUT =
>>   ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~
>>   $helptext
>> .
>>     
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
XenMan-Users mailing list
XenMan-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xenman-users

Reply via email to