[libvirt] [PATCH v2 4/5] Parallels: Add domainCreateWithFlags() function.

Ján Tomko jtomko at redhat.com
Fri Aug 22 12:51:31 UTC 2014


On 08/22/2014 01:04 PM, Alexander Burluka wrote:
> domainCreateWithFlags function is used by OpenStack Nova to boot
> instance.
> ---
>  src/parallels/parallels_driver.c | 50 ++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 50 insertions(+)
> 
> diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c
> index 0373830..d0f49b9 100644
> --- a/src/parallels/parallels_driver.c
> +++ b/src/parallels/parallels_driver.c
> @@ -2428,6 +2428,55 @@ parallelsNodeGetCPUMap(virConnectPtr conn ATTRIBUTE_UNUSED,
>  }
>  
>  
> +static int
> +parallelsDomainCreateWithFlags(virDomainPtr domain, unsigned int flags)
> +{
> +    parallelsConnPtr privconn = domain->conn->privateData;
> +    virDomainObjPtr privdom = NULL;
> +    int ret = -1;
> +
> +    virCheckFlags(VIR_DOMAIN_START_PAUSED |
> +                  VIR_DOMAIN_START_AUTODESTROY |
> +                  VIR_DOMAIN_START_BYPASS_CACHE |
> +                  VIR_DOMAIN_START_FORCE_BOOT, -1);

You don't seem to be using the flags anywhere. I don't think we should pretend
they are supported if they have no effect.

Also, shouldn't this share more code with parallelsDomainCreate?

Jan


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140822/49941c65/attachment-0001.sig>


More information about the libvir-list mailing list