Class: MintPress::OracleWeblogic::SystemComponent

Inherits:
TargetMBean
  • Object
show all
Includes:
MintLogger, Mixins::Properties, FancyNew, MBeanUtils, Utils
Defined in:
src/oracle-weblogic/lib/oracle-weblogic/model/individual/system_component.rb,
src/oracle-weblogic/lib/oracle-weblogic/model/generated_classes/split_32.rb,
src/oracle-weblogic/lib/oracle-weblogic/model/system_component.rb

Overview

Base class for an Oracle Weblogic Domain's SystemComponent see Domain class for further details Domain#system_components

Since:

  • 0.1.0

Properties (Read/Write)

  • #version ⇒ String (Default Value: Proc.new { self.domain.version })
    Version of weblogic this property is being applied to

    Property Attributes
    • defaultProc.new { self.domain.version }
    
    
    9
    # File 'src/oracle-weblogic/lib/oracle-weblogic/model/individual/system_component.rb', line 9
    
    property :version, type: String, default: Proc.new { self.domain.version }
  • #name ⇒ String

    Property Attributes
    • short_name"Name"
    • has_settertrue
    • has_gettertrue
    • has_listerfalse
    • has_creatorfalse
    • read_onlyfalse
    
    
    12
    # File 'src/oracle-weblogic/lib/oracle-weblogic/model/individual/system_component.rb', line 12
    
    property :Name, type: String
  • #notes ⇒ String
    "Optional information that you can include to describe this\nconfiguration."

    Property Attributes
    • short_name"Notes"
    • has_settertrue
    • has_gettertrue
    • has_listerfalse
    • has_creatorfalse
    • read_onlyfalse
    
    
    15
    # File 'src/oracle-weblogic/lib/oracle-weblogic/model/individual/system_component.rb', line 15
    
    property :Notes, type: String, array: false, hash: false, short_name: "Notes", has_setter: true, has_getter: true, has_lister: false, has_creator: false, read_only: false, description: "Optional information that you can include to describe this\nconfiguration."
  • #auto_restart ⇒ [TrueClass, FalseClass] (Default Value: true)
    Should the system component automatically restart?

    Property Attributes
    • short_name"AutoRestart"
    • has_settertrue
    • has_gettertrue
    • has_listerfalse
    • has_creatorfalse
    • read_onlyfalse
    • defaulttrue
    
    
    18
    # File 'src/oracle-weblogic/lib/oracle-weblogic/model/individual/system_component.rb', line 18
    
    property :AutoRestart, type: [TrueClass, FalseClass], default: true
  • #machine ⇒ MintPress::OracleWeblogic::Machine

    Property Attributes
    • short_name"Machine"
    • has_settertrue
    • has_gettertrue
    • has_listerfalse
    • has_creatorfalse
    • read_onlyfalse
    
    
    21
    # File 'src/oracle-weblogic/lib/oracle-weblogic/model/individual/system_component.rb', line 21
    
    property :Machine, type: MintPress::OracleWeblogic::Machine
  • #nm_socket_create_timeout_in_millis ⇒ Integer (Default Value: 180000)

    Property Attributes
    • short_name"NMSocketCreateTimeoutInMillis"
    • has_settertrue
    • has_gettertrue
    • has_listerfalse
    • has_creatorfalse
    • read_onlyfalse
    • default180000
    
    
    24
    # File 'src/oracle-weblogic/lib/oracle-weblogic/model/individual/system_component.rb', line 24
    
    property :NMSocketCreateTimeoutInMillis, type: Integer, default: 180000
  • #restart_delay_seconds ⇒ Integer (Default Value: 0)

    Property Attributes
    • short_name"RestartDelaySeconds"
    • has_settertrue
    • has_gettertrue
    • has_listerfalse
    • has_creatorfalse
    • read_onlyfalse
    • default0
    
    
    27
    # File 'src/oracle-weblogic/lib/oracle-weblogic/model/individual/system_component.rb', line 27
    
    property :RestartDelaySeconds, type: Integer, default: 0
  • #restart_interval_seconds ⇒ Integer (Default Value: 3600)

    Property Attributes
    • short_name"RestartIntervalSeconds"
    • has_settertrue
    • has_gettertrue
    • has_listerfalse
    • has_creatorfalse
    • read_onlyfalse
    • default3600
    
    
    30
    # File 'src/oracle-weblogic/lib/oracle-weblogic/model/individual/system_component.rb', line 30
    
    property :RestartIntervalSeconds, type: Integer, default: 3600
  • #restart_max ⇒ Integer (Default Value: 2)

    Property Attributes
    • short_name"RestartMax"
    • has_settertrue
    • has_gettertrue
    • has_listerfalse
    • has_creatorfalse
    • read_onlyfalse
    • default2
    
    
    33
    # File 'src/oracle-weblogic/lib/oracle-weblogic/model/individual/system_component.rb', line 33
    
    property :RestartMax, type: Integer, default: 2
  • #component_type ⇒ String
    What type of system component is this?

    Property Attributes
    • short_name"ComponentType"
    • has_settertrue
    • has_gettertrue
    • has_listerfalse
    • has_creatorfalse
    • read_onlyfalse
    
    
    36
    # File 'src/oracle-weblogic/lib/oracle-weblogic/model/individual/system_component.rb', line 36
    
    property :ComponentType, type: String
  • #system_component_start ⇒ MintPress::OracleWeblogic::SystemComponentStart (Default Value: MintPress::OracleWeblogic::SystemComponentStart.new)

    Property Attributes
    • short_name"SystemComponentStart"
    • has_setterfalse
    • has_gettertrue
    • has_listerfalse
    • has_creatorfalse
    • read_onlyfalse
    • defaultMintPress::OracleWeblogic::SystemComponentStart.new
    
    
    39
    # File 'src/oracle-weblogic/lib/oracle-weblogic/model/individual/system_component.rb', line 39
    
    property :SystemComponentStart
  • #dynamically_created ⇒ [TrueClass, FalseClass] (Default Value: false)
    Was this system component dynamically created by weblogic?

    Property Attributes
    • defaultfalse
    
    
    75
    # File 'src/oracle-weblogic/lib/oracle-weblogic/model/system_component.rb', line 75
    
    property :DynamicallyCreated, type: [TrueClass, FalseClass], default: false
  • #host ⇒ MintPress::Infrastructure::Host (Default Value: Proc.new { self.machine.host })
    The host on which the system component resides - this is mostly used for BAU functions, and defaults to the host of the machine

    Property Attributes
    • defaultProc.new { self.machine.host }
    
    
    82
    # File 'src/oracle-weblogic/lib/oracle-weblogic/model/system_component.rb', line 82
    
    property :Host, type: MintPress::Infrastructure::Host, default: Proc.new { self.machine.host }
  • #component_supports_parallel ⇒ [TrueClass, FalseClass] (Default Value: true)

    Property Attributes
    • defaulttrue
    
    
    83
    # File 'src/oracle-weblogic/lib/oracle-weblogic/model/system_component.rb', line 83
    
    property :component_supports_parallel, type: [TrueClass, FalseClass], default: true
  • #need_fake_starting ⇒ [TrueClass, FalseClass] (Default Value: true)
    Do we need to fake a "starting" state for this component type? many components go starting -> shutdown -> running, which confuses the state machine. this syntehsises a 'starting' state in the middle. disable this if you hjave process monitoring or some other mechanism to ensur ethe syscomponent is running!

    Property Attributes
    • defaulttrue
    
    
    87
    # File 'src/oracle-weblogic/lib/oracle-weblogic/model/system_component.rb', line 87
    
    property :need_fake_starting, type: [TrueClass, FalseClass], default: true
  • #kill_if_shutdown_failed ⇒ [TrueClass, FalseClass] (Default Value: true)
    If the shutdown fails, should we attempt to kill this system component by process?

    Property Attributes
    • defaulttrue
    
    
    90
    # File 'src/oracle-weblogic/lib/oracle-weblogic/model/system_component.rb', line 90
    
    property :kill_if_shutdown_failed, type: [TrueClass, FalseClass], default: true
  • #name ⇒ String

    Property Attributes
    
    
    23
    # File 'src/oracle-weblogic/lib/oracle-weblogic/model/target_mbean.rb', line 23
    
    property :Name, type: String
  • #notes ⇒ String
    Notes about this object

    Property Attributes
    
    
    25
    # File 'src/oracle-weblogic/lib/oracle-weblogic/model/target_mbean.rb', line 25
    
    property :Notes, type: String
  • #tags ⇒ Array of ⇒ String
    Array of tags for this object

    Property Attributes
    
    
    27
    # File 'src/oracle-weblogic/lib/oracle-weblogic/model/target_mbean.rb', line 27
    
    property :Tags, type: String, array: true

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

