Class: Serverspec::Type::Pacemaker_order
- Inherits:
-
PacemakerXML
- Object
- Base
- PacemakerXML
- Serverspec::Type::Pacemaker_order
- Defined in:
- lib/serverspec/type/pacemaker_order.rb
Overview
This Serverspec type can do the check on the Pacemaker order object
Instance Method Summary collapse
-
#first ⇒ Object
The resource which should start first.
-
#first_action ⇒ Object
The action of the first resource that triggers the constraint.
-
#instance ⇒ Hash?
The data object from the library or nil if there is no object.
-
#kind ⇒ Object
the enforcement type of the constraint.
-
#present? ⇒ true, false
(also: #exists?)
Check if this object is present.
-
#require_all ⇒ Object
The require_all setting of the constraint.
-
#score ⇒ String?
The priority score value.
-
#second ⇒ Object
(also: #then)
The resource that should start after the first one.
-
#second_action ⇒ Object
(also: #then_action)
The action of the second resource that triggers the constraint.
-
#symmetrical ⇒ Object
The symmetrical setting of the constraint.
-
#to_s ⇒ Object
Test representation.
Methods inherited from PacemakerXML
Methods included from Pacemaker::Type
#add_to_operations_array, #compare_meta_attributes, #compare_operations, #inspect_to_s, #insync_debug, #munge_meta_attributes, #munge_operation, #munge_operations_array, #munge_rule, #primitive_base_name, #stringify_data
Methods included from Pacemaker::Xml
#xml_document, #xml_element, #xml_pretty_format
Methods included from Pacemaker::Wait
#online?, #retry_block, #wait_for_constraint_create, #wait_for_constraint_remove, #wait_for_constraint_update, #wait_for_master, #wait_for_online, #wait_for_primitive_create, #wait_for_primitive_remove, #wait_for_primitive_update, #wait_for_start, #wait_for_status, #wait_for_stop
Methods included from Pacemaker::Status
#cib_section_lrm_resources, #cib_section_lrm_rsc_ops, #cib_section_node_state, #decode_lrm_resources, #decode_lrm_rsc_ops, #determine_primitive_status, #failed_operations_found?, #node_status, #operation_status, #primitive_has_failures?, #primitive_has_master_running?, #primitive_has_status_on, #primitive_is_running?, #primitive_status, #primitives_status_by_node
Methods included from Pacemaker::OperationDefault
#cib_section_operation_defaults, #operation_default_defined?, #operation_default_delete, #operation_default_set, #operation_default_value, #operation_defaults
Methods included from Pacemaker::ResourceDefault
#cib_section_resource_defaults, #resource_default_defined?, #resource_default_delete, #resource_default_set, #resource_default_value, #resource_defaults
Methods included from Pacemaker::Debug
#cibadmin_safe, #cluster_debug_report, #cmapctl_safe, #crm_attribute_safe, #crm_node_safe, #crm_resource_safe, #debug_mode_enabled?, #resource_operations_report, #safe_method
Methods included from Pacemaker::Properties
#cib_section_cluster_property, #cluster_properties, #cluster_property_defined?, #cluster_property_delete, #cluster_property_set, #cluster_property_value
Methods included from Pacemaker::Primitives
#ban_primitive, #cib_section_primitives, #cleanup_primitive, #disable_primitive, #enable_primitive, #manage_primitive, #move_primitive, #parse_operations, #primitive_class, #primitive_complex_type, #primitive_exists?, #primitive_full_name, #primitive_group, #primitive_in_group?, #primitive_is_clone?, #primitive_is_complex?, #primitive_is_managed?, #primitive_is_master?, #primitive_is_simple?, #primitive_is_started?, #primitive_provider, #primitive_type, #primitives, #read_complex_types, #set_primitive_meta_attribute, #unban_primitive, #unmanage_primitive, #unmove_primitive, #write_complex_types, #xml_primitive
Methods included from Pacemaker::Options
#max_wait_time, pacemaker_options, #pacemaker_options, pacemaker_options_file
Methods included from Pacemaker::Nodes
#cib_section_nodes, #dc_name, #node_name, #nodes
Methods included from Pacemaker::Helpers
#attributes_to_hash, #children_elements_to_array, #children_elements_to_hash, #copy_value, #export_attributes_structure, #get_primitive_puppet_enable, #get_primitive_puppet_status, #import_attributes_structure, #sort_data
Methods included from Pacemaker::ConstraintColocations
#constraint_colocation_add, #constraint_colocation_exists?, #constraint_colocation_remove, #constraint_colocations, #xml_rsc_colocation
Methods included from Pacemaker::ConstraintLocations
#constraint_location_add, #constraint_location_exists?, #constraint_location_remove, #constraint_locations, #service_location_add, #service_location_exists?, #service_location_name, #service_location_remove, #xml_rsc_location
Methods included from Pacemaker::ConstraintOrders
#constraint_order_add, #constraint_order_exists?, #constraint_order_remove, #constraint_orders, #xml_rsc_order
Methods included from Pacemaker::Constraints
#cib_section_constraint_rules, #cib_section_constraints, #constraint_exists?, #constraints, #decode_constraint, #decode_constraint_rules
Methods included from Pacemaker::Cib
#cib, #cib=, #cib?, #cib_reset, #cibadmin_create, #cibadmin_delete, #cibadmin_modify, #cibadmin_replace, #dc, #dc_version, #raw_cib
Instance Method Details
#first ⇒ Object
The resource which should start first
21 22 23 24 |
# File 'lib/serverspec/type/pacemaker_order.rb', line 21 def first return unless instance instance['first'] end |
#first_action ⇒ Object
The action of the first resource that triggers the constraint
42 43 44 45 |
# File 'lib/serverspec/type/pacemaker_order.rb', line 42 def first_action return unless instance instance['first-action'] end |
#instance ⇒ Hash?
The data object from the library or nil if there is no object
16 17 18 |
# File 'lib/serverspec/type/pacemaker_order.rb', line 16 def instance constraint_orders[@name] end |
#kind ⇒ Object
the enforcement type of the constraint
56 57 58 59 60 |
# File 'lib/serverspec/type/pacemaker_order.rb', line 56 def kind return unless instance return unless instance['kind'] instance['kind'].downcase end |
#present? ⇒ true, false Also known as: exists?
Check if this object is present
8 9 10 |
# File 'lib/serverspec/type/pacemaker_order.rb', line 8 def present? !instance.nil? end |
#require_all ⇒ Object
The require_all setting of the constraint
69 70 71 72 |
# File 'lib/serverspec/type/pacemaker_order.rb', line 69 def require_all return unless instance instance['require-all'] end |
#score ⇒ String?
The priority score value
36 37 38 39 |
# File 'lib/serverspec/type/pacemaker_order.rb', line 36 def score return unless instance instance['score'] end |
#second ⇒ Object Also known as: then
The resource that should start after the first one
27 28 29 30 |
# File 'lib/serverspec/type/pacemaker_order.rb', line 27 def second return unless instance instance['then'] end |
#second_action ⇒ Object Also known as: then_action
The action of the second resource that triggers the constraint
48 49 50 51 |
# File 'lib/serverspec/type/pacemaker_order.rb', line 48 def second_action return unless instance instance['then-action'] end |
#symmetrical ⇒ Object
The symmetrical setting of the constraint
63 64 65 66 |
# File 'lib/serverspec/type/pacemaker_order.rb', line 63 def symmetrical return unless instance instance['symmetrical'] end |
#to_s ⇒ Object
Test representation
75 76 77 |
# File 'lib/serverspec/type/pacemaker_order.rb', line 75 def to_s "Pacemaker_order #{@name}" end |