upload_jeeappcomp_file

Uploads one file to a Java EE Application component in the software library.

This command needs the verb create_jeeappcomp to function properly.

Format

emcli upload_jeeappcomp_file
        -entity_rev_id="entity_rev_id"
        -host="hostname"
        -filetype="filetype"
        -file="<absolute file path>[;<new file name>]"
        [-credential_set_name="setname"] | [-credential_name="name" -credential_owner="owner"]
        [-upload_storage="<storage location name>;<storage type>"] 
        [-use_latest_revision] 

[ ]  indicates that the parameter is optional

Options

  • entity_rev_id

    Identifier for the entity revision. You can view the entity ID by logging in to the Cloud Control console. The Software Library Home page exposes the identifier for folders and entities as a custom column called Internal ID. By default, this is hidden.

  • host

    Target name of the host where the files are available.

  • filetype

    The file type of the file specified with '-file'. Valid values include: "archive", "plan", "pre_deployment_script", "post_deployment_script", "target_execution_script", "additional_file", "zip".

  • file

    Absolute path of the file to be uploaded. File name stored in the Software Library is overwritten with the name of the file being uploaded. Optionally, you can specify a different file name, separated by ";".

  • credential_set_name

    The name of the preferred credential stored inside the Management Repository for the host target. It can be one of the following:

    HostCredsNormal - default unprivileged credential set.

    HostCredsPriv - privileged credential set.

  • credential_name

    Name of a named credential stored in the Management Repository. This option must be specified along with the -credential_owner option.

  • credential_owner

    Owner of a named credential stored in the Management Repository. This option must be specified along with the -credential_name option.

  • upload_storage

    Destination storage location and type of storage is passed as a parmeter for the upload, separated by ";". If no value is passsed, then the storage type and storage location are defaulted to the first upload location configured for Software Library. The storage type can be one of the following:

    OmsShared (OMS Shared File System)

    OmsAgent (OMS Agent File System)

    The storage location specified must be in "active" status.

  • use_latest_revision

    Flag for indicating that the upload should happen to the latest revision of the entity instead of the revision identified by entity_rev_id.

Examples

Example 1

Uploads the file '/u01/downloads/file1.jar' to the entity revision identified by entity_rev_id. The file present on the host 'example.com' should be accessible using the preferred credential set for the "HostCredsNormal" credential set, for the user logged in to EMCLI.

The host must be a managed host target in Enterprise Manager and the agent on this host must be up and running.

emcli upload_jeeappcomp_file
-entity_rev_id="oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_JavaEEApplication:B1B1880C6A8C62AAE040548C42832D14:0.1"
-file="/u01/downloads/file1.jar"
-filetype="archive"
-host="example.com"
-credential_set_name="HostCredsNormal"

Example 2

Uploads the file newfile.xml to the entity revision identified by entity_rev_id. The file present on the host 'example.com' should be accessible using the credential named"'MyExampleCreds" owned by "EXAMPLE_USER". The entity revision specified should contain a file of filetype 'archive' before uploading any other filetype. File '/u01/downloads/file2.xml', after upload, will be associated with the entity revision as 'newfile.xml'. A new revision will be created from the latest revision of the entity.

emcli upload_jeeappcomp_file
-entity_rev_id="oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_JavaEEApplication:B1B1880C6A8C62AAE040548C42832D14:0.1"
-file="/u01/downloads/file2.xml;newfile.xml"
-filetype="plan"
-host="example.com"
-credential_name="MyExampleCreds"
-credential_owner="EXAMPLE_USER"
-use_latest_revision