After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 680187 - Allow renaming libvirt machine
Allow renaming libvirt machine
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on: 680168
Blocks:
 
 
Reported: 2012-07-18 17:21 UTC by Marc-Andre Lureau
Modified: 2016-03-31 13:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
properties: if edition change is not validate keep editing (1.52 KB, patch)
2012-07-18 17:21 UTC, Marc-Andre Lureau
needs-work Details | Review
Use explicit GetXML flag name, bump libvirt-glib dep (1.44 KB, patch)
2012-07-18 17:21 UTC, Marc-Andre Lureau
committed Details | Review
libvirt: allow changing machine name (2.62 KB, patch)
2012-07-18 17:21 UTC, Marc-Andre Lureau
committed Details | Review

Description Marc-Andre Lureau 2012-07-18 17:21:28 UTC
SSIA
Comment 1 Marc-Andre Lureau 2012-07-18 17:21:30 UTC
Created attachment 219146 [details] [review]
properties: if edition change is not validate keep editing

If changed cb throws a Boxes.INVALID error, keep editing the state. It
can be cancelled/escaped with Escape key.

We may want to have a (x) icon to indicate the error, that would need
further discussion with UI.
Comment 2 Marc-Andre Lureau 2012-07-18 17:21:35 UTC
Created attachment 219147 [details] [review]
Use explicit GetXML flag name, bump libvirt-glib dep

Bump libvirt-glib to 0.1.1 for flag names.
Comment 3 Marc-Andre Lureau 2012-07-18 17:21:38 UTC
Created attachment 219148 [details] [review]
libvirt: allow changing machine name
Comment 4 Marc-Andre Lureau 2012-07-18 17:27:10 UTC
depends on bug 680168
Comment 5 Zeeshan Ali 2012-07-28 15:25:38 UTC
Review of attachment 219146 [details] [review]:

Looks right otherwise.

::: src/i-properties-provider.vala
@@ +27,3 @@
             } catch (Boxes.Error error) {
                 warning (error.message);
+                if (error is Boxes.Error.INVALID)

IMO having a separate catch for the exact error rather than checking the error type is more cleaner.
Comment 6 Zeeshan Ali 2012-07-28 15:33:47 UTC
Review of attachment 219147 [details] [review]:

If the patch wasn't simple, I wouldn't have understood from log what its about. There is no 'GetXML' identifier involved and no need to say ', bump libvirt-glib dep' in the summary line (the convention is to keep it as short as possible). Change itself is good. :)
Comment 7 Zeeshan Ali 2012-07-28 15:36:07 UTC
Review of attachment 219146 [details] [review]:

Oh and commit log needs some cleaning here as well: s/validate/valid,/ in the summary
Comment 8 Zeeshan Ali 2012-07-29 08:46:24 UTC
Review of attachment 219148 [details] [review]:

https://live.gnome.org/Git/CommitMessages

Looks good apart from this nonfunctional nitpicks. :)

::: src/libvirt-machine.vala
@@ -274,2 +275,5 @@
     }
 
+    public void try_change_name (string name) throws Boxes.Error {
+        try {
+            // we use libvirt "title" for free form user name

In english, first letter is capitalized in a phrase/sentence. :)

@@ -276,0 +277,5 @@
+    public void try_change_name (string name) throws Boxes.Error {
+        try {
+            // we use libvirt "title" for free form user name
... 2 more ...

* this -> This

* Lines are 120 columns in boxes. While breaking lines might make code more readable, its the opposite for human languages IMO.

@@ -276,0 +277,11 @@
+    public void try_change_name (string name) throws Boxes.Error {
+        try {
+            // we use libvirt "title" for free form user name
... 8 more ...

invalid -> Invalid
Comment 9 Marc-Andre Lureau 2012-07-30 16:21:06 UTC
Review of attachment 219146 [details] [review]:

::: src/i-properties-provider.vala
@@ +27,3 @@
             } catch (Boxes.Error error) {
                 warning (error.message);
+                if (error is Boxes.Error.INVALID)

fixed
Comment 10 Marc-Andre Lureau 2012-07-30 16:28:45 UTC
Review of attachment 219148 [details] [review]:

changed, although I am not convinced by any of these rules.. anyway.
Comment 11 Marc-Andre Lureau 2012-07-30 17:14:58 UTC
Attachment 219147 [details] pushed as 1fa5ae4 - Use explicit GetXML flag name, bump libvirt-glib dep
Attachment 219148 [details] pushed as 5499c36 - libvirt: allow changing machine name
Comment 12 Christophe Fergeau 2012-07-30 18:11:01 UTC
(In reply to comment #11)
> Attachment 219147 [details] pushed as 1fa5ae4 - Use explicit GetXML flag name, bump
> libvirt-glib dep

I agree with Zeeshan here that the 'bump libvirt-glib dep' is out of place in the one line summary and that the rest of the log could have been more descriptive.
Comment 13 Zeeshan Ali 2012-07-31 00:34:22 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > Attachment 219147 [details] [details] pushed as 1fa5ae4 - Use explicit GetXML flag name, bump
> > libvirt-glib dep
> 
> I agree with Zeeshan here that the 'bump libvirt-glib dep' is out of place in
> the one line summary and that the rest of the log could have been more
> descriptive.

For future reference: "accepted_commitnow" means that change itself is good but if I pointed out some mistake/issue in commit log, you need to correct that before pushing the commit.
Comment 14 Marc-Andre Lureau 2012-09-04 16:51:16 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
Comment 15 Christophe Fergeau 2012-09-05 10:00:10 UTC
Dunno if we also want a more direct way to do it (directly from the collection view, through f2 for example, and/or double click)