Kaitlin Rupert wrote:
> - virtxml = vxml.get_class(options.virt)
> - if options.virt == "LXC":
> + virtxml = vxml.get_class(virt)
> + if virt == "LXC":
> cxml = virtxml(test_dom)
> else:
> cxml = virtxml(test_dom, mac = test_mac)
> - ret = cxml.create(options.ip)
>
> + ret = cxml.cim_define(server)
> if not ret:
> - logger.error("ERROR: Failed to Create the dom: %s" % test_dom)
> - status = FAIL
> - return status
> - keys = ['Name', 'CreationClassName']
> + logger.error("Failed to define the dom: %s" % test_dom)
> + return FAIL
> +
> + rc = call_request_state_change(test_dom, server, 2, TIME, virt)
> + if rc != 0:
> + logger.error("Failed to start the dom: %s" % test_dom)
> + cxml.undefine(server)
> + return FAIL
What we really want to do here is implement cim_start(). You're
welcome to leave this as is, but eventually we'll need to replace this
(and the cxml.start() calls) with a cim_start() call.
This will be more uniform than using cim_define() to define a guest
and then using a non-vxml related function to change the guest's
state. But cim_start() (or cim_state_change(), whichever way you
think is best) can be added at some later time.
I will modify these to use the cim_start in the next iterations, as I
would like to spend time in completing to support the tc to work with
the SBLIM changes.
Thanks and Regards,
Deepti.