def configure_s3cmd(config): """ Install configuration for s3cmd. This allows the slave to upload vagrant images to S3. """ s3_config = FilePath(__file__).sibling('s3-config.in').getContent() put(StringIO(s3_config.format( aws_access_key_id=config['aws_access_key_id'], aws_secret_access_key=config['aws_secret_access_key'], )), '/home/buildslave/.s3cfg')
def configure_s3cmd(config): """ Install configuration for s3cmd. This allows the slave to upload vagrant images to S3. """ s3_config = FilePath(__file__).sibling('s3-config.in').getContent() put( StringIO( s3_config.format( aws_access_key_id=config['aws_access_key_id'], aws_secret_access_key=config['aws_secret_access_key'], )), '/home/buildslave/.s3cfg')
def _generateControlFile(package, provides, description=None): """ Generate a control file for C{package}. @returns: the control file @rtype: L{file}-like """ if description is None: description = 'Dummy provider of %s.' % provides template = FilePath(__file__).sibling('equivs.control').getContent() body = template.format(package=package, provides=provides, description=description) return StringIO(body)