hawkular-client 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/.gitignore +17 -0
 - data/.rubocop.yml +14 -0
 - data/.travis.yml +5 -0
 - data/CHANGES.rdoc +6 -0
 - data/Gemfile +1 -1
 - data/README.rdoc +2 -1
 - data/Rakefile +6 -3
 - data/hawkularclient.gemspec +17 -11
 - data/lib/hawkularclient.rb +91 -98
 - data/lib/metrics/metric_api.rb +83 -66
 - data/lib/metrics/tenant_api.rb +3 -4
 - data/lib/metrics/types.rb +9 -11
 - data/lib/metrics/version.rb +1 -1
 - data/spec/{endpoint.yml.example → endpoint.yml} +0 -0
 - data/spec/integration/metric_spec.rb +223 -131
 - data/spec/spec_helper.rb +14 -10
 - data/spec/unit/client_spec.rb +24 -19
 - data/spec/vcr/vcr_setup.rb +16 -0
 - data/spec/vcr_cassettes/Availability_metrics/Should_create_Availability_definition_using_MetricDefinition_parameter.yml +87 -0
 - data/spec/vcr_cassettes/Availability_metrics/Should_create_and_return_Availability_using_Hash_parameter.yml +87 -0
 - data/spec/vcr_cassettes/Availability_metrics/Should_push_metric_data_to_non-existing_Availability.yml +126 -0
 - data/spec/vcr_cassettes/Availability_metrics/Should_update_tags_for_Availability_definition.yml +210 -0
 - data/spec/vcr_cassettes/Counter_metrics/Should_create_and_return_counter_using_Hash_parameter.yml +87 -0
 - data/spec/vcr_cassettes/Counter_metrics/Should_create_counter_definition_using_MetricDefinition_parameter.yml +87 -0
 - data/spec/vcr_cassettes/Counter_metrics/Should_push_metric_data_to_existing_counter.yml +249 -0
 - data/spec/vcr_cassettes/Counter_metrics/Should_push_metric_data_to_non-existing_counter.yml +126 -0
 - data/spec/vcr_cassettes/Gauge_metrics/Should_create_gauge_definition_using_Hash.yml +87 -0
 - data/spec/vcr_cassettes/Gauge_metrics/Should_create_gauge_definition_using_MetricDefinition.yml +87 -0
 - data/spec/vcr_cassettes/Gauge_metrics/Should_push_metric_data_to_existing_gauge.yml +249 -0
 - data/spec/vcr_cassettes/Gauge_metrics/Should_push_metric_data_to_non-existing_gauge.yml +126 -0
 - data/spec/vcr_cassettes/Gauge_metrics/Should_return_periods.yml +85 -0
 - data/spec/vcr_cassettes/Gauge_metrics/Should_update_tags_for_gauge_definition.yml +210 -0
 - data/spec/vcr_cassettes/Mixed_metrics/Should_send_mixed_metric_request.yml +284 -0
 - data/spec/vcr_cassettes/Mixed_metrics/Should_send_mixed_metric_request_of_a_single_type.yml +249 -0
 - data/spec/vcr_cassettes/Simple/Should_be_Cool.yml +208 -0
 - data/spec/vcr_cassettes/Tenants/Should_create_and_return_tenant.yml +79 -0
 - metadata +111 -25
 
    
        data/spec/spec_helper.rb
    CHANGED
    
    | 
         @@ -6,23 +6,27 @@ require 'uri' 
     | 
|
| 
       6 
6 
     | 
    
         
             
            require 'yaml'
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
            module Hawkular::Metrics::RSpec
         
     | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
9 
     | 
    
         
             
              def setup_client(options = {})
         
     | 
| 
       11 
     | 
    
         
            -
                 
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
      
 10 
     | 
    
         
            +
                credentials = {
         
     | 
| 
      
 11 
     | 
    
         
            +
                  username: config['user'],
         
     | 
| 
      
 12 
     | 
    
         
            +
                  password: config['password']
         
     | 
| 
      
 13 
     | 
    
         
            +
                }
         
     | 
| 
      
 14 
     | 
    
         
            +
                @client = Hawkular::Metrics::Client.new(config['url'],
         
     | 
| 
      
 15 
     | 
    
         
            +
                                                        credentials, options)
         
     | 
| 
       13 
16 
     | 
    
         
             
              end
         
     | 
| 
       14 
17 
     | 
    
         | 
