<s> """<STR_LIT>""" <EOL> import os <EOL> import time <EOL> from fabric . api import env , require , runs_once <EOL> import opsfab . defaults <EOL> from opsfab . types import * <EOL> from opsfab . environments import * <EOL> from fab_shared import local , put , sudo , rechef , setup <EOL> env . root_dir = os . path . abspath ( os . path . dirname ( __file__ ) ) <EOL> env . pip_requirements = [ "<STR_LIT>" , ] <EOL> @ runs_once <EOL> def spawn ( ami = None , region = None , chef_roles = None ) : <EOL> """<STR_LIT>""" <EOL> require ( '<STR_LIT>' , provided_by = [ small , large , extra_large , extra_large_mem , <EOL> double_extra_large_mem , quadruple_extra_large_mem , medium_cpu , <EOL> extra_large_cpu ] ) <EOL> require ( '<STR_LIT>' ) <EOL> require ( '<STR_LIT>' ) <EOL> require ( '<STR_LIT>' ) <EOL> require ( '<STR_LIT>' ) <EOL> require ( '<STR_LIT>' ) <EOL> env . ami = ami or env . ami <EOL> env . region = region or env . region <EOL> role_string = "<STR_LIT>" <EOL> if chef_roles : <EOL> env . chef_roles . extend ( chef_roles . split ( '<STR_LIT:->' ) ) <EOL> for role in env . chef_roles : <EOL> role_string += "<STR_LIT>" % role <EOL> local ( '<STR_LIT>' % env ) <EOL> command = '<STR_LIT>' % role_string <EOL> command += '<STR_LIT>' % env <EOL> command += '<STR_LIT>' % env <EOL> command += '<STR_LIT>' % '<STR_LIT:U+002C>' . join ( env . security_groups ) <EOL> command += '<STR_LIT>' % env <EOL> command += '<STR_LIT>' <EOL> print "<STR_LIT>" <EOL> print command </s>
