Patching EM CLI Verbs

Support for patching any number of targets from the same single patch plan using command line interface is now supported. Following are some of the important EM CLI verbs used for patching.

Table A-2 EM CLI Patching Verbs and their Usage

Verbs Usage Example

create_patch_plan

emcli create_patch_plan -name="name" -input_file=data:"file_path" [-impact_other_targets="add_all | add_original_only | cancel"][-problems_assoc_patches="ignore_all_warnings | cancel"]

emcli create_patch_plan -name="plan name" -input_file=data:"/tmp/patchplan.pros" -impact_other_targets="add_all"

describe_patch_plan_input

emcli describe_patch_plan_input -name="name"

emcli describe_patch_plan_input -name="plan_name"

get_patch_plan_data

emcli get_patch_plan_data -name="name"

emcli get_patch_plan_data -name="plan_name"

set_patch_plan_data

emcli set_patch_plan_data-name="name"[-impact_other_targets =" add_all | add_original_only | cancel"][-problems_assoc_patches =" ignore_all_warnings | cancel"]

emcli set_patch_plan_data -name="plan name" -input_file=data:"/tmp/patchplan.pros" -impact_other_targets="add_all"

list_aru_languages

emcli list_aru_languages [-name="language name" | -id="language id"] [-noheader] [-script | -format= [name:<pretty|script|csv>]; [column_separator:"column_sep_string"]; [row_separator:"row_sep_string"];]

emcli list_aru_languages -noheader

list_aru_platforms

emcli list_aru_platforms [-name="platform name" | -id="platform id"] [-noheader] [-script | -format= [name:<pretty|script|csv>]; [column_separator:"column_sep_string"]; [row_separator:"row_sep_string"];]

emcli list_aru_platforms -noheader

list_aru_products

emcli list_aru_products [-name="product name" | -id="product id"] [-noheader] [-script | -format= [name:<pretty|script|csv>]; [column_separator:"column_sep_string"]; [row_separator:"row_sep_string"]; ]

emcli list_aru_products -id="product id"

list_aru_releases

emcli list_aru_releases [-name="release name" | -id="release id" | -productId="product id"] [-noheader] [-script | -format= [name:<pretty|script|csv>]; [column_separator:"column_sep_string"]; [row_separator:"row_sep_string"];]

emcli list_aru_releases -noheader

list_patch_plans

emcli list_patch_plans -name="name" [-noheader] [-script | -format= [name:<pretty|script|csv>]; [column_separator:"column_sep_string"]; [row_separator:"row_sep_string"];]

emcli list_patch_plans -name="plan name" -noheader

search_patches

emcli search_patches [-swlib] [-patch_name="patch_name"] [-product="product id" [-include_all_products_in_family]] [-release="release id"] [-platform="platform id" | -language="language id"] [-type="patch | patchset"] [-noheader] [-script | -xml | -format= [name:<pretty|script|csv>]; [column_separator:"column_sep_string"]; [row_separator:"row_sep_string"];]

emcli search_patches -patch_name="patch number" -platform="platform id"

get_connection_mode

emcli get_connection_mode

emcli get_connection_mode

set_connection_mode

emcli set_connection_mode -mode="online | offline"

emcli set_connection_mode -mode="offline"

show_patch_plan

emcli show_patch_plan -name="name" [-info [-showPrivs]] [-actions [-onlyShowEnabled]] [-patches] [-targets] [-deplOptions] [-analysisResults][-conflictFree][-impactedTargets][-deploymentProcedures]

emcli show_patch_plan -name="plan name" -info -showPrivs

submit_patch_plan

emcli submit_patch_plan -name="name" -action="action name"

emcli submit_patch_plan -name="plan name" -action="analyze"

get_targets

emcli get_targets [-targets="[name1:]type1;[name2:]type2;..."] [-alerts][-noheader][-script | -format=[name:<pretty|script|csv>];[column_separator:"column_sep_string"];[row_separator:"row_sep_string"];]

emcli get_targets -targets="databa%:%oracle%"

get_instance_status

emcli get_instance_status [-instance={instance_guid}] [-exec={execution_guid}] [-name={execution name}] [-owner={execution owner}] [-xml [-details]

emcli get_instance_status -instance=16B15CB29C3F9E6CE040578C96093F61 -xml -showJobOutput -tailLength=1024

get_job_execution_detail

emcli get_job_execution_detail -execution={execution_id}[-xml [-showOutput [-tailLength={length}]]]

emcli get_job_execution_detail -execution=12345678901234567890123456789012 -xml

create_named_credential

emcli create_named_credential -cred_name=<name> -auth_target_type=<authenticating target type> -cred_type=<Credential type> -cred_scope=<Credential Scope> -cred_desc=<Credential Description> -target_name=<target name> -target_type=<target type> -input_file=<tag:value> -input_bfile=<tag:value> -properties_file=<filename> -attributes=<p1:v1;p2:v2;...>

emcli create_named_credential-cred_name=NC1 -auth_target_type=host-cred_type=HostCreds -attributes="HostUserName:foo;HostPassword:"

get_named_credential

emcli get_named_credential -cred_owner=<owner> -cred_name=<name>-out=<filename>

emcli get_named_credential -cred_name=NC1

set_preferred_credential

emcli set_preferred_credential -set_name="set_name" -target_name="target_name" -target_type="ttype" -credential_name="cred_name" [-credential_owner ="owner]"

emcli set_preferred_credential -target_type=oracle_database -target_name=myDB -set_name=DBCredsSYSDBA -credential_name=MyDBCredentials -credential_owner="Joe"

show_credential_set_info

emcli show_credential_type_info [-target_type="target_type"] [-type_name="credential_type_name"]

emcli show_credential_type_info -target_type=oracle_database

setup

emcli setup - url="http[s]://host:port/em/" [-username=<EM Console Username]> [-password=<EM Console Password>][-licans=YES|NO][-dir=<local emcli configuration directory>][-trustall][-novalidate][-noautologin][-custom_attrib_file=<Custom attribute file path>][-nocertvalidate]

emcli setup -url=https://dadvmi0128.us.example.com:4473/em -username=sysman -password=sysman

upload_patches

emcli upload_patches -from_host="host name" -patch_files="metadata file path;ZIP file path" [-cred_name="name" -cred_owner="owner"]

emcli upload_patches -patch_files="/scratch/p13741363_112310_Linux-x86-64_M.xml;/scratch/p13741363_112310_Linux-x86-64.zip" -from_host=abc.example.com

delete_patches

emcli delete_patches -patch_name="patch name" -release="release id" -platform= "platform id"

emcli delete_patches -patch_name=13741363 -release=80112310 -platform=226