]> www.infradead.org Git - users/dhowells/kafs-utils.git/log
users/dhowells/kafs-utils.git
11 years agorxgen: Fix rxrpc_send_data()
David Howells [Tue, 15 Apr 2014 09:42:23 +0000 (10:42 +0100)]
rxgen: Fix rxrpc_send_data()

Make three Fixes to rxrpc_send_data():

 (1) Advance to the next buffer when filling the iovec array rather than
     endlessly cycling over the first one.

 (2) Only clear MSG_MORE if we have sent all the buffered data at the end of
     the transmission phase of a call.

 (3) Don't turn the return value of sendmsg() into just -1 or 0 as we need the
     number of bytes actually sent to allow us to correctly advance the buffer
     cursor.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agorxgen: Clean up the debugging in the AF_RXRPC driver a bit
David Howells [Tue, 15 Apr 2014 09:52:32 +0000 (10:52 +0100)]
rxgen: Clean up the debugging in the AF_RXRPC driver a bit

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "bos prune"
David Howells [Mon, 14 Apr 2014 15:56:25 +0000 (16:56 +0100)]
Implement "bos prune"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoFix argument non-combination checking
David Howells [Mon, 14 Apr 2014 16:11:46 +0000 (17:11 +0100)]
Fix argument non-combination checking

11 years agoImplement "bos exec"
David Howells [Mon, 14 Apr 2014 15:31:06 +0000 (16:31 +0100)]
Implement "bos exec"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "bos restart"
David Howells [Mon, 14 Apr 2014 15:18:59 +0000 (16:18 +0100)]
Implement "bos restart"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "bos setauth"
David Howells [Mon, 14 Apr 2014 15:08:57 +0000 (16:08 +0100)]
Implement "bos setauth"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoMark accesses to global vars in addrcache as 'global'
David Howells [Mon, 14 Apr 2014 14:23:15 +0000 (15:23 +0100)]
Mark accesses to global vars in addrcache as 'global'

Mark accesses to global vars in the addrcache module as 'global' to make sure
Python doesn't do local access instead.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoFix up output and error displaying in commands
David Howells [Mon, 14 Apr 2014 12:42:41 +0000 (13:42 +0100)]
Fix up output and error displaying in commands

Fix up output and error displaying in commands so far implemented.  Replace
usage of print() with output() and outputf() for normal operation and error()
for error display.  debug() is replaced with verbose() which is contingent on
the -verbose switch.

Also add error handling to a number of commands.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoProvide argument exception class and check argument length restrictions
David Howells [Mon, 14 Apr 2014 08:23:54 +0000 (09:23 +0100)]
Provide argument exception class and check argument length restrictions

Create an argument error class specifically for the indication of command line
argument problems and catch it in main.py.

Further, provide checking for string arguments that have length restrictions
in the protocol.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agorxgen: Check maximum length of parameter string or opaque
David Howells [Mon, 14 Apr 2014 07:46:45 +0000 (08:46 +0100)]
rxgen: Check maximum length of parameter string or opaque

Check the maximum length of string or opaque parameter to a function and raise
an exception if it is too long.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agorxgen: The abort table comparator needs to handle big numbers
David Howells [Mon, 14 Apr 2014 07:09:58 +0000 (08:09 +0100)]
rxgen: The abort table comparator needs to handle big numbers

The abort table comparator needs to handle big numbers (larger than
0x7fffffff).  Subtracting a small number from such a big number and then
casting to a signed int results in a negative number, which bsearch()
interprets as indicating that the bigger number is smaller than the smaller
number.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "bos {adduser,removeuser}"
David Howells [Sun, 13 Apr 2014 11:46:16 +0000 (12:46 +0100)]
Implement "bos {adduser,removeuser}"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "bos removehost"
David Howells [Sat, 12 Apr 2014 20:06:37 +0000 (21:06 +0100)]
Implement "bos removehost"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "bos {startup,shutdown}"
David Howells [Sat, 12 Apr 2014 19:50:10 +0000 (20:50 +0100)]
Implement "bos {startup,shutdown}"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "bos {start,stop}" and make "bos delete" handle multiple instances
David Howells [Sat, 12 Apr 2014 16:47:54 +0000 (17:47 +0100)]
Implement "bos {start,stop}" and make "bos delete" handle multiple instances

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "bos delete"
David Howells [Sat, 12 Apr 2014 14:53:25 +0000 (15:53 +0100)]
Implement "bos delete"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "bos create"
David Howells [Sat, 12 Apr 2014 13:58:29 +0000 (14:58 +0100)]
Implement "bos create"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoPreface AFS error messages with the program name
David Howells [Sat, 12 Apr 2014 14:52:45 +0000 (15:52 +0100)]
Preface AFS error messages with the program name

