Download UNICORE Commandline Client: User Manual

Transcript
UNICORE Commandline Client: User Manual
37
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>
15
Scripting
UCC can execute Groovy scripts. Groovy (http://groovy.codehaus.org) is a dynamic scripting
language similar to Python or Ruby, but very closely integrated with Java. The scripting facility
can be used for automation tasks or implementation of custom commands, but it needs a bit of
insight into how UNICORE 6 and UCC work.
15.1
Script context
Your Groovy scripts can access some predefined variables that are summarized in the following
table
Table 8: Variables accessible for scripts
variable
registry
securityProperties
registryURL
messageWriter
commandLine
properties
description
A preconfigured client for
accessing the registry
Security configuration
(keystore, etc)
the URL of the registry
for writing messages to the
user
the command line
defaults from the user’s
properties file
Java type
de.fzj.unicore.uas.client.IRegistryQuery
eu.unicore.security.util.client.IClientProperties
java.lang.String
de.fzj.unicore.ucc.MessageWriter
org.apache.commons.cli.CommandLine
java.util.Properties