Re: [virt-tools-list] [virt-viewer v2] ovirt: Only use active ISO domains for foreign menu
On 03/02/2016 09:04 AM, Fabiano FidĂȘncio wrote: > On Wed, Mar 2, 2016 at 12:02 PM, Christophe Fergeau > wrote: >> On Wed, Mar 02, 2016 at 08:52:28AM +0100, Christophe Fergeau wrote: >>> oVirt storage domains can be in various states (inactive, in >>> maintainance, ...). We only want to show the ISOs it contains in the >>> foreign menu when the storage domain is actually active, not in the >>> other states. >>> >>> https://bugzilla.redhat.com/show_bug.cgi?id=1310450 >>> --- >>> Changes since v1: >>> - added new condition to an existing if() block >> >> Fwiw, I prefer the v1 way which I find much easier to read. > > Same here. V1 it is then :) Acked-by: Eduardo Lima (Etrunko) -- Eduardo de Barros Lima (Etrunko) Software Engineer - RedHat etru...@redhat.com ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-viewer v2] ovirt: Only use active ISO domains for foreign menu
On Wed, Mar 2, 2016 at 12:02 PM, Christophe Fergeau wrote: > On Wed, Mar 02, 2016 at 08:52:28AM +0100, Christophe Fergeau wrote: >> oVirt storage domains can be in various states (inactive, in >> maintainance, ...). We only want to show the ISOs it contains in the >> foreign menu when the storage domain is actually active, not in the >> other states. >> >> https://bugzilla.redhat.com/show_bug.cgi?id=1310450 >> --- >> Changes since v1: >> - added new condition to an existing if() block > > Fwiw, I prefer the v1 way which I find much easier to read. Same here. > > Christophe > > ___ > virt-tools-list mailing list > virt-tools-list@redhat.com > https://www.redhat.com/mailman/listinfo/virt-tools-list ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-viewer v2] ovirt: Only use active ISO domains for foreign menu
On Wed, Mar 02, 2016 at 08:52:28AM +0100, Christophe Fergeau wrote: > oVirt storage domains can be in various states (inactive, in > maintainance, ...). We only want to show the ISOs it contains in the > foreign menu when the storage domain is actually active, not in the > other states. > > https://bugzilla.redhat.com/show_bug.cgi?id=1310450 > --- > Changes since v1: > - added new condition to an existing if() block Fwiw, I prefer the v1 way which I find much easier to read. Christophe signature.asc Description: PGP signature ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-viewer v2] ovirt: Only use active ISO domains for foreign menu
oVirt storage domains can be in various states (inactive, in maintainance, ...). We only want to show the ISOs it contains in the foreign menu when the storage domain is actually active, not in the other states. https://bugzilla.redhat.com/show_bug.cgi?id=1310450 --- Changes since v1: - added new condition to an existing if() block - added bug reference src/ovirt-foreign-menu.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ovirt-foreign-menu.c b/src/ovirt-foreign-menu.c index 9859439..13aceba 100644 --- a/src/ovirt-foreign-menu.c +++ b/src/ovirt-foreign-menu.c @@ -650,9 +650,11 @@ static void storage_domains_fetched_cb(GObject *source_object, while (g_hash_table_iter_next(&iter, NULL, (gpointer *)&domain)) { OvirtCollection *file_collection; int type; +int state; -g_object_get(domain, "type", &type, NULL); -if (type != OVIRT_STORAGE_DOMAIN_TYPE_ISO) { +g_object_get(domain, "type", &type, "state", &state, NULL); +if ((type != OVIRT_STORAGE_DOMAIN_TYPE_ISO) +|| (state != OVIRT_STORAGE_DOMAIN_STATE_ACTIVE)) { continue; } -- 2.5.0 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list