Class: MintPress::Migration::ModelProcessor
- Inherits:
-
Object
- Object
- MintPress::Migration::ModelProcessor
- Includes:
- MintLogger
- Defined in:
- src/mintpress-oldworld-integration/lib/mintpress-oldworld-integration/model-transform.rb
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 Method Summary collapse
- #add_otd_configuration(domain, domain_object, domain_json) ⇒ Object
- #binaries_from_model ⇒ Object
- #call_method_on_combined_templates(method) ⇒ Object
- #call_methods_on_filtered_instances(*methods) ⇒ Object
- #cast_type(obj, k, v, known_array: false) ⇒ Object
- #clobber ⇒ Object
- #clobber_binaries ⇒ Object
- #configure_all_nodemanagers ⇒ Object
- #configure_nodemanagers ⇒ Object
- #configure_system_components ⇒ Object
- #construct_hash_name(prop_value, type, model_parent) ⇒ Object
-
#create_all_domains ⇒ Object
For legacy integration, this _just_ calls create - we expect orchestration to happen outside!.
- #create_all_repos ⇒ Object
- #create_bare_transport(h) ⇒ Object
- #create_domain_object(domain_object) ⇒ Object
-
#create_generic_resource_from_model(model, res_name, type, parent, config_list_entry) ⇒ Object
This implements the creation of a resource by finding it in the parent, and then creating it if iut exists,a nd calling the mbean setter on whatever comes out the other side.
- #create_host_object(h) ⇒ Object
- #create_installation_object(i, added_hosts: []) ⇒ Object
- #create_instance_object(i) ⇒ Object
- #create_instances ⇒ Object
- #create_nodemanager_object(nodemanager_object, postfix = "") ⇒ Object
- #delete_instances ⇒ Object
- #deploy_instances ⇒ Object
- #do_execute_stage(t) ⇒ Object
- #do_transfer_stage(t) ⇒ Object
- #domains ⇒ Object
- #domains_from_model ⇒ Object
- #drop_all_domains ⇒ Object
- #drop_all_instances ⇒ Object
- #drop_all_repos ⇒ Object
- #dump_model ⇒ Object
- #dump_model_json(file_name, model) ⇒ Object
-
#ensure_no_incorrect_attribute_types(obj, type) ⇒ Object
This function ensures that we don't have typo'd types, since it turns out they're easy to typo, and fail badly - the example is thiS: { name: "fooInstance" type: "MintPress::Instance::Foo" attributes: MintPress::Instance::Boo: foo_param: x }.
- #fill_otd_props(domain, new_thing, model_parent, thing, name_attr, model_name, children: {}) ⇒ Object
- #filtered_domains ⇒ Object
- #filtered_instances ⇒ Object
- #filtered_node_managers ⇒ Object
- #filtered_repositories(metadata_repositories) ⇒ Object
- #find_all_instances ⇒ Object
- #find_my_instance(instance_name) ⇒ Object
- #fix_hash_types!(hash) ⇒ Object
-
#fix_missing_system_comp_config ⇒ Object
support for ANT controller.
- #generic_fmw_params(i, h) ⇒ Object
- #get_fmwinfra(i) ⇒ Object
- #get_installation_deps(iname) ⇒ Object
- #get_java(i) ⇒ Object
- #get_name(c) ⇒ Object
- #get_server(s, domain) ⇒ Object
- #grab_rcu_opts!(r, rcu_opts, dest_opt, from) ⇒ Object
-
#handle_configlist_targets!(config_list_entry, me) ⇒ Object
Apply configurationList targets to an entry - seperated out here so things that don't use create_generic_resource_from_model can still use this...
- #handle_direct_attributes(obj, model) ⇒ Object
-
#handle_legacy_opt(opts, param, prop, localjson, split: true, append: nil) ⇒ Object
Obviously this needs to do string stuff....
- #handle_otd_args(control) ⇒ Object
-
#handle_otd_type(domain, model_name, name_attr, parent_name, model_parent, mintpress_ptr, object_type, children: {}) ⇒ Object
This function handles actually processing the OTD attributes Note to JJ: Please document this more, because it is confusing as hell, and almost certainly only makes sense to jj...
- #host_object ⇒ Object
- #hosts_from_model ⇒ Object
-
#initialize(model, installation_filter: nil, patch_id_filter: nil, host_filter: nil, admin_host: nil, host_options: nil, domain_filter: nil, nm_filter: nil, repository_filter: nil, component_filter: nil, instance_filter: nil, ssl_enabled: false, installations_fatal: true, templates_fatal: true, generic_component_okay: false, include_online_parts: false, allow_otd: true, domain_args: {}, otd_args: {}) ⇒ ModelProcessor
constructor
A new instance of ModelProcessor.
- #install_everything ⇒ Object
- #install_thing(i) ⇒ Object
- #installations ⇒ Object
- #instances ⇒ Object
- #instances_from_model ⇒ Object
- #mbeans_from_model(r, obj, folding_parts: []) ⇒ Object
- #nodemanagers ⇒ Object
- #nodemanagers_from_model ⇒ Object
- #not_populated?(obj) ⇒ Boolean
- #not_populated_or_include?(obj, value) ⇒ Boolean
- #obj_to_type(v, deets) ⇒ Object
- #otd_configurations ⇒ Object
- #otd_create_config ⇒ Object
-
#otd_iterate_properties!(item, my_object) ⇒ Object
This iterates the name/target pairs that are used in the old model ONLY for OTD - the format of that is we set the attribute named `target` on the object that is called `name` within our own object.
- #otd_start_snmp ⇒ Object
- #otd_toggle_primary ⇒ Object
-
#pack_unpack_domains ⇒ Object
Do a pack/unpack for any domain hosts for which it needs to be done...
- #patch_stage(stage) ⇒ Object
- #patch_thing(i, stage) ⇒ Object
- #perform_executes(stage, id: nil) ⇒ Object
- #perform_transfers(stage, id: nil) ⇒ Object
- #post_domain ⇒ Object
- #post_first_admin_start ⇒ Object
- #post_managed_start ⇒ Object
- #pre_first_admin_start ⇒ Object
- #pre_managed_start ⇒ Object
- #restart_all_managed ⇒ Object
- #siebel_start_application_interface ⇒ Object
- #siebel_start_enterprise_container ⇒ Object
- #siebel_start_siebel_gateway ⇒ Object
- #siebel_start_siebel_server ⇒ Object
- #siebel_stop_application_interface ⇒ Object
- #siebel_stop_enterprise_container ⇒ Object
- #siebel_stop_siebel_gateway ⇒ Object
- #siebel_stop_siebel_server ⇒ Object
- #split_vals(optval, split: true) ⇒ Object
- #start_admin_server ⇒ Object
- #start_all_managed ⇒ Object
-
#start_all_managed_servers ⇒ Object
start servers DEFAULT: The servers will be started parallelly If the managed servers are to be started sequentially 'startup_control.parallel_tasks' args has to be set.
- #start_all_nodemanagers ⇒ Object
-
#start_all_system_components ⇒ Object
start servers DEFAULT: The servers will be started parallelly If the managed servers are to be started sequentially 'startup_control.parallel_tasks' args has to be set.
- #start_instances ⇒ Object
- #start_managed_on_host(h) ⇒ Object
- #stop_admin_server ⇒ Object
- #stop_all_managed ⇒ Object
- #stop_all_managed_servers ⇒ Object
- #stop_all_nodemanagers ⇒ Object
- #stop_all_system_components ⇒ Object
- #stop_instances ⇒ Object
- #stop_managed_on_host(h) ⇒ Object
- #to_bool(s) ⇒ Object
- #transition_instances(action) ⇒ Object
- #transition_node_managers(action) ⇒ Object
- #transition_siebel(action:, post:, assign_host: false) ⇒ Object
- #update_instances ⇒ Object
-
#update_trusts ⇒ Object
support for ANT controller.
- #with_filtered_autoharvest_domains ⇒ Object
- #with_filtered_domain_metadata_repositories ⇒ Object
- #with_filtered_domains ⇒ Object
Methods included from MintLogger::Utils::Common
#boolean_val, #has_value?, #no_value?, #nvl, #path_as_symbol, #ruby_level_to_send
Constructor Details
#initialize(model, installation_filter: nil, patch_id_filter: nil, host_filter: nil, admin_host: nil, host_options: nil, domain_filter: nil, nm_filter: nil, repository_filter: nil, component_filter: nil, instance_filter: nil, ssl_enabled: false, installations_fatal: true, templates_fatal: true, generic_component_okay: false, include_online_parts: false, allow_otd: true, domain_args: {}, otd_args: {}) ⇒ ModelProcessor
Returns a new instance of ModelProcessor.
Instance Method Details
#add_otd_configuration(domain, domain_object, domain_json) ⇒ Object
#binaries_from_model ⇒ Object
#call_method_on_combined_templates(method) ⇒ Object
#call_methods_on_filtered_instances(*methods) ⇒ Object
#cast_type(obj, k, v, known_array: false) ⇒ Object
#clobber ⇒ Object
#clobber_binaries ⇒ Object
#configure_all_nodemanagers ⇒ Object
#configure_nodemanagers ⇒ Object
#configure_system_components ⇒ Object
#construct_hash_name(prop_value, type, model_parent) ⇒ Object
#create_all_domains ⇒ Object
For legacy integration, this _just_ calls create - we expect orchestration to
happen outside!
#create_all_repos ⇒ Object
#create_bare_transport(h) ⇒ Object
#create_domain_object(domain_object) ⇒ Object
#create_generic_resource_from_model(model, res_name, type, parent, config_list_entry) ⇒ Object
This implements the creation of a resource by finding it in the parent,
and then creating it if iut exists,a nd calling the mbean setter on whatever
comes out the other side
#create_host_object(h) ⇒ Object
#create_installation_object(i, added_hosts: []) ⇒ Object
#create_instance_object(i) ⇒ Object
#create_instances ⇒ Object
#create_nodemanager_object(nodemanager_object, postfix = "") ⇒ Object
#delete_instances ⇒ Object
#deploy_instances ⇒ Object
#do_execute_stage(t) ⇒ Object
#do_transfer_stage(t) ⇒ Object
#domains ⇒ Object
#domains_from_model ⇒ Object
#drop_all_domains ⇒ Object
#drop_all_instances ⇒ Object
#drop_all_repos ⇒ Object
#dump_model ⇒ Object
#dump_model_json(file_name, model) ⇒ Object
#ensure_no_incorrect_attribute_types(obj, type) ⇒ Object
This function ensures that we don't have typo'd types, since it turns out they're easy to typo, and fail
badly - the example is thiS:
{
name: "fooInstance"
type: "MintPress::Instance::Foo"
attributes:
MintPress::Instance::Boo:
foo_param: x
}
This would fail by just setting no params, rather than actually failing with an error like it should for
this obviously invalid input
#fill_otd_props(domain, new_thing, model_parent, thing, name_attr, model_name, children: {}) ⇒ Object
#filtered_domains ⇒ Object
#filtered_instances ⇒ Object
#filtered_node_managers ⇒ Object
#filtered_repositories(metadata_repositories) ⇒ Object
#find_all_instances ⇒ Object
#find_my_instance(instance_name) ⇒ Object
#fix_hash_types!(hash) ⇒ Object
#fix_missing_system_comp_config ⇒ Object
support for ANT controller
#generic_fmw_params(i, h) ⇒ Object
#get_fmwinfra(i) ⇒ Object
#get_installation_deps(iname) ⇒ Object
#get_java(i) ⇒ Object
#get_name(c) ⇒ Object
#get_server(s, domain) ⇒ Object
#grab_rcu_opts!(r, rcu_opts, dest_opt, from) ⇒ Object
#handle_configlist_targets!(config_list_entry, me) ⇒ Object
Apply configurationList targets to an entry - seperated out here so things that don't use
create_generic_resource_from_model can still use this...
#handle_direct_attributes(obj, model) ⇒ Object
#handle_legacy_opt(opts, param, prop, localjson, split: true, append: nil) ⇒ Object
Obviously this needs to do string stuff....
#handle_otd_args(control) ⇒ Object
#handle_otd_type(domain, model_name, name_attr, parent_name, model_parent, mintpress_ptr, object_type, children: {}) ⇒ Object
This function handles actually processing the OTD attributes
Note to JJ: Please document this more, because it is confusing as hell, and
almost certainly only makes sense to jj...
EExplanation of the children attribute - it informs what to pass to the next level of this function.
Currently it takes keys:
:name_attr -> passed to name_attr
:object_type -> passed to object_type
:params -> passed to local_props
#host_object ⇒ Object
#hosts_from_model ⇒ Object
#install_everything ⇒ Object
#install_thing(i) ⇒ Object
#installations ⇒ Object
#instances ⇒ Object
#instances_from_model ⇒ Object
#mbeans_from_model(r, obj, folding_parts: []) ⇒ Object
#nodemanagers ⇒ Object
#nodemanagers_from_model ⇒ Object
#not_populated?(obj) ⇒ Boolean
#not_populated_or_include?(obj, value) ⇒ Boolean
#obj_to_type(v, deets) ⇒ Object
#otd_configurations ⇒ Object
#otd_create_config ⇒ Object
#otd_iterate_properties!(item, my_object) ⇒ Object
This iterates the name/target pairs that are used in the old model ONLY for OTD - the format of that
is we set the attribute named `target` on the object that is called `name` within our own object.
Clear as mud! the psuedo code makes more sense:
my_object.get_property(name).target = value
#otd_start_snmp ⇒ Object
#otd_toggle_primary ⇒ Object
#pack_unpack_domains ⇒ Object
Do a pack/unpack for any domain hosts for which it needs to be done...
#patch_stage(stage) ⇒ Object
#patch_thing(i, stage) ⇒ Object
#perform_executes(stage, id: nil) ⇒ Object
#perform_transfers(stage, id: nil) ⇒ Object
#post_domain ⇒ Object
#post_first_admin_start ⇒ Object
#post_managed_start ⇒ Object
#pre_first_admin_start ⇒ Object
#pre_managed_start ⇒ Object
#restart_all_managed ⇒ Object
#siebel_start_application_interface ⇒ Object
#siebel_start_enterprise_container ⇒ Object
#siebel_start_siebel_gateway ⇒ Object
#siebel_start_siebel_server ⇒ Object
#siebel_stop_application_interface ⇒ Object
#siebel_stop_enterprise_container ⇒ Object
#siebel_stop_siebel_gateway ⇒ Object
#siebel_stop_siebel_server ⇒ Object
#split_vals(optval, split: true) ⇒ Object
#start_admin_server ⇒ Object
#start_all_managed ⇒ Object
#start_all_managed_servers ⇒ Object
start servers
DEFAULT: The servers will be started parallelly
If the managed servers are to be started sequentially
'startup_control.parallel_tasks' args has to be set
#start_all_nodemanagers ⇒ Object
#start_all_system_components ⇒ Object
start servers
DEFAULT: The servers will be started parallelly
If the managed servers are to be started sequentially
'startup_control.parallel_tasks' args has to be set
#start_instances ⇒ Object
#start_managed_on_host(h) ⇒ Object
#stop_admin_server ⇒ Object
#stop_all_managed ⇒ Object
#stop_all_managed_servers ⇒ Object
#stop_all_nodemanagers ⇒ Object
#stop_all_system_components ⇒ Object
#stop_instances ⇒ Object
#stop_managed_on_host(h) ⇒ Object
#to_bool(s) ⇒ Object
#transition_instances(action) ⇒ Object
#transition_node_managers(action) ⇒ Object
#transition_siebel(action:, post:, assign_host: false) ⇒ Object
#update_instances ⇒ Object
#update_trusts ⇒ Object
support for ANT controller