hawkular-client 2.9.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.rdoc +27 -0
- data/README.rdoc +14 -14
- data/lib/hawkular/alerts/alerts_api.rb +43 -7
- data/lib/hawkular/client_utils.rb +0 -3
- data/lib/hawkular/hawkular_client.rb +1 -1
- data/lib/hawkular/inventory/entities.rb +55 -19
- data/lib/hawkular/inventory/inventory_api.rb +313 -412
- data/lib/hawkular/metrics/metric_api.rb +5 -2
- data/lib/hawkular/operations/operations_api.rb +0 -8
- data/lib/hawkular/tokens/tokens_api.rb +0 -3
- data/lib/hawkular/version.rb +1 -1
- metadata +3 -647
- data/.coveralls.yml +0 -1
- data/.gitignore +0 -56
- data/.rubocop.yml +0 -32
- data/.travis.yml +0 -20
- data/.travis/start_hawkular_services.sh +0 -21
- data/.travis/wait_for_services.rb +0 -39
- data/.yardopts +0 -1
- data/Gemfile +0 -2
- data/Rakefile +0 -20
- data/api_breaking_changes.rdoc +0 -84
- data/docker-compose.yml +0 -17
- data/hawkularclient.gemspec +0 -43
- data/spec/README.rdoc +0 -62
- data/spec/integration/alert-resources/alerts-test-data.json +0 -40
- data/spec/integration/alert-resources/events-test-data.json +0 -78
- data/spec/integration/alert-resources/triggers-test-data.json +0 -66
- data/spec/integration/alerts_spec.rb +0 -774
- data/spec/integration/env_config_spec.rb +0 -39
- data/spec/integration/hawkular_client_spec.rb +0 -304
- data/spec/integration/hello-world-definitions.json +0 -45
- data/spec/integration/inventory_spec.rb +0 -680
- data/spec/integration/logger_spec.rb +0 -36
- data/spec/integration/metric_spec.rb +0 -953
- data/spec/integration/operations_spec.rb +0 -591
- data/spec/integration/tokens_spec.rb +0 -49
- data/spec/resources/driver.jar +0 -0
- data/spec/resources/sample.war +0 -0
- data/spec/spec_helper.rb +0 -336
- data/spec/unit/base_spec.rb +0 -256
- data/spec/unit/canonical_path_spec.rb +0 -102
- data/spec/unit/client_spec.rb +0 -55
- data/spec/unit/deprecations_spec.rb +0 -19
- data/spec/vcr/vcr_setup.rb +0 -16
- data/spec/vcr_cassettes/Alert/Alerts/Templates/Should_acknowledge_an_alert.yml +0 -205
- data/spec/vcr_cassettes/Alert/Alerts/Templates/Should_add_tags_to_existing_alert.yml +0 -210
- data/spec/vcr_cassettes/Alert/Alerts/Templates/Should_fetch_single_alert.yml +0 -108
- data/spec/vcr_cassettes/Alert/Alerts/Templates/Should_list_alerts.yml +0 -59
- data/spec/vcr_cassettes/Alert/Alerts/Templates/Should_list_alerts_for_trigger.yml +0 -58
- data/spec/vcr_cassettes/Alert/Alerts/Templates/Should_list_alerts_for_unknown_trigger.yml +0 -50
- data/spec/vcr_cassettes/Alert/Alerts/Templates/Should_list_open_alerts.yml +0 -59
- data/spec/vcr_cassettes/Alert/Alerts/Templates/Should_remove_tags_from_existing_alert.yml +0 -257
- data/spec/vcr_cassettes/Alert/Alerts/Templates/Should_resolve_an_alert.yml +0 -207
- data/spec/vcr_cassettes/Alert/Alerts/Templates/setup.yml +0 -255
- data/spec/vcr_cassettes/Alert/Alerts/Templates/setup_cleanup.yml +0 -302
- data/spec/vcr_cassettes/Alert/EndToEnd/Templates/Should_create_and_fire_a_trigger.yml +0 -527
- data/spec/vcr_cassettes/Alert/Events/Templates/Should_create_an_event.yml +0 -101
- data/spec/vcr_cassettes/Alert/Events/Templates/Should_delete_an_event.yml +0 -148
- data/spec/vcr_cassettes/Alert/Events/Templates/Should_list_events.yml +0 -91
- data/spec/vcr_cassettes/Alert/Events/Templates/Should_list_events_using_criteria.yml +0 -60
- data/spec/vcr_cassettes/Alert/Events/Templates/Should_not_list_events_using_criteria.yml +0 -50
- data/spec/vcr_cassettes/Alert/Events/Templates/setup.yml +0 -615
- data/spec/vcr_cassettes/Alert/Events/Templates/setup_cleanup.yml +0 -567
- data/spec/vcr_cassettes/Alert/Groups/Templates/Should_operate_a_complex_group_trigger.yml +0 -1882
- data/spec/vcr_cassettes/Alert/Templates/Should_return_the_version.yml +0 -42
- data/spec/vcr_cassettes/Alert/Triggers/Templates/Should_List_Triggers.yml +0 -55
- data/spec/vcr_cassettes/Alert/Triggers/Templates/Should_List_Triggers_for_ID.yml +0 -56
- data/spec/vcr_cassettes/Alert/Triggers/Templates/Should_List_Triggers_for_Tag.yml +0 -56
- data/spec/vcr_cassettes/Alert/Triggers/Templates/Should_List_Triggers_for_Tags.yml +0 -56
- data/spec/vcr_cassettes/Alert/Triggers/Templates/Should_bulk_load_triggers.yml +0 -243
- data/spec/vcr_cassettes/Alert/Triggers/Templates/Should_create_a_basic_trigger_with_action.yml +0 -386
- data/spec/vcr_cassettes/Alert/Triggers/Templates/Should_create_a_firing_ALL_ANY_trigger.yml +0 -483
- data/spec/vcr_cassettes/Alert/Triggers/Templates/Should_create_an_action.yml +0 -146
- data/spec/vcr_cassettes/Alert/Triggers/Templates/Should_get_a_single_Trigger_with_conditions.yml +0 -144
- data/spec/vcr_cassettes/Alert/Triggers/Templates/Should_get_a_single_metric_Trigger.yml +0 -50
- data/spec/vcr_cassettes/Alert/Triggers/Templates/Should_get_the_action_definitions.yml +0 -228
- data/spec/vcr_cassettes/Alert/Triggers/Templates/Should_not_create_an_action_for_unknown_plugin.yml +0 -50
- data/spec/vcr_cassettes/Alert/Triggers/Templates/Should_not_create_an_action_for_unknown_properties.yml +0 -100
- data/spec/vcr_cassettes/Alert/Triggers/Templates/setup.yml +0 -52
- data/spec/vcr_cassettes/Alert/Triggers/Templates/setup_cleanup.yml +0 -285
- data/spec/vcr_cassettes/HawkularClient/Should_err_on_bad_credentials.yml +0 -42
- data/spec/vcr_cassettes/HawkularClient/and_Inventory_client/Should_both_create_and_delete_feed.yml +0 -317
- data/spec/vcr_cassettes/HawkularClient/and_Inventory_client/Should_both_list_WildFlys.yml +0 -103
- data/spec/vcr_cassettes/HawkularClient/and_Inventory_client/Should_both_list_types_with_bad_feed.yml +0 -103
- data/spec/vcr_cassettes/HawkularClient/and_Inventory_client/Should_list_same_types_when_param_is_given.yml +0 -325
- data/spec/vcr_cassettes/HawkularClient/and_Inventory_client/Should_list_the_same_feeds.yml +0 -117
- data/spec/vcr_cassettes/HawkularClient/and_Inventory_client/Should_list_the_same_resource_types.yml +0 -111
- data/spec/vcr_cassettes/HawkularClient/and_Metrics_client/Should_both_create_and_retrieve_tags_for_Availability.yml +0 -155
- data/spec/vcr_cassettes/HawkularClient/and_Metrics_client/Should_both_create_and_return_Availability_using_Hash_parameter.yml +0 -155
- data/spec/vcr_cassettes/HawkularClient/and_Metrics_client/Should_both_return_the_version.yml +0 -89
- data/spec/vcr_cassettes/HawkularClient/and_Metrics_client/Should_both_work_the_same_way_when_pushing_metric_data_to_non-existing_counter.yml +0 -114
- data/spec/vcr_cassettes/HawkularClient/and_Operations_client/Should_both_work_the_same_way.yml +0 -158
- data/spec/vcr_cassettes/HawkularClient/and_Operations_client/Should_work_initializing_with_URI.yml +0 -48
- data/spec/vcr_cassettes/HawkularClient/and_Operations_client_Should_both_work_the_same_way.json +0 -44
- data/spec/vcr_cassettes/HawkularClient/and_Operations_client_Should_work_initializing_with_URI.json +0 -9
- data/spec/vcr_cassettes/HawkularClient/and_URIs_as_input/Should_work_with_URI.yml +0 -169
- data/spec/vcr_cassettes/HawkularClient/and_URIs_as_input/Should_work_with_URI_on_metrics_client.yml +0 -42
- data/spec/vcr_cassettes/Inventory/NonSecure/Connection/Templates/Should_err_on_bad_credentials.yml +0 -44
- data/spec/vcr_cassettes/Inventory/NonSecure/Tenants/Templates/Should_Get_Tenant_For_Explicit_Credentials.yml +0 -101
- data/spec/vcr_cassettes/Inventory/NonSecure/Tenants/Templates/Should_Get_Tenant_For_Implicit_Credentials.yml +0 -101
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Client_should_listen_on_various_inventory_events.json +0 -47
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Client_should_listen_on_various_inventory_events.yml +0 -207
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Helpers/create_url.yml +0 -52
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Helpers/generate_some_events_for_websocket.yml +0 -411
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Helpers/get_feeds.yml +0 -62
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_List_datasources_with_no_props.yml +0 -133
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_create_a_feed.yml +0 -59
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_create_a_feed_again.yml +0 -181
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_create_a_nested_resource_and_metric_on_it.yml +0 -664
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_create_a_resource.yml +0 -360
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_create_a_resource_with_metric.yml +0 -846
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_create_a_resourcetype.yml +0 -169
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_create_and_delete_feed.yml +0 -166
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_create_and_get_a_resource.yml +0 -420
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_get_resource_with_its_configurations.yml +0 -132
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_have_a_consistent_behaviour_when_creating_an_already_existing_resource.yml +0 -714
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_have_the_same_requested_metric_type_id.yml +0 -73
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_list_URLs.yml +0 -90
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_list_WildFlys.yml +0 -70
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_list_WildFlys_with_props.yml +0 -138
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_list_all_the_resource_types.yml +0 -59
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_list_children_of_WildFly.yml +0 -333
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_list_children_of_nested_resource.yml +0 -180
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_list_feeds.yml +0 -62
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_list_heap_metrics_for_WildFlys.yml +0 -943
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_list_metrics_for_WildFlys.yml +0 -361
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_list_metrics_of_given_metric_type.yml +0 -94
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_list_metrics_of_given_resource_type.yml +0 -294
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_list_operation_definitions_of_given_resource.yml +0 -871
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_list_operation_definitions_of_given_resource_type.yml +0 -740
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_list_recursive_children_of_WildFly.yml +0 -1117
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_list_relationships_of_WildFly.yml +0 -393
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_list_resources_for_feed.yml +0 -84
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_list_types_with_bad_feed.yml +0 -55
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_list_types_with_feed.yml +0 -166
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_not_find_an_unknown_resource.yml +0 -59
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_return_config_data_of_given_nested_resource.yml +0 -66
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_return_config_data_of_given_resource.yml +0 -71
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_return_data_from_get_entity.yml +0 -230
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_return_the_version.yml +0 -50
- data/spec/vcr_cassettes/Inventory/Secure/Connection/Templates/Should_err_on_bad_credentials.yml +0 -44
- data/spec/vcr_cassettes/Inventory/Secure/Tenants/Templates/Should_Get_Tenant_For_Explicit_Credentials.yml +0 -101
- data/spec/vcr_cassettes/Inventory/Secure/Tenants/Templates/Should_Get_Tenant_For_Implicit_Credentials.yml +0 -101
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Client_should_listen_on_various_inventory_events.json +0 -47
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Client_should_listen_on_various_inventory_events.yml +0 -207
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Helpers/create_url.yml +0 -52
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Helpers/generate_some_events_for_websocket.yml +0 -411
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Helpers/get_feeds.yml +0 -62
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_List_datasources_with_no_props.yml +0 -133
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_create_a_feed.yml +0 -59
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_create_a_feed_again.yml +0 -181
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_create_a_nested_resource_and_metric_on_it.yml +0 -664
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_create_a_resource.yml +0 -360
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_create_a_resource_with_metric.yml +0 -846
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_create_a_resourcetype.yml +0 -169
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_create_and_delete_feed.yml +0 -166
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_create_and_get_a_resource.yml +0 -420
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_get_resource_with_its_configurations.yml +0 -132
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_have_the_same_requested_metric_type_id.yml +0 -73
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_URLs.yml +0 -90
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_WildFlys.yml +0 -70
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_WildFlys_with_props.yml +0 -138
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_all_the_resource_types.yml +0 -59
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_children_of_WildFly.yml +0 -333
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_children_of_nested_resource.yml +0 -180
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_feeds.yml +0 -62
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_heap_metrics_for_WildFlys.yml +0 -943
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_metrics_for_WildFlys.yml +0 -361
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_metrics_of_given_metric_type.yml +0 -90
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_metrics_of_given_resource_type.yml +0 -294
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_operation_definitions_of_given_resource.yml +0 -871
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_operation_definitions_of_given_resource_type.yml +0 -740
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_recursive_children_of_WildFly.yml +0 -1117
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_relationships_of_WildFly.yml +0 -393
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_resources_for_feed.yml +0 -84
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_types_with_bad_feed.yml +0 -55
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_types_with_feed.yml +0 -166
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_not_find_an_unknown_resource.yml +0 -59
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_return_config_data_of_given_nested_resource.yml +0 -66
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_return_config_data_of_given_resource.yml +0 -71
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_return_the_version.yml +0 -50
- data/spec/vcr_cassettes/Inventory/Templates/Should_list_feeds_when_using_SSL_without_certificate.yml +0 -114
- data/spec/vcr_cassettes/Inventory/inventory_0_17/Templates/Should_get_resource_with_its_configurations.yml +0 -132
- data/spec/vcr_cassettes/Metrics/NonSecure/ID_with_special_characters/Templates/Get_metric_definition_by_id.yml +0 -51
- data/spec/vcr_cassettes/Metrics/NonSecure/ID_with_special_characters/Templates/Retrieve_metric_rate_points.yml +0 -92
- data/spec/vcr_cassettes/Metrics/NonSecure/ID_with_special_characters/Templates/Should_create_Availability_definition.yml +0 -101
- data/spec/vcr_cassettes/Metrics/NonSecure/ID_with_special_characters/Templates/Should_create_Counter_definition.yml +0 -101
- data/spec/vcr_cassettes/Metrics/NonSecure/ID_with_special_characters/Templates/Should_create_gauge_definition.yml +0 -101
- data/spec/vcr_cassettes/Metrics/NonSecure/ID_with_special_characters/Templates/Should_push_metric_data_to_existing_gauge.yml +0 -50
- data/spec/vcr_cassettes/Metrics/NonSecure/ID_with_special_characters/Templates/Should_update_tags_for_Availability_definition.yml +0 -146
- data/spec/vcr_cassettes/Metrics/NonSecure/ID_with_special_characters/Templates/Should_update_tags_for_gauge_definition.yml +0 -146
- data/spec/vcr_cassettes/Metrics/NonSecure/ID_with_special_characters/Templates/setup_client.yml +0 -44
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_8_0/Templates/Availability_metrics/Should_create_Availability_definition_using_MetricDefinition_parameter.yml +0 -83
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_8_0/Templates/Availability_metrics/Should_create_and_return_Availability_using_Hash_parameter.yml +0 -83
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_8_0/Templates/Availability_metrics/Should_push_metric_data_to_non-existing_Availability.yml +0 -120
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_8_0/Templates/Availability_metrics/Should_update_tags_for_Availability_definition.yml +0 -200
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_8_0/Templates/Counter_metrics/Should_create_and_return_counter_using_Hash_parameter.yml +0 -83
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_8_0/Templates/Counter_metrics/Should_create_counter_definition_using_MetricDefinition_parameter.yml +0 -83
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_8_0/Templates/Counter_metrics/Should_get_metrics_as_bucketed_results.yml +0 -200
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_8_0/Templates/Counter_metrics/Should_push_metric_data_to_existing_counter.yml +0 -237
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_8_0/Templates/Counter_metrics/Should_push_metric_data_to_non-existing_counter.yml +0 -120
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_8_0/Templates/Gauge_metrics/Should_create_gauge_definition_using_Hash.yml +0 -83
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_8_0/Templates/Gauge_metrics/Should_create_gauge_definition_using_MetricDefinition.yml +0 -83
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_8_0/Templates/Gauge_metrics/Should_push_metric_data_to_existing_gauge.yml +0 -237
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_8_0/Templates/Gauge_metrics/Should_push_metric_data_to_non-existing_gauge.yml +0 -120
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_8_0/Templates/Gauge_metrics/Should_return_periods.yml +0 -81
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_8_0/Templates/Gauge_metrics/Should_update_tags_for_gauge_definition.yml +0 -200
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_8_0/Templates/Mixed_metrics/Should_send_mixed_metric_request.yml +0 -270
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_8_0/Templates/Mixed_metrics/Should_send_mixed_metric_request_of_a_single_type.yml +0 -237
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_8_0/Templates/Simple/Should_be_Cool.yml +0 -82
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_8_0/Templates/Status/Should_return_the_version.yml +0 -42
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_8_0/Templates/Tenants/Should_create_and_return_tenant.yml +0 -83
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/All_Tags_for_metrics/Should_fetch_all_metric_tags_for_metrics_definitions.yml +0 -434
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/All_Tags_for_metrics/Should_fetch_all_metrics_with_some_tags.yml +0 -1251
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Availability_metrics/Should_create_Availability_definition_using_MetricDefinition_parameter.yml +0 -99
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Availability_metrics/Should_create_and_return_Availability_using_Hash_parameter.yml +0 -99
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Availability_metrics/Should_group_contiguous_values.yml +0 -138
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Availability_metrics/Should_push_metric_data_to_non-existing_Availability.yml +0 -144
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Availability_metrics/Should_update_tags_for_Availability_definition.yml +0 -240
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Availability_metrics/setup_client.yml +0 -44
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Counter_metrics/Should_create_and_return_counter_using_Hash_parameter.yml +0 -99
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Counter_metrics/Should_create_counter_definition_using_MetricDefinition_parameter.yml +0 -99
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Counter_metrics/Should_get_metrics_as_bucketed_results.yml +0 -240
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Counter_metrics/Should_get_metrics_with_limit_and_order.yml +0 -328
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Counter_metrics/Should_push_metric_data_to_existing_counter.yml +0 -281
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Counter_metrics/Should_push_metric_data_to_non-existing_counter.yml +0 -144
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Counter_metrics/setup_client.yml +0 -44
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Gauge_metrics/Should_create_gauge_definition_using_Hash.yml +0 -99
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Gauge_metrics/Should_create_gauge_definition_using_MetricDefinition.yml +0 -99
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Gauge_metrics/Should_push_metric_data_to_existing_gauge.yml +0 -281
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Gauge_metrics/Should_push_metric_data_to_non-existing_gauge.yml +0 -144
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Gauge_metrics/Should_return_periods.yml +0 -97
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Gauge_metrics/Should_return_platform_memory.yml +0 -196
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Gauge_metrics/Should_return_platform_memory_def.yml +0 -197
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Gauge_metrics/Should_update_tags_for_gauge_definition.yml +0 -240
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Gauge_metrics/setup_client.yml +0 -44
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Mixed_metrics/Should_fetch_rate_stats_for_mixed_metric.yml +0 -328
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Mixed_metrics/Should_fetch_stats_for_mixed_metric.yml +0 -363
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Mixed_metrics/Should_requests_raw_data_for_multiple_metrics.yml +0 -414
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Mixed_metrics/Should_send_mixed_metric_request.yml +0 -314
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Mixed_metrics/Should_send_mixed_metric_request_of_a_single_type.yml +0 -285
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Mixed_metrics/setup_client.yml +0 -44
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/No_Tenant/Should_fail.yml +0 -89
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Simple/Should_be_Cool.yml +0 -48
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Status/Should_return_the_version.yml +0 -85
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/String_metrics/Should_create_string_definition_using_Hash.yml +0 -99
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/String_metrics/Should_create_string_definition_using_MetricDefinition.yml +0 -99
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/String_metrics/Should_push_metric_data_to_existing_string.yml +0 -281
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/String_metrics/Should_push_metric_data_to_non-existing_string.yml +0 -144
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/String_metrics/setup_client.yml +0 -44
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Tags_Metrics/setup_client.yml +0 -44
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Tenants/Should_create_and_return_tenant.yml +0 -103
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Tenants/setup_client.yml +0 -44
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/setup_client.yml +0 -44
- data/spec/vcr_cassettes/Metrics/Secure/ID_with_special_characters/Templates/Get_metric_definition_by_id.yml +0 -51
- data/spec/vcr_cassettes/Metrics/Secure/ID_with_special_characters/Templates/Retrieve_metric_rate_points.yml +0 -92
- data/spec/vcr_cassettes/Metrics/Secure/ID_with_special_characters/Templates/Should_create_Availability_definition.yml +0 -101
- data/spec/vcr_cassettes/Metrics/Secure/ID_with_special_characters/Templates/Should_create_Counter_definition.yml +0 -101
- data/spec/vcr_cassettes/Metrics/Secure/ID_with_special_characters/Templates/Should_create_gauge_definition.yml +0 -101
- data/spec/vcr_cassettes/Metrics/Secure/ID_with_special_characters/Templates/Should_push_metric_data_to_existing_gauge.yml +0 -50
- data/spec/vcr_cassettes/Metrics/Secure/ID_with_special_characters/Templates/Should_update_tags_for_Availability_definition.yml +0 -146
- data/spec/vcr_cassettes/Metrics/Secure/ID_with_special_characters/Templates/Should_update_tags_for_gauge_definition.yml +0 -146
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Availability_metrics/Should_create_Availability_definition_using_MetricDefinition_parameter.yml +0 -99
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Availability_metrics/Should_create_and_return_Availability_using_Hash_parameter.yml +0 -99
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Availability_metrics/Should_group_contiguous_values.yml +0 -97
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Availability_metrics/Should_push_metric_data_to_non-existing_Availability.yml +0 -144
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Availability_metrics/Should_update_tags_for_Availability_definition.yml +0 -240
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Counter_metrics/Should_create_and_return_counter_using_Hash_parameter.yml +0 -99
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Counter_metrics/Should_create_counter_definition_using_MetricDefinition_parameter.yml +0 -99
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Counter_metrics/Should_get_metrics_as_bucketed_results.yml +0 -240
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Counter_metrics/Should_get_metrics_with_limit_and_order.yml +0 -328
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Counter_metrics/Should_push_metric_data_to_existing_counter.yml +0 -281
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Counter_metrics/Should_push_metric_data_to_non-existing_counter.yml +0 -144
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Gauge_metrics/Should_create_gauge_definition_using_Hash.yml +0 -99
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Gauge_metrics/Should_create_gauge_definition_using_MetricDefinition.yml +0 -99
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Gauge_metrics/Should_push_metric_data_to_existing_gauge.yml +0 -281
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Gauge_metrics/Should_push_metric_data_to_non-existing_gauge.yml +0 -144
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Gauge_metrics/Should_return_periods.yml +0 -97
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Gauge_metrics/Should_return_platform_memory.yml +0 -50
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Gauge_metrics/Should_return_platform_memory_def.yml +0 -51
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Gauge_metrics/Should_update_tags_for_gauge_definition.yml +0 -240
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Mixed_metrics/Should_fetch_stats_for_mixed_metric.yml +0 -364
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Mixed_metrics/Should_requests_raw_data_for_multiple_metrics.yml +0 -373
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Mixed_metrics/Should_send_mixed_metric_request.yml +0 -314
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Mixed_metrics/Should_send_mixed_metric_request_of_a_single_type.yml +0 -285
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/No_Tenant/Should_fail.yml +0 -50
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Simple/Should_be_Cool.yml +0 -48
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Status/Should_return_the_version.yml +0 -44
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Tenants/Should_create_and_return_tenant.yml +0 -99
- data/spec/vcr_cassettes/New_API_Counter_metrics/Should_get_metrics_as_bucketed_results.yml +0 -230
- data/spec/vcr_cassettes/New_API_Mixed_metrics/Should_send_mixed_metric_request.yml +0 -300
- data/spec/vcr_cassettes/Operation/NonSecure/Helpers/Templates/agent_properties.yml +0 -124
- data/spec/vcr_cassettes/Operation/NonSecure/Helpers/Templates/get_feed.yml +0 -61
- data/spec/vcr_cassettes/Operation/NonSecure/Helpers/Templates/get_tenant.yml +0 -55
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Add_JDBC_driver_should_add_the_driver.json +0 -23
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Add_XA_datasource_should_be_doable.json +0 -23
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Add_deployment_should_be_doable.json +0 -23
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Add_non-XA_datasource_should_be_doable.json +0 -23
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Disable_should_be_performed_and_eventually_respond_with_success.json +0 -23
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Remove_JDBC_driver_should_be_performed_and_eventually_respond_with_success.json +0 -23
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Remove_datasource_should_be_performed_and_eventually_respond_with_success.json +0 -23
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Restart_can_be_run_multiple_times_in_parallel.json +0 -32
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Restart_should_be_performed_and_eventually_respond_with_success.json +0 -23
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Restart_should_not_be_performed_if_resource_path_is_wrong.json +0 -23
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Undeploy_deployment_should_be_performed_and_eventually_respond_with_success.json +0 -23
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Update_collection_intervals_should_be_performed_and_eventually_respond_with_success.json +0 -23
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/should_not_be_possible_to_perform_on_closed_client.json +0 -12
- data/spec/vcr_cassettes/Operation/NonSecure/Websocket_connection/should_bail_with_hash_property_error_because_no_callback_at_all.json +0 -9
- data/spec/vcr_cassettes/Operation/NonSecure/Websocket_connection/should_bail_with_hash_property_error_because_no_error-callback_.json +0 -9
- data/spec/vcr_cassettes/Operation/NonSecure/Websocket_connection/should_bail_with_no_host.json +0 -3
- data/spec/vcr_cassettes/Operation/NonSecure/Websocket_connection/should_be_established.json +0 -9
- data/spec/vcr_cassettes/Operation/NonSecure/Websocket_connection/should_be_established_via_entrypoint.json +0 -9
- data/spec/vcr_cassettes/Operation/NonSecure/Websocket_connection/should_run_into_error_callback.json +0 -18
- data/spec/vcr_cassettes/Operation/NonSecure/Websocket_connection/should_run_into_error_callback_because_bad_hash_parameters.json +0 -13
- data/spec/vcr_cassettes/Operation/Secure/Helpers/Templates/get_feed.yml +0 -61
- data/spec/vcr_cassettes/Operation/Secure/Helpers/Templates/get_tenant.yml +0 -55
- data/spec/vcr_cassettes/Operation/Secure/Operation/Add_JDBC_driver_should_add_the_driver.json +0 -23
- data/spec/vcr_cassettes/Operation/Secure/Operation/Add_datasource_should_be_doable.json +0 -23
- data/spec/vcr_cassettes/Operation/Secure/Operation/Add_deployment_should_be_doable.json +0 -23
- data/spec/vcr_cassettes/Operation/Secure/Operation/Disable_should_be_performed_and_eventually_respond_with_success.json +0 -23
- data/spec/vcr_cassettes/Operation/Secure/Operation/Remove_JDBC_driver_should_be_performed_and_eventually_respond_with_success.json +0 -23
- data/spec/vcr_cassettes/Operation/Secure/Operation/Remove_datasource_should_be_performed_and_eventually_respond_with_success.json +0 -23
- data/spec/vcr_cassettes/Operation/Secure/Operation/Restart_can_be_run_multiple_times_in_parallel.json +0 -32
- data/spec/vcr_cassettes/Operation/Secure/Operation/Restart_should_be_performed_and_eventually_respond_with_success.json +0 -23
- data/spec/vcr_cassettes/Operation/Secure/Operation/Restart_should_not_be_performed_if_resource_path_is_wrong.json +0 -23
- data/spec/vcr_cassettes/Operation/Secure/Operation/Undeploy_deployment_should_be_performed_and_eventually_respond_with_success.json +0 -23
- data/spec/vcr_cassettes/Operation/Secure/Operation/should_not_be_possible_to_perform_on_closed_client.json +0 -12
- data/spec/vcr_cassettes/Operation/Secure/Websocket_connection/should_bail_with_hash_property_error_because_no_callback_at_all.json +0 -9
- data/spec/vcr_cassettes/Operation/Secure/Websocket_connection/should_bail_with_hash_property_error_because_no_error-callback_.json +0 -9
- data/spec/vcr_cassettes/Operation/Secure/Websocket_connection/should_bail_with_no_host.json +0 -3
- data/spec/vcr_cassettes/Operation/Secure/Websocket_connection/should_be_established.json +0 -9
- data/spec/vcr_cassettes/Operation/Secure/Websocket_connection/should_be_established_via_entrypoint.json +0 -9
- data/spec/vcr_cassettes/Operation/Secure/Websocket_connection/should_run_into_error_callback.json +0 -18
- data/spec/vcr_cassettes/Operation/Secure/Websocket_connection/should_run_into_error_callback_because_bad_hash_parameters.json +0 -13
- data/spec/vcr_cassettes/Tokens/Should_be_able_to_create_a_new_token_for_an_actual_user.yml +0 -57
- data/spec/vcr_cassettes/Tokens/Should_be_able_to_list_the_available_tokens.yml +0 -49
- data/spec/vcr_cassettes/Tokens/Should_get_a_401_when_attempting_to_create_a_token_with_a_wrong_password.yml +0 -56
- data/spec/vcr_cassettes/Tokens/Should_get_a_401_when_attempting_to_create_a_token_without_a_password.yml +0 -55
@@ -1,102 +0,0 @@
|
|
1
|
-
require_relative '../spec_helper'
|
2
|
-
|
3
|
-
include Hawkular::Inventory
|
4
|
-
|
5
|
-
describe 'CanonicalPath' do
|
6
|
-
# positive cases :)
|
7
|
-
context 'with valid path' do
|
8
|
-
it 'should be parseable' do
|
9
|
-
expect(CanonicalPath.parse('/t;t1/f;f1/r;r1'))
|
10
|
-
.to be == CanonicalPath.new(tenant_id: 't1', feed_id: 'f1', resource_ids: ['r1'])
|
11
|
-
|
12
|
-
expect(CanonicalPath.parse('/t;t1/f;f1/m;m1'))
|
13
|
-
.to be == CanonicalPath.new(tenant_id: 't1', feed_id: 'f1', metric_id: 'm1')
|
14
|
-
|
15
|
-
expect(CanonicalPath.parse('/t;t1/f;f1/rt;rt1'))
|
16
|
-
.to be == CanonicalPath.new(tenant_id: 't1', feed_id: 'f1', resource_type_id: 'rt1')
|
17
|
-
|
18
|
-
expect(CanonicalPath.parse('/t;t1/f;f1/mt;mt1'))
|
19
|
-
.to be == CanonicalPath.new(tenant_id: 't1', feed_id: 'f1', metric_type_id: 'mt1')
|
20
|
-
|
21
|
-
expect(CanonicalPath.parse('/t;t1/e;e1/r;r1'))
|
22
|
-
.to be == CanonicalPath.new(tenant_id: 't1', environment_id: 'e1', resource_ids: ['r1'])
|
23
|
-
|
24
|
-
expect(CanonicalPath.parse('/t;t1/e;e1/m;m1'))
|
25
|
-
.to be == CanonicalPath.new(tenant_id: 't1', environment_id: 'e1', metric_id: 'm1')
|
26
|
-
|
27
|
-
expect(CanonicalPath.parse('/t;t1/rt;rt1'))
|
28
|
-
.to be == CanonicalPath.new(tenant_id: 't1', resource_type_id: 'rt1')
|
29
|
-
|
30
|
-
expect(CanonicalPath.parse('/t;t1/mt;mt1'))
|
31
|
-
.to be == CanonicalPath.new(tenant_id: 't1', metric_type_id: 'mt1')
|
32
|
-
end
|
33
|
-
|
34
|
-
it 'with resource hierarchy should be parseable' do
|
35
|
-
expect(CanonicalPath.parse('/t;t1/f;f1/r;r1/r;r2/r;r3/r;r4/r;r5'))
|
36
|
-
.to be == CanonicalPath.new(tenant_id: 't1', feed_id: 'f1', resource_ids: %w(r1 r2 r3 r4 r5))
|
37
|
-
expect(CanonicalPath.parse('/t;t1/e;e1/r;r1/r;r2/r;r3'))
|
38
|
-
.to be == CanonicalPath.new(tenant_id: 't1', environment_id: 'e1', resource_ids: %w(r1 r2 r3))
|
39
|
-
end
|
40
|
-
|
41
|
-
it 'with resource hierarchy should be upable' do
|
42
|
-
expect(CanonicalPath.parse('/t;t1/f;f1/r;r1/r;r2/r;r3/r;r4/r;r5').up)
|
43
|
-
.to be == CanonicalPath.new(tenant_id: 't1', feed_id: 'f1', resource_ids: %w(r1 r2 r3 r4))
|
44
|
-
expect(CanonicalPath.parse('/t;t1/e;e1/r;r1').up)
|
45
|
-
.to be == CanonicalPath.new(tenant_id: 't1', environment_id: 'e1', resource_ids: [])
|
46
|
-
expect(CanonicalPath.parse('/t;t1/e;e1').up)
|
47
|
-
.to be == CanonicalPath.new(tenant_id: 't1', environment_id: 'e1', resource_ids: [])
|
48
|
-
end
|
49
|
-
|
50
|
-
it 'should be identity when calling parse and then to_s' do
|
51
|
-
path_str = '/t;t1/e;e1/r;r1/r;r2'
|
52
|
-
path1 = CanonicalPath.parse(path_str)
|
53
|
-
expect(CanonicalPath.parse(path1.to_s)).to be == path1
|
54
|
-
expect(path1.to_s).to eql(path_str)
|
55
|
-
|
56
|
-
path2 = CanonicalPath.new(tenant_id: 'tenant', resource_type_id: 'type')
|
57
|
-
expect(CanonicalPath.parse(path2.to_s)).to be == path2
|
58
|
-
expect(CanonicalPath.parse(CanonicalPath.parse(path2.to_s).to_s)).to be == path2
|
59
|
-
end
|
60
|
-
|
61
|
-
it 'should be readable' do
|
62
|
-
tenant_id = 'tenant'
|
63
|
-
feed_id = 'feed'
|
64
|
-
metric_type_id = 'm_type'
|
65
|
-
res1_id = 'resource_1'
|
66
|
-
res2_id = 'resource_2'
|
67
|
-
|
68
|
-
path = CanonicalPath.parse("/t;#{tenant_id}/f;#{feed_id}/mt;#{metric_type_id}")
|
69
|
-
expect(path.tenant_id).to eql(tenant_id)
|
70
|
-
expect(path.feed_id).to eql(feed_id)
|
71
|
-
expect(path.metric_type_id).to eql(metric_type_id)
|
72
|
-
|
73
|
-
other_path = CanonicalPath.parse("/t;#{tenant_id}/f;#{feed_id}/r;#{res1_id}/r;#{res2_id}")
|
74
|
-
expect(other_path.tenant_id).to eql(tenant_id)
|
75
|
-
expect(other_path.feed_id).to eql(feed_id)
|
76
|
-
expect(other_path.resource_ids).to eql([res1_id, res2_id])
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
# negative cases :(
|
81
|
-
it 'with empty path cannot be parsed' do
|
82
|
-
expect { CanonicalPath.parse(nil) }.to raise_error(RuntimeError)
|
83
|
-
expect { CanonicalPath.parse('') }.to raise_error(RuntimeError)
|
84
|
-
expect { CanonicalPath.parse(' ') }.to raise_error(RuntimeError)
|
85
|
-
end
|
86
|
-
|
87
|
-
context 'with no tenant id' do
|
88
|
-
xit 'should not be parseable' do
|
89
|
-
expect { CanonicalPath.parse('/f;myFeed/rt;resType') }.to raise_error(RuntimeError)
|
90
|
-
end
|
91
|
-
|
92
|
-
xit 'should not be constructed' do
|
93
|
-
expect { CanonicalPath.new(feed_id: 'something') }.to raise_error(RuntimeError)
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
it 'with empty path cannot be parsed' do
|
98
|
-
expect { CanonicalPath.parse(nil) }.to raise_error(RuntimeError)
|
99
|
-
expect { CanonicalPath.parse('') }.to raise_error(RuntimeError)
|
100
|
-
expect { CanonicalPath.parse(' ') }.to raise_error(RuntimeError)
|
101
|
-
end
|
102
|
-
end
|
data/spec/unit/client_spec.rb
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
require_relative '../spec_helper'
|
2
|
-
|
3
|
-
HOST = 'localhost:8080'
|
4
|
-
describe Hawkular::Metrics::Client do
|
5
|
-
context 'client initialization' do
|
6
|
-
it 'should accept no option' do
|
7
|
-
credentials = { username: 'mockuser', password: 'mockpass' }
|
8
|
-
::RSpec::Mocks.with_temporary_scope do
|
9
|
-
mock_metrics_version
|
10
|
-
Hawkular::Metrics::Client.new(HOST, credentials)
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
it 'should accept Hawkular-Tenant option' do
|
15
|
-
credentials = { username: 'mockuser', password: 'mockpass' }
|
16
|
-
::RSpec::Mocks.with_temporary_scope do
|
17
|
-
mock_metrics_version
|
18
|
-
@client = Hawkular::Metrics::Client.new(HOST, credentials, tenant: 'foo')
|
19
|
-
headers = @client.send(:http_headers)
|
20
|
-
expect(headers[:'Hawkular-Tenant']).to eql('foo')
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
it 'should define subcomponents' do
|
25
|
-
::RSpec::Mocks.with_temporary_scope do
|
26
|
-
mock_metrics_version
|
27
|
-
client = Hawkular::Metrics::Client.new HOST
|
28
|
-
expect(client.tenants).not_to be nil
|
29
|
-
expect(client.counters).not_to be nil
|
30
|
-
expect(client.gauges).not_to be nil
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
context 'http comms' do
|
36
|
-
before(:each) do
|
37
|
-
credentials = { username: 'mockuser', password: 'mockpass' }
|
38
|
-
::RSpec::Mocks.with_temporary_scope do
|
39
|
-
mock_metrics_version
|
40
|
-
@client = Hawkular::Metrics::Client.new(HOST, credentials)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
it 'should add Accept: headers' do
|
45
|
-
headers = @client.send(:http_headers)
|
46
|
-
expect(headers[:accept]).to eql('application/json')
|
47
|
-
end
|
48
|
-
|
49
|
-
it 'should keep existing Accept: headers' do
|
50
|
-
value = 'application/json; foo=bar;'
|
51
|
-
headers = @client.send(:http_headers, accept: value)
|
52
|
-
expect(headers[:accept]).to eql(value)
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
require_relative '../spec_helper'
|
2
|
-
|
3
|
-
describe 'Deprecations' do
|
4
|
-
def self.changed_constant(from:, to:)
|
5
|
-
describe to do
|
6
|
-
it 'is still accessible by its old name' do
|
7
|
-
expect(from).to eq to
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
describe 'pre-3.0' do
|
13
|
-
changed_constant from: HawkularUtilsMixin, to: Hawkular::ClientUtils
|
14
|
-
changed_constant from: Hawkular::Operations::OperationsClient, to: Hawkular::Operations::Client
|
15
|
-
changed_constant from: Hawkular::Alerts::AlertsClient, to: Hawkular::Alerts::Client
|
16
|
-
changed_constant from: Hawkular::Token::TokenClient, to: Hawkular::Token::Client
|
17
|
-
changed_constant from: Hawkular::Inventory::InventoryClient, to: Hawkular::Inventory::Client
|
18
|
-
end
|
19
|
-
end
|
data/spec/vcr/vcr_setup.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
require 'vcr'
|
2
|
-
require 'simple_websocket_vcr'
|
3
|
-
require 'webmock'
|
4
|
-
|
5
|
-
VCR.configure do |c|
|
6
|
-
c.cassette_library_dir = 'spec/vcr_cassettes'
|
7
|
-
c.hook_into :webmock
|
8
|
-
c.default_cassette_options = { match_requests_on: [:uri, :method] }
|
9
|
-
c.debug_logger = File.open('spec/vcr.log', 'w')
|
10
|
-
c.configure_rspec_metadata!
|
11
|
-
end
|
12
|
-
|
13
|
-
WebSocketVCR.configure do |c|
|
14
|
-
c.json_cassettes = true
|
15
|
-
c.cassette_library_dir = VCR.configuration.cassette_library_dir
|
16
|
-
end
|
@@ -1,205 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/?statuses=OPEN
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
Accept:
|
11
|
-
- application/json
|
12
|
-
Accept-Encoding:
|
13
|
-
- identity
|
14
|
-
User-Agent:
|
15
|
-
- hawkular-client-ruby
|
16
|
-
Hawkular-Tenant:
|
17
|
-
- hawkular
|
18
|
-
Content-Type:
|
19
|
-
- application/json
|
20
|
-
Host:
|
21
|
-
- localhost:8080
|
22
|
-
response:
|
23
|
-
status:
|
24
|
-
code: 200
|
25
|
-
message: OK
|
26
|
-
headers:
|
27
|
-
Expires:
|
28
|
-
- '0'
|
29
|
-
Cache-Control:
|
30
|
-
- no-cache, no-store, must-revalidate
|
31
|
-
X-Powered-By:
|
32
|
-
- Undertow/1
|
33
|
-
Server:
|
34
|
-
- WildFly/10
|
35
|
-
Pragma:
|
36
|
-
- no-cache
|
37
|
-
Date:
|
38
|
-
- Fri, 07 Oct 2016 15:36:35 GMT
|
39
|
-
X-Total-Count:
|
40
|
-
- '1'
|
41
|
-
Connection:
|
42
|
-
- keep-alive
|
43
|
-
Content-Type:
|
44
|
-
- application/json
|
45
|
-
Content-Length:
|
46
|
-
- '1235'
|
47
|
-
Link:
|
48
|
-
- <http://localhost:8080/hawkular/alerts/?statuses=OPEN>; rel="current", <http://localhost:8080/hawkular/alerts/?statuses=OPEN&page=0>;
|
49
|
-
rel="last"
|
50
|
-
body:
|
51
|
-
encoding: UTF-8
|
52
|
-
string: '[{"eventType":"ALERT","tenantId":"hawkular","id":"a-trigger-1475854594696-89fe86b0-959c-434f-96c3-e627f2376e90","ctime":1475854594696,"dataSource":"_none_","dataId":"a-trigger","category":"ALERT","text":"Just
|
53
|
-
a trigger","trigger":{"tenantId":"hawkular","id":"a-trigger","name":"A trigger
|
54
|
-
name","description":"Just a trigger","type":"STANDARD","eventType":"ALERT","eventCategory":null,"eventText":null,"severity":"HIGH","autoDisable":false,"autoEnable":false,"autoResolve":false,"autoResolveAlerts":true,"autoResolveMatch":"ALL","enabled":true,"firingMatch":"ALL","source":"_none_"},"dampening":{"tenantId":"hawkular","triggerId":"a-trigger","triggerMode":"FIRING","type":"STRICT","evalTrueSetting":1,"evalTotalSetting":1,"evalTimeSetting":0,"dampeningId":"hawkular-a-trigger-FIRING"},"evalSets":[[{"evalTimestamp":1475854594694,"dataTimestamp":1475854594,"type":"THRESHOLD","condition":{"tenantId":"hawkular","triggerId":"a-trigger","triggerMode":"FIRING","type":"THRESHOLD","conditionSetSize":1,"conditionSetIndex":1,"conditionId":"hawkular-a-trigger-FIRING-1-1","dataId":"data-x","operator":"LT","threshold":5.0},"value":4.0}]],"severity":"HIGH","status":"OPEN","lifecycle":[{"status":"OPEN","user":"system","stime":1475854594696}]}]'
|
55
|
-
http_version:
|
56
|
-
recorded_at: Fri, 07 Oct 2016 15:36:35 GMT
|
57
|
-
- request:
|
58
|
-
method: get
|
59
|
-
uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/alert/a-trigger-1475854594696-89fe86b0-959c-434f-96c3-e627f2376e90
|
60
|
-
body:
|
61
|
-
encoding: US-ASCII
|
62
|
-
string: ''
|
63
|
-
headers:
|
64
|
-
Accept:
|
65
|
-
- application/json
|
66
|
-
Accept-Encoding:
|
67
|
-
- identity
|
68
|
-
User-Agent:
|
69
|
-
- hawkular-client-ruby
|
70
|
-
Hawkular-Tenant:
|
71
|
-
- hawkular
|
72
|
-
Content-Type:
|
73
|
-
- application/json
|
74
|
-
Host:
|
75
|
-
- localhost:8080
|
76
|
-
response:
|
77
|
-
status:
|
78
|
-
code: 200
|
79
|
-
message: OK
|
80
|
-
headers:
|
81
|
-
Expires:
|
82
|
-
- '0'
|
83
|
-
Cache-Control:
|
84
|
-
- no-cache, no-store, must-revalidate
|
85
|
-
X-Powered-By:
|
86
|
-
- Undertow/1
|
87
|
-
Server:
|
88
|
-
- WildFly/10
|
89
|
-
Pragma:
|
90
|
-
- no-cache
|
91
|
-
Date:
|
92
|
-
- Fri, 07 Oct 2016 15:36:35 GMT
|
93
|
-
Connection:
|
94
|
-
- keep-alive
|
95
|
-
Content-Type:
|
96
|
-
- application/json
|
97
|
-
Content-Length:
|
98
|
-
- '1233'
|
99
|
-
body:
|
100
|
-
encoding: UTF-8
|
101
|
-
string: '{"eventType":"ALERT","tenantId":"hawkular","id":"a-trigger-1475854594696-89fe86b0-959c-434f-96c3-e627f2376e90","ctime":1475854594696,"dataSource":"_none_","dataId":"a-trigger","category":"ALERT","text":"Just
|
102
|
-
a trigger","trigger":{"tenantId":"hawkular","id":"a-trigger","name":"A trigger
|
103
|
-
name","description":"Just a trigger","type":"STANDARD","eventType":"ALERT","eventCategory":null,"eventText":null,"severity":"HIGH","autoDisable":false,"autoEnable":false,"autoResolve":false,"autoResolveAlerts":true,"autoResolveMatch":"ALL","enabled":true,"firingMatch":"ALL","source":"_none_"},"dampening":{"tenantId":"hawkular","triggerId":"a-trigger","triggerMode":"FIRING","type":"STRICT","evalTrueSetting":1,"evalTotalSetting":1,"evalTimeSetting":0,"dampeningId":"hawkular-a-trigger-FIRING"},"evalSets":[[{"evalTimestamp":1475854594694,"dataTimestamp":1475854594,"type":"THRESHOLD","condition":{"tenantId":"hawkular","triggerId":"a-trigger","triggerMode":"FIRING","type":"THRESHOLD","conditionSetSize":1,"conditionSetIndex":1,"conditionId":"hawkular-a-trigger-FIRING-1-1","dataId":"data-x","operator":"LT","threshold":5.0},"value":4.0}]],"severity":"HIGH","status":"OPEN","lifecycle":[{"status":"OPEN","user":"system","stime":1475854594696}]}'
|
104
|
-
http_version:
|
105
|
-
recorded_at: Fri, 07 Oct 2016 15:36:35 GMT
|
106
|
-
- request:
|
107
|
-
method: put
|
108
|
-
uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/ack/a-trigger-1475854594696-89fe86b0-959c-434f-96c3-e627f2376e90?ackBy=Heiko&ackNotes=Hello%20Ruby%20World%20:-)
|
109
|
-
body:
|
110
|
-
encoding: UTF-8
|
111
|
-
string: "{}"
|
112
|
-
headers:
|
113
|
-
Accept:
|
114
|
-
- application/json
|
115
|
-
Accept-Encoding:
|
116
|
-
- identity
|
117
|
-
User-Agent:
|
118
|
-
- hawkular-client-ruby
|
119
|
-
Hawkular-Tenant:
|
120
|
-
- hawkular
|
121
|
-
Content-Type:
|
122
|
-
- application/json
|
123
|
-
Content-Length:
|
124
|
-
- '2'
|
125
|
-
Host:
|
126
|
-
- localhost:8080
|
127
|
-
response:
|
128
|
-
status:
|
129
|
-
code: 200
|
130
|
-
message: OK
|
131
|
-
headers:
|
132
|
-
Expires:
|
133
|
-
- '0'
|
134
|
-
Cache-Control:
|
135
|
-
- no-cache, no-store, must-revalidate
|
136
|
-
X-Powered-By:
|
137
|
-
- Undertow/1
|
138
|
-
Server:
|
139
|
-
- WildFly/10
|
140
|
-
Pragma:
|
141
|
-
- no-cache
|
142
|
-
Date:
|
143
|
-
- Fri, 07 Oct 2016 15:36:35 GMT
|
144
|
-
Connection:
|
145
|
-
- keep-alive
|
146
|
-
Content-Type:
|
147
|
-
- application/json
|
148
|
-
Content-Length:
|
149
|
-
- '0'
|
150
|
-
body:
|
151
|
-
encoding: UTF-8
|
152
|
-
string: ''
|
153
|
-
http_version:
|
154
|
-
recorded_at: Fri, 07 Oct 2016 15:36:35 GMT
|
155
|
-
- request:
|
156
|
-
method: get
|
157
|
-
uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/alert/a-trigger-1475854594696-89fe86b0-959c-434f-96c3-e627f2376e90
|
158
|
-
body:
|
159
|
-
encoding: US-ASCII
|
160
|
-
string: ''
|
161
|
-
headers:
|
162
|
-
Accept:
|
163
|
-
- application/json
|
164
|
-
Accept-Encoding:
|
165
|
-
- identity
|
166
|
-
User-Agent:
|
167
|
-
- hawkular-client-ruby
|
168
|
-
Hawkular-Tenant:
|
169
|
-
- hawkular
|
170
|
-
Content-Type:
|
171
|
-
- application/json
|
172
|
-
Host:
|
173
|
-
- localhost:8080
|
174
|
-
response:
|
175
|
-
status:
|
176
|
-
code: 200
|
177
|
-
message: OK
|
178
|
-
headers:
|
179
|
-
Expires:
|
180
|
-
- '0'
|
181
|
-
Cache-Control:
|
182
|
-
- no-cache, no-store, must-revalidate
|
183
|
-
X-Powered-By:
|
184
|
-
- Undertow/1
|
185
|
-
Server:
|
186
|
-
- WildFly/10
|
187
|
-
Pragma:
|
188
|
-
- no-cache
|
189
|
-
Date:
|
190
|
-
- Fri, 07 Oct 2016 15:36:35 GMT
|
191
|
-
Connection:
|
192
|
-
- keep-alive
|
193
|
-
Content-Type:
|
194
|
-
- application/json
|
195
|
-
Content-Length:
|
196
|
-
- '1383'
|
197
|
-
body:
|
198
|
-
encoding: UTF-8
|
199
|
-
string: '{"eventType":"ALERT","tenantId":"hawkular","id":"a-trigger-1475854594696-89fe86b0-959c-434f-96c3-e627f2376e90","ctime":1475854594696,"dataSource":"_none_","dataId":"a-trigger","category":"ALERT","text":"Just
|
200
|
-
a trigger","trigger":{"tenantId":"hawkular","id":"a-trigger","name":"A trigger
|
201
|
-
name","description":"Just a trigger","type":"STANDARD","eventType":"ALERT","eventCategory":null,"eventText":null,"severity":"HIGH","autoDisable":false,"autoEnable":false,"autoResolve":false,"autoResolveAlerts":true,"autoResolveMatch":"ALL","enabled":true,"firingMatch":"ALL","source":"_none_"},"dampening":{"tenantId":"hawkular","triggerId":"a-trigger","triggerMode":"FIRING","type":"STRICT","evalTrueSetting":1,"evalTotalSetting":1,"evalTimeSetting":0,"dampeningId":"hawkular-a-trigger-FIRING"},"evalSets":[[{"evalTimestamp":1475854594694,"dataTimestamp":1475854594,"type":"THRESHOLD","condition":{"tenantId":"hawkular","triggerId":"a-trigger","triggerMode":"FIRING","type":"THRESHOLD","conditionSetSize":1,"conditionSetIndex":1,"conditionId":"hawkular-a-trigger-FIRING-1-1","dataId":"data-x","operator":"LT","threshold":5.0},"value":4.0}]],"severity":"HIGH","status":"ACKNOWLEDGED","notes":[{"user":"Heiko","ctime":1475854595365,"text":"Hello
|
202
|
-
Ruby World :-)"}],"lifecycle":[{"status":"OPEN","user":"system","stime":1475854594696},{"status":"ACKNOWLEDGED","user":"Heiko","stime":1475854595365}]}'
|
203
|
-
http_version:
|
204
|
-
recorded_at: Fri, 07 Oct 2016 15:36:35 GMT
|
205
|
-
recorded_with: VCR 3.0.3
|
@@ -1,210 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
Accept:
|
11
|
-
- application/json
|
12
|
-
Accept-Encoding:
|
13
|
-
- identity
|
14
|
-
User-Agent:
|
15
|
-
- hawkular-client-ruby
|
16
|
-
Hawkular-Tenant:
|
17
|
-
- hawkular
|
18
|
-
Content-Type:
|
19
|
-
- application/json
|
20
|
-
Host:
|
21
|
-
- localhost:8080
|
22
|
-
response:
|
23
|
-
status:
|
24
|
-
code: 200
|
25
|
-
message: OK
|
26
|
-
headers:
|
27
|
-
Expires:
|
28
|
-
- '0'
|
29
|
-
Cache-Control:
|
30
|
-
- no-cache, no-store, must-revalidate
|
31
|
-
X-Powered-By:
|
32
|
-
- Undertow/1
|
33
|
-
Server:
|
34
|
-
- WildFly/10
|
35
|
-
Pragma:
|
36
|
-
- no-cache
|
37
|
-
Date:
|
38
|
-
- Mon, 27 Feb 2017 23:22:51 GMT
|
39
|
-
X-Total-Count:
|
40
|
-
- '2'
|
41
|
-
Connection:
|
42
|
-
- keep-alive
|
43
|
-
Content-Type:
|
44
|
-
- application/json
|
45
|
-
Content-Length:
|
46
|
-
- '2578'
|
47
|
-
Link:
|
48
|
-
- <http://localhost:8080/hawkular/alerts/>; rel="current", <http://localhost:8080/hawkular/alerts/?page=0>;
|
49
|
-
rel="last"
|
50
|
-
body:
|
51
|
-
encoding: UTF-8
|
52
|
-
string: '[{"eventType":"ALERT","tenantId":"hawkular","id":"hello-world-trigger-1488237770801-406d7ed6-619e-4123-a427-4aa9bb97201a","ctime":1488237770801,"dataSource":"_none_","dataId":"hello-world-trigger","category":"ALERT","text":"A
|
53
|
-
mandatory Hello World Trigger","trigger":{"tenantId":"hawkular","id":"hello-world-trigger","name":"Hello
|
54
|
-
World Trigger","description":"A mandatory Hello World Trigger","type":"STANDARD","eventType":"ALERT","eventCategory":null,"eventText":null,"severity":"HIGH","autoDisable":false,"autoEnable":false,"autoResolve":false,"autoResolveAlerts":true,"autoResolveMatch":"ALL","enabled":true,"firingMatch":"ALL","source":"_none_"},"dampening":{"tenantId":"hawkular","triggerId":"hello-world-trigger","triggerMode":"FIRING","type":"STRICT","evalTrueSetting":1,"evalTotalSetting":1,"evalTimeSetting":0,"dampeningId":"hawkular-hello-world-trigger-FIRING"},"evalSets":[[{"evalTimestamp":1488237770800,"dataTimestamp":1488237770,"type":"THRESHOLD","condition":{"tenantId":"hawkular","triggerId":"hello-world-trigger","triggerMode":"FIRING","type":"THRESHOLD","conditionSetSize":1,"conditionSetIndex":1,"conditionId":"hawkular-hello-world-trigger-FIRING-1-1","dataId":"data-x","operator":"LT","threshold":5.0},"value":4.0}]],"severity":"HIGH","status":"OPEN","lifecycle":[{"status":"OPEN","user":"system","stime":1488237770801}]},{"eventType":"ALERT","tenantId":"hawkular","id":"a-trigger-1488237770802-b33d5fdf-b784-4f2f-a6b5-ddd65f94da44","ctime":1488237770802,"dataSource":"_none_","dataId":"a-trigger","category":"ALERT","text":"Just
|
55
|
-
a trigger","trigger":{"tenantId":"hawkular","id":"a-trigger","name":"A trigger
|
56
|
-
name","description":"Just a trigger","type":"STANDARD","eventType":"ALERT","eventCategory":null,"eventText":null,"severity":"HIGH","autoDisable":false,"autoEnable":false,"autoResolve":false,"autoResolveAlerts":true,"autoResolveMatch":"ALL","enabled":true,"firingMatch":"ALL","source":"_none_"},"dampening":{"tenantId":"hawkular","triggerId":"a-trigger","triggerMode":"FIRING","type":"STRICT","evalTrueSetting":1,"evalTotalSetting":1,"evalTimeSetting":0,"dampeningId":"hawkular-a-trigger-FIRING"},"evalSets":[[{"evalTimestamp":1488237770800,"dataTimestamp":1488237770,"type":"THRESHOLD","condition":{"tenantId":"hawkular","triggerId":"a-trigger","triggerMode":"FIRING","type":"THRESHOLD","conditionSetSize":1,"conditionSetIndex":1,"conditionId":"hawkular-a-trigger-FIRING-1-1","dataId":"data-x","operator":"LT","threshold":5.0},"value":4.0}]],"severity":"HIGH","status":"OPEN","lifecycle":[{"status":"OPEN","user":"system","stime":1488237770802}]}]'
|
57
|
-
http_version:
|
58
|
-
recorded_at: Mon, 27 Feb 2017 23:22:51 GMT
|
59
|
-
- request:
|
60
|
-
method: get
|
61
|
-
uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/?tags=new-tag-name%7Ctag_value&thin=true
|
62
|
-
body:
|
63
|
-
encoding: US-ASCII
|
64
|
-
string: ''
|
65
|
-
headers:
|
66
|
-
Accept:
|
67
|
-
- application/json
|
68
|
-
Accept-Encoding:
|
69
|
-
- identity
|
70
|
-
User-Agent:
|
71
|
-
- hawkular-client-ruby
|
72
|
-
Hawkular-Tenant:
|
73
|
-
- hawkular
|
74
|
-
Content-Type:
|
75
|
-
- application/json
|
76
|
-
Host:
|
77
|
-
- localhost:8080
|
78
|
-
response:
|
79
|
-
status:
|
80
|
-
code: 200
|
81
|
-
message: OK
|
82
|
-
headers:
|
83
|
-
Expires:
|
84
|
-
- '0'
|
85
|
-
Cache-Control:
|
86
|
-
- no-cache, no-store, must-revalidate
|
87
|
-
X-Powered-By:
|
88
|
-
- Undertow/1
|
89
|
-
Server:
|
90
|
-
- WildFly/10
|
91
|
-
Pragma:
|
92
|
-
- no-cache
|
93
|
-
Date:
|
94
|
-
- Mon, 27 Feb 2017 23:22:51 GMT
|
95
|
-
Connection:
|
96
|
-
- keep-alive
|
97
|
-
Content-Type:
|
98
|
-
- application/json
|
99
|
-
Content-Length:
|
100
|
-
- '2'
|
101
|
-
body:
|
102
|
-
encoding: UTF-8
|
103
|
-
string: "[]"
|
104
|
-
http_version:
|
105
|
-
recorded_at: Mon, 27 Feb 2017 23:22:51 GMT
|
106
|
-
- request:
|
107
|
-
method: put
|
108
|
-
uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/tags?alertIds=hello-world-trigger-1488237770801-406d7ed6-619e-4123-a427-4aa9bb97201a&tags=new-tag-name%7Ctag_value,othertag%7Cothervalue
|
109
|
-
body:
|
110
|
-
encoding: UTF-8
|
111
|
-
string: "{}"
|
112
|
-
headers:
|
113
|
-
Accept:
|
114
|
-
- application/json
|
115
|
-
Accept-Encoding:
|
116
|
-
- identity
|
117
|
-
User-Agent:
|
118
|
-
- hawkular-client-ruby
|
119
|
-
Hawkular-Tenant:
|
120
|
-
- hawkular
|
121
|
-
Content-Type:
|
122
|
-
- application/json
|
123
|
-
Content-Length:
|
124
|
-
- '2'
|
125
|
-
Host:
|
126
|
-
- localhost:8080
|
127
|
-
response:
|
128
|
-
status:
|
129
|
-
code: 200
|
130
|
-
message: OK
|
131
|
-
headers:
|
132
|
-
Expires:
|
133
|
-
- '0'
|
134
|
-
Cache-Control:
|
135
|
-
- no-cache, no-store, must-revalidate
|
136
|
-
X-Powered-By:
|
137
|
-
- Undertow/1
|
138
|
-
Server:
|
139
|
-
- WildFly/10
|
140
|
-
Pragma:
|
141
|
-
- no-cache
|
142
|
-
Date:
|
143
|
-
- Mon, 27 Feb 2017 23:22:51 GMT
|
144
|
-
Connection:
|
145
|
-
- keep-alive
|
146
|
-
Content-Type:
|
147
|
-
- application/json
|
148
|
-
Content-Length:
|
149
|
-
- '0'
|
150
|
-
body:
|
151
|
-
encoding: UTF-8
|
152
|
-
string: ''
|
153
|
-
http_version:
|
154
|
-
recorded_at: Mon, 27 Feb 2017 23:22:51 GMT
|
155
|
-
- request:
|
156
|
-
method: get
|
157
|
-
uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/?tags=new-tag-name%7Ctag_value&thin=true
|
158
|
-
body:
|
159
|
-
encoding: US-ASCII
|
160
|
-
string: ''
|
161
|
-
headers:
|
162
|
-
Accept:
|
163
|
-
- application/json
|
164
|
-
Accept-Encoding:
|
165
|
-
- identity
|
166
|
-
User-Agent:
|
167
|
-
- hawkular-client-ruby
|
168
|
-
Hawkular-Tenant:
|
169
|
-
- hawkular
|
170
|
-
Content-Type:
|
171
|
-
- application/json
|
172
|
-
Host:
|
173
|
-
- localhost:8080
|
174
|
-
response:
|
175
|
-
status:
|
176
|
-
code: 200
|
177
|
-
message: OK
|
178
|
-
headers:
|
179
|
-
Expires:
|
180
|
-
- '0'
|
181
|
-
Cache-Control:
|
182
|
-
- no-cache, no-store, must-revalidate
|
183
|
-
X-Powered-By:
|
184
|
-
- Undertow/1
|
185
|
-
Server:
|
186
|
-
- WildFly/10
|
187
|
-
Pragma:
|
188
|
-
- no-cache
|
189
|
-
Date:
|
190
|
-
- Mon, 27 Feb 2017 23:22:51 GMT
|
191
|
-
X-Total-Count:
|
192
|
-
- '1'
|
193
|
-
Connection:
|
194
|
-
- keep-alive
|
195
|
-
Content-Type:
|
196
|
-
- application/json
|
197
|
-
Content-Length:
|
198
|
-
- '816'
|
199
|
-
Link:
|
200
|
-
- <http://localhost:8080/hawkular/alerts/?tags=new-tag-name%7ctag_value&thin=true>;
|
201
|
-
rel="current", <http://localhost:8080/hawkular/alerts/?tags=new-tag-name%7ctag_value&thin=true&page=0>;
|
202
|
-
rel="last"
|
203
|
-
body:
|
204
|
-
encoding: UTF-8
|
205
|
-
string: '[{"eventType":"ALERT","tenantId":"hawkular","id":"hello-world-trigger-1488237770801-406d7ed6-619e-4123-a427-4aa9bb97201a","ctime":1488237770801,"dataSource":"_none_","dataId":"hello-world-trigger","category":"ALERT","text":"A
|
206
|
-
mandatory Hello World Trigger","tags":{"othertag":"othervalue","new-tag-name":"tag_value"},"trigger":{"tenantId":"hawkular","id":"hello-world-trigger","name":"Hello
|
207
|
-
World Trigger","description":"A mandatory Hello World Trigger","type":"STANDARD","eventType":"ALERT","eventCategory":null,"eventText":null,"severity":"HIGH","autoDisable":false,"autoEnable":false,"autoResolve":false,"autoResolveAlerts":true,"autoResolveMatch":"ALL","enabled":true,"firingMatch":"ALL","source":"_none_"},"severity":"HIGH","status":"OPEN","lifecycle":[{"status":"OPEN","user":"system","stime":1488237770801}]}]'
|
208
|
-
http_version:
|
209
|
-
recorded_at: Mon, 27 Feb 2017 23:22:51 GMT
|
210
|
-
recorded_with: VCR 3.0.3
|