From alinefm at linux.vnet.ibm.com Mon May 4 14:56:45 2015 Content-Type: multipart/mixed; boundary="===============0923454405449021912==" MIME-Version: 1.0 From: Aline Manera To: kimchi-devel at ovirt.org Subject: Re: [Kimchi-devel] [PATCH 1/5] Create title tag Date: Mon, 04 May 2015 15:56:36 -0300 Message-ID: <5547C0E4.6050707@linux.vnet.ibm.com> In-Reply-To: 1430227002-19283-2-git-send-email-ramonn@linux.vnet.ibm.com --===============0923454405449021912== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 28/04/2015 10:16, Ramon Medeiros wrote: > Title tag will store name with special characters, while name will store > with ascii convertion, to keep compatibility with libvirt (that does not > accept unicode string on name tag). Just to make sure everyone is aware about the issue you can add to the = commit message the Fedora bug. As it is a Fedora bug due the systemd scope. (I mean, the issue is not = presented in the distros not using systemd scope AFAIU) > Signed-off-by: Ramon Medeiros > --- > src/kimchi/vmtemplate.py | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/kimchi/vmtemplate.py b/src/kimchi/vmtemplate.py > index ef97d83..972745f 100644 > --- a/src/kimchi/vmtemplate.py > +++ b/src/kimchi/vmtemplate.py > @@ -290,7 +290,8 @@ class VMTemplate(object): > > def to_vm_xml(self, vm_name, vm_uuid, **kwargs): > params =3D dict(self.info) > - params['name'] =3D vm_name > + params['name'] =3D unicode(vm_name.encode('utf-8'), errors=3D'ig= nore') > + params['title'] =3D vm_name > params['uuid'] =3D vm_uuid > params['networks'] =3D self._get_networks_xml() > params['input_output'] =3D self._get_input_output_xml() > @@ -320,6 +321,7 @@ class VMTemplate(object): > > %(qemu-stream-cmdline)s > %(name)s > + %(title)s > %(uuid)s > %(memory)s > %(cpus)s --===============0923454405449021912==--