Breaking changes in the major releases

3.0.0

  • A lot of methods in the inventory client have been changed or removed, here is the list:

  1. get_tenant - removed

  2. list_relationships - removed

  3. list_relationships_for_feed - removed

  4. get_entity - removed

  5. delete_feed - removed

  6. create_feed - removed

  7. create_resource_type - removed

  8. create_resource - removed

  9. create_resource_under_resource - removed

  10. create_metric_type - removed

  11. create_metric_for_resource - removed

  12. events - removed

  13. no_more_events! - removed

  14. list_metrics_for_resource_type - removed

  15. list_resource_types(feed_id) - now the feed_id parameter is mandatory

  • instead of Hawkular::Inventory::CanonicalPath.to_resource use Hawkular::Inventory::CanonicalPath.down

removed deprecated API:

  • instead of HawkularUtilsMixin use Hawkular::ClientUtils

  • instead of Hawkular::Operations::OperationsClient use Hawkular::Operations::Client

  • instead of Hawkular::Alerts::AlertsClient use Hawkular::Alerts::Client

  • instead of Hawkular::Token::TokenClient use Hawkular::Token::Client

  • instead of Hawkular::Inventory::InventoryClient use Hawkular::Inventory::Client

2.0.0

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' })

1.0.0

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)