juju-solutions / cloud-weather-report

Apache License 2.0
2 stars 7 forks source link

Check for resource availability before performing tests. #103

Closed seman closed 7 years ago

seman commented 7 years ago

Added code to check for resource availability before performing cwr tests. When you add the following fields in the test plan, it automatically checks if the number of machines and CPUs are available from the provider before running the test:

cloud_resource:
    machines: 5
    cpus: 10

It checks resource availability by calculating how many resources you are already using and how many more you are requesting from the provider. In case of not having enough resources, it generates resource not available test result. See attached image.

I tested the code on running AWS, GCE, Azure and LXD.

I will update the doc once this is landed.

resource-not-available

seman commented 7 years ago