| 
       15 
     | 
    
         
            -
              def setup_client_new_tenant( 
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
                @tenant =  
     | 
| 
       18 
     | 
    
         
            -
                @client.tenants.create(@tenant)
         
     | 
| 
       19 
     | 
    
         
            -
                setup_client( 
     | 
| 
      
 18 
     | 
    
         
            +
              def setup_client_new_tenant(_options = {})
         
     | 
| 
      
 19 
     | 
    
         
            +
                setup_client
         
     | 
| 
      
 20 
     | 
    
         
            +
                @tenant = 'vcr-test-tenant-123'
         
     | 
| 
      
 21 
     | 
    
         
            +
                # @client.tenants.create(@tenant)
         
     | 
| 
      
 22 
     | 
    
         
            +
                setup_client(tenant: @tenant)
         
     | 
| 
       20 
23 
     | 
    
         
             
              end
         
     | 
| 
       21 
24 
     | 
    
         | 
| 
       22 
25 
     | 
    
         
             
              def config
         
     | 
| 
       23 
     | 
    
         
            -
                @config ||= YAML.load( 
     | 
| 
      
 26 
     | 
    
         
            +
                @config ||= YAML.load(
         
     | 
| 
      
 27 
     | 
    
         
            +
                  File.read(File.expand_path('endpoint.yml', File.dirname(__FILE__)))
         
     | 
| 
      
 28 
     | 
    
         
            +
                )
         
     | 
| 
       24 
29 
     | 
    
         
             
              end
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
30 
     | 
    
         
             
            end
         
     | 
| 
       27 
31 
     | 
    
         | 
| 
       28 
32 
     | 
    
         
             
            RSpec.configure do |config|
         
     | 
    
        data/spec/unit/client_spec.rb
    CHANGED
    
    | 
         @@ -1,43 +1,48 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require  
     | 
| 
      
 1 
     | 
    
         
            +
            require '#{File.dirname(__FILE__)}/../spec_helper'
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            describe Hawkular::Metrics::Client do
         
     | 
| 
       4 
     | 
    
         
            -
              context  
     | 
| 
       5 
     | 
    
         
            -
                it  
     | 
| 
       6 
     | 
    
         
            -
                   
     | 
| 
      
 4 
     | 
    
         
            +
              context 'client initialization' do
         
     | 
| 
      
 5 
     | 
    
         
            +
                it 'should accept no option' do
         
     | 
| 
      
 6 
     | 
    
         
            +
                  credentials = { username: 'mockuser', password: 'mockpass' }
         
     | 
| 
      
 7 
     | 
    
         
            +
                  Hawkular::Metrics::Client.new(
         
     | 
| 
      
 8 
     | 
    
         
            +
                    'http://localhost:8080/hawkular/metrics', credentials)
         
     | 
| 
       7 
9 
     | 
    
         
             
                end
         
     | 
| 
       8 
10 
     | 
    
         | 
| 
       9 
     | 
    
         
            -
                it  
     | 
| 
       10 
     | 
    
         
            -
                  Hawkular::Metrics::Client 
     | 
| 
      
 11 
     | 
    
         
            +
                it 'should support no parameters' do
         
     | 
| 
      
 12 
     | 
    
         
            +
                  Hawkular::Metrics::Client.new
         
     | 
| 
       11 
13 
     | 
    
         
             
                end
         
     | 
| 
       12 
14 
     | 
    
         | 
| 
       13 
     | 
    
         
            -
                it  
     | 
| 
       14 
     | 
    
         
            -
                   
     | 
| 
      
 15 
     | 
    
         
            +
                it 'should accept Hawkular-Tenant option' do
         
     | 
| 
      
 16 
     | 
    
         
            +
                  credentials = { username: 'mockuser', password: 'mockpass' }
         
     | 
| 
      
 17 
     | 
    
         
            +
                  @client = Hawkular::Metrics::Client.new(
         
     | 
| 
      
 18 
     | 
    
         
            +
                    'http://localhost:8080/hawkular/metrics', credentials, tenant: 'foo')
         
     | 
| 
       15 
19 
     | 
    
         
             
                  headers = @client.send(:http_headers)
         
     | 
| 
       16 
     | 
    
         
            -
                  expect(headers[: 
     | 
| 
      
 20 
     | 
    
         
            +
                  expect(headers[:'Hawkular-Tenant']).to eql('foo')
         
     | 
| 
       17 
21 
     | 
    
         
             
                end
         
     | 
| 
       18 
22 
     | 
    
         | 
| 
       19 
     | 
    
         
            -
                it  
     | 
| 
       20 
     | 
    
         
            -
                  client = Hawkular::Metrics::Client 
     | 
| 
      
 23 
     | 
    
         
            +
                it 'should define subcomponents' do
         
     | 
| 
      
 24 
     | 
    
         
            +
                  client = Hawkular::Metrics::Client.new
         
     | 
| 
       21 
25 
     | 
    
         
             
                  expect(client.tenants).not_to be nil
         
     | 
| 
       22 
26 
     | 
    
         
             
                  expect(client.counters).not_to be nil
         
     | 
| 
       23 
27 
     | 
    
         
             
                  expect(client.gauges).not_to be nil
         
     | 
| 
       24 
28 
     | 
    
         
             
                end
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
29 
     | 
    
         
             
              end
         
     | 
| 
       27 
30 
     | 
    
         | 
| 
       28 
     | 
    
         
            -
              context  
     | 
| 
      
 31 
     | 
    
         
            +
              context 'http comms' do
         
     | 
| 
       29 
32 
     | 
    
         
             
                before(:each) do
         
     | 
| 
       30 
     | 
    
         
            -
                   
     | 
| 
      
 33 
     | 
    
         
            +
                  credentials = { username: 'mockuser', password: 'mockpass' }
         
     | 
| 
      
 34 
     | 
    
         
            +
                  @client = Hawkular::Metrics::Client.new(
         
     | 
| 
      
 35 
     | 
    
         
            +
                    'http://localhost:8080/hawkular/metrics', credentials)
         
     | 
| 
       31 
36 
     | 
    
         
             
                end
         
     | 
| 
       32 
37 
     | 
    
         | 
| 
       33 
     | 
    
         
            -
                it  
     | 
| 
      
 38 
     | 
    
         
            +
                it 'should add Accept: headers' do
         
     | 
| 
       34 
39 
     | 
    
         
             
                  headers = @client.send(:http_headers)
         
     | 
| 
       35 
     | 
    
         
            -
                  expect(headers[:accept]).to eql( 
     | 
| 
      
 40 
     | 
    
         
            +
                  expect(headers[:accept]).to eql('application/json')
         
     | 
| 
       36 
41 
     | 
    
         
             
                end
         
     | 
| 
       37 
42 
     | 
    
         | 
| 
       38 
     | 
    
         
            -
                it  
     | 
| 
       39 
     | 
    
         
            -
                  value =  
     | 
| 
       40 
     | 
    
         
            -
                  headers = @client.send(:http_headers,  
     | 
| 
      
 43 
     | 
    
         
            +
                it 'should keep existing Accept: headers' do
         
     | 
| 
      
 44 
     | 
    
         
            +
                  value = 'application/json; foo=bar;'
         
     | 
| 
      
 45 
     | 
    
         
            +
                  headers = @client.send(:http_headers, accept: value)
         
     | 
| 
       41 
46 
     | 
    
         
             
                  expect(headers[:accept]).to eql(value)
         
     | 
| 
       42 
47 
     | 
    
         
             
                end
         
     | 
| 
       43 
48 
     | 
    
         
             
              end
         
     | 
| 
         @@ -0,0 +1,16 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'vcr'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'webmock'
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            VCR.configure do |c|
         
     | 
| 
      
 5 
     | 
    
         
            +
              c.cassette_library_dir = 'spec/vcr_cassettes'
         
     | 
| 
      
 6 
     | 
    
         
            +
              c.hook_into :webmock
         
     | 
| 
      
 7 
     | 
    
         
            +
              c.default_cassette_options = { match_requests_on:  [:uri, :method] }
         
     | 
| 
      
 8 
     | 
    
         
            +
              c.debug_logger = File.open('spec/vcr.log', 'w')
         
     | 
| 
      
 9 
     | 
    
         
            +
              c.configure_rspec_metadata!
         
     | 
| 
      
 10 
     | 
    
         
            +
            end
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            RSpec.configure do |c|
         
     | 
| 
      
 13 
     | 
    
         
            +
              # so we can use :vcr rather than :vcr => true;
         
     | 
| 
      
 14 
     | 
    
         
            +
              # in RSpec 3 this will no longer be necessary.
         
     | 
| 
      
 15 
     | 
    
         
            +
              c.treat_symbols_as_metadata_keys_with_true_values = true
         
     | 
| 
      
 16 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,87 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            http_interactions:
         
     | 
| 
      
 3 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 4 
     | 
    
         
            +
                method: post
         
     | 
| 
      
 5 
     | 
    
         
            +
                uri: http://localhost:8080/hawkular/metrics/availability
         
     | 
| 
      
 6 
     | 
    
         
            +
                body:
         
     | 
| 
      
 7 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 8 
     | 
    
         
            +
                  string: '{"id":"<%= id %>","dataRetention":90,"tags":{"tag":"value"}}'
         
     | 
| 
      
 9 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 10 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 11 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 12 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 13 
     | 
    
         
            +
                  - gzip, deflate
         
     | 
| 
      
 14 
     | 
    
         
            +
                  Hawkular-Tenant:
         
     | 
| 
      
 15 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 16 
     | 
    
         
            +
                  Tenantid:
         
     | 
| 
      
 17 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 18 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 19 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 20 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 21 
     | 
    
         
            +
                  - '87'
         
     | 
| 
      
 22 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 23 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 24 
     | 
    
         
            +
              response:
         
     | 
| 
      
 25 
     | 
    
         
            +
                status:
         
     | 
| 
      
 26 
     | 
    
         
            +
                  code: 201
         
     | 
| 
      
 27 
     | 
    
         
            +
                  message: Created
         
     | 
| 
      
 28 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 29 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 30 
     | 
    
         
            +
                  - keep-alive
         
     | 
| 
      
 31 
     | 
    
         
            +
                  X-Powered-By:
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - Undertow/1
         
     | 
| 
      
 33 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 34 
     | 
    
         
            +
                  - WildFly/9
         
     | 
| 
      
 35 
     | 
    
         
            +
                  Location:
         
     | 
| 
      
 36 
     | 
    
         
            +
                  - http://localhost:8080/hawkular/metrics/availability/<%= id %>
         
     | 
| 
      
 37 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 38 
     | 
    
         
            +
                  - '0'
         
     | 
| 
      
 39 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 40 
     | 
    
         
            +
                  - Fri, 30 Oct 2015 17:30:28 GMT
         
     | 
| 
      
 41 
     | 
    
         
            +
                body:
         
     | 
| 
      
 42 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 43 
     | 
    
         
            +
                  string: ''
         
     | 
| 
      
 44 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 45 
     | 
    
         
            +
              recorded_at: Fri, 30 Oct 2015 17:30:28 GMT
         
     | 
| 
      
 46 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 47 
     | 
    
         
            +
                method: get
         
     | 
| 
      
 48 
     | 
    
         
            +
                uri: http://localhost:8080/hawkular/metrics/availability/<%= id %>
         
     | 
| 
      
 49 
     | 
    
         
            +
                body:
         
     | 
| 
      
 50 
     | 
    
         
            +
                  encoding: US-ASCII
         
     | 
| 
      
 51 
     | 
    
         
            +
                  string: ''
         
     | 
| 
      
 52 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 53 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 54 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 55 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 56 
     | 
    
         
            +
                  - gzip, deflate
         
     | 
| 
      
 57 
     | 
    
         
            +
                  Hawkular-Tenant:
         
     | 
| 
      
 58 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 59 
     | 
    
         
            +
                  Tenantid:
         
     | 
| 
      
 60 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 61 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 62 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 63 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 64 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 65 
     | 
    
         
            +
              response:
         
     | 
| 
      
 66 
     | 
    
         
            +
                status:
         
     | 
| 
      
 67 
     | 
    
         
            +
                  code: 200
         
     | 
| 
      
 68 
     | 
    
         
            +
                  message: OK
         
     | 
| 
      
 69 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 70 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 71 
     | 
    
         
            +
                  - keep-alive
         
     | 
| 
      
 72 
     | 
    
         
            +
                  X-Powered-By:
         
     | 
| 
      
 73 
     | 
    
         
            +
                  - Undertow/1
         
     | 
| 
      
 74 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 75 
     | 
    
         
            +
                  - WildFly/9
         
     | 
| 
      
 76 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 77 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 78 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 79 
     | 
    
         
            +
                  - '142'
         
     | 
| 
      
 80 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 81 
     | 
    
         
            +
                  - Fri, 30 Oct 2015 17:30:28 GMT
         
     | 
| 
      
 82 
     | 
    
         
            +
                body:
         
     | 
| 
      
 83 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 84 
     | 
    
         
            +
                  string: '{"id":"<%= id %>","tags":{"tag":"value"},"dataRetention":90,"type":"availability","tenantId":"vcr-test-tenant-123"}'
         
     | 
| 
      
 85 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 86 
     | 
    
         
            +
              recorded_at: Fri, 30 Oct 2015 17:30:28 GMT
         
     | 
| 
      
 87 
     | 
    
         
            +
            recorded_with: VCR 2.9.3
         
     | 
| 
         @@ -0,0 +1,87 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            http_interactions:
         
     | 
| 
      
 3 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 4 
     | 
    
         
            +
                method: post
         
     | 
| 
      
 5 
     | 
    
         
            +
                uri: http://localhost:8080/hawkular/metrics/availability
         
     | 
| 
      
 6 
     | 
    
         
            +
                body:
         
     | 
| 
      
 7 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 8 
     | 
    
         
            +
                  string: '{"id":"<%= id %>","dataRetention":123,"tags":{"some":"value"},"tenantId":"vcr-test-tenant-123"}'
         
     | 
| 
      
 9 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 10 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 11 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 12 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 13 
     | 
    
         
            +
                  - gzip, deflate
         
     | 
| 
      
 14 
     | 
    
         
            +
                  Hawkular-Tenant:
         
     | 
| 
      
 15 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 16 
     | 
    
         
            +
                  Tenantid:
         
     | 
| 
      
 17 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 18 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 19 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 20 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 21 
     | 
    
         
            +
                  - '122'
         
     | 
| 
      
 22 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 23 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 24 
     | 
    
         
            +
              response:
         
     | 
| 
      
 25 
     | 
    
         
            +
                status:
         
     | 
| 
      
 26 
     | 
    
         
            +
                  code: 201
         
     | 
| 
      
 27 
     | 
    
         
            +
                  message: Created
         
     | 
| 
      
 28 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 29 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 30 
     | 
    
         
            +
                  - keep-alive
         
     | 
| 
      
 31 
     | 
    
         
            +
                  X-Powered-By:
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - Undertow/1
         
     | 
| 
      
 33 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 34 
     | 
    
         
            +
                  - WildFly/9
         
     | 
| 
      
 35 
     | 
    
         
            +
                  Location:
         
     | 
| 
      
 36 
     | 
    
         
            +
                  - http://localhost:8080/hawkular/metrics/availability/<%= id %>
         
     | 
| 
      
 37 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 38 
     | 
    
         
            +
                  - '0'
         
     | 
| 
      
 39 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 40 
     | 
    
         
            +
                  - Fri, 30 Oct 2015 17:30:27 GMT
         
     | 
| 
      
 41 
     | 
    
         
            +
                body:
         
     | 
| 
      
 42 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 43 
     | 
    
         
            +
                  string: ''
         
     | 
| 
      
 44 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 45 
     | 
    
         
            +
              recorded_at: Fri, 30 Oct 2015 17:30:27 GMT
         
     | 
| 
      
 46 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 47 
     | 
    
         
            +
                method: get
         
     | 
| 
      
 48 
     | 
    
         
            +
                uri: http://localhost:8080/hawkular/metrics/availability/<%= id %>
         
     | 
| 
      
 49 
     | 
    
         
            +
                body:
         
     | 
| 
      
 50 
     | 
    
         
            +
                  encoding: US-ASCII
         
     | 
| 
      
 51 
     | 
    
         
            +
                  string: ''
         
     | 
| 
      
 52 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 53 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 54 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 55 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 56 
     | 
    
         
            +
                  - gzip, deflate
         
     | 
| 
      
 57 
     | 
    
         
            +
                  Hawkular-Tenant:
         
     | 
| 
      
 58 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 59 
     | 
    
         
            +
                  Tenantid:
         
     | 
| 
      
 60 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 61 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 62 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 63 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 64 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 65 
     | 
    
         
            +
              response:
         
     | 
| 
      
 66 
     | 
    
         
            +
                status:
         
     | 
| 
      
 67 
     | 
    
         
            +
                  code: 200
         
     | 
| 
      
 68 
     | 
    
         
            +
                  message: OK
         
     | 
| 
      
 69 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 70 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 71 
     | 
    
         
            +
                  - keep-alive
         
     | 
| 
      
 72 
     | 
    
         
            +
                  X-Powered-By:
         
     | 
| 
      
 73 
     | 
    
         
            +
                  - Undertow/1
         
     | 
| 
      
 74 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 75 
     | 
    
         
            +
                  - WildFly/9
         
     | 
| 
      
 76 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 77 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 78 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 79 
     | 
    
         
            +
                  - '144'
         
     | 
| 
      
 80 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 81 
     | 
    
         
            +
                  - Fri, 30 Oct 2015 17:30:27 GMT
         
     | 
| 
      
 82 
     | 
    
         
            +
                body:
         
     | 
| 
      
 83 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 84 
     | 
    
         
            +
                  string: '{"id":"<%= id %>","tags":{"some":"value"},"dataRetention":123,"type":"availability","tenantId":"vcr-test-tenant-123"}'
         
     | 
| 
      
 85 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 86 
     | 
    
         
            +
              recorded_at: Fri, 30 Oct 2015 17:30:27 GMT
         
     | 
| 
      
 87 
     | 
    
         
            +
            recorded_with: VCR 2.9.3
         
     | 
| 
         @@ -0,0 +1,126 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            http_interactions:
         
     | 
| 
      
 3 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 4 
     | 
    
         
            +
                method: post
         
     | 
| 
      
 5 
     | 
    
         
            +
                uri: http://localhost:8080/hawkular/metrics/availability/<%= id %>/data
         
     | 
| 
      
 6 
     | 
    
         
            +
                body:
         
     | 
| 
      
 7 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 8 
     | 
    
         
            +
                  string: '[{"value":"UP","timestamp":1446226228074}]'
         
     | 
| 
      
 9 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 10 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 11 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 12 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 13 
     | 
    
         
            +
                  - gzip, deflate
         
     | 
| 
      
 14 
     | 
    
         
            +
                  Hawkular-Tenant:
         
     | 
| 
      
 15 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 16 
     | 
    
         
            +
                  Tenantid:
         
     | 
| 
      
 17 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 18 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 19 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 20 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 21 
     | 
    
         
            +
                  - '42'
         
     | 
| 
      
 22 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 23 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 24 
     | 
    
         
            +
              response:
         
     | 
| 
      
 25 
     | 
    
         
            +
                status:
         
     | 
| 
      
 26 
     | 
    
         
            +
                  code: 200
         
     | 
| 
      
 27 
     | 
    
         
            +
                  message: OK
         
     | 
| 
      
 28 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 29 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 30 
     | 
    
         
            +
                  - keep-alive
         
     | 
| 
      
 31 
     | 
    
         
            +
                  X-Powered-By:
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - Undertow/1
         
     | 
| 
      
 33 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 34 
     | 
    
         
            +
                  - WildFly/9
         
     | 
| 
      
 35 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 36 
     | 
    
         
            +
                  - '0'
         
     | 
| 
      
 37 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 38 
     | 
    
         
            +
                  - Fri, 30 Oct 2015 17:30:28 GMT
         
     | 
| 
      
 39 
     | 
    
         
            +
                body:
         
     | 
| 
      
 40 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 41 
     | 
    
         
            +
                  string: ''
         
     | 
| 
      
 42 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 43 
     | 
    
         
            +
              recorded_at: Fri, 30 Oct 2015 17:30:28 GMT
         
     | 
| 
      
 44 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 45 
     | 
    
         
            +
                method: get
         
     | 
| 
      
 46 
     | 
    
         
            +
                uri: http://localhost:8080/hawkular/metrics/availability/<%= id %>/data/
         
     | 
| 
      
 47 
     | 
    
         
            +
                body:
         
     | 
| 
      
 48 
     | 
    
         
            +
                  encoding: US-ASCII
         
     | 
| 
      
 49 
     | 
    
         
            +
                  string: ''
         
     | 
| 
      
 50 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 51 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 52 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 53 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 54 
     | 
    
         
            +
                  - gzip, deflate
         
     | 
| 
      
 55 
     | 
    
         
            +
                  Hawkular-Tenant:
         
     | 
| 
      
 56 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 57 
     | 
    
         
            +
                  Tenantid:
         
     | 
| 
      
 58 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 59 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 60 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 61 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 62 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 63 
     | 
    
         
            +
              response:
         
     | 
| 
      
 64 
     | 
    
         
            +
                status:
         
     | 
| 
      
 65 
     | 
    
         
            +
                  code: 200
         
     | 
| 
      
 66 
     | 
    
         
            +
                  message: OK
         
     | 
| 
      
 67 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 68 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 69 
     | 
    
         
            +
                  - keep-alive
         
     | 
| 
      
 70 
     | 
    
         
            +
                  X-Powered-By:
         
     | 
| 
      
 71 
     | 
    
         
            +
                  - Undertow/1
         
     | 
| 
      
 72 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 73 
     | 
    
         
            +
                  - WildFly/9
         
     | 
| 
      
 74 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 75 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 76 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 77 
     | 
    
         
            +
                  - '42'
         
     | 
| 
      
 78 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 79 
     | 
    
         
            +
                  - Fri, 30 Oct 2015 17:30:28 GMT
         
     | 
| 
      
 80 
     | 
    
         
            +
                body:
         
     | 
| 
      
 81 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 82 
     | 
    
         
            +
                  string: '[{"timestamp":1446226228074,"value":"up"}]'
         
     | 
| 
      
 83 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 84 
     | 
    
         
            +
              recorded_at: Fri, 30 Oct 2015 17:30:28 GMT
         
     | 
| 
      
 85 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 86 
     | 
    
         
            +
                method: get
         
     | 
| 
      
 87 
     | 
    
         
            +
                uri: http://localhost:8080/hawkular/metrics/availability/<%= id %>
         
     | 
| 
      
 88 
     | 
    
         
            +
                body:
         
     | 
| 
      
 89 
     | 
    
         
            +
                  encoding: US-ASCII
         
     | 
| 
      
 90 
     | 
    
         
            +
                  string: ''
         
     | 
| 
      
 91 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 92 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 93 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 94 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 95 
     | 
    
         
            +
                  - gzip, deflate
         
     | 
| 
      
 96 
     | 
    
         
            +
                  Hawkular-Tenant:
         
     | 
| 
      
 97 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 98 
     | 
    
         
            +
                  Tenantid:
         
     | 
| 
      
 99 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 100 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 101 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 102 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 103 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 104 
     | 
    
         
            +
              response:
         
     | 
| 
      
 105 
     | 
    
         
            +
                status:
         
     | 
| 
      
 106 
     | 
    
         
            +
                  code: 200
         
     | 
| 
      
 107 
     | 
    
         
            +
                  message: OK
         
     | 
| 
      
 108 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 109 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 110 
     | 
    
         
            +
                  - keep-alive
         
     | 
| 
      
 111 
     | 
    
         
            +
                  X-Powered-By:
         
     | 
| 
      
 112 
     | 
    
         
            +
                  - Undertow/1
         
     | 
| 
      
 113 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 114 
     | 
    
         
            +
                  - WildFly/9
         
     | 
| 
      
 115 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 116 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 117 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 118 
     | 
    
         
            +
                  - '100'
         
     | 
| 
      
 119 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 120 
     | 
    
         
            +
                  - Fri, 30 Oct 2015 17:30:28 GMT
         
     | 
| 
      
 121 
     | 
    
         
            +
                body:
         
     | 
| 
      
 122 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 123 
     | 
    
         
            +
                  string: '{"id":"<%= id %>","type":"availability","tenantId":"vcr-test-tenant-123"}'
         
     | 
| 
      
 124 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 125 
     | 
    
         
            +
              recorded_at: Fri, 30 Oct 2015 17:30:28 GMT
         
     | 
| 
      
 126 
     | 
    
         
            +
            recorded_with: VCR 2.9.3
         
     | 
    
        data/spec/vcr_cassettes/Availability_metrics/Should_update_tags_for_Availability_definition.yml
    ADDED
    
    | 
         @@ -0,0 +1,210 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            http_interactions:
         
     | 
| 
      
 3 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 4 
     | 
    
         
            +
                method: post
         
     | 
| 
      
 5 
     | 
    
         
            +
                uri: http://localhost:8080/hawkular/metrics/availability
         
     | 
| 
      
 6 
     | 
    
         
            +
                body:
         
     | 
| 
      
 7 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 8 
     | 
    
         
            +
                  string: '{"id":"<%= id %>","tags":{"myTag":"<%= id %>"}}'
         
     | 
| 
      
 9 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 10 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 11 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 12 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 13 
     | 
    
         
            +
                  - gzip, deflate
         
     | 
| 
      
 14 
     | 
    
         
            +
                  Hawkular-Tenant:
         
     | 
| 
      
 15 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 16 
     | 
    
         
            +
                  Tenantid:
         
     | 
| 
      
 17 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 18 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 19 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 20 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 21 
     | 
    
         
            +
                  - '101'
         
     | 
| 
      
 22 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 23 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 24 
     | 
    
         
            +
              response:
         
     | 
| 
      
 25 
     | 
    
         
            +
                status:
         
     | 
| 
      
 26 
     | 
    
         
            +
                  code: 201
         
     | 
| 
      
 27 
     | 
    
         
            +
                  message: Created
         
     | 
| 
      
 28 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 29 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 30 
     | 
    
         
            +
                  - keep-alive
         
     | 
| 
      
 31 
     | 
    
         
            +
                  X-Powered-By:
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - Undertow/1
         
     | 
| 
      
 33 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 34 
     | 
    
         
            +
                  - WildFly/9
         
     | 
| 
      
 35 
     | 
    
         
            +
                  Location:
         
     | 
| 
      
 36 
     | 
    
         
            +
                  - http://localhost:8080/hawkular/metrics/availability/<%= id %>
         
     | 
| 
      
 37 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 38 
     | 
    
         
            +
                  - '0'
         
     | 
| 
      
 39 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 40 
     | 
    
         
            +
                  - Fri, 30 Oct 2015 17:30:28 GMT
         
     | 
| 
      
 41 
     | 
    
         
            +
                body:
         
     | 
| 
      
 42 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 43 
     | 
    
         
            +
                  string: ''
         
     | 
| 
      
 44 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 45 
     | 
    
         
            +
              recorded_at: Fri, 30 Oct 2015 17:30:28 GMT
         
     | 
| 
      
 46 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 47 
     | 
    
         
            +
                method: get
         
     | 
| 
      
 48 
     | 
    
         
            +
                uri: http://localhost:8080/hawkular/metrics/availability/<%= id %>
         
     | 
| 
      
 49 
     | 
    
         
            +
                body:
         
     | 
| 
      
 50 
     | 
    
         
            +
                  encoding: US-ASCII
         
     | 
| 
      
 51 
     | 
    
         
            +
                  string: ''
         
     | 
| 
      
 52 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 53 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 54 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 55 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 56 
     | 
    
         
            +
                  - gzip, deflate
         
     | 
| 
      
 57 
     | 
    
         
            +
                  Hawkular-Tenant:
         
     | 
| 
      
 58 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 59 
     | 
    
         
            +
                  Tenantid:
         
     | 
| 
      
 60 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 61 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 62 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 63 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 64 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 65 
     | 
    
         
            +
              response:
         
     | 
| 
      
 66 
     | 
    
         
            +
                status:
         
     | 
| 
      
 67 
     | 
    
         
            +
                  code: 200
         
     | 
| 
      
 68 
     | 
    
         
            +
                  message: OK
         
     | 
| 
      
 69 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 70 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 71 
     | 
    
         
            +
                  - keep-alive
         
     | 
| 
      
 72 
     | 
    
         
            +
                  X-Powered-By:
         
     | 
| 
      
 73 
     | 
    
         
            +
                  - Undertow/1
         
     | 
| 
      
 74 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 75 
     | 
    
         
            +
                  - WildFly/9
         
     | 
| 
      
 76 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 77 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 78 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 79 
     | 
    
         
            +
                  - '156'
         
     | 
| 
      
 80 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 81 
     | 
    
         
            +
                  - Fri, 30 Oct 2015 17:30:28 GMT
         
     | 
| 
      
 82 
     | 
    
         
            +
                body:
         
     | 
| 
      
 83 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 84 
     | 
    
         
            +
                  string: '{"id":"<%= id %>","tags":{"myTag":"<%= id %>"},"type":"availability","tenantId":"vcr-test-tenant-123"}'
         
     | 
| 
      
 85 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 86 
     | 
    
         
            +
              recorded_at: Fri, 30 Oct 2015 17:30:28 GMT
         
     | 
| 
      
 87 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 88 
     | 
    
         
            +
                method: put
         
     | 
| 
      
 89 
     | 
    
         
            +
                uri: http://localhost:8080/hawkular/metrics/availability/<%= id %>/tags
         
     | 
| 
      
 90 
     | 
    
         
            +
                body:
         
     | 
| 
      
 91 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 92 
     | 
    
         
            +
                  string: '{"newTag":"newValue"}'
         
     | 
| 
      
 93 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 94 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 95 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 96 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 97 
     | 
    
         
            +
                  - gzip, deflate
         
     | 
| 
      
 98 
     | 
    
         
            +
                  Hawkular-Tenant:
         
     | 
| 
      
 99 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 100 
     | 
    
         
            +
                  Tenantid:
         
     | 
| 
      
 101 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 102 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 103 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 104 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 105 
     | 
    
         
            +
                  - '21'
         
     | 
| 
      
 106 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 107 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 108 
     | 
    
         
            +
              response:
         
     | 
| 
      
 109 
     | 
    
         
            +
                status:
         
     | 
| 
      
 110 
     | 
    
         
            +
                  code: 200
         
     | 
| 
      
 111 
     | 
    
         
            +
                  message: OK
         
     | 
| 
      
 112 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 113 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 114 
     | 
    
         
            +
                  - keep-alive
         
     | 
| 
      
 115 
     | 
    
         
            +
                  X-Powered-By:
         
     | 
| 
      
 116 
     | 
    
         
            +
                  - Undertow/1
         
     | 
| 
      
 117 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 118 
     | 
    
         
            +
                  - WildFly/9
         
     | 
| 
      
 119 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 120 
     | 
    
         
            +
                  - '0'
         
     | 
| 
      
 121 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 122 
     | 
    
         
            +
                  - Fri, 30 Oct 2015 17:30:28 GMT
         
     | 
| 
      
 123 
     | 
    
         
            +
                body:
         
     | 
| 
      
 124 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 125 
     | 
    
         
            +
                  string: ''
         
     | 
| 
      
 126 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 127 
     | 
    
         
            +
              recorded_at: Fri, 30 Oct 2015 17:30:28 GMT
         
     | 
| 
      
 128 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 129 
     | 
    
         
            +
                method: get
         
     | 
| 
      
 130 
     | 
    
         
            +
                uri: http://localhost:8080/hawkular/metrics/availability/<%= id %>
         
     | 
| 
      
 131 
     | 
    
         
            +
                body:
         
     | 
| 
      
 132 
     | 
    
         
            +
                  encoding: US-ASCII
         
     | 
| 
      
 133 
     | 
    
         
            +
                  string: ''
         
     | 
| 
      
 134 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 135 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 136 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 137 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 138 
     | 
    
         
            +
                  - gzip, deflate
         
     | 
| 
      
 139 
     | 
    
         
            +
                  Hawkular-Tenant:
         
     | 
| 
      
 140 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 141 
     | 
    
         
            +
                  Tenantid:
         
     | 
| 
      
 142 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 143 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 144 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 145 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 146 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 147 
     | 
    
         
            +
              response:
         
     | 
| 
      
 148 
     | 
    
         
            +
                status:
         
     | 
| 
      
 149 
     | 
    
         
            +
                  code: 200
         
     | 
| 
      
 150 
     | 
    
         
            +
                  message: OK
         
     | 
| 
      
 151 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 152 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 153 
     | 
    
         
            +
                  - keep-alive
         
     | 
| 
      
 154 
     | 
    
         
            +
                  X-Powered-By:
         
     | 
| 
      
 155 
     | 
    
         
            +
                  - Undertow/1
         
     | 
| 
      
 156 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 157 
     | 
    
         
            +
                  - WildFly/9
         
     | 
| 
      
 158 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 159 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 160 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 161 
     | 
    
         
            +
                  - '176'
         
     | 
| 
      
 162 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 163 
     | 
    
         
            +
                  - Fri, 30 Oct 2015 17:30:28 GMT
         
     | 
| 
      
 164 
     | 
    
         
            +
                body:
         
     | 
| 
      
 165 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 166 
     | 
    
         
            +
                  string: '{"id":"<%= id %>","tags":{"myTag":"<%= id %>","newTag":"newValue"},"type":"availability","tenantId":"vcr-test-tenant-123"}'
         
     | 
| 
      
 167 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 168 
     | 
    
         
            +
              recorded_at: Fri, 30 Oct 2015 17:30:28 GMT
         
     | 
| 
      
 169 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 170 
     | 
    
         
            +
                method: get
         
     | 
| 
      
 171 
     | 
    
         
            +
                uri: http://localhost:8080/hawkular/metrics/metrics/?tags=myTag:<%= id %>&type=availability
         
     | 
| 
      
 172 
     | 
    
         
            +
                body:
         
     | 
| 
      
 173 
     | 
    
         
            +
                  encoding: US-ASCII
         
     | 
| 
      
 174 
     | 
    
         
            +
                  string: ''
         
     | 
| 
      
 175 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 176 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 177 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 178 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 179 
     | 
    
         
            +
                  - gzip, deflate
         
     | 
| 
      
 180 
     | 
    
         
            +
                  Hawkular-Tenant:
         
     | 
| 
      
 181 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 182 
     | 
    
         
            +
                  Tenantid:
         
     | 
| 
      
 183 
     | 
    
         
            +
                  - vcr-test-tenant-123
         
     | 
| 
      
 184 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 185 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 186 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 187 
     | 
    
         
            +
                  - Ruby
         
     | 
| 
      
 188 
     | 
    
         
            +
              response:
         
     | 
| 
      
 189 
     | 
    
         
            +
                status:
         
     | 
| 
      
 190 
     | 
    
         
            +
                  code: 200
         
     | 
| 
      
 191 
     | 
    
         
            +
                  message: OK
         
     | 
| 
      
 192 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 193 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 194 
     | 
    
         
            +
                  - keep-alive
         
     | 
| 
      
 195 
     | 
    
         
            +
                  X-Powered-By:
         
     | 
| 
      
 196 
     | 
    
         
            +
                  - Undertow/1
         
     | 
| 
      
 197 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 198 
     | 
    
         
            +
                  - WildFly/9
         
     | 
| 
      
 199 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 200 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 201 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 202 
     | 
    
         
            +
                  - '178'
         
     | 
| 
      
 203 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 204 
     | 
    
         
            +
                  - Fri, 30 Oct 2015 17:30:29 GMT
         
     | 
| 
      
 205 
     | 
    
         
            +
                body:
         
     | 
| 
      
 206 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 207 
     | 
    
         
            +
                  string: '[{"id":"<%= id %>","tags":{"myTag":"<%= id %>","newTag":"newValue"},"type":"availability","tenantId":"vcr-test-tenant-123"}]'
         
     | 
| 
      
 208 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 209 
     | 
    
         
            +
              recorded_at: Fri, 30 Oct 2015 17:30:29 GMT
         
     | 
| 
      
 210 
     | 
    
         
            +
            recorded_with: VCR 2.9.3
         
     |