<s> from lib . softlayer import SoftlayerBaseAction <EOL> class SoftlayerCreateInstance ( SoftlayerBaseAction ) : <EOL> def run ( self , name , datacenter , os = "<STR_LIT>" , domain = "<STR_LIT>" , cpus = <NUM_LIT:1> , ram = <NUM_LIT> , <EOL> disk = <NUM_LIT:100> , bandwidth = <NUM_LIT:10> , local_disk = True , keyname = None ) : <EOL> driver = self . _get_driver ( ) <EOL> create_params = { "<STR_LIT:name>" : name , "<STR_LIT>" : datacenter , <EOL> self . st2_to_libcloud [ '<STR_LIT>' ] : os , <EOL> self . st2_to_libcloud [ '<STR_LIT>' ] : domain , <EOL> self . st2_to_libcloud [ '<STR_LIT>' ] : cpus , <EOL> self . st2_to_libcloud [ '<STR_LIT>' ] : disk , <EOL> self . st2_to_libcloud [ '<STR_LIT>' ] : ram , <EOL> self . st2_to_libcloud [ '<STR_LIT>' ] : bandwidth , <EOL> self . st2_to_libcloud [ '<STR_LIT>' ] : local_disk } <EOL> if keyname is not None : <EOL> create_params [ self . st2_to_libcloud [ '<STR_LIT>' ] ] = keyname <EOL> self . logger . info ( '<STR_LIT>' ) <EOL> node = driver . create_node ( ** create_params ) <EOL> self . logger . info ( '<STR_LIT>' . format ( node ) ) <EOL> return node </s>
