[[ucc_admin]]
Admin use of UCC
----------------

You can use UCC to keep track of your jobs, or, with appropriate permissions,
to keep track of all the resources on a site. 
UCC allows to list jobs, Grid sites, and applications, including full details. 
Using the scripting possibilities described in 
xref:ucc_scripting[], UCC can be extended to 
other administrative tasks as well.
 
Security considerations
~~~~~~~~~~~~~~~~~~~~~~~
 
Usually, each UNICORE user has only access to his or her own resources 
(such as jobs). For administrative use, you will need to aquire administrator
privileges. There are two ways to achieve this. 

  - create a dedicated certificate and map it to role "admin" (in the XUUDB, 
or whatever attribute source you are using). This method is recommended if you 
want to remotely administrate UNICORE/X.
 
  - use the server keystore (of the UNICORE/X server you want to administrate) 
as UCC keystore. This will also give you administrator privileges. For this you 
will need to be logged on to the UNICORE/X server.


Filtering lists
~~~~~~~~~~~~~~~

The UCC commands that list server-side things (list-jobs etc) accept 
a filtering option, that can be used to limit the results of the operation.
Filtering works on the XML resource properties of the resource in question.

Filtering is enabled by the "-f" or "--filter" option of the form

-------
-f XMLNAME OPERATOR VALUE
-------
  
where XMLNAME is the name of an XML Element from the WSRF resource properties
document.

For example, to list all your running jobs:

-----
ucc list-jobs -f Status equals RUNNING
-----

To list all jobs submitted on Nov 13, 2007:

-----
ucc list-jobs -f SubmissionTime contains 2007-11-13
-----

etc. 

.Filtering options
[options="header"]
|=============================
| operator (long and short form)| description
| equals, eq  | String equality (ignoring case)
| notequals, neq  | String inequality (ignoring case)
| contains, c  | Substring match
| notcontains, nc  | substring non-match
| greaterthan, gt  | Lexical comparison
| lessthan, lt  | Lexical comparison
|=============================


WSRF commands
~~~~~~~~~~~~~

UCC supports several low-level WSRF operations using the "wsrf" command.

To destroy a resource,
  
------
ucc wsrf destroy <Address>
------
  
To get a property listing (i.e. print the XML resource property document)
  
-----
ucc wsrf getproperties <Address>
-----
  
To extend the lifetime of a resource 
   
-----
ucc wsrf extend <Address> <Days>
-----

These commands can be abbreviated, e.g. + ucc wsrf d <Address> +

