Re: [libvirt] PATCH : Opennebula, adding xen i686 domain capability and updating some error messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 30, 2009 at 03:28:45PM +0200, "Abel M?guez Rodr?guez" wrote:
> Hi,
> 
> this patch uses "OPERATION_INVALID" error instead "OPERATION_FAILED" error where should be used, also adds a missing capability, defining Xen i686 domains.
> 
> Thanks for the patches,
> 
> --- one_driver.c.bak    2009-06-30 15:02:28.000000000 +0200
> +++ one_driver.c    2009-06-30 15:02:29.000000000 +0200
> @@ -505,7 +505,7 @@ static int oneDomainShutdown(virDomainPt
>              ret= 0;
>              goto return_point;
>          }
> -        oneError(dom->conn, dom, VIR_ERR_OPERATION_FAILED,
> +        oneError(dom->conn, dom, VIR_ERR_OPERATION_INVALID,
>                   _("Wrong state to perform action"));
>          goto return_point;
>      }
> @@ -541,7 +541,7 @@ static int oneDomainDestroy(virDomainPtr
>      if(c_oneCancel(vm->pid)) {
>          /* VM not running, delete the instance at ONE DB */
>          if(c_oneFinalize(vm->pid)){
> -            oneError(dom->conn, dom, VIR_ERR_OPERATION_FAILED,
> +            oneError(dom->conn, dom, VIR_ERR_OPERATION_INVALID,
>                       _("Wrong state to perform action"));
>              goto return_point;
>          }
> @@ -576,11 +576,11 @@ static int oneDomainSuspend(virDomainPtr
>                  ret=0;
>                  goto return_point;
>              }
> -            oneError(dom->conn, dom, VIR_ERR_OPERATION_FAILED,
> +            oneError(dom->conn, dom, VIR_ERR_OPERATION_INVALID,
>                       _("Wrong state to perform action"));
>              goto return_point;
>          }
> -        oneError(dom->conn,dom,VIR_ERR_OPERATION_FAILED,
> +        oneError(dom->conn,dom,VIR_ERR_OPERATION_INVALID,
>                   _("domain is not running"));
>      } else {
>          oneError(dom->conn, dom, VIR_ERR_INVALID_DOMAIN,
> @@ -609,11 +609,11 @@ static int oneDomainResume(virDomainPtr 
>                  ret=0;
>                  goto return_point;
>              }
> -            oneError(dom->conn, dom, VIR_ERR_OPERATION_FAILED,
> +            oneError(dom->conn, dom, VIR_ERR_OPERATION_INVALID,
>                       _("Wrong state to perform action"));
>              goto return_point;
>          }
> -        oneError(dom->conn,dom,VIR_ERR_OPERATION_FAILED,
> +        oneError(dom->conn,dom,VIR_ERR_OPERATION_INVALID,
>                   _("domain is not paused "));
>      } else {
>          oneError(dom->conn, dom, VIR_ERR_INVALID_DOMAIN,
> 
> 
> --- one_conf.c.bak    2009-06-30 15:01:06.000000000 +0200
> +++ one_conf.c    2009-06-30 15:00:58.000000000 +0200
> @@ -94,6 +94,27 @@ virCapsPtr oneCapsInit(void)
>      {
>          goto no_memory;
>      }
> +    if ((guest = virCapabilitiesAddGuest(caps,
> +                                         "xen",
> +                                         "i686",
> +                                         32,
> +                                         NULL,
> +                                         NULL,
> +                                         0,
> +                                         NULL)) == NULL)
> +    {
> +        goto no_memory;
> +    }
> +    if (virCapabilitiesAddGuestDomain(guest,
> +                                      "one",
> +                                      NULL,
> +                                      NULL,
> +                                      0,
> +                                      NULL) == NULL)
> +    {
> +        goto no_memory;
> +    }
> +


ACK

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]