Sun N1 Service Provisioning System 5.1 Command-Line Interface Reference Manual

Chapter 14 util: Miscellaneous CLI Commands

This chapter describes some miscellaneous commands that can be used to show the version of the Master Server application, formats an object, and perform Perl-type and XSLT transformations on a file.

Overview of the util Commands

The following table summarizes the CLI commands described in this chapter.

Table 14–1 Summary of the util Commands

Command 

Description 

util.msv

Show the version of the Master Server application. 

util.reformat

Format an object. 

util.xfm

Transform a serialized object representation to a human-readable representation. 

util.msv

This command shows the version of the Master Server application.

Table 14–2 Arguments and Result for the util.msv Command

Result 

Syntax 

Description 

result 

String 

The version of the Master Server application 

util.reformat

This command formats an object.

The following list the command-specific output formats that are available to specific commands:

cdb.detail

Detailed text output of components

cmp.detail

Detailed text output of comparisons

fdb.detail

Detailed text output of folders

hdb.detail

Detailed text output of host data

net.detail

Detailed text output of network data

net.summary

Summarized output of network data

pdb.detail

Detailed text output of plans

pe.detail

Detailed text output from the running of plans

plg.detail

Detailed text output of plug-ins

rule.detail

Detailed text output of notification rules

udb.deep

Very detailed text output describing users and user groups

udb.detail

Detailed text output describing users and user groups

udb.summary

Summarized text output describing users and user groups

Table 14–3 Argument and Result for the util.reformat Command

Argument/Result 

Syntax 

Description 

self 

[R] 

Object 

The argument and result 

result 

Object 

The argument unaltered 

util.xfm

This command is used to transform a serialized object representation to a human-readable representation.

Table 14–4 Arguments for the util.xfm Command

Argument 

Syntax 

Description 

in 

[R] 

ReaderWrapper 

The input stream to be transformed 

type 

[R] 

TransformType 

The type of transformation to apply to the input stream 

xfm 

[R] 

ReaderWrapper 

The transformed stream 


Example 14–1 Using the util.xfm Command

This example performs a PERL transformation, which is described in the perl.xml file, on the text specified in the in.txt file. The result is written to standard output. You can use the -of argument to redirect the standard output to a file.


cr_cli -cmd util.xfm -in in.txt -type PERL -xfm perl.xml -u terry -p 123xyz

Since the class of the input stream is ReaderWrapper, you can specify any syntax supported by the String2ReaderWrapper converter to specify each stream's source. For example, to read input from standard input instead of from the in.txt file, use -in - instead of -in in.txt.