create_swlib_entity

Creates an entity in the software library. Upon successful creation, the entity revision appears under the specified folder on the software library home page.

Format

emcli create_swlib_entity 
      -name="entity_name" 
      -folder_id="folder_id" 
      [-type]="type_internal_id"] 
      [-subtype]="subtype_internal_id"] 
      [-desc="entity_desc"] 
      [-attr="<attr_name>:<attr value>"] 
      [-prop="<prop_name>:<prop value>"] 
      [-secret_prop="<secret_prop_name>:<secret_prop=_value>"] 
      [-note="note_text"] 

[ ]  indicates that the parameter is optionalis optional

Options

  • name

    Name of the entity.

  • folder_id

    Identifier of the folder where the entity is to be created. The software library home page exposes the identifier for folders and entities as a custom column (Internal ID), and is hidden by default.

  • type

    Use the list_swlib_entity_types verb to identify the type.

  • subtype

    Internal identifier of the entity subtype, which defaults to the 'Generic Component' subtype for the 'Component' type. Use the list_swlib_entity_types verb to identify the subtype.

  • desc

    Description of the entity.

  • attr

    An attribute and its value, separated by a colon ( : ). To specify values for multiple attributes, repeat this option.

  • prop

    A configuration property and its value, separated by a colon ( : ). To specify values for multiple properties, repeat this option.

  • secret_prop

    A configuration property and its secret value separated by a colon ( : ). It is recommended to not specify the secret value on the command line. If omitted from the command line, the value is prompted for. To specify values for multiple properties, repeat this option.

  • note

    A note on the entity. For multiple notes, repeat this option.

Examples

Example 1

This example creates an entity named 'myAcmeInstall' under the specified folder. The entity is of type 'Component' and subtype 'Generic Component, by default. The folder identifier value can be found on the software library home page. The software library home page exposes the identifier for folders and entities as a custom column (Internal ID), and is hidden by default.

emcli create_swlib_entity 
      -name="myAcmeInstall" 
      -folder_id=
"oracle:defaultService:em:provisioning:1:cat:B13B3B7B086458CFE040E80A19AA560C" 
 

Example 2

This example creates an entity named 'myAcmeInstall' under the specified folder with the specified description. The entity is of type 'Component' and subtype 'Generic Component' by default. Values for the entity attributes, viz. PRODUCT, PRODUCT_VERSION and VENDOR, are specified. The value for the configuration property named DEFAULT_HOME is specified. A note on the entity is also specified. The identifier of the newly created entity revision is printed on the standard output.

emcli create_swlib_entity 
      -name="myAcmeInstall" 
      -folder_id=
"oracle:defaultService:em:provisioning:1:cat:B13B3B7B086458CFE040E80A19AA560C"
       -desc="myAcmeInstall description" 
       -attr="PRODUCT:Acme" 
       -attr="PRODUCT_VERSION:3.0" 
       -attr="VENDOR:Acme Corp" 
       -prop="DEFAULT_HOME:/u01/acme3/" 
       -note="myAcmeInstall for test servers"