Class: Serverspec::Type::Pacemaker_property
- Inherits:
-
PacemakerXML
- Object
- Base
- PacemakerXML
- Serverspec::Type::Pacemaker_property
- Defined in:
- lib/serverspec/type/pacemaker_property.rb
Overview
This Serverspec type can do the check on the Pacemaker property object
Instance Method Summary collapse
-
#instance ⇒ Hash?
The data object from the library or nil if there is no object.
-
#present? ⇒ true, false
(also: #exists?)
Check if this object is present.
-
#to_s ⇒ Object
Test representation.
-
#value ⇒ String?
The value of this object.
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
#instance ⇒ Hash?
The data object from the library or nil if there is no object
16 17 18 |
# File 'lib/serverspec/type/pacemaker_property.rb', line 16 def instance cluster_properties[@name] end |
#present? ⇒ true, false Also known as: exists?
Check if this object is present
8 9 10 |
# File 'lib/serverspec/type/pacemaker_property.rb', line 8 def present? !instance.nil? end |
#to_s ⇒ Object
Test representation
28 29 30 |
# File 'lib/serverspec/type/pacemaker_property.rb', line 28 def to_s "Pacemaker_property #{@name}" end |
#value ⇒ String?
The value of this object
22 23 24 25 |
# File 'lib/serverspec/type/pacemaker_property.rb', line 22 def value return unless instance instance['value'] end |