This release adds three new convenience functions for use in the Fabric testing scripts:
- `get_artifacts()` - Receives a list of strings of log files to pull from remote nodes.
- `http_check()` - Receives a URL and string and runs a HTTP check from the remote node.
- `local_http_check()` - Same as `http_check()`, but runs from the host running fabric.
Some example usage:
**get_artifacts()**
task
def artifacts():
env.platform_family = detect.detect()
Logs to pull
logs = ['/root/cfn-userdata.log',
'/root/heat-script.log']
get_artifacts(logs)
**http_check() and local_http_check()**
task
def check():
env.platform_family = detect.detect()
site = "http://localhost/"
string = "Apache2 Ubuntu Default Page"
assert http_check(site, string), "Apache is not responding."
assert local_http_check(env.host, string), "Apache is not responding remotely."
**Note:** See the usage of the fabric variable `env.host` which supplies the host string for the function.