Class: Caco::Repmgr::NodeRegisterPrimary
- Inherits:
-
Trailblazer::Operation
- Object
- Trailblazer::Operation
- Caco::Repmgr::NodeRegisterPrimary
- Defined in:
- lib/caco/repmgr/node_register_primary.rb
Instance Method Summary collapse
Instance Method Details
#check_existing_id(ctx, node_role:) ⇒ Object
25 26 27 28 |
# 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:) ⇒ Object
30 31 32 |
# 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 |