--- repos/domain/destroy.py | 5 +++-- repos/domain/install_linux_cdrom.py | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/repos/domain/destroy.py b/repos/domain/destroy.py index 91e83ea..154ffaf 100644 --- a/repos/domain/destroy.py +++ b/repos/domain/destroy.py @@ -12,7 +12,7 @@ from src import sharedmod from utils import utils required_params = ('guestname',) -optional_params = {'flags' : 'noping'} +optional_params = {'flags' : 'noping','bridgename' : 'virbr0',} def destroy(params): """destroy domain @@ -32,6 +32,7 @@ def destroy(params): logger = params['logger'] params.pop('logger') guestname = params['guestname'] + br = params['bridgename'] flags = "" if params.has_key('flags'): flags = params['flags'] @@ -58,7 +59,7 @@ def destroy(params): # Get domain ip mac = utils.get_dom_mac_addr(guestname) logger.info("get ip by mac address") - ip = utils.mac_to_ip(mac, 180) + ip = utils.mac_to_ip(mac,br,180) logger.info("the ip address of guest is %s" % ip) # Destroy domain diff --git a/repos/domain/install_linux_cdrom.py b/repos/domain/install_linux_cdrom.py index 239f85e..9d3a7e9 100644 --- a/repos/domain/install_linux_cdrom.py +++ b/repos/domain/install_linux_cdrom.py @@ -30,6 +30,8 @@ optional_params = { 'type' : 'define', 'xml': 'xmls/kvm_linux_guest_install_cdrom.xml', 'guestmachine': 'pc', + 'networksource': 'default', + 'bridgename': 'virbr0', } VIRSH_QUIET_LIST = "virsh --quiet list --all|awk '{print $2}'|grep \"^%s$\"" @@ -145,6 +147,7 @@ def install_linux_cdrom(params): guestname = params.get('guestname') guestos = params.get('guestos') guestarch = params.get('guestarch') + br = params['bridgename'] xmlstr = params['xml'] logger.info("the name of guest is %s" % guestname) @@ -301,7 +304,7 @@ def install_linux_cdrom(params): time.sleep(10) timeout -= 10 - ip = utils.mac_to_ip(mac, 180) + ip = utils.mac_to_ip(mac,br,180) if not ip: logger.info(str(timeout) + "s left") -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list