GitHub user syed opened a pull request: https://github.com/apache/libcloud/pull/512
Handle case where Cloudstack can return Unlimited instead of int Sometimes the Cloudstack API returns 'Unlimited' instead of an int. For instance, this is a sample output of listProjects() ```json { 'primarystorageavailable': 'Unlimited', 'domain': 'demo', 'domainid': '6ee35be2-8002-46a3-8736-b071aa059fd6', 'vpclimit': 'Unlimited', 'iplimit': 'Unlimited', 'volumelimit': 'Unlimited', 'memorytotal': 14336, 'secondarystorageavailable': 'Unlimited', 'vmtotal': 7, 'displaytext': 'DefaultEnv.', 'vpctotal': 1, 'id': '7862b2ed-5204-45e4-b036-b2237db40cde', 'cpuavailable': 'Unlimited', 'networklimit': 'Unlimited', 'iptotal': 2, 'volumetotal': 14, 'snapshotlimit': 'Unlimited'.... } ``` I am using -1 to mean "Unlimited" You can merge this pull request into a Git repository by running: $ git pull https://github.com/syed/libcloud trunk Alternatively you can review and apply these changes as the patch at: https://github.com/apache/libcloud/pull/512.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #512 ---- commit faef57fe796f1954409a7dcfb7444223ebd521cd Author: Syed <syed1.mush...@gmail.com> Date: 2015-05-07T22:57:26Z Handle case where Cloudstack can return Unlimited instead of int ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---