hawkular-client 2.2.1 → 2.3.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 +12 -0
- data/README.rdoc +5 -3
- data/Rakefile +8 -0
- data/hawkularclient.gemspec +1 -1
- data/lib/hawkular/base_client.rb +19 -1
- data/lib/hawkular/hawkular_client.rb +1 -1
- data/lib/hawkular/hawkular_client_utils.rb +1 -0
- data/lib/hawkular/inventory/entities.rb +234 -0
- data/lib/hawkular/inventory/inventory_api.rb +92 -311
- data/lib/hawkular/metrics/metric_api.rb +23 -10
- data/lib/hawkular/metrics/metrics_client.rb +14 -0
- data/lib/hawkular/operations/operations_api.rb +8 -2
- data/lib/hawkular/version.rb +1 -1
- data/spec/README.rdoc +62 -0
- data/spec/integration/alerts_spec.rb +18 -14
- data/spec/integration/hawkular_client_spec.rb +53 -14
- data/spec/integration/inventory_spec.rb +91 -44
- data/spec/integration/metric_spec.rb +574 -420
- data/spec/integration/operations_spec.rb +78 -5
- data/spec/integration/tokens_spec.rb +8 -4
- data/spec/spec_helper.rb +73 -13
- data/spec/unit/base_spec.rb +30 -1
- data/spec/unit/client_spec.rb +21 -9
- data/spec/vcr_cassettes/HawkularClient/Should_err_on_bad_credentials.yml +42 -0
- data/spec/vcr_cassettes/HawkularClient/and_Inventory_client/Should_both_create_and_delete_feed.yml +64 -34
- data/spec/vcr_cassettes/HawkularClient/and_Inventory_client/Should_both_list_WildFlys.yml +27 -43
- data/spec/vcr_cassettes/HawkularClient/and_Inventory_client/Should_both_list_types_with_bad_feed.yml +12 -8
- data/spec/vcr_cassettes/HawkularClient/and_Inventory_client/Should_list_same_types_when_param_is_given.yml +144 -64
- data/spec/vcr_cassettes/HawkularClient/and_Inventory_client/Should_list_the_same_feeds.yml +26 -14
- data/spec/vcr_cassettes/HawkularClient/and_Inventory_client/Should_list_the_same_resource_types.yml +20 -158
- data/spec/vcr_cassettes/HawkularClient/and_Operations_client/Should_both_work_the_same_way.yml +40 -30
- data/spec/vcr_cassettes/{Tenants/Should_Get_Tenant_For_Explicit_Credentials.yml → HawkularClient/and_Operations_client/Should_work_initializing_with_URI.yml} +18 -20
- data/spec/vcr_cassettes/HawkularClient/and_Operations_client_Should_both_work_the_same_way.json +8 -8
- data/spec/vcr_cassettes/HawkularClient/and_Operations_client_Should_work_initializing_with_URI.json +9 -0
- data/spec/vcr_cassettes/HawkularClient/and_URIs_as_input/Should_work_with_URI.yml +77 -20
- data/spec/vcr_cassettes/HawkularClient/and_URIs_as_input/Should_work_with_URI_on_metrics_client.yml +3 -3
- data/spec/vcr_cassettes/Inventory/Connection/Should_err_on_bad_credentials.yml +42 -0
- data/spec/vcr_cassettes/Inventory/Tenants/Should_Get_Tenant_For_Explicit_Credentials.yml +59 -12
- data/spec/vcr_cassettes/Inventory/Tenants/Should_Get_Tenant_For_Implicit_Credentials.yml +59 -12
- data/spec/vcr_cassettes/Inventory/{Helpers → inventory_0_17/Helpers}/create_url.yml +9 -7
- data/spec/vcr_cassettes/Inventory/{Templates/Should_list_feeds_when_using_SSL_without_certificate.yml → inventory_0_17/Helpers/get_feeds.yml} +23 -21
- data/spec/vcr_cassettes/Inventory/inventory_0_17/Templates/Client_should_listen_on_various_inventory_events.json +47 -0
- data/spec/vcr_cassettes/Inventory/{Templates → inventory_0_17/Templates}/Client_should_listen_on_various_inventory_events.yml +48 -40
- data/spec/vcr_cassettes/Inventory/inventory_0_17/Templates/Helpers/generate_some_events_for_websocket.yml +397 -0
- data/spec/vcr_cassettes/Inventory/inventory_0_17/Templates/Should_List_datasources_with_no_props.yml +129 -0
- data/spec/vcr_cassettes/Inventory/{Templates → inventory_0_17/Templates}/Should_create_a_feed.yml +13 -10
- data/spec/vcr_cassettes/Inventory/{Templates → inventory_0_17/Templates}/Should_create_a_feed_again.yml +40 -29
- data/spec/vcr_cassettes/Inventory/{Templates → inventory_0_17/Templates}/Should_create_a_nested_resource_and_metric_on_it.yml +193 -237
- data/spec/vcr_cassettes/Inventory/{Templates/Should_create_and_get_a_resource.yml → inventory_0_17/Templates/Should_create_a_resource.yml} +86 -172
- data/spec/vcr_cassettes/Inventory/{Templates → inventory_0_17/Templates}/Should_create_a_resource_with_metric.yml +296 -158
- data/spec/vcr_cassettes/Inventory/{Templates → inventory_0_17/Templates}/Should_create_a_resourcetype.yml +38 -29
- data/spec/vcr_cassettes/Inventory/{Templates → inventory_0_17/Templates}/Should_create_and_delete_feed.yml +42 -27
- data/spec/vcr_cassettes/Inventory/{Templates/Should_create_a_resource.yml → inventory_0_17/Templates/Should_create_and_get_a_resource.yml} +109 -89
- data/spec/vcr_cassettes/Inventory/{Templates → inventory_0_17/Templates}/Should_list_URLs.yml +20 -17
- data/spec/vcr_cassettes/Inventory/{Templates → inventory_0_17/Templates}/Should_list_WildFlys.yml +19 -12
- data/spec/vcr_cassettes/Inventory/inventory_0_17/Templates/Should_list_WildFlys_with_props.yml +131 -0
- data/spec/vcr_cassettes/Inventory/{Helpers/get_feeds.yml → inventory_0_17/Templates/Should_list_all_the_resource_types.yml} +14 -11
- data/spec/vcr_cassettes/Inventory/inventory_0_17/Templates/Should_list_children_of_WildFly.yml +315 -0
- data/spec/vcr_cassettes/Inventory/{Templates → inventory_0_17/Templates}/Should_list_children_of_nested_resource.yml +45 -30
- data/spec/vcr_cassettes/Inventory/{Templates → inventory_0_17/Templates}/Should_list_feeds.yml +16 -10
- data/spec/vcr_cassettes/Inventory/inventory_0_17/Templates/Should_list_feeds_when_using_SSL_without_certificate.yml +60 -0
- data/spec/vcr_cassettes/Inventory/inventory_0_17/Templates/Should_list_heap_metrics_for_WildFlys.yml +935 -0
- data/spec/vcr_cassettes/Inventory/inventory_0_17/Templates/Should_list_metrics_for_WildFlys.yml +357 -0
- data/spec/vcr_cassettes/Inventory/inventory_0_17/Templates/Should_list_metrics_of_given_metric_type.yml +122 -0
- data/spec/vcr_cassettes/Inventory/inventory_0_17/Templates/Should_list_metrics_of_given_resource_type.yml +292 -0
- data/spec/vcr_cassettes/Inventory/inventory_0_17/Templates/Should_list_operation_definitions_of_given_resource.yml +235 -0
- data/spec/vcr_cassettes/Inventory/inventory_0_17/Templates/Should_list_operation_definitions_of_given_resource_type.yml +121 -0
- data/spec/vcr_cassettes/Inventory/inventory_0_17/Templates/Should_list_recursive_children_of_WildFly.yml +1099 -0
- data/spec/vcr_cassettes/Inventory/inventory_0_17/Templates/Should_list_relationships_of_WildFly.yml +377 -0
- data/spec/vcr_cassettes/Inventory/{Templates → inventory_0_17/Templates}/Should_list_resources_for_feed.yml +19 -9
- data/spec/vcr_cassettes/Inventory/{Templates → inventory_0_17/Templates}/Should_list_types_with_bad_feed.yml +10 -8
- data/spec/vcr_cassettes/Inventory/inventory_0_17/Templates/Should_list_types_with_feed.yml +164 -0
- data/spec/vcr_cassettes/Inventory/{Templates → inventory_0_17/Templates}/Should_not_find_an_unknown_resource.yml +12 -10
- data/spec/vcr_cassettes/Inventory/{Templates → inventory_0_17/Templates}/Should_return_config_data_of_given_nested_resource.yml +17 -11
- data/spec/vcr_cassettes/Inventory/inventory_0_17/Templates/Should_return_config_data_of_given_resource.yml +66 -0
- data/spec/vcr_cassettes/Inventory/inventory_0_17/Templates/Should_return_the_version.yml +48 -0
- data/spec/vcr_cassettes/Metric_ID_with_special_characters/Get_metric_definition_by_id.yml +49 -0
- data/spec/vcr_cassettes/Metric_ID_with_special_characters/Retrieve_metric_rate_points.yml +88 -0
- data/spec/vcr_cassettes/Metric_ID_with_special_characters/Should_create_Availability_definition.yml +97 -0
- data/spec/vcr_cassettes/Metric_ID_with_special_characters/Should_create_Counter_definition.yml +97 -0
- data/spec/vcr_cassettes/Metric_ID_with_special_characters/Should_create_gauge_definition.yml +97 -0
- data/spec/vcr_cassettes/Metric_ID_with_special_characters/Should_push_metric_data_to_existing_gauge.yml +48 -0
- data/spec/vcr_cassettes/Metric_ID_with_special_characters/Should_update_tags_for_Availability_definition.yml +140 -0
- data/spec/vcr_cassettes/Metric_ID_with_special_characters/Should_update_tags_for_gauge_definition.yml +140 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Availability_metrics/Should_create_Availability_definition_using_MetricDefinition_parameter.yml +95 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Availability_metrics/Should_create_and_return_Availability_using_Hash_parameter.yml +95 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Availability_metrics/Should_group_contiguous_values.yml +93 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Availability_metrics/Should_push_metric_data_to_non-existing_Availability.yml +138 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Availability_metrics/Should_update_tags_for_Availability_definition.yml +230 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Counter_metrics/Should_create_and_return_counter_using_Hash_parameter.yml +95 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Counter_metrics/Should_create_counter_definition_using_MetricDefinition_parameter.yml +95 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Counter_metrics/Should_get_metrics_as_bucketed_results.yml +230 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Counter_metrics/Should_get_metrics_with_limit_and_order.yml +314 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Counter_metrics/Should_push_metric_data_to_existing_counter.yml +269 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Counter_metrics/Should_push_metric_data_to_non-existing_counter.yml +138 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Gauge_metrics/Should_create_gauge_definition_using_Hash.yml +95 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Gauge_metrics/Should_create_gauge_definition_using_MetricDefinition.yml +95 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Gauge_metrics/Should_push_metric_data_to_existing_gauge.yml +269 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Gauge_metrics/Should_push_metric_data_to_non-existing_gauge.yml +138 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Gauge_metrics/Should_return_periods.yml +93 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Gauge_metrics/Should_update_tags_for_gauge_definition.yml +230 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Mixed_metrics/Should_requests_raw_data_for_multiple_metrics.yml +330 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Mixed_metrics/Should_send_mixed_metric_request.yml +300 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Mixed_metrics/Should_send_mixed_metric_request_of_a_single_type.yml +273 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/No_Tenant/Should_fail.yml +48 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Simple/Should_be_Cool.yml +48 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Status/Should_return_the_version.yml +42 -0
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Tenants/Should_create_and_return_tenant.yml +95 -0
- data/spec/vcr_cassettes/{Availability_metrics → Metrics/metrics_0_8_0/Templates/Availability_metrics}/Should_create_Availability_definition_using_MetricDefinition_parameter.yml +5 -9
- data/spec/vcr_cassettes/{Availability_metrics → Metrics/metrics_0_8_0/Templates/Availability_metrics}/Should_create_and_return_Availability_using_Hash_parameter.yml +5 -9
- data/spec/vcr_cassettes/{Availability_metrics → Metrics/metrics_0_8_0/Templates/Availability_metrics}/Should_push_metric_data_to_non-existing_Availability.yml +9 -15
- data/spec/vcr_cassettes/{Availability_metrics → Metrics/metrics_0_8_0/Templates/Availability_metrics}/Should_update_tags_for_Availability_definition.yml +11 -21
- data/spec/vcr_cassettes/{Counter_metrics → Metrics/metrics_0_8_0/Templates/Counter_metrics}/Should_create_and_return_counter_using_Hash_parameter.yml +5 -9
- data/spec/vcr_cassettes/{Counter_metrics → Metrics/metrics_0_8_0/Templates/Counter_metrics}/Should_create_counter_definition_using_MetricDefinition_parameter.yml +5 -9
- data/spec/vcr_cassettes/Metrics/metrics_0_8_0/Templates/Counter_metrics/Should_get_metrics_as_bucketed_results.yml +200 -0
- data/spec/vcr_cassettes/{Counter_metrics → Metrics/metrics_0_8_0/Templates/Counter_metrics}/Should_push_metric_data_to_existing_counter.yml +16 -28
- data/spec/vcr_cassettes/{Counter_metrics → Metrics/metrics_0_8_0/Templates/Counter_metrics}/Should_push_metric_data_to_non-existing_counter.yml +9 -15
- data/spec/vcr_cassettes/{Gauge_metrics → Metrics/metrics_0_8_0/Templates/Gauge_metrics}/Should_create_gauge_definition_using_Hash.yml +5 -9
- data/spec/vcr_cassettes/{Gauge_metrics → Metrics/metrics_0_8_0/Templates/Gauge_metrics}/Should_create_gauge_definition_using_MetricDefinition.yml +6 -10
- data/spec/vcr_cassettes/{Gauge_metrics → Metrics/metrics_0_8_0/Templates/Gauge_metrics}/Should_push_metric_data_to_existing_gauge.yml +18 -30
- data/spec/vcr_cassettes/{Gauge_metrics → Metrics/metrics_0_8_0/Templates/Gauge_metrics}/Should_push_metric_data_to_non-existing_gauge.yml +9 -15
- data/spec/vcr_cassettes/{Gauge_metrics → Metrics/metrics_0_8_0/Templates/Gauge_metrics}/Should_return_periods.yml +6 -10
- data/spec/vcr_cassettes/{Gauge_metrics → Metrics/metrics_0_8_0/Templates/Gauge_metrics}/Should_update_tags_for_gauge_definition.yml +11 -21
- data/spec/vcr_cassettes/{Mixed_metrics → Metrics/metrics_0_8_0/Templates/Mixed_metrics}/Should_send_mixed_metric_request.yml +19 -33
- data/spec/vcr_cassettes/{Mixed_metrics → Metrics/metrics_0_8_0/Templates/Mixed_metrics}/Should_send_mixed_metric_request_of_a_single_type.yml +19 -31
- data/spec/vcr_cassettes/Metrics/metrics_0_8_0/Templates/Simple/Should_be_Cool.yml +82 -0
- data/spec/vcr_cassettes/Metrics/{Status.yml → metrics_0_8_0/Templates/Status/Should_return_the_version.yml} +6 -8
- data/spec/vcr_cassettes/{Tenants → Metrics/metrics_0_8_0/Templates/Tenants}/Should_create_and_return_tenant.yml +12 -8
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Availability_metrics/Should_create_Availability_definition_using_MetricDefinition_parameter.yml +95 -0
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Availability_metrics/Should_create_and_return_Availability_using_Hash_parameter.yml +95 -0
- data/spec/vcr_cassettes/{Availability_metrics → Metrics/metrics_services/Templates/Availability_metrics}/Should_group_contiguous_values.yml +7 -7
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Availability_metrics/Should_push_metric_data_to_non-existing_Availability.yml +138 -0
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Availability_metrics/Should_update_tags_for_Availability_definition.yml +230 -0
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Counter_metrics/Should_create_and_return_counter_using_Hash_parameter.yml +95 -0
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Counter_metrics/Should_create_counter_definition_using_MetricDefinition_parameter.yml +95 -0
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Counter_metrics/Should_get_metrics_as_bucketed_results.yml +230 -0
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Counter_metrics/Should_get_metrics_with_limit_and_order.yml +314 -0
- data/spec/vcr_cassettes/{Counter_metrics/Should_get_metrics_with_limit_and_order.yml → Metrics/metrics_services/Templates/Counter_metrics/Should_push_metric_data_to_existing_counter.yml} +72 -61
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Counter_metrics/Should_push_metric_data_to_non-existing_counter.yml +138 -0
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Gauge_metrics/Should_create_gauge_definition_using_Hash.yml +95 -0
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Gauge_metrics/Should_create_gauge_definition_using_MetricDefinition.yml +95 -0
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Gauge_metrics/Should_push_metric_data_to_existing_gauge.yml +269 -0
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Gauge_metrics/Should_push_metric_data_to_non-existing_gauge.yml +138 -0
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Gauge_metrics/Should_return_periods.yml +93 -0
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Gauge_metrics/Should_return_platform_memory.yml +48 -0
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Gauge_metrics/Should_return_platform_memory_def.yml +49 -0
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Gauge_metrics/Should_update_tags_for_gauge_definition.yml +230 -0
- data/spec/vcr_cassettes/{Mixed_metrics → Metrics/metrics_services/Templates/Mixed_metrics}/Should_requests_raw_data_for_multiple_metrics.yml +25 -25
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Mixed_metrics/Should_send_mixed_metric_request.yml +300 -0
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Mixed_metrics/Should_send_mixed_metric_request_of_a_single_type.yml +273 -0
- data/spec/vcr_cassettes/{No_Tenant → Metrics/metrics_services/Templates/No_Tenant}/Should_fail.yml +16 -10
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Simple/Should_be_Cool.yml +48 -0
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Status/Should_return_the_version.yml +42 -0
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Tenants/Should_create_and_return_tenant.yml +95 -0
- data/spec/vcr_cassettes/{Counter_metrics → New_API_Counter_metrics}/Should_get_metrics_as_bucketed_results.yml +73 -33
- data/spec/vcr_cassettes/New_API_Mixed_metrics/Should_send_mixed_metric_request.yml +300 -0
- data/spec/vcr_cassettes/Operation/Helpers/get_feed.yml +17 -11
- data/spec/vcr_cassettes/Operation/Helpers/get_tenant.yml +13 -11
- data/spec/vcr_cassettes/Operation/Operation/Add_JDBC_driver_should_add_the_driver.json +2 -2
- data/spec/vcr_cassettes/Operation/Operation/Add_datasource_should_be_doable.json +2 -2
- data/spec/vcr_cassettes/Operation/Operation/Add_deployment_should_be_doable.json +2 -2
- data/spec/vcr_cassettes/Operation/Operation/Redeploy_can_be_run_multiple_times_in_parallel.json +4 -4
- data/spec/vcr_cassettes/Operation/Operation/Redeploy_should_be_performed_and_eventually_respond_with_success.json +2 -2
- data/spec/vcr_cassettes/Operation/Operation/Redeploy_should_not_be_performed_if_resource_path_is_wrong.json +2 -2
- data/spec/vcr_cassettes/Operation/Operation/Remove_JDBC_driver_should_be_performed_and_eventually_respond_with_success.json +2 -2
- data/spec/vcr_cassettes/Operation/Operation/Remove_datasource_should_be_performed_and_eventually_respond_with_success.json +2 -2
- data/spec/vcr_cassettes/Operation/Operation/Remove_deployment_should_be_performed_and_eventually_respond_with_success.json +2 -2
- data/spec/vcr_cassettes/Operation/Operation/Undeploy_should_be_performed_and_eventually_respond_with_success.json +2 -2
- data/spec/vcr_cassettes/Operation/Websocket_connection/should_bail_with_hash_property_error_because_no_callback_at_all.json +9 -0
- data/spec/vcr_cassettes/Operation/Websocket_connection/should_bail_with_hash_property_error_because_no_error-callback_.json +9 -0
- data/spec/vcr_cassettes/Operation/Websocket_connection/should_run_into_error_callback_because_bad_hash_parameters.json +13 -0
- metadata +259 -139
- data/spec/vcr_cassettes/Gauge_metrics/Platform_mem.yml +0 -44
- data/spec/vcr_cassettes/Gauge_metrics/Platform_mem_def.yml +0 -45
- data/spec/vcr_cassettes/Inventory/Helpers/generate_some_events_for_websocket.yml +0 -4446
- data/spec/vcr_cassettes/Inventory/Templates/Client_should_listen_on_various_inventory_events.json +0 -47
- data/spec/vcr_cassettes/Inventory/Templates/Helpers/generate_some_events_for_websocket.yml +0 -542
- data/spec/vcr_cassettes/Inventory/Templates/Should_List_datasources_with_no_props.yml +0 -174
- data/spec/vcr_cassettes/Inventory/Templates/Should_list_WildFlys_with_props.yml +0 -115
- data/spec/vcr_cassettes/Inventory/Templates/Should_list_all_the_resource_types.yml +0 -126
- data/spec/vcr_cassettes/Inventory/Templates/Should_list_children_of_WildFly.yml +0 -308
- data/spec/vcr_cassettes/Inventory/Templates/Should_list_heap_metrics_for_WildFlys.yml +0 -712
- data/spec/vcr_cassettes/Inventory/Templates/Should_list_metrics_for_WildFlys.yml +0 -278
- data/spec/vcr_cassettes/Inventory/Templates/Should_list_metrics_of_given_metric_type.yml +0 -530
- data/spec/vcr_cassettes/Inventory/Templates/Should_list_metrics_of_given_resource_type.yml +0 -278
- data/spec/vcr_cassettes/Inventory/Templates/Should_list_operation_definitions_of_given_resource.yml +0 -185
- data/spec/vcr_cassettes/Inventory/Templates/Should_list_operation_definitions_of_given_resource_type.yml +0 -126
- data/spec/vcr_cassettes/Inventory/Templates/Should_list_recursive_children_of_WildFly.yml +0 -2369
- data/spec/vcr_cassettes/Inventory/Templates/Should_list_relationships_of_WildFly.yml +0 -415
- data/spec/vcr_cassettes/Inventory/Templates/Should_list_types_with_feed.yml +0 -124
- data/spec/vcr_cassettes/Inventory/Templates/Should_return_config_data_of_given_resource.yml +0 -57
- data/spec/vcr_cassettes/Simple/Should_be_Cool.yml +0 -208
- data/spec/vcr_cassettes/Tenants/Should_Get_Tenant_For_Implicit_Credentials.yml +0 -50
@@ -86,6 +86,82 @@ module Hawkular::Operations::RSpec
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
+
it 'should run into error callback because bad hash parameters' do
|
90
|
+
WebSocketVCR.configure do |c|
|
91
|
+
c.hook_uris = [HOST]
|
92
|
+
end
|
93
|
+
|
94
|
+
WebSocketVCR.record(example, self) do
|
95
|
+
client = OperationsClient.new(host: HOST,
|
96
|
+
wait_time: WebSocketVCR.live? ? 1.5 : 2,
|
97
|
+
credentials: {
|
98
|
+
username: 'jdoe',
|
99
|
+
password: 'password'
|
100
|
+
},
|
101
|
+
options: {
|
102
|
+
tenant: 'hawkular'
|
103
|
+
})
|
104
|
+
|
105
|
+
noop = { operationName: 'noop' }
|
106
|
+
|
107
|
+
client.invoke_generic_operation(noop) do |on|
|
108
|
+
on.success do |_data|
|
109
|
+
fail 'This should have failed'
|
110
|
+
end
|
111
|
+
on.failure do |_error|
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
it 'should bail with hash property error because no callback at all' do
|
118
|
+
WebSocketVCR.configure do |c|
|
119
|
+
c.hook_uris = [HOST]
|
120
|
+
end
|
121
|
+
|
122
|
+
WebSocketVCR.record(example, self) do
|
123
|
+
client = OperationsClient.new(host: HOST,
|
124
|
+
wait_time: WebSocketVCR.live? ? 1.5 : 2,
|
125
|
+
credentials: {
|
126
|
+
username: 'jdoe',
|
127
|
+
password: 'password'
|
128
|
+
},
|
129
|
+
options: {
|
130
|
+
tenant: 'hawkular'
|
131
|
+
})
|
132
|
+
|
133
|
+
noop = { operationName: 'noop' }
|
134
|
+
expect { client.invoke_generic_operation(noop) }.to raise_error(ArgumentError,
|
135
|
+
'You need to specify error callback')
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
it 'should bail with hash property error because no error-callback ' do
|
140
|
+
WebSocketVCR.configure do |c|
|
141
|
+
c.hook_uris = [HOST]
|
142
|
+
end
|
143
|
+
|
144
|
+
WebSocketVCR.record(example, self) do
|
145
|
+
client = OperationsClient.new(host: HOST,
|
146
|
+
wait_time: WebSocketVCR.live? ? 1.5 : 2,
|
147
|
+
credentials: {
|
148
|
+
username: 'jdoe',
|
149
|
+
password: 'password'
|
150
|
+
},
|
151
|
+
options: {
|
152
|
+
tenant: 'hawkular'
|
153
|
+
})
|
154
|
+
|
155
|
+
noop = { operationName: 'noop' }
|
156
|
+
expect do
|
157
|
+
client.invoke_generic_operation(noop) do |on|
|
158
|
+
on.success do |_data|
|
159
|
+
fail 'This should have failed'
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end.to raise_error(ArgumentError, 'You need to specify error callback')
|
163
|
+
end
|
164
|
+
end
|
89
165
|
it 'should bail with no host' do
|
90
166
|
WebSocketVCR.configure do |c|
|
91
167
|
c.hook_uris = [HOST]
|
@@ -112,16 +188,13 @@ module Hawkular::Operations::RSpec
|
|
112
188
|
end
|
113
189
|
|
114
190
|
describe 'Operation/Operation', :websocket, vcr: { decode_compressed_response: true } do
|
115
|
-
let(:example) do |e|
|
116
|
-
e
|
117
|
-
end
|
118
|
-
|
119
191
|
before(:all) do
|
120
192
|
VCR.use_cassette('Operation/Helpers/get_tenant', decode_compressed_response: true) do
|
121
193
|
@creds = { username: 'jdoe', password: 'password' }
|
122
194
|
::RSpec::Mocks.with_temporary_scope do
|
123
195
|
mock_inventory_client
|
124
|
-
|
196
|
+
options = { tenant: 'hawkular' }
|
197
|
+
@inventory_client = InventoryClient.create(entrypoint: HOST, credentials: @creds, options: options)
|
125
198
|
end
|
126
199
|
inventory_client = @inventory_client
|
127
200
|
remove_instance_variable(:@inventory_client)
|
@@ -6,14 +6,16 @@ module Hawkular::Token::RSpec
|
|
6
6
|
describe 'Tokens', :vcr do
|
7
7
|
it 'Should be able to list the available tokens' do
|
8
8
|
creds = { username: 'jdoe', password: 'password' }
|
9
|
-
|
9
|
+
options = { tenant: 'hawkular' }
|
10
|
+
client = Hawkular::Token::TokenClient.new(HAWKULAR_BASE, creds, options)
|
10
11
|
tokens = client.get_tokens(creds)
|
11
12
|
expect(tokens).to be_empty
|
12
13
|
end
|
13
14
|
|
14
15
|
it 'Should be able to create a new token for an actual user' do
|
15
16
|
creds = { username: 'jdoe', password: 'password' }
|
16
|
-
|
17
|
+
options = { tenant: 'hawkular' }
|
18
|
+
client = Hawkular::Token::TokenClient.new(HAWKULAR_BASE, creds, options)
|
17
19
|
token = client.create_token(creds)
|
18
20
|
expect(token['key']).not_to be_nil
|
19
21
|
expect(token['secret']).not_to be_nil
|
@@ -22,7 +24,8 @@ module Hawkular::Token::RSpec
|
|
22
24
|
|
23
25
|
it 'Should get a 401 when attempting to create a token with a wrong password' do
|
24
26
|
creds = { username: 'jdoe', password: 'mywrongpassword' }
|
25
|
-
|
27
|
+
options = { tenant: 'hawkular' }
|
28
|
+
client = Hawkular::Token::TokenClient.new(HAWKULAR_BASE, creds, options)
|
26
29
|
begin
|
27
30
|
client.create_token(creds)
|
28
31
|
fail 'Should have failed with 401'
|
@@ -33,7 +36,8 @@ module Hawkular::Token::RSpec
|
|
33
36
|
|
34
37
|
it 'Should get a 401 when attempting to create a token without a password' do
|
35
38
|
creds = { username: 'jdoe', password: '' }
|
36
|
-
|
39
|
+
options = { tenant: 'hawkular' }
|
40
|
+
client = Hawkular::Token::TokenClient.new(HAWKULAR_BASE, creds, options)
|
37
41
|
begin
|
38
42
|
client.create_token(creds)
|
39
43
|
fail 'Should have failed with 401'
|
data/spec/spec_helper.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# This needs to go before all requires to be able to record full coverage
|
2
2
|
require 'coveralls'
|
3
3
|
Coveralls.wear!
|
4
|
+
|
4
5
|
# Now the application requires.
|
5
6
|
require 'hawkular/hawkular_client'
|
6
7
|
require 'hawkular/hawkular_client_utils'
|
@@ -28,20 +29,55 @@ module Hawkular::Inventory::RSpec
|
|
28
29
|
end
|
29
30
|
|
30
31
|
module Hawkular::Metrics::RSpec
|
32
|
+
def setup_client_without_tenant(options = {})
|
33
|
+
options[:tenant] = nil
|
34
|
+
mocked_version = options[:mocked_version]
|
35
|
+
::RSpec::Mocks.with_temporary_scope do
|
36
|
+
mocked_version.nil? ? mock_metrics_version : mock_metrics_version(mocked_version)
|
37
|
+
@client = Hawkular::Metrics::Client.new(config['url'],
|
38
|
+
credentials(options), options)
|
39
|
+
return @client
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
31
43
|
def setup_client(options = {})
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
44
|
+
options[:tenant] ||= 'hawkular'
|
45
|
+
mocked_version = options[:mocked_version]
|
46
|
+
::RSpec::Mocks.with_temporary_scope do
|
47
|
+
mocked_version.nil? ? mock_metrics_version : mock_metrics_version(mocked_version)
|
48
|
+
@client = Hawkular::Metrics::Client.new(config['url'],
|
49
|
+
credentials(options), options)
|
50
|
+
end
|
51
|
+
@client
|
38
52
|
end
|
39
53
|
|
40
|
-
def
|
41
|
-
|
54
|
+
def setup_v8_client(options = {})
|
55
|
+
options[:tenant] ||= 'hawkular'
|
56
|
+
options[:verify_ssl] ||= OpenSSL::SSL::VERIFY_NONE
|
57
|
+
::RSpec::Mocks.with_temporary_scope do
|
58
|
+
mock_metrics_version '0.8.0'
|
59
|
+
@client = Hawkular::Metrics::Client.new(config['url_v8'],
|
60
|
+
credentials_v8(options), options)
|
61
|
+
end
|
62
|
+
@client
|
63
|
+
end
|
64
|
+
|
65
|
+
def setup_client_new_tenant(options = {})
|
42
66
|
@tenant = 'vcr-test-tenant-123'
|
43
|
-
|
44
|
-
|
67
|
+
setup_client(tenant: @tenant, mocked_version: options[:mocked_version])
|
68
|
+
end
|
69
|
+
|
70
|
+
def credentials_v8(options = {})
|
71
|
+
{
|
72
|
+
token: options[:token].nil? ? config['token_v8'] : options[:token]
|
73
|
+
}
|
74
|
+
end
|
75
|
+
|
76
|
+
def credentials(options = {})
|
77
|
+
{
|
78
|
+
username: options[:username].nil? ? config['user'] : options[:username],
|
79
|
+
password: options[:password].nil? ? config['password'] : options[:password]
|
80
|
+
}
|
45
81
|
end
|
46
82
|
|
47
83
|
def config
|
@@ -50,6 +86,12 @@ module Hawkular::Metrics::RSpec
|
|
50
86
|
)
|
51
87
|
end
|
52
88
|
|
89
|
+
def mock_metrics_version(version = '0.9.0.Final')
|
90
|
+
allow_any_instance_of(Hawkular::Metrics::Client).to receive(:fetch_version_and_status).and_return(
|
91
|
+
'Implementation-Version' => version
|
92
|
+
)
|
93
|
+
end
|
94
|
+
|
53
95
|
# more or less generic method common for all metric types (counters, gauges, availabilities)
|
54
96
|
def create_metric_using_hash(endpoint, id, tenant_id)
|
55
97
|
endpoint.create(id: id, dataRetention: 123, tags: { some: 'value' }, tenantId: tenant_id)
|
@@ -134,7 +176,7 @@ module Helpers
|
|
134
176
|
|
135
177
|
text = File.read(input_file_path)
|
136
178
|
bindings.select { |_, v| v.size >= 3 }.each do |k, v|
|
137
|
-
text.gsub! v, "<%= #{k} %>"
|
179
|
+
text.gsub! v.to_s, "<%= #{k} %>"
|
138
180
|
end
|
139
181
|
|
140
182
|
File.open(output_file_path, 'w') { |file| file.write text }
|
@@ -143,11 +185,17 @@ module Helpers
|
|
143
185
|
|
144
186
|
def record(prefix, bindings, explicit_cassette_name, example: nil)
|
145
187
|
run = lambda do
|
146
|
-
|
188
|
+
unless example.nil?
|
189
|
+
if example.respond_to?(:run)
|
190
|
+
example.run
|
191
|
+
elsif example.respond_to?(:call)
|
192
|
+
example.call
|
193
|
+
end
|
194
|
+
end
|
147
195
|
yield if block_given?
|
148
196
|
end
|
149
197
|
|
150
|
-
if
|
198
|
+
if ENV['VCR_UPDATE'] == '1'
|
151
199
|
VCR.use_cassette(prefix + '/tmp/' + explicit_cassette_name,
|
152
200
|
decode_compressed_response: true,
|
153
201
|
record: :all) do
|
@@ -186,4 +234,16 @@ RSpec.configure do |config|
|
|
186
234
|
WebMock.allow_net_connect!
|
187
235
|
puts 'VCR is turned off!'
|
188
236
|
end
|
237
|
+
|
238
|
+
module RestClient
|
239
|
+
class Request
|
240
|
+
def default_headers
|
241
|
+
{
|
242
|
+
accept: '*/*',
|
243
|
+
accept_encoding: 'identity',
|
244
|
+
user_agent: 'hawkular-client-ruby'
|
245
|
+
}
|
246
|
+
end
|
247
|
+
end
|
248
|
+
end
|
189
249
|
end
|
data/spec/unit/base_spec.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
require
|
1
|
+
require "#{File.dirname(__FILE__)}/../vcr/vcr_setup"
|
2
|
+
require "#{File.dirname(__FILE__)}/../spec_helper"
|
2
3
|
|
3
4
|
describe 'Base Spec' do
|
4
5
|
it 'should know encode' do
|
@@ -155,4 +156,32 @@ describe 'Base Spec' do
|
|
155
156
|
ret = c.normalize_entrypoint_url uri, '/hawkular/alerts/'
|
156
157
|
expect(ret).to eq('http://localhost:8080/hawkular/alerts')
|
157
158
|
end
|
159
|
+
|
160
|
+
it 'Should throw a HawkularConnectionException when host not listening to port' do
|
161
|
+
begin
|
162
|
+
WebMock.disable!
|
163
|
+
VCR.turned_off do
|
164
|
+
c = Hawkular::BaseClient.new('127.0.0.1:0')
|
165
|
+
expect do
|
166
|
+
c.http_get('not-needed-for-this-test')
|
167
|
+
end.to raise_error(Hawkular::BaseClient::HawkularConnectionException)
|
168
|
+
end
|
169
|
+
ensure
|
170
|
+
WebMock.enable!
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
it 'Should throw a HawkularConnectionException when unknown host' do
|
175
|
+
begin
|
176
|
+
WebMock.disable!
|
177
|
+
VCR.turned_off do
|
178
|
+
c = Hawkular::BaseClient.new('some-unknown-and-random-host-that-wont-exist')
|
179
|
+
expect do
|
180
|
+
c.http_get('not-needed-for-this-test')
|
181
|
+
end.to raise_error(Hawkular::BaseClient::HawkularConnectionException)
|
182
|
+
end
|
183
|
+
ensure
|
184
|
+
WebMock.enable!
|
185
|
+
end
|
186
|
+
end
|
158
187
|
end
|
data/spec/unit/client_spec.rb
CHANGED
@@ -4,28 +4,40 @@ describe Hawkular::Metrics::Client do
|
|
4
4
|
context 'client initialization' do
|
5
5
|
it 'should accept no option' do
|
6
6
|
credentials = { username: 'mockuser', password: 'mockpass' }
|
7
|
-
|
7
|
+
::RSpec::Mocks.with_temporary_scope do
|
8
|
+
mock_metrics_version
|
9
|
+
Hawkular::Metrics::Client.new(HOST, credentials)
|
10
|
+
end
|
8
11
|
end
|
9
12
|
|
10
13
|
it 'should accept Hawkular-Tenant option' do
|
11
14
|
credentials = { username: 'mockuser', password: 'mockpass' }
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
+
::RSpec::Mocks.with_temporary_scope do
|
16
|
+
mock_metrics_version
|
17
|
+
@client = Hawkular::Metrics::Client.new(HOST, credentials, tenant: 'foo')
|
18
|
+
headers = @client.send(:http_headers)
|
19
|
+
expect(headers[:'Hawkular-Tenant']).to eql('foo')
|
20
|
+
end
|
15
21
|
end
|
16
22
|
|
17
23
|
it 'should define subcomponents' do
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
24
|
+
::RSpec::Mocks.with_temporary_scope do
|
25
|
+
mock_metrics_version
|
26
|
+
client = Hawkular::Metrics::Client.new HOST
|
27
|
+
expect(client.tenants).not_to be nil
|
28
|
+
expect(client.counters).not_to be nil
|
29
|
+
expect(client.gauges).not_to be nil
|
30
|
+
end
|
22
31
|
end
|
23
32
|
end
|
24
33
|
|
25
34
|
context 'http comms' do
|
26
35
|
before(:each) do
|
27
36
|
credentials = { username: 'mockuser', password: 'mockpass' }
|
28
|
-
|
37
|
+
::RSpec::Mocks.with_temporary_scope do
|
38
|
+
mock_metrics_version
|
39
|
+
@client = Hawkular::Metrics::Client.new(HOST, credentials)
|
40
|
+
end
|
29
41
|
end
|
30
42
|
|
31
43
|
it 'should add Accept: headers' do
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://-XX-X-jdoe-X:password@localhost:8080/hawkular/inventory/status
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 401
|
21
|
+
message: Unauthorized
|
22
|
+
headers:
|
23
|
+
Connection:
|
24
|
+
- keep-alive
|
25
|
+
Www-Authenticate:
|
26
|
+
- Basic realm="ApplicationRealm"
|
27
|
+
X-Powered-By:
|
28
|
+
- Undertow/1
|
29
|
+
Server:
|
30
|
+
- WildFly/10
|
31
|
+
Content-Type:
|
32
|
+
- text/html;charset=UTF-8
|
33
|
+
Content-Length:
|
34
|
+
- '71'
|
35
|
+
Date:
|
36
|
+
- Thu, 07 Jul 2016 22:03:04 GMT
|
37
|
+
body:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: "<html><head><title>Error</title></head><body>Unauthorized</body></html>"
|
40
|
+
http_version:
|
41
|
+
recorded_at: Thu, 07 Jul 2016 22:03:04 GMT
|
42
|
+
recorded_with: VCR 3.0.3
|
data/spec/vcr_cassettes/HawkularClient/and_Inventory_client/Should_both_create_and_delete_feed.yml
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: http://jdoe:password@localhost:8080/hawkular/inventory/
|
5
|
+
uri: http://jdoe:password@localhost:8080/hawkular/inventory/entity/feed
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: '{"properties":{},"id":"feed_1123sdn","name":null,"outgoing":{},"incoming":{}}'
|
@@ -11,6 +11,8 @@ http_interactions:
|
|
11
11
|
- application/json
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip, deflate
|
14
|
+
Hawkular-Tenant:
|
15
|
+
- hawkular
|
14
16
|
Content-Type:
|
15
17
|
- application/json
|
16
18
|
Content-Length:
|
@@ -33,27 +35,28 @@ http_interactions:
|
|
33
35
|
Pragma:
|
34
36
|
- no-cache
|
35
37
|
Location:
|
36
|
-
- http://localhost:8080/hawkular/inventory/
|
38
|
+
- http://localhost:8080/hawkular/inventory/entity/f;feed_1123sdn
|
37
39
|
Date:
|
38
|
-
-
|
40
|
+
- Wed, 13 Jul 2016 23:58:02 GMT
|
39
41
|
Connection:
|
40
42
|
- keep-alive
|
41
43
|
Content-Type:
|
42
44
|
- application/json
|
43
45
|
Content-Length:
|
44
|
-
- '
|
46
|
+
- '131'
|
45
47
|
body:
|
46
48
|
encoding: ASCII-8BIT
|
47
49
|
string: |-
|
48
50
|
{
|
49
|
-
"path" : "/t;
|
51
|
+
"path" : "/t;hawkular/f;feed_1123sdn",
|
52
|
+
"identityHash" : "e153d6e14c5bd12f51dcdc16a0493afbd0298dcb",
|
50
53
|
"id" : "feed_1123sdn"
|
51
54
|
}
|
52
55
|
http_version:
|
53
|
-
recorded_at:
|
56
|
+
recorded_at: Wed, 13 Jul 2016 23:58:02 GMT
|
54
57
|
- request:
|
55
58
|
method: post
|
56
|
-
uri: http://jdoe:password@localhost:8080/hawkular/inventory/
|
59
|
+
uri: http://jdoe:password@localhost:8080/hawkular/inventory/entity/feed
|
57
60
|
body:
|
58
61
|
encoding: UTF-8
|
59
62
|
string: '{"properties":{},"id":"feed_1124sdn","name":null,"outgoing":{},"incoming":{}}'
|
@@ -62,6 +65,8 @@ http_interactions:
|
|
62
65
|
- application/json
|
63
66
|
Accept-Encoding:
|
64
67
|
- gzip, deflate
|
68
|
+
Hawkular-Tenant:
|
69
|
+
- hawkular
|
65
70
|
Content-Type:
|
66
71
|
- application/json
|
67
72
|
Content-Length:
|
@@ -84,27 +89,28 @@ http_interactions:
|
|
84
89
|
Pragma:
|
85
90
|
- no-cache
|
86
91
|
Location:
|
87
|
-
- http://localhost:8080/hawkular/inventory/
|
92
|
+
- http://localhost:8080/hawkular/inventory/entity/f;feed_1124sdn
|
88
93
|
Date:
|
89
|
-
-
|
94
|
+
- Wed, 13 Jul 2016 23:58:02 GMT
|
90
95
|
Connection:
|
91
96
|
- keep-alive
|
92
97
|
Content-Type:
|
93
98
|
- application/json
|
94
99
|
Content-Length:
|
95
|
-
- '
|
100
|
+
- '130'
|
96
101
|
body:
|
97
102
|
encoding: ASCII-8BIT
|
98
103
|
string: |-
|
99
104
|
{
|
100
|
-
"path" : "/t;
|
105
|
+
"path" : "/t;hawkular/f;feed_1124sdn",
|
106
|
+
"identityHash" : "1f35659889bbd9f3cfef7654b2e2e44aa17e6ba",
|
101
107
|
"id" : "feed_1124sdn"
|
102
108
|
}
|
103
109
|
http_version:
|
104
|
-
recorded_at:
|
110
|
+
recorded_at: Wed, 13 Jul 2016 23:58:02 GMT
|
105
111
|
- request:
|
106
112
|
method: get
|
107
|
-
uri: http://jdoe:password@localhost:8080/hawkular/inventory/
|
113
|
+
uri: http://jdoe:password@localhost:8080/hawkular/inventory/traversal/type=f
|
108
114
|
body:
|
109
115
|
encoding: US-ASCII
|
110
116
|
string: ''
|
@@ -113,6 +119,8 @@ http_interactions:
|
|
113
119
|
- application/json
|
114
120
|
Accept-Encoding:
|
115
121
|
- gzip, deflate
|
122
|
+
Hawkular-Tenant:
|
123
|
+
- hawkular
|
116
124
|
Content-Type:
|
117
125
|
- application/json
|
118
126
|
User-Agent:
|
@@ -133,7 +141,7 @@ http_interactions:
|
|
133
141
|
Pragma:
|
134
142
|
- no-cache
|
135
143
|
Date:
|
136
|
-
-
|
144
|
+
- Wed, 13 Jul 2016 23:58:02 GMT
|
137
145
|
X-Total-Count:
|
138
146
|
- '3'
|
139
147
|
Connection:
|
@@ -141,27 +149,39 @@ http_interactions:
|
|
141
149
|
Content-Type:
|
142
150
|
- application/json
|
143
151
|
Content-Length:
|
144
|
-
- '
|
152
|
+
- '713'
|
145
153
|
Link:
|
146
|
-
- <http://localhost:8080/hawkular/inventory/
|
154
|
+
- <http://localhost:8080/hawkular/inventory/traversal/type=f>; rel="current"
|
147
155
|
body:
|
148
156
|
encoding: ASCII-8BIT
|
149
157
|
string: |-
|
150
158
|
[ {
|
151
|
-
"path" : "/t;
|
152
|
-
"
|
159
|
+
"path" : "/t;hawkular/f;60f168e0-5220-4208-aa28-0d82a3df4c0c",
|
160
|
+
"properties" : {
|
161
|
+
"__identityHash" : "994724c2730de93555ab298d8e4e3f99579a6b"
|
162
|
+
},
|
163
|
+
"identityHash" : "994724c2730de93555ab298d8e4e3f99579a6b",
|
164
|
+
"id" : "60f168e0-5220-4208-aa28-0d82a3df4c0c"
|
153
165
|
}, {
|
154
|
-
"path" : "/t;
|
166
|
+
"path" : "/t;hawkular/f;feed_1123sdn",
|
167
|
+
"properties" : {
|
168
|
+
"__identityHash" : "e153d6e14c5bd12f51dcdc16a0493afbd0298dcb"
|
169
|
+
},
|
170
|
+
"identityHash" : "e153d6e14c5bd12f51dcdc16a0493afbd0298dcb",
|
155
171
|
"id" : "feed_1123sdn"
|
156
172
|
}, {
|
157
|
-
"path" : "/t;
|
173
|
+
"path" : "/t;hawkular/f;feed_1124sdn",
|
174
|
+
"properties" : {
|
175
|
+
"__identityHash" : "1f35659889bbd9f3cfef7654b2e2e44aa17e6ba"
|
176
|
+
},
|
177
|
+
"identityHash" : "1f35659889bbd9f3cfef7654b2e2e44aa17e6ba",
|
158
178
|
"id" : "feed_1124sdn"
|
159
179
|
} ]
|
160
180
|
http_version:
|
161
|
-
recorded_at:
|
181
|
+
recorded_at: Wed, 13 Jul 2016 23:58:02 GMT
|
162
182
|
- request:
|
163
183
|
method: delete
|
164
|
-
uri: http://jdoe:password@localhost:8080/hawkular/inventory/
|
184
|
+
uri: http://jdoe:password@localhost:8080/hawkular/inventory/entity/f;feed_1124sdn
|
165
185
|
body:
|
166
186
|
encoding: US-ASCII
|
167
187
|
string: ''
|
@@ -170,6 +190,8 @@ http_interactions:
|
|
170
190
|
- application/json
|
171
191
|
Accept-Encoding:
|
172
192
|
- gzip, deflate
|
193
|
+
Hawkular-Tenant:
|
194
|
+
- hawkular
|
173
195
|
Content-Type:
|
174
196
|
- application/json
|
175
197
|
User-Agent:
|
@@ -190,15 +212,15 @@ http_interactions:
|
|
190
212
|
Pragma:
|
191
213
|
- no-cache
|
192
214
|
Date:
|
193
|
-
-
|
215
|
+
- Wed, 13 Jul 2016 23:58:02 GMT
|
194
216
|
body:
|
195
217
|
encoding: UTF-8
|
196
218
|
string: ''
|
197
219
|
http_version:
|
198
|
-
recorded_at:
|
220
|
+
recorded_at: Wed, 13 Jul 2016 23:58:02 GMT
|
199
221
|
- request:
|
200
222
|
method: delete
|
201
|
-
uri: http://jdoe:password@localhost:8080/hawkular/inventory/
|
223
|
+
uri: http://jdoe:password@localhost:8080/hawkular/inventory/entity/f;feed_1123sdn
|
202
224
|
body:
|
203
225
|
encoding: US-ASCII
|
204
226
|
string: ''
|
@@ -207,6 +229,8 @@ http_interactions:
|
|
207
229
|
- application/json
|
208
230
|
Accept-Encoding:
|
209
231
|
- gzip, deflate
|
232
|
+
Hawkular-Tenant:
|
233
|
+
- hawkular
|
210
234
|
Content-Type:
|
211
235
|
- application/json
|
212
236
|
User-Agent:
|
@@ -227,15 +251,15 @@ http_interactions:
|
|
227
251
|
Pragma:
|
228
252
|
- no-cache
|
229
253
|
Date:
|
230
|
-
-
|
254
|
+
- Wed, 13 Jul 2016 23:58:02 GMT
|
231
255
|
body:
|
232
256
|
encoding: UTF-8
|
233
257
|
string: ''
|
234
258
|
http_version:
|
235
|
-
recorded_at:
|
259
|
+
recorded_at: Wed, 13 Jul 2016 23:58:02 GMT
|
236
260
|
- request:
|
237
261
|
method: get
|
238
|
-
uri: http://jdoe:password@localhost:8080/hawkular/inventory/
|
262
|
+
uri: http://jdoe:password@localhost:8080/hawkular/inventory/traversal/type=f
|
239
263
|
body:
|
240
264
|
encoding: US-ASCII
|
241
265
|
string: ''
|
@@ -244,6 +268,8 @@ http_interactions:
|
|
244
268
|
- application/json
|
245
269
|
Accept-Encoding:
|
246
270
|
- gzip, deflate
|
271
|
+
Hawkular-Tenant:
|
272
|
+
- hawkular
|
247
273
|
Content-Type:
|
248
274
|
- application/json
|
249
275
|
User-Agent:
|
@@ -264,7 +290,7 @@ http_interactions:
|
|
264
290
|
Pragma:
|
265
291
|
- no-cache
|
266
292
|
Date:
|
267
|
-
-
|
293
|
+
- Wed, 13 Jul 2016 23:58:02 GMT
|
268
294
|
X-Total-Count:
|
269
295
|
- '1'
|
270
296
|
Connection:
|
@@ -272,16 +298,20 @@ http_interactions:
|
|
272
298
|
Content-Type:
|
273
299
|
- application/json
|
274
300
|
Content-Length:
|
275
|
-
- '
|
301
|
+
- '269'
|
276
302
|
Link:
|
277
|
-
- <http://localhost:8080/hawkular/inventory/
|
303
|
+
- <http://localhost:8080/hawkular/inventory/traversal/type=f>; rel="current"
|
278
304
|
body:
|
279
305
|
encoding: ASCII-8BIT
|
280
306
|
string: |-
|
281
307
|
[ {
|
282
|
-
"path" : "/t;
|
283
|
-
"
|
308
|
+
"path" : "/t;hawkular/f;60f168e0-5220-4208-aa28-0d82a3df4c0c",
|
309
|
+
"properties" : {
|
310
|
+
"__identityHash" : "994724c2730de93555ab298d8e4e3f99579a6b"
|
311
|
+
},
|
312
|
+
"identityHash" : "994724c2730de93555ab298d8e4e3f99579a6b",
|
313
|
+
"id" : "60f168e0-5220-4208-aa28-0d82a3df4c0c"
|
284
314
|
} ]
|
285
315
|
http_version:
|
286
|
-
recorded_at:
|
316
|
+
recorded_at: Wed, 13 Jul 2016 23:58:02 GMT
|
287
317
|
recorded_with: VCR 3.0.1
|