refer_swlib_entity_files

Refers one or more files from an entity revision in the software library.

Format

emcli refer_swlib_entity_files 
        -entity_rev_id="entity_rev_id" 
        -file="<relative_file_path>[;<new_file_name>]" | [-removefile="<existing_
           file_name>"] 
        -refer_storage="<storage_location_name>;<storage_type>" 
        [-use_latest_revision]

[ ]  indicates that the parameter is optional

Options

  • entity_rev_id

    Identifier of the entity revision. The Software Library home page exposes the identifier for folders and entities as a custom column (Internal ID) and is hidden by default.

  • file

    Relative path of the file to be referred from the specified storage location. The file name stored in the software library is defaulted to the name of the file being referred. You can optionally specify a different file name, separated by a semi-colon ( ; ).

  • removefile

    Name of the file to be removed. This is an existing file carried forward from the specified entity revision.Alternatively, you can specify the following values:

    • ALL — Remove all existing files (no carry forward).
    • NONE — Retain all carried forward files.

    The default is NONE.

  • refer_storage

    The storage location and type for referring to files, separated by a semi-colon ( ; ). The location specified must be in 'active' status. The storage type can be Http, Nfs, or ExtAgent.

  • use_latest_revision

    Indicates that the latest revision of the entity be used instead of the revision identified by entity_rev_id.

Example

This example refers the file 'scripts/perl/script1.pl' in the HTTP reference file location 'myScripts' from the entity revision identified. The file name associated will be 'new_script.pl'. The identifier of the updated revision is output.

emcli refer_swlib_entity_files 
        -entity_rev_id="oracle:defaultService:em:provisioning:1:cmp:
         COMP_Component:SUB_Generic:B1B1880C6A8C62AAE040548C42832D14:0.1"
        -file="scripts/perl/script1.pl;new_script.pl"
        -refer_storage="myScripts;Http"
        -use_latest_revision