Attributes included from Mixins::Properties

#autopush_set_cache, #dynamic_create, #harvest_on_access, #harvest_undefined_only, #harvested, #tree_root

Instance Method Summary collapse

Methods included from MBeanUtils

#assign_object_by_identity, #assign_object_by_identity_from, #bean_is_changed?, #dump_metadata, #dump_tree_metadata, #get_item_by_identity_name, #get_item_by_identity_name_from, #get_parent_by_identity_name, #harvest, #harvest_anew, #harvest_item_by_name, #harvest_item_by_type, #harvest_wlst, #harvesters, #harvesting, #longname, #lookup_mintpress_by_mbean, #mbean_by_url, #process_mbeans, #register_mbean_url

Methods included from Mixins::Properties

#[], #[]=, #add_validate_report_result, #armour_set_property, #array_contains?, #array_is_a?, #check_autopush, #check_stack_overflow, #clone_property_object, #cloner_handle_single_property, #coerce_single, #contains_as_string?, #display_validate_report_result, #double_initialize?, #dump_to_hash, #find_parent, #find_parent_by_identity, #generate_accessor_functions, #get_canonical_renamed, #get_from_opts, #get_my_name, #get_property, #get_property_item, #has?, included, #initialize_validate_report, #inspect, #is_cloned_object?, #is_mintpress_object?, #is_probably_canonical?, #is_set?, #local_debug, #local_info, #local_verbose, #mintpress_property_definitions, #place_object_by_identity, #process_properties, #prop_set?, #property, #property_definitions, #property_details, #property_is_simple_object?, #push_root!, #require_property, #require_update, #retrieve_docstring, #sanitize, #set_map_dirty, #set_property, #set_property_item, #show_short_array, #strip_defaults!, #synchronize, #uncloned_property_definitions, #update_map, #validate, #validate_generic, #validate_properties, #validate_property, #validate_required, #version_allowed?, #weakref

