Azure/azure-sdk-for-python — pull request #224 by lmazuel (2014-10-10 19:53:24+00:00)
Title: Add metrics to ServiceBus management

Hi,

Add the metrics for Service Bus via Management REST API:
http://msdn.microsoft.com/en-us/library/azure/dn163589.aspx

The 3 end-points are implemented by 12 methods:
- get_supported_metrics_XXX -> list of MetricProperties
- get_metrics_data_XXX -> list of MetricValues
- get_metrics_rollups_XXX -> list of MetricRollups

where XXX in [queue, topic, notification_hub, relay]

Implementation details:
- I have reverted the modification I did in `_convert_response_to_feeds` in https://github.com/Azure/azure-sdk-for-python/pull/182 and convert the related code into a callback function `_convert_xml_to_windows_azure_object`.
- Add a `xml_to_metrics` static method in `_ServiceBusManagementXmlSerializer` which handles the creation of object from the "entry" format of the metrics REST API
- Made a few PEP8 corrections in `servicebusmanagementservice.py` based on the pip module.
- Since unittesting requires a queue/topics/hub/relay name, I think the best approach is the add this information to the "credentials" file (as already made currently for the "namespace" information"). I wasn't sure you'll be ok with that, then I didn't add it to this pull-request. I can add a commit with the unittesting of the 12 methods based on adding info to the "credentials" file, or any other approach you think correct, just tell me :)

Let me know for any comments!