When printing an error message passed through AFSException, preface it with
the name the program was run as.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoProvide separate arg interpretation functions for multivalued arguments
David Howells [Sat, 12 Apr 2014 14:51:03 +0000 (15:51 +0100)]
Provide separate arg interpretation functions for multivalued arguments

Provide separate arg interpretation functions for multivalued arguments so
that the single-valued versions return a non-list and the multivalued returns
a list.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "bos addhost"
David Howells [Sat, 12 Apr 2014 13:36:28 +0000 (14:36 +0100)]
Implement "bos addhost"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoUse gethostbyname_ex() and gethostbyaddr() rather than the DNS resolver
David Howells [Sat, 12 Apr 2014 13:33:46 +0000 (14:33 +0100)]
Use gethostbyname_ex() and gethostbyaddr() rather than the DNS resolver

Use gethostbyname_ex() and gethostbyaddr() for A and PTR record retrieval
rather than using the DNS resolver directly so that /etc/hosts and suchlike
are also used.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "bos setcellname"
David Howells [Sat, 12 Apr 2014 12:59:34 +0000 (13:59 +0100)]
Implement "bos setcellname"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "bos getrestricted"
David Howells [Fri, 11 Apr 2014 23:29:02 +0000 (00:29 +0100)]
Implement "bos getrestricted"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "bos getrestart"
David Howells [Fri, 11 Apr 2014 23:03:15 +0000 (00:03 +0100)]
Implement "bos getrestart"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "bos status"
David Howells [Fri, 11 Apr 2014 16:39:28 +0000 (17:39 +0100)]
Implement "bos status"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agorxgen: The string and bytes decode functions must advance the cursor
David Howells [Fri, 11 Apr 2014 22:57:53 +0000 (23:57 +0100)]
rxgen: The string and bytes decode functions must advance the cursor

The string and bytes decode functions (py_dec_string() and rxrpc_dec_bytes())
need to advance the extraction cursor after extracting so the data doesn't get
reused.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "bos listusers"
David Howells [Fri, 11 Apr 2014 16:28:56 +0000 (17:28 +0100)]
Implement "bos listusers"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "bos getdate"
David Howells [Fri, 11 Apr 2014 16:04:43 +0000 (17:04 +0100)]
Implement "bos getdate"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "bos listhosts" and "bos getcell"
David Howells [Fri, 11 Apr 2014 15:46:18 +0000 (16:46 +0100)]
Implement "bos listhosts" and "bos getcell"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoCreate AFS standard date and time format library module
David Howells [Fri, 11 Apr 2014 15:35:02 +0000 (16:35 +0100)]
Create AFS standard date and time format library module

Create an python library module to format date and times in the AFS standard
way.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "vos monitor"
David Howells [Fri, 11 Apr 2014 14:15:39 +0000 (15:15 +0100)]
Implement "vos monitor"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoClean up unnecessary imports
David Howells [Fri, 11 Apr 2014 14:10:03 +0000 (15:10 +0100)]
Clean up unnecessary imports

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoIntroduce a server subclass to hold network name and address information
David Howells [Fri, 11 Apr 2014 13:42:00 +0000 (14:42 +0100)]
Introduce a server subclass to hold network name and address information

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agovos listpart and vos partinfo should use common partition name generation
David Howells [Fri, 11 Apr 2014 12:32:54 +0000 (13:32 +0100)]
vos listpart and vos partinfo should use common partition name generation

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "vos examine"
David Howells [Thu, 10 Apr 2014 13:04:52 +0000 (14:04 +0100)]
Implement "vos examine"

Implement the "vos examine" command.  There is a lot of common display code
between this and several of the other commands, so the common bits are drawn
out into a library module for all to share.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoAllow the volserver class to be instantiated with an int address
David Howells [Fri, 11 Apr 2014 12:27:30 +0000 (13:27 +0100)]
Allow the volserver class to be instantiated with an int address

