utils module

Fabric tasks

django_fabfile.utils.update_volumes_tags()[source]

Clone tags from instances to volumes.

Parameters:filters – apply optional filtering for the django_fabfile.utils.get_all_instances().

Internals

Check Fabric tasks for Django and Amazon Web Services or django_fabfile.utils.Config docstring for setup instructions.

class django_fabfile.utils.Config[source]

Make use from Django settings or local config file.

Django settings will be checked out if environment variable DJANGO_SETTINGS_MODULE configured properly. If not configured within Django settings, then options will be taken from ./fabfile.cfg file - copy-paste rows that should be overriden from django_fabfile/fabfile.cfg.def.

refresh()[source]

Reread configuration.

New in version 2012.07.11.1.

class django_fabfile.utils.WaitForProper(attempts=10, pause=10)[source]

Decorate consecutive exceptions eating.

>>> @WaitForProper(attempts=3, pause=5)
... def test():
...     1 / 0
...
>>> test()
ZeroDivisionError('integer division or modulo by zero',)
 waiting next 5 sec (2 times left)
ZeroDivisionError('integer division or modulo by zero',)
 waiting next 5 sec (1 times left)
ZeroDivisionError('integer division or modulo by zero',)
django_fabfile.utils.copy_ami_to_regions[source]

Copies ami to all regions except source region.

Parameters:source_region – define source region for ami.
django_fabfile.utils.get_inst_by_id(region_name, instance_id)[source]

Return Instance or None.

Raise AssertionError if more that one Instance returned.

django_fabfile.utils.get_region_conn(region_name=None)[source]

Connect to partially spelled region_name.

Return connection to default boto region if called without arguments.

Parameters:region_name – may be spelled partially.
django_fabfile.utils.update_volumes_tags[source]

Clone tags from instances to volumes.

Parameters:filters – apply optional filtering for the django_fabfile.utils.get_all_instances().
django_fabfile.utils.wait_for(obj, state, attrs=None, max_sleep=30, limit=300)[source]

Wait for attribute to go into state.

Parameters:attrs (list) – nested attribute names.

Table Of Contents

Previous topic

useradd module

This Page