Methods included from MintLogger::Utils::Common

#boolean_val, #has_value?, #no_value?, #nvl, #path_as_symbol, #ruby_level_to_send

Methods included from Utils

#activate_list, #already_traversed, #announce_self, #bean_type, #build_activate_list, #clear_property_sheet_cache, #create_generic, #create_mbean_components, #delete, #destroy_generic, #empty_mbean?, #execute_script, #fast_ls_all, #fast_ls_folder, #fast_ls_object, #fast_ls_object_map, #find_cluster, #find_runtime_path_in_rest, #find_server, #full_url, #get, #get_all_self_names, #get_identity, #get_local_wlst_session, #get_matching_self_names, #get_property_from_target, #get_property_from_target_rest, #get_property_from_target_wlst, #get_property_from_target_wlst_impl, #get_property_sheet, #get_rest_item, #get_rest_url_for_parent, #get_rest_url_for_self, #get_servers, #get_servers_rest, #get_servers_wlst, #get_wl_home, #globmatch?, #handle_create, #http_delete, #http_get, #http_post, #http_put, included, #invalidate_session, #is_meta_object?, #longclass, #massage_return, #mbean_components, #mbean_exists?, #mbean_lookup, #mbean_properties, #mbean_to_hash, #meta_list?, #my_short_name, #perform_method_generic, #perform_runtime_call_generic_rest, #perform_runtime_method_generic, #post, #raise_http_exception, #remove, #request_headers, #reset_activate_list, #rest_activate_change, #rest_create_generic, #rest_create_mbean_components, #rest_destroy_self, #rest_edit_url, #rest_has_changes, #rest_idempotent_create, #rest_locked, #rest_nonedit_url, #rest_start_change, #rest_undo_change, #runtime_introspection, #shortclass, #start_with_async, #state_with_net_ping, #stop_with_async, #to_nested, #wlst_cd_to, #wlst_create_generic, #wlst_destroy_self, #wlst_find_object, #wlst_find_parent_object, #wlst_generic_mbean_update_all, #wlst_idempotent_create, #wlst_update_mbean

Methods included from FancyNew

included

Constructor Details

#initialize(opts = {}) ⇒ MintPress::OracleWeblogic::SystemComponent

Constructor

Examples:

Create Domain with SystemComponents - @see Domain#configure_system_components

admin_password = Mint::Secret.new("welcome1")

domain_opts={Name: 'wls_domain', AdminServerName: 'AdminServer', AdminUsername: 'weblogic', AdminPassword: admin_password, RootDirectory: '/oracle/app/wls/environments', installations: [wls_installation1, wls_installation2])
domain=MintPress::OracleWeblogic::Domain.new(domain_opts)

opts = {  Name: 'oid1',
       ComponentType: "OID",
       Machine: domain.machines['oidhost1'],
       ListenPort: 3060,
       ListenPortSsl: 3131,
       RealmDn: "dc=limepoint,dc=com"
   }
domain.system_components['oid1'] = MintPress::OracleInternetDirectory::SystemComponent.new(opts)

Parameters:

  • opts (Hash) (defaults to: {})
    A Hash of options with which to instantiate this class

Raises:

  • (ArgumentError)
    invalid argument passed into constructor

Since:

  • 0.1.0