Allow the volserver class to be instantiated with an int address that
represents a binary coded IPv4 address.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoWhen processing a singular volume name arg, extract it from the array
David Howells [Fri, 11 Apr 2014 12:26:00 +0000 (13:26 +0100)]
When processing a singular volume name arg, extract it from the array

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoC can't just return exception classes to python to raise an exception
David Howells [Fri, 11 Apr 2014 12:24:06 +0000 (13:24 +0100)]
C can't just return exception classes to python to raise an exception

C can't just return exception classes to python to raise an exception, it must
instead call something like PyErr_Format().

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoDeclare RXKAD abort messages
David Howells [Fri, 11 Apr 2014 12:22:24 +0000 (13:22 +0100)]
Declare RXKAD abort messages

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agorxgen: Save trailing comments on error codes in .xg files for exception message
David Howells [Fri, 11 Apr 2014 12:21:28 +0000 (13:21 +0100)]
rxgen: Save trailing comments on error codes in .xg files for exception message

Save the trailing comment on an error code definition in a .xg file and attach
it to the python exception raised if a matching abort is received.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "vos listvol"
David Howells [Wed, 9 Apr 2014 23:13:39 +0000 (00:13 +0100)]
Implement "vos listvol"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoSave raw argument list for each switch
David Howells [Thu, 10 Apr 2014 10:19:56 +0000 (11:19 +0100)]
Save raw argument list for each switch

Several of the switch parameters have their argument lists cooked by the
argument parser.  This means we cannot get at the original string(s) when
producing error messages.

Save the raw argument list for each switch in the parameters dictionary as a
list of strings attached to a key of "raw.<switchname>".

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoAdd a convenience module for partition ID handling
David Howells [Thu, 10 Apr 2014 10:17:25 +0000 (11:17 +0100)]
Add a convenience module for partition ID handling

Add a convenience module for partition ID handling.  One function translates
"/vicepX[Y]", "vicepX[Y]", "X[Y]" and "N" into a numeric ID and range checks
it.  Another function translates a numeric ID back into "/vicepX[Y]".

Make the argument parser use it.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoFix "vos listaddrs" with -host
David Howells [Wed, 9 Apr 2014 23:05:16 +0000 (00:05 +0100)]
Fix "vos listaddrs" with -host

Fix "vos listaddrs" with -host to expect a host name or ip address rather than
a UUID.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agorxgen: Emit individual exception classes for defined abort codes and raise them
David Howells [Wed, 9 Apr 2014 22:38:32 +0000 (23:38 +0100)]
rxgen: Emit individual exception classes for defined abort codes and raise them

Emit an exception class for each defined abort code and raise the appropriate
exception when an abort is received.  Each set of classes is subclassed from a
package-specific class (eg. AbortVL_NOENT -> VLAbort) and each
package-specific class is subclassed from a generic class (eg. VLAbort ->
RemoteAbort) so that all package codes can be trapped in one statement and all
remote aborts can be trapped together.

If an unknown code is received, then this is raised as RemoteAbort only.

RxRPC/rxgen codes are supplied now also in the rxgen.xg file under the RXGEN
package name.

KAA/KAM/KAT codes are under the KA package.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "vos listaddrs"
David Howells [Wed, 9 Apr 2014 16:44:11 +0000 (17:44 +0100)]
Implement "vos listaddrs"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agorxgen: Set struct members correctly in struct types
David Howells [Wed, 9 Apr 2014 20:27:58 +0000 (21:27 +0100)]
rxgen: Set struct members correctly in struct types

When setting a member of a struct (eg. VL.ListAddrByAttributes) where that
member is itself a struct type (eg. afsUUID), we need to check that the type
of the value to assign is the member type, not the container type.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agorxgen: Anchor kafs.RemoteAbort class to module
David Howells [Wed, 9 Apr 2014 20:25:30 +0000 (21:25 +0100)]
rxgen: Anchor kafs.RemoteAbort class to module

Anchor the kafs.RemoteAbort exception class to module so that it can be
referred to by name from scripts.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement "vos partinfo"
David Howells [Wed, 9 Apr 2014 16:24:28 +0000 (17:24 +0100)]
Implement "vos partinfo"

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImplement 'vos listpart'
David Howells [Wed, 9 Apr 2014 14:47:36 +0000 (15:47 +0100)]
Implement 'vos listpart'

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoMove VL connection security determination into cell.py
David Howells [Wed, 9 Apr 2014 14:40:36 +0000 (15:40 +0100)]
Move VL connection security determination into cell.py

