Index...
Centrallix Documentation
|
1.3.1 test_obj Command-Line
Overview of test_obj
test_obj is a command-line tool which allows you to do some useful things with Centrallix without actually running the full Centrallix server process. This page contains an overview of how this tool works.
If you compiled from source, make sure you have built test_obj. In your centrallix directory, type:
make test_obj
Then, to run test_obj, just type:
test_obj
at the prompt. The program will ask you to log in, just to set up your session. You will then be presented with a prompt, at which you can enter commands:
Centrallix/0.7.5 build #1349-323 DEVELOPMENT
Copyright (C) 1998-2007 LightSys Technology Services, Inc.
An open source community developed project. Provided with
ABSOLUTELY NO WARRANTY. See the file 'COPYING' for details.
mod: osdriver http (HTTP ObjectSystem Driver, 0.1.0)
mod: osdriver xml (XML ObjectSystem Driver, 0.0.1)
mod: osdriver mime (MIME ObjectSystem Driver, 0.1.0)
mod: osdriver gzip (GZIP ObjectSystem Driver, 0.1.0)
mod: osdriver mbox (MBOX ObjectSystem Driver, 0.0.1)
mod: osdriver pop (POP ObjectSystem Driver, 0.0.1)
Username: gbeeley
Password:
OSML:/> ls
LICENSE.txt system/file
tests system/directory
apps system/directory
centrallix-os.spec system/file
INSTALL.txt system/file
sys system/directory
tmp system/directory
index.app system/file
samples system/directory
OSML:/>
Command-Line Options
Test_obj has several command line options:
Option | Description |
-c {file} | Use a different configuration file. Default is 'centrallix.conf' in the usual place (see [1.3 Running Centrallix]). |
-C {command} | Give test_obj a single command to run, after which it will exit. |
-f {file} | Tell test_obj to read its commands from the given file. |
-o {file} | Send output from commands to the given file. |
Commands
There are a number of different commands that can be run from within test_obj to perform operations on the OSML and view data in the OSML.
Command | Description |
annot | Add or change the annotation on an object. An annotation is a standard property that all objects have which is used to briefly describe the object.
Usage: annot {objectpath} |
cd | Change the current working directory in the OSML.
Usage: cd {objectpath} |
copy | Copy one object's content to another.
Usage: copy {srctype|dsttype} {objectpath-from} {objectpath-to} |
create | Create a new object.
Usage: create {objectpath}
If objectpath is *, then the OSML will automatically name the object if it is appropriate for that to be done.
The 'create' command will ask for attributes, one per line. Use a blank line to finish entering properties in the form of "attributename=this is some value"
|
csv | Run a SQL query and print the results in CSV format. Useful when exporting data or running a test suite item, especially in combination with the 'output' command. This is most useful when all objects in the query result set have the same set of attributes. See [5. SQL Language] for more information.
Usage: csv {sql-query}
|
delete | Delete an object.
Usage: delete {objectpath} |
exec | Call a method on an object.
Usage: exec {objectpath} {methodname} {parameter} |
hints | Display presentation hints of a particular attribute on an object.
Usage: hints {objectpath} {attribute} |
help | Display a list of commands. |
ls | (also: list) List the objects in the current directory in the objectsystem, or if an objectpath is supplied, list the objects within that object.
Usage: ls {objectpath} |
output | Change where command output is sent. This command takes a filename, not an objectpath, as output is saved into the local filesystem, not into the OSML. This command will override any "-o" option passed to test_obj. If no filename is supplied, output reverts to standard output.
Usage: output {filename} |
print | Display an object's content.
Usage: print {objectpath} |
query | Run a SQL query, displaying every attribute from every object in the query result set on a separate line. See [6. SQL Language] for more information.
Usage: query {sql-query} |
quit | Exit from test_obj.
Usage: quit |
show | Display an object's attributes and methods, as well as presentation hints where applicable and object flags.
Usage: show {objectpath} |
Comments...
(none yet)
Add a Comment...
|