Class: MintPress::OracleEBS::EnvVariable
- Inherits:
-
Object
- Object
- MintPress::OracleEBS::EnvVariable
- Includes:
- MintLogger, EbsUtils
- Defined in:
- src/oracle-ebs/lib/oracle-ebs/host.rb
Overview
EnvVariable: Simple class to store a unix environment variable, along with the command to derive its value
and attributes detailing what the variable contains.
Properties (Read/Write)
Properties (Read Only)
Constant Summary
Constants included from MintLogger
MintLogger::DEBUG, MintLogger::ERROR, MintLogger::FATAL, MintLogger::INFO, MintLogger::UNKNOWN, MintLogger::VERBOSE, MintLogger::WARN
Instance Attribute Summary collapse
-
#create_if_missing ⇒ Object
Returns the value of attribute create_if_missing.
-
#echo_command ⇒ Object
Returns the value of attribute echo_command.
-
#env_variable ⇒ Object
Returns the value of attribute env_variable.
-
#get_value_called ⇒ Object
Returns the value of attribute get_value_called.
-
#is_file ⇒ Object
Returns the value of attribute is_file.
-
#is_path ⇒ Object
Returns the value of attribute is_path.
-
#must_exist ⇒ Object
Returns the value of attribute must_exist.
-
#two_base ⇒ Object
Returns the value of attribute two_base.
Instance Method Summary collapse
-
#build_patch_path(base_path_variable:) ⇒ Object
build_tgt_path: Derives the target path by replacing the source SYSTEM_BASE with the target SYSTEM_BASE in the src_path.
-
#build_tgt_path(src_base_variable:, tgt_base_variable:, src_variable:) ⇒ Object
build_tgt_path: Derives the target path by replacing the source SYSTEM_BASE with the target SYSTEM_BASE in the src_path.
-
#create_directory(host:, base:) ⇒ Object
create_directory: Create a directory on the target host if it doesn't already exist.
- #env_value(base:) ⇒ Object
-
#get_value(host:) ⇒ Object
get_value: Derives the environment variables value by running the echo command on the transport provided.
-
#initialize(attributes) ⇒ EnvVariable
constructor
A new instance of EnvVariable.
- #inspect(indent = 0) ⇒ Object
- #set_patch_value(value:) ⇒ Object
- #set_run_value(value:) ⇒ Object
- #swap_context(src_context_name:, tgt_context_name:) ⇒ Object
- #to_s(indent = 0) ⇒ Object
Methods included from MintLogger::Utils::Common
#boolean_val, #has_value?, #no_value?, #nvl, #path_as_symbol, #ruby_level_to_send
Methods included from EbsUtils
#build_path, #check_base, #copy_direct, #copy_indirect, #create_tarball, #set_ebs_init, #translate_sff, #untar_tarball
Constructor Details
#initialize(attributes) ⇒ EnvVariable
Returns a new instance of EnvVariable.
Instance Attribute Details
#create_if_missing ⇒ Object
Returns the value of attribute create_if_missing.
#echo_command ⇒ Object
Returns the value of attribute echo_command.
#env_variable ⇒ Object
Returns the value of attribute env_variable.
#get_value_called ⇒ Object
Returns the value of attribute get_value_called.
#is_file ⇒ Object
Returns the value of attribute is_file.
#is_path ⇒ Object
Returns the value of attribute is_path.
#must_exist ⇒ Object
Returns the value of attribute must_exist.
#two_base ⇒ Object
Returns the value of attribute two_base.
Instance Method Details
#build_patch_path(base_path_variable:) ⇒ Object
build_tgt_path: Derives the target path by replacing the source SYSTEM_BASE with the target SYSTEM_BASE
in the src_path.
#build_tgt_path(src_base_variable:, tgt_base_variable:, src_variable:) ⇒ Object
build_tgt_path: Derives the target path by replacing the source SYSTEM_BASE with the target SYSTEM_BASE
in the src_path.
#create_directory(host:, base:) ⇒ Object
create_directory: Create a directory on the target host if it doesn't already exist.
#env_value(base:) ⇒ Object
#get_value(host:) ⇒ Object
get_value: Derives the environment variables value by running the echo command on the transport provided.
If the variable represents a path, check if it exists on the target host.
If it is, and create_if_missing is true, use create_directory to create it.