Sun N1 Service Provisioning System 5.1 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 

[R] 

String  

The host name  

desc 

[O] 

String  

The host description  

tID 

[R] 

HostTypeID  

The ID of the host type  

attr 

[O] 

Hashtable  

The host attributes  

hide 

[O] 

Boolean 

Whether the host is hidden, default false 

pID 

[O] 

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