create - Create Object

Contents
csp
Contents
Use the create command to create an object.
For information about how to create a model in a secure domain, run ./create to display a usage statement.
The command has the following format:
create model ip=<IP Address | Low_IP-High_IP> [sec_dom=Secure_Domain_Address][comm=Community_Name] [to=Time_Out] [tc=Try_Count] [lh=landscape_handle] | create model mth=model_type_handle [attr=attribute_id,val=value ...] [lh=landscape_handle] | create association rel=relation lmh=left_model_handle rmh=right_model_handle create alarm [-nr] sev=alarm_severity cause=probable_cause_id [mh=model_handle] | create event type=event_type text=event_text [mh=model_handle|lh=landscape_handle]
create alarm
The command create alarm creates an alarm with severity alarm_severity and cause probable_cause_id for the model with model_handle. Valid alarm severity options are: CRITICAL, MAJOR, MINOR, OK, MAINTENANCE, SUPPRESSED, or INITIAL. By default, the new alarm replaces an existing alarm.
If create alarm is entered with a valid alarm_severity, a valid probable_cause_id, and a valid model_handle, the created entry in the alarm table is displayed. The create time is displayed in hh:mm:ss format.
Example: create
$ create alarm sev=CRITICAL cause=0x10308 mh=0x400134 ID Date Time PCauseID MHandle MName MTypeName Severity Ack 984 05/11/2000 12:33:27 0x10308 0x400134 12.84 Bdg_CSI_CN CRITICAL No
create association
The command create association, creates an instance of the relation (an association) between the model with left_model_handle and the model with right_model_handle.
If create association is entered with a valid relation between a valid left_model_handle and right_model_handle, the following message is displayed:
create association: successful
Example: create association
$ create association rel=Collects lmh=0x400009 rmh=0x400134 create association: successful
create event
The create event command, creates an event with type event_type and text event_text for the model that is specified by model_handle. If a landscape_handle is specified, the event is created for the user model that created the event.
In previous versions of the CLI, the event was created for the landscape model.
If model_handle or landscape_handle is not specified, the event is created for the user model that created the event. Or the the event is created for the current model if one has been specified. Some events in
CA Spectrum
lack an associated model. For example, when an application connects to the
SpectroSERVER
, no model is associated with the event.
If create event is entered with a valid event_type, valid event_text, and a valid model_handle or landscape_handle (if present), the entry appears in the event table. The create time is displayed in hh:mm:ss format.
The event_type command (also named an event code in
CA Spectrum
) is a 4-byte hexadecimal number. The two most significant bytes specify the developer ID for the event (0001 for
CA Spectrum
-generated event codes), and the two least significant bytes are a unique event identifier. Not all event types include user-entered text. Examples of such event types are those that include the variable {S 0} in their event format files. For those event types that do not include user-entered text, the event_text parameter is ignored but must still be present on the command line.
For more information, see the Certification section.
Example: create event
$ create event type=0x1061a text="fan down" mh=0x40013 Date Time Type MHandle MName MTypeName 05/11/2000 12:39:42 0x1061a 0x400134 12.84 Bdg_CSI_CNB20
create model
You can specify create model with an IP address or with a model type handle. In either case, the system creates the model in the landscape that is specified by landscape_handle. If landscape_handle is not specified, the command creates the model in the current landscape.
The model_name attribute is required only when creating a User model.
  • If you specify create model with an IP address, the system finds the object at the specified ip_address and creates a model for it. The model has all of the properties of that object including any associated children. For example, if the object is a hub, the create model command creates a model of a hub with all of its ports.
  • You can specify an IPv4 address or an IPv6 address. IPv6 ranges are not supported and this command does not support the setting of attribute IDs.
  • To create several models at once, you can define a range of IP addresses with the create model command. Specify the Low_IP and High_IP parameters, separated by “-”. If the Community_Name is not specified, the newly created model is of type "Pingable". If the Community_Name is specified, the device is modeled to the appropriate model type. The Try_Count and Time_Out options are similar to options in the OneClick 'Create Model by IP' dialog.
  • If you specify the create model command with a model type handle, the system creates a model of type model_type_handle. You can then set the value of one or more attributes for the created model.
  • When you specify the create model command with a model type handle, you can also specify multiple attributes in that one command. Specify multiple 'attribute_id, value' pairs, separating each pair from adjacent pairs by a space.
  • The attribute values that the user specifies when creating a model of a particular model type while using OneClick should be specified in the create model command. Otherwise, Inference Handler errors can occur within a
    SpectroSERVER
    when the model is created. For example, when creating a Hub_CSI_IRM3 model using OneClick, a window is displayed in which you can enter values for Model Name, Network Address, Community String. Specify values for these attributes when using the create model command to create a model of the same type using the CLI.
  • If create model is specified with a valid model_type_handle and valid attribute_id, value pairs (if present), the created model handle is displayed.
  • If create model is specified with a valid ip_address, the created model handle is displayed.
Example: create model
$ create model mth=0x102d attr=0x12d7f,val=132.177.12.84 attr=0x1006e,val=12.84lh=0x400000 created model handle = 0x400134 $ create model ip=206.61.231.1-206.61.231.5 Creating model for IP=206.61.231.1 created model handle = 0x9a00259 Creating model for IP=206.61.231.2 create model: DCM device unreachable Creating model for IP=206.61.231.3 create model: DCM device unreachable Creating model for IP=206.61.231.4 create model: DCM device unreachable Creating model for IP=206.61.231.5 created model handle = 0x9a0025a
By default, the create command displays a maximum of 16 characters for the model name. However, with the environment variable, CLIMNAMEWIDTH, you can specify a different number of characters (up to 1024) to be displayed for model names.