Using WS RLS

This section describes a few key usage scenarios and provides examples of using the WS RLS command-line tools.

1. Create mappings

Use the globus-replicalocation-createmappings(1) tool to create mappings.

% $GLOBUS_LOCATION/bin/globus-replicalocation-createmappings \
  -s https://localhost:8443/wsrf/services/ReplicaLocationCatalogService \
  mydata1 gsiftp://path/a/to/mydata1
        

No output is expect from this command when successful.

2. Add mappings

Use the globus-replicalocation-addmappings(1) tool to add mappings.

% $GLOBUS_LOCATION/bin/globus-replicalocation-addmappings \
  -s https://localhost:8443/wsrf/services/ReplicaLocationCatalogService \
  mydata1 gsiftp://path/b/to/mydata1
        

No output is expect from this command when successful.

3. Define attribute definitions

Use the globus-replicalocation-defineattributes(1) tool to define attribute definitions.

% $GLOBUS_LOCATION/bin/globus-replicalocation-defineattributes \
  -s https://localhost:8443/wsrf/services/ReplicaLocationCatalogService \
  myattr1 logical string
        

No output is expect from this command when successful.

4. Add attributes

Use the globus-replicalocation-addattributes(1) tool to add attributes.

% $GLOBUS_LOCATION/bin/globus-replicalocation-addattributes \
  -s https://localhost:8443/wsrf/services/ReplicaLocationCatalogService \
  mydata1 myattr1 logical string attribute-value-goes-here
        

No output is expect from this command when successful.

5. Query mappings

Use the wsrf-query tool to query mappings.

% $GLOBUS_LOCATION/bin/wsrf-query \
  -s https://localhost:8443/wsrf/services/ReplicaLocationCatalogService \
  "query-target: mydata1" \
  "http://globus.org/replica/location/06/01/QueryDialect"
<ns1:MappingStatusType ns1:logical="mydata1" 
ns1:target="gsiftp://path/a/to/mydata1" 
xmlns:ns1="http://www.globus.org/namespaces/2005/08/replica/location"/>
<ns1:MappingStatusType ns1:logical="mydata1" 
ns1:target="gsiftp://path/b/to/mydata1" 
xmlns:ns1="http://www.globus.org/namespaces/2005/08/replica/location"/>
        

6. Query attributes

Use the wsrf-query tool to query attributes.

% $GLOBUS_LOCATION/bin/wsrf-query \
  -s https://localhost:8443/wsrf/services/ReplicaLocationCatalogService \
  "query-logical-attributes: mydata1" \
  "http://globus.org/replica/location/06/01/QueryDialect"
<ns1:AttributeStatusType ns1:key="mydata1" ns1:name="myattr1"
 ns1:objtype="logical" ns1:status="attributeExists" ns1:valtype="string"
 xmlns:ns1="http://www.globus.org/namespaces/2005/08/replica/location">
 <_value xmlns="">attribute-value-goes-here</_value>
</ns1:AttributeStatusType>