Class: MintPress::OracleWeblogic::Scaleout

Inherits:
Object
  • Object
show all
Includes:
MintLogger, Mixins::Properties, Utils
Defined in:
src/oracle-weblogic/lib/oracle-weblogic/scaleout.rb

Overview

Base class for Scaleout function of Oracle Weblogic software.

Since:

  • 0.1.0

Properties (Read/Write)

  • #host_count ⇒ Integer (Default Value: Proc.new { [1, self.hostname_list.length].max })
    Host count, if list is not specified, host count will be 1

    Property Attributes
    • defaultProc.new { [1, self.hostname_list.length].max }
    
    
    39
    # File 'src/oracle-weblogic/lib/oracle-weblogic/scaleout.rb', line 39
    
    property :host_count, type: Integer, default: Proc.new { [1, self.hostname_list.length].max }
  • #hostname_list ⇒ Array of ⇒ String
    Following properties describe dimension of the scaleout function

    Property Attributes
    
    
    45
    # File 'src/oracle-weblogic/lib/oracle-weblogic/scaleout.rb', line 45
    
    property :hostname_list, type: String, array: true
  • #servers_per_host ⇒ Integer (Default Value: 1)
    Number of servers defined per host

    Property Attributes
    • default1
    
    
    48
    # File 'src/oracle-weblogic/lib/oracle-weblogic/scaleout.rb', line 48
    
    property :servers_per_host, type: Integer, default: 1
  • #server_names ⇒ Array of ⇒ String
    This is an optional param to strictly control server naming

    Property Attributes
    • requiredfalse
    
    
    51
    # File 'src/oracle-weblogic/lib/oracle-weblogic/scaleout.rb', line 51
    
    property :server_names, type: String, array: true, required: false
  • #pattern ⇒ String
    Optional naming pattern

    Property Attributes
    • requiredfalse
    
    
    54
    # File 'src/oracle-weblogic/lib/oracle-weblogic/scaleout.rb', line 54
    
    property :pattern, type: String, required: false

Properties (Read Only)

  • #server_count ⇒ Integer (Default Value: Proc.new { self.host_count * self.servers_per_host })
    Total number of managed serveres

    Property Attributes
    • read_onlytrue
    • defaultProc.new { self.host_count * self.servers_per_host }
    
    
    42
    # File 'src/oracle-weblogic/lib/oracle-weblogic/scaleout.rb', line 42
    
    property :server_count, type: Integer, read_only: true, default: Proc.new { self.host_count * self.servers_per_host }

Constant Summary

Constants included from MintLogger

MintLogger::DEBUG, MintLogger::ERROR, MintLogger::FATAL, MintLogger::INFO, MintLogger::UNKNOWN, MintLogger::VERBOSE, MintLogger::WARN

Instance Attribute Summary

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 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, #exists?, #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

Constructor Details

#initialize(opts = {}) ⇒ Scaleout

Returns a new instance of Scaleout.

Since:

  • 0.1.0

Instance Method Details

#applyObject

Since:

  • 0.1.0

#get_node_id(name) ⇒ Object

Since:

  • 0.1.0

#get_object_name(source_value:, source_id:, target_id:) ⇒ Object

Construct a new object name based on the mapping format

Parameters:

  • source_value (String)
    Name
  • source_id (Integer)
    Source Id of the object
  • target_id (Integer)
    Target Id of the object

Since:

  • 0.1.0

#get_rename_map(source_server:, server_map:, target_server_name:) ⇒ Object

Implement function to get node number Get host details for the server

Parameters:

Since:

  • 0.1.0

#get_server_hostname(server_name:, server_object:, server_map:) ⇒ String

For a given server, retrieve the hostname it should have

Parameters:

Returns:

Since:

  • 0.1.0

#get_server_ids(server_name:, server_id:, map:) ⇒ Object

Generate ids for the new server

Parameters:

  • server_name (String)
    Name of the server/component
  • server_id (Integer)
    Numeric Identifier

Since:

  • 0.1.0

#get_server_map(name:) ⇒ Object

Get list of servers based on scaleout config @@return [Hash] Complete map of server names with server Ids

Parameters:

  • name (String)
    Name of the server

Since:

  • 0.1.0

#get_server_scaleout_map(servers:) ⇒ Object

Get map containing all servers accoring to the scaleout config

Since:

  • 0.1.0

#get_source_server(server_name:, server_map:) ⇒ MintPress::OracleWeblogic::Server

Determine the source server/instance/component object when cloning NOTE: at this stage we are using the first server as a source

Parameters:

  • server_name (String)
    Name of the server
  • server_map (Hash)
    Map containing details of the all servers

Returns:

Since:

  • 0.1.0

#handle_singleton(v, clone_list, walked_items, all_clones) ⇒ Object

Since:

  • 0.1.0

#scaleout_domain_servers(domain:) ⇒ Hash

Scale out list of servers based on scaleout configuration

Parameters:

  • domain (MintPress::OracleWeblogic::Doamin)
    Weblogic domain details

Returns:

  • (Hash)
    Clone list

Since:

  • 0.1.0

#scaleout_recursive(node:, walked_items: [], clone_list: {}, all_clones: {}) ⇒ Object

Run scaleout action

Parameters:

  • opts (Hash)
    A Hash of options with which to instantiate this class

Since:

  • 0.1.0

#usageString

Example usage of the class

Returns:

Since:

  • 0.1.0