Skip to content
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

Merged
merged 2 commits into from
May 13, 2016

Conversation

jkremser
Copy link
Member

@jkremser jkremser commented May 9, 2016

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

@jkremser
Copy link
Member Author

@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)
Copy link
Member

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?

Copy link
Member

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?

Copy link
Member Author

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?

@pilhuhn
Copy link
Member

pilhuhn commented May 12, 2016

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
Copy link
Contributor

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"

@jkremser jkremser force-pushed the list-operations branch 2 times, most recently from 78d5684 to 0fc53dd Compare May 12, 2016 15:32
@coveralls
Copy link

coveralls commented May 12, 2016

Coverage Status

Coverage increased (+0.06%) to 94.687% when pulling 3a698f0 on Jiri-Kremser:list-operations into 9235e12 on hawkular:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants