Skip to content

Latest commit

 

History

History
141 lines (98 loc) · 6.02 KB

api_breaking_changes.rdoc

File metadata and controls

141 lines (98 loc) · 6.02 KB

Breaking changes in the major releases

5.0.0.pre1

  • The Hawkular inventory implementation was rewritten. Thus, the support for inventory on metrics has been removed from the client. The new API is now being used. Some of the most important changes are these:

    • CanonicalPath is removed. Now, entities in inventory have opaque IDs, and no assumptions about the format of the ID can be done.

    • Inventory has now four basic classes for entities: Resource, Resource Type, Metric and Operation. The BaseEntity class has been removed.

    • The inventory client Hawkular::Inventory::Client class was fully rewritten. None of the previous methods exist. Now, it is using the new API exposed by Hawkular and provides basic methods to traverse the inventory tree and do some simple queries.

  • Almost all Operations client methods receive a hash with the parameters to perform the operation. A common hash key was resourcePath. Because of the new inventory API, this key is no longer requried. Instead, resourceId and feedId keys are required. This means that all methods of the Operations client class are non-backwards compatible.

    • In particular, export_jdr method does not receive a hash, but plain parameters. The resourcePath parameter was replaced by resourceId and feedId parameters. Also, support for sender_request_id is added as a parameter.

4.0.0

  • Standardized Exceptions under the Hawkular namespace, and the old names were deprecated, here is the list:

    1. Hawkular::BaseClient::HawkularException -> Hawkular::Exception

    2. Hawkular::BaseClient::HawkularConnectionException -> Hawkular::ConnectionException

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)