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

hdb.h.add

This command adds a new host to the host repository.

Table 7–10 Arguments and Results for the hdb.h.add Command

Argument/Result 

Syntax 

Description 

name 

Required 

String  

The host name  

desc 

Optional 

String  

The host description  

tID 

Required 

HostTypeID  

The ID of the host type  

attr 

Optional 

Hashtable  

The host attributes  

hide 

Optional 

Boolean 

Whether the host is hidden, default false 

pID 

Optional 

HostID 

The ID of the parent host if virtual, or empty if physical  

result 

Host  

The new host  


Note –

The -attr argument only sets the overrides. Attributes not explicitly included retain their default value.



Example 7–2 Example of Adding a Host

This example demonstrates adding a basic host to the provisioning software.

Host name

NewYork-v240

Host type

system#crhost


% ./cr_cli -cmd hdb.h.add -name NewYork-v240  \
-tID NM:system#crhost -u admin -p admin


Example 7–3 Example of Adding a Virtual Host

This example demonstrates adding a virtual host that is located on a server named NewYork-v240.

Virtual host name

MyAppServer-vhost

Host type

system#crhost

Parent host name

NewYork-v240


% ./cr_cli -cmd hdb.h.add -name MyAppServer-vhost  \ 
-tID NM:system#crhost -pID NM:NewYork-v240 -u admin -p admin