Welcome to Glusto’s documentation!¶
Glusto is a framework designed to provide features commonly used in a remote/distributed environment via a single and easy-to-access object.
It started out as a port of some shell ssh functions I had written and was meant for use in PyUnit* tests and config scripts for Gluster.
I’ve removed the Gluster specifics from this package. Feel free to give it a go, and please let me know how it works out.
Some of the key concepts and features of Glusto:
- Glusto inherits from multiple classes providing configuration (yaml, json, ini), remote connection (SSH, SCP, RPyC), ANSI color output, logging, and unit test functionality (PyUnit, PyTest, Nose)–presenting them in a single global Class object.
- Glusto also acts as a global class for maintaining state and configuration data across multiple modules and classes.
- Glusto provides a wrapper utility (
/usr/bin/glusto
) to help make configuration files available to test cases from the command-line.
Adding Glusto utilities to a Python module is as simple as an import.
- Example:
To use Glusto in a module:
from glusto.core import Glusto as g
Note
It is no longer necessary to say “Glusto Importo!” out loud before executing scripts using the Glusto module. The import statement is more than sufficient.
User Guide¶
Table of Contents¶
- Installing Glusto
- Configuring Glusto
- Using Glusto
- Working With Remote Systems
- Using RPyC
- Using Config Files with Glusto
- Handling Logging with Glusto
- Default Logging
- Setting up Logging
- Sending a Log Event
- Sending Log Events to Multiple Logfiles
- Show the Logfiles Attached to a Specific Logger
- Removing a Log
- Changing the Level of an Existing Log Handler
- Changing the Filename of an Existing Log Handler
- Clearing a Log
- Temporarily Disable Logging
- Logging with Color Text
- Handling Templates with Glusto
- PyUnit (unittest) and Glusto
- PyTest and Glusto
- Nose and Glusto
- Working with PyTest and Nose
- Dynamic Cartesian Product Test Case Creation
- Glusto Simple REST Client
- To Do