Software Library EM CLI Verbs

Configuring Software Library, creating entities, and using them is supported in Oracle Enterprise Manager Cloud Control.

Note:

You can either use Enterprise Manager UI or the command line utility (EM CLI) to retrieve the folder id and the entity revision id. To do so, and for a comprehensive example on how to effectively use the EM CLI verbs to perform a number of Software Library tasks listed in the following table, see the workflow example Creating a New Generic Component by Associating a Zip File.

Following are some of the important EM CLI verbs used to perform some Software Library actions:

Table A-3 Software Library EM CLI Verbs and Their Usage

Verb Usage Example

add_swlib_storage_location

(Adding a Software Library storage location)

emcli add_swlib_storage_location -name="location_name" -path="location_path" [-type="OmsShared|OmsAgent|Http|Nfs|ExtAgent"] [-host="hostname"] [-credential_set_name="setname"] | [-credential_name="name" -credential_owner="owner"]

emcli add_swlib_storage_location -name="myOMSAgtLocation" -path="/u01/swlib" -type="OmsAgent"-host="fs1.us.example.com" -credential_name="MyexampleCreds" -credential_owner="example_USER"

create_swlib_folder

(Creating a Software Library folder)

emcli create_swlib_folder -name="folder_name" -parent_id="parent folder id" [-desc="folder description"]

emcli create_swlib_folder -name="myFolder" -parent_id="oracle:defaultService:em:provisioning:1:cat:B13B3B7B086458CFE040E80A19AA560C" -desc="myFolder description"

create_swlib_entity

(Creating a Software Library entity)

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"]

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

list_swlib_entities

(Listing the Software Library entities)

emcli list_swlib_entities [-name="entity_name"] [-folder_id="folder internal id"] [-desc="entity_desc"] [-attr="<attr name>:<attr value>"] [-type]="type internal id"][-subtype]="subtype internal id"][-maturity]="maturity"][-owner]="owner"][-status]="status"][-show_folder_path] [-show_folder_id] [-show_entity_rev_id]

emcli list_swlib_entities -name="myEntity" -attr="PRODUCT=Oracle Database" -show_folder_id

list_swlib_entity_subtypes

(Listing Software Library entity subtypes)

emcli list_swlib_entity_subtypes -entity_type_id="type internal name"] [-show_subtype_id]

emcli list_swlib_entity_subtypes -entity_type_id="COMP_Component" -show_type_id

list_swlib_entity_types

(Listing Software Library entity types)

emcli list_swlib_entity_types [-show_type_id]

emcli list_swlib_entity_types -show_type_id

list_swlib_folders

(Listing Software Library folders)

emcli list_swlib_folders[-parent_id="parent folder id"] [-show_folder_path][-show_folder_id]

emcli list_swlib_folders -parent_id="oracle:defaultService:em:provisioning:1:cat:B13B3B7B086458CFE040E80A19AA560C" -show_folder_id

list_swlib_storage_locations

(Listing Software Library storage locations)

emcli list_swlib_storage_locations [-type="OmsShared|OmsAgent|Http|Nfs|ExtAgent"]

emcli list_swlib_storage_locations -type="OmsAgent"

refer_swlib_entity_files

(Referring files from a Software Library entity)

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]

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" -removefile="ALL" -refer_storage="myScripts;Http" -use_latest_revision

reimport_swlib_metadata

(Re-Importing Software Library metadata)

emcli reimport_swlib_metadata

emcli reimport_swlib_metadata

remove_swlib_storage_location

(Removing a Software Library storage location)

emcli remove_swlib_storage_location -name="src location name"-type="OmsShared|OmsAgent|Http|Nfs|ExtAgent" -migrate_to_loc="dest location name"[-migrate_to_type="OmsShared|OmsAgent|Http|Nfs|ExtAgent"]

emcli remove_swlib_storage_location -name="myOMSSharedLocation" -type="OmsShared"-migrate_to_loc="myNewAGTLocation" -migrate_to_type="OmsAgent"

update_swlib_entity

(Modifying a Software Library entity)

emcli update_swlib_entity -entity_rev_id="entity_rev_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"] [-use_latest_revision]

emcli update_swlib_entity -entity_rev_id="oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_Generic:B1B1880C6A8C62AAE040548C4D14:0.1" -entity_desc="myexampleInstall description" -attr="PRODUCT:example" -attr="PRODUCT_VERSION:3.0" -attr="VENDOR:example Corp" -prop="DEFAULT_HOME:/u01/example3/" -note="myexampleInstall for test servers"

upload_swlib_entity_files

(Uploading files to a Software Library entity)

emcli upload_swlib_entity_files -entity_rev_id="entity_rev_id" -host="hostname" [-file="<abs file path>[;<new file name>]" | [-removefile="<existing file name>"] [-credential_set_name="setname"] | [-credential_name="name" -credential_owner="owner"] [-upload_storage="<storage location name>;<storage type>"][-use_latest_revision]

emcli upload_swlib_entity_files -entity_rev_id="oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_Generic:B1B1880C6A8C62AAE040548C42832D14:0.1" -file="/u01/example_downloads/file1.zip;newfile1.zip" -file="/u01/example_downloads/file2.zip" -removefile="ALL" -host="fs1.us.example.com" -credential_name="MyexampleCreds" -credential_owner="example_USER" -use_latest_revision