Move the Volume Location DB connection security handling into
cell.open_vl_server() as it's common to all vos commands.  It can be
configured directly by passing in a dictionary holding the appropriate
parameters.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoProvide generic check for non-combinable parameters
David Howells [Wed, 9 Apr 2014 14:43:22 +0000 (15:43 +0100)]
Provide generic check for non-combinable parameters

Provide generic check for non-combinable parameters in command py files.  A
list of tuples of pairs of argument names that don't interact is provided by
the name cant_combine_arguments as a global var.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoAllow RxRPC transport security to be requested
David Howells [Tue, 8 Apr 2014 17:23:54 +0000 (18:23 +0100)]
Allow RxRPC transport security to be requested

Honour the -encrypt flag to vos listvldb and make it tell AF_RXRPC to secure
the connection.  This requires an appropriate key to be available in one of
the user's keyrings, labelled:

afs@<UPPERCASE.CELL.NAME>

Without such a key, error:

[Errno 126] Required key not available

will be issued.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years ago"vos listvldb -server xxx" takes a fileserver name, not a vlserver name
David Howells [Tue, 8 Apr 2014 17:08:30 +0000 (18:08 +0100)]
"vos listvldb -server xxx" takes a fileserver name, not a vlserver name

"vos listvldb -server xxx" takes a fileserver name, not a vlserver name, so
provide a class for that and change the argument list.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoCreate 'vos listvldb' command
David Howells [Mon, 7 Apr 2014 22:41:20 +0000 (23:41 +0100)]
Create 'vos listvldb' command

11 years agorxgen: Need to align after encoding an array of bytes or a string
David Howells [Mon, 7 Apr 2014 23:22:16 +0000 (00:22 +0100)]
rxgen: Need to align after encoding an array of bytes or a string

Padding may need to be inserted after encoding an array of bytes or a string
to bring the buffer to 4-byte alignment.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoRemove unused files
David Howells [Thu, 3 Apr 2014 17:57:21 +0000 (18:57 +0100)]
Remove unused files

11 years agoMove to mostly asynchronous model and emit server side pieces
David Howells [Wed, 22 Jan 2014 00:55:24 +0000 (00:55 +0000)]
Move to mostly asynchronous model and emit server side pieces

Move to a mostly asynchronous model for sending and receiving RPC calls and
also emit server side pieces.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoAdd call to VL_ListAttribute() to test program and fix stuff
David Howells [Wed, 15 Jan 2014 13:49:36 +0000 (13:49 +0000)]
Add call to VL_ListAttribute() to test program and fix stuff

Fix the following things:

 (1) Calculation of iovecs for filling the reply data circular buffer from
     recvmsg().

 (2) Set the circular buffer tail pointer correctly when discarding extraneous
     data in the final reply decode phase when waiting for MSG_EOR.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agorxgen: Use the xg files as sources for rxgen
David Howells [Fri, 10 Jan 2014 01:44:40 +0000 (01:44 +0000)]
rxgen: Use the xg files as sources for rxgen

Use the Arla xg files rather than C headers as sources for the rxgen script.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoxg: More cleanups
David Howells [Fri, 10 Jan 2014 01:07:03 +0000 (01:07 +0000)]
xg: More cleanups

More cleanups to the xg files.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoxg: Reindent the xg files
David Howells [Fri, 10 Jan 2014 00:52:12 +0000 (00:52 +0000)]
xg: Reindent the xg files

Reindent the xg files to use tabs.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoxg: All integer types should be in terms of stdint
David Howells [Fri, 10 Jan 2014 00:39:44 +0000 (00:39 +0000)]
xg: All integer types should be in terms of stdint

All integer types should be in terms of stdint:

int8_t uint8_t
int16_t uint16_t
int32_t uint32_t
int64_t uint64_t

Long should not be used as it may be 32-bits or 64-bits.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoxg: Clean up Arla xg files
David Howells [Fri, 10 Jan 2014 00:13:10 +0000 (00:13 +0000)]
xg: Clean up Arla xg files

Clean up Arla xg files to remove CVS-isms and Arla-specific bits.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoImport the Arla XG files
David Howells [Fri, 10 Jan 2014 00:02:20 +0000 (00:02 +0000)]
Import the Arla XG files

