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:
-
get_tenant- removed -
list_relationships- removed -
list_relationships_for_feed- removed -
get_entity- removed -
delete_feed- removed -
create_feed- removed -
create_resource_type- removed -
create_resource- removed -
create_resource_under_resource- removed -
create_metric_type- removed -
create_metric_for_resource- removed -
events- removed -
no_more_events!- removed -
list_metrics_for_resource_type- removed -
list_resource_types(feed_id)- now the feed_id parameter is mandatory
-
instead of
Hawkular::Inventory::CanonicalPath.to_resourceuseHawkular::Inventory::CanonicalPath.down
removed deprecated API:
-
instead of
HawkularUtilsMixinuseHawkular::ClientUtils -
instead of
Hawkular::Operations::OperationsClientuseHawkular::Operations::Client -
instead of
Hawkular::Alerts::AlertsClientuseHawkular::Alerts::Client -
instead of
Hawkular::Token::TokenClientuseHawkular::Token::Client -
instead of
Hawkular::Inventory::InventoryClientuseHawkular::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)