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
Add agent host info for Rackspace Cloud Monitoring #2442
Conversation
@krames - could you review, thanks! |
class Mock | ||
def get_cpus_info(agent_id) | ||
|
||
agent_id = Fog::Rackspace::MockData.uuid |
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.
Awesome job on the mocks!
Sorry about the delay in reviewing your PR. (It's been a crazy week). The code looks good to me, but could I get you to write some tests to ensure that a future committer doesn't break anything? You can find a good example of tests here -> https://github.com/fog/fog/blob/master/tests/rackspace/requests/queues/claim_tests.rb |
@kfafel Here is a gist with our sample -> https://gist.github.com/krames/7919623 Let me know if you need any more help! |
@kfafel It looks like one of the travis tests had a random failure. I restarted it and everything looks good. Let me know if you need any more help with tests. |
@krames great to hear on the Travis tests! On the Shindo tests, I worked on them some this weekend... Instead of simply testing for a Response Code of 200, I'm trying to go a little deeper, and test for the right data format being returned. If it turns into too much hassle, I'll revert back to the Response Codes just to get something working out there. |
@krames -- okay, I think I've got the shindo tests working well. The tests are looking for more than a response status code, but not too much more -- basically just the body to be a hash. I was going to look for specific values, but the output was slightly different for a couple agent calls. The lowest common denominator was an hash for a body. I could go deeper, but I was trying to balance between simplicity of code vs going overboard with little return. Thoughts? |
@kfafel more information is always preferable, but this at least exercises the call and that's the most important thing. It looks like this commit is missing some files. When I execute it locally, it is complaining about not finding the list_agents request. Can you verify that you have pushed all your changes up to the branch?
Good work BTW!!! 👍 |
@krames ... oops, you're right. I missed adding a couple files. try now. |
@kfafel Looks good to me. Are you ready for me to merge it? |
@krames go for it! :) |
Add agent host info for Rackspace Cloud Monitoring
Thanks! 👍 |
Thanks! |
Implements these Rackspace Cloud Monitoring API calls - http://docs.rackspace.com/cm/api/v1.0/cm-devguide/content/service-agent-host_info.html