Import the Arla XG files.  These are RxRPC RPC API definitions for rxgen to
turn into compilables.

They are licensed under the 3-clause BSD licence from Royal Institute of
Technology, Stockholm, Sweden, which is GPL-compatible.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoIntegrate the afs_xg.h contents back into afs.h and afs_vl.h
David Howells [Thu, 9 Jan 2014 15:59:50 +0000 (15:59 +0000)]
Integrate the afs_xg.h contents back into afs.h and afs_vl.h

Integrate the afs_xg.h contents back into afs.h and afs_vl.h and get rid of
the afs_xg.h file.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agorxgen: Extract C synchronous RPC func emitter
David Howells [Thu, 9 Jan 2014 14:59:13 +0000 (14:59 +0000)]
rxgen: Extract C synchronous RPC func emitter

Extract the code to emit C functions to perform synchronous RPC calls from the
main rxgen script and put into its own module.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agorxgen: Extract C struct marshal/unmarshal code emitter
David Howells [Thu, 9 Jan 2014 14:55:10 +0000 (14:55 +0000)]
rxgen: Extract C struct marshal/unmarshal code emitter

Extract the code to emit the code to marshal/unmarshal C structures from the
main rxgen script and put into its own perl module.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agorxgen: Extract py module emitter
David Howells [Thu, 9 Jan 2014 14:44:55 +0000 (14:44 +0000)]
rxgen: Extract py module emitter

Extract the code to emit the python module creation code from the main rxgen
script and put into its own perl module.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agorxgen: Turn the py module emitter into a perl subroutine
David Howells [Thu, 9 Jan 2014 14:41:04 +0000 (14:41 +0000)]
rxgen: Turn the py module emitter into a perl subroutine

Turn the python module defining code emitter into a perl subroutine within the
main rxgen script.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agorxgen: Extract py wrapper type emitter
David Howells [Thu, 9 Jan 2014 14:33:21 +0000 (14:33 +0000)]
rxgen: Extract py wrapper type emitter

Extract the code to emit python wrapper types from the main rxgen script
and put into its own module.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agorxgen: Extract py wrapper func emitter
David Howells [Thu, 9 Jan 2014 14:29:25 +0000 (14:29 +0000)]
rxgen: Extract py wrapper func emitter

Extract the code to emit python wrapper functions from the main rxgen script
and put into its own module.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agorxgen: Make lists of constants, structs and funcs global
David Howells [Thu, 9 Jan 2014 14:49:29 +0000 (14:49 +0000)]
rxgen: Make lists of constants, structs and funcs global

Make lists of constants, structs and funcs global within the rxgen perl script
and any modules it uses.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agorxgen: Move rxgen.pl to its own dir
David Howells [Thu, 9 Jan 2014 13:50:07 +0000 (13:50 +0000)]
rxgen: Move rxgen.pl to its own dir

Move rxgen.pl to its own dir so that it can be split up.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoInitial code commit now that the VLDB lookup test python script works
David Howells [Wed, 8 Jan 2014 23:38:07 +0000 (23:38 +0000)]
Initial code commit now that the VLDB lookup test python script works

The rxgen.pl script takes a C header file, parses it for #defined constants,
structures declarations and synchronous RPC call function declarations and
emits the following:

- C functions to marshal/unmarshal structs.
- C functions to marshal func arguments and dispatch the request.
- C functions to unmarshal the replies.
- C functions to provide synchronous RPC calls matching the source.
- A python module containing:
  - Python types to wrap the structs.
  - Python methods to wrap the synchronous RPC calls.
  - Python constants to wrap the constants.

It cannot yet handle functions that deal in bulk types/lists of structs and
functions that take interpolated chunks of arbitrary data.

It also does not yet emit server-side parts or top layer of the asynchronous
client side stuff.

It requires python v3 and requires the AF_RXRPC socket family to be available
in the kernel.

A script called "vl-test.py" is included that can be used to test the
functionality.  Run without arguments, it will attempt to retrieve the
"afs.root" volume from the grand.central.org AFS cell.

The test script uses the DNS so may require a python3-dns package installing.

Signed-off-by: David Howells <dhowells@redhat.com>
11 years agoInitial revision
David Howells [Wed, 8 Jan 2014 21:15:54 +0000 (21:15 +0000)]
Initial revision