def setUp(self): marketplaceId = getVmImageInfo()[self.name()]['id'] for i in self.driver.list_images(): if i.id == marketplaceId: image = i print 'image:', image break self.assertTrue('image' in locals(), 'id: %s: Image not found' % marketplaceId) self.nodes = list() self.ip_addresses = list() for i in xrange(self.vmNum): try: self.nodes.append(self.driver.create_node( name=self.name() + '-libcloud-node', size=self.size, image=image, location=self.location)) print 'create:', self.nodes[i] self.ip_addresses.append(self.driver.wait_until_running( [self.nodes[i]], wait_period=self.wait_period, timeout=self.timeout)[0][1]) print 'ip_addresses:', self.ip_addresses[i] except KeyboardInterrupt: raise except: self.tearDown() raise
def setUp(self): marketplaceId = getVmImageInfo()[self.name()]['id'] for i in self.driver.list_images(): if i.id == marketplaceId: image = i print 'image:', image break self.assertTrue('image' in locals(), 'id: %s: Image not found' % marketplaceId) self.image = image
def setUp(self): marketplaceId = getVmImageInfo()[self.name()]['id'] for i in self.driver.list_images(): if i.id == marketplaceId: image = i print 'image:', image break self.assertTrue('image' in locals(), 'id: %s: Image not found' % marketplaceId) self.node = self.driver.create_node(name=self.name() + '-libcloud-node', size=self.size, image=image, location=self.location)