set_iso method added into integration package

This commit is contained in:
Vladimir Kozhukalov 2012-06-07 12:24:37 +04:00
parent 3c3d939372
commit db5a35b1e6
2 changed files with 7 additions and 4 deletions

View File

@ -1,7 +1,6 @@
import os.path
import os
import sys
import pprint
pp = pprint.PrettyPrinter(indent=4)
paths = [
os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'devops'),
@ -13,6 +12,8 @@ import nose
import nose.config
import integration
integration.ci.set_iso('/var/www/nailgun-ubuntu-12.04-amd64.last.iso')
nc = nose.config.Config()
nc.verbosity = 3
nose.run(module=integration, config=nc)

View File

@ -5,7 +5,7 @@ from devops.driver.libvirt import Libvirt
from devops.helpers import tcp_ping, wait
class Ci:
def __init__(self):
def __init__(self, iso='http://mc0n1-srt.srt.mirantis.net/nailgun-ubuntu-12.04-amd64.last.iso'):
self.environment = Environment('test')
self.default_network = Network('default')
@ -13,7 +13,7 @@ class Ci:
self.admin_node = Node('admin')
self.admin_node.memory = 1024
self.admin_node.vnc = True
self.admin_node.cdrom = Cdrom(isopath='/var/www/local/nailgun-ubuntu-12.04-amd64.last.iso')
self.admin_node.cdrom = Cdrom(isopath=iso)
self.admin_node.disks.append(Disk(size=30*1024**3))
self.admin_node.interfaces.append(Interface(self.default_network))
self.admin_node.boot = ['disk', 'cdrom']
@ -27,6 +27,8 @@ class Ci:
self.default_ip = self.default_network.ip_addresses
def set_iso(iso):
self.admin_node.cdrom = Cdrom(isopath=iso)
ci = Ci()