Instance Attribute Details

#DomainMintPress::OracleWeblogic::Domain

Returns the domain associated with the SystemComponent.

Returns:

#MachineMintPress::OracleWeblogic::Machine

Returns the machine associated with the SystemComponent.

Returns:

#nameString

Returns the name of the SystemComponent.

Returns:

  • (String)
    the name of the SystemComponent

Instance Method Details

#createvoid

TODO:
This should, of course, be generic, and also support REST and friends - and it will! Of course, I'm writing the code to be generic now!

This method returns an undefined value.

Create the SystemComponent

Since:

  • 0.1.0

#exists?Boolean

Returns:

  • (Boolean)

Since:

  • 0.1.0

#exists_via_config?Boolean

Returns:

  • (Boolean)

Since:

  • 0.1.0

#fix_missing_system_comp_configObject

Since:

  • 0.1.0

#get_any_transportObject

This will get _any_ transport where config.xml should exist

Since:

  • 0.1.0

#get_my_transportObject

This will get the transport of the system we are on

Since:

  • 0.1.0

#get_stateObject

The current state of the server.

#getStateObject

The current state of the server.

#import_props_from_modelObject

#internal_component_nameObject

This function obtains the real component name from weblogic - children can re-implement this if they know exactly what the component will be named, but it uses the search_for_name function by default - see the description of that function for the semantics no_action

Since:

  • 0.1.0

#is_registeredObject Also known as: isRegistered

Deprecated.

#m_bean_infoObject Also known as: getMBeanInfo, get_m_bean_info, mBeanInfo

Deprecated.

#node_manager_restart_countObject Also known as: getNodeManagerRestartCount, get_node_manager_restart_count, nodeManagerRestartCount

The number of times the server has been restarted using the Node Manager# since its creation.

#object_nameObject Also known as: getObjectName, get_object_name, objectName

Deprecated.

#perform_action(action:, opts: {}, async: true, wait: true, block: false) ⇒ Hash

Perform a generic action on the SystemComponent is running using the SystemComponentLifeCycle REST API

Returns:

  • (Hash)
    the SystemComponent REST API Hash result

Since:

  • 0.1.0

#poll_stop(instate) ⇒ Object

If we get stuck in the STARTING_OR_STOPPING state, start sending kills

Since:

  • 0.1.0

#process_regexObject

If children implement this, it will be passed to a `grep` command, which will make `process_running?` work

Since:

  • 0.1.0

#process_running?Boolean

This function actually returns a tristate of: * true - yes, its def running * false - no, it's def not running * nil - we could not work it out, due to either missing transport or missing regex

Returns:

  • (Boolean)

Since:

  • 0.1.0

#reported_stateString

Determine the state of SystemComponent using the SystemComponentLifeCycle REST API

Returns:

  • (String)
    the state of the SystemComponent

Since:

  • 0.1.0

#restartvoid

This method returns an undefined value.

Restart the SystemComponent using the SystemComponentLifeCycle REST APIs

Since:

  • 0.1.0

#running?TrueClass, FalseClass

Determine whether the SystemComponent is running using the SystemComponentLifeCycle REST API

Returns:

  • (TrueClass, FalseClass)
    whether the SystemComponent is running

Since:

  • 0.1.0

#search_for_name(t, exact:) ⇒ Object

Find our system component, since they are not named consistantly - if exact is true, we only return the actual name, but if it's false we try and heuristically match it instead, dealing with component names like 'otd_foo_machine1' for the component that is actually named 'machine1', or 'oid_oidldap1' for an oid component named 'oidldap1'

Since:

  • 0.1.0

#soft_restartObject

Reload the component, if supported by the component THis should support rest, obviously....

Since:

  • 0.1.0

#startObject

Since:

  • 0.1.0

#start_asyncvoid

This method returns an undefined value.

Start the SystemComponent using the SystemComponentLifeCycle REST APIs if not already running

Since:

  • 0.1.0

#state(cached: true) ⇒ Object

This will try reported state first, and then if not it will attempt to either interrogate the process, or otherwise do fake things to make `starting` actually work

Since:

  • 0.1.0

#stopObject

Since:

  • 0.1.0

#stop_asyncvoid

This method returns an undefined value.

Stop the SystemComponent using the SystemComponentLifeCycle REST APIs if running

Since:

  • 0.1.0

#stopped?Boolean

Returns:

  • (Boolean)

Since:

  • 0.1.0

#uncached_exists?TrueClass, FalseClass

Determine whether the SystemComponent already exists using the SystemComponentLifeCycle REST API

Returns:

  • (TrueClass, FalseClass)
    whether the SystemComponent exists

Since:

  • 0.1.0