class Caco::Repmgr::NodeRegisterPrimary
Public Instance Methods
check_existing_id(ctx, node_role:, **)
click to toggle source
# File lib/caco/repmgr/node_register_primary.rb, line 25 def check_existing_id(ctx, node_role:, **) return true if node_role == "primary" false end
verify_any_primary(ctx, node_name:, output:, **)
click to toggle source
# File lib/caco/repmgr/node_register_primary.rb, line 30 def verify_any_primary(ctx, node_name:, output:, **) output.match?(/^\s+[0-9]{1,}\s+\|\s(?!#{node_name})[^\s]+\s+\|\s+primary\s+\|/) end