By default no Hawkular-Tenant HTTP header is being set. If you need it (for instance for hawkular-services), provide the tenant option when creating a client. e.g. ::Hawkular::Client.new(..., options: { tenant: 'hawkular' })
To use the client use the require 'hawkular/hawkular_client'
instead of require 'hawkular_all'
While it’s still possible to use individual component clients (inventory, alert, metrics, operation, token), the preferred way is to use the unified client that has reference on those ‘sub-clients’:
::Hawkular::Client.new(:entrypoint => 'http://localhost:8080', :credentials => {username: 'jdoe', password: 'password'})
See the spec/integraion/hawkular_client_spec.rb to see more details.
In the lib/hawkular/inventory/inventory_api.rb
all following methods have different signatures (old
-> new
):
list_resources_for_type(feed_id, type, fetch_properties = false)
-> list_resources_for_type(type_path, fetch_properties = false, filter = {})
get_config_data_for_resource(feed_id, res_ids)
-> get_config_data_for_resource(resource_path)
def list_child_resources(Resource parent_resource, recursive = false)
-> def list_child_resources(parent_resource_path, recursive = false)
list_relationships(Resource resource, named = nil)
-> list_relationships(path, named = nil)
list_relationships_for_feed(feed_id, named = nil)
-> list_relationships_for_feed(path, named = nil)
list_metrics_for_metric_type(feed_id, type)
-> list_metrics_for_metric_type(met_type_path)
list_metrics_for_resource_type(feed, type)
-> list_metrics_for_resource_type(res_type_path)
list_metrics_for_resource(Resource resource, filter = {})
-> list_metrics_for_resource(resource_path, filter = {})
create_resource(feed_id, type_path, resource_id, resource_name = nil, properties = {})
-> create_resource(type_path, resource_id, resource_name = nil, properties = {})
create_resource_under_resource(feed_id, type_path, parent_resource_ids, resource_id, resource_name = nil, properties = {})
-> create_resource_under_resource(type_path, parent_resource_path, resource_id, resource_name = nil, properties = {})
get_resource(feed_id, res_ids, fetch_resource_config = true)
-> get_resource(res_path, fetch_resource_config = true)
create_metric_for_resource(feed_id, metric_id, type_path, res_ids, metric_name = nil)
-> create_metric_for_resource(metric_type_path, resource_path, metric_id, metric_name = nil)