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>
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>
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>
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>