-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 52: adding a method for listing the operations stored in inventory #63
Conversation
@pilhuhn could you please review? It shouldn't be blocked by the fact that not all the operation types are in the inventory, right? |
# List operation types for given resource type | ||
# @param [String] resource_type_path canonical path of the resource type entity | ||
# @return [Array<String>] List of operation type ids | ||
def list_operation_types(resource_type_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we rename this to list_operation_definitions
to make it more clear what it is - even if they are called differently in inventory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we (additionally) expose a list_operation_definitions(resource_id)
which accepts a resource (CP) and then internally goes resource -> resourceType -> operationTypes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I can add that, but rather than overloading the method and doing some is_a? String ruby-fu, I'd create a new method called list_operation_definitions_for_resource(resource_path)
, wdyt?
In General LGTM. And no this missing stuff in inventory should not block this PR. |
@@ -429,6 +429,17 @@ def create_metric_type(feed_id, metric_type_id, type = 'GAUGE', unit = 'NONE', c | |||
MetricType.new(new_mt) | |||
end | |||
|
|||
# List operation types for given resource type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing "a" - "for a given resource type"
78d5684
to
0fc53dd
Compare
…r a given resource
Only the method for retrieving all the operations declared in the inventory has been added. Inventory is storing more info under the
../resourceTypes/foo/operationTypes/bar/data
endpoint, but this endpoint is currently broken.This fixes issue #52