Re: [libvirt] [PATCH 4/6] Allow a timezone to be specified instead of sync to host timezone

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

 



On Mon, Mar 01, 2010 at 10:59:27PM +0100, Daniel Veillard wrote:
> On Mon, Mar 01, 2010 at 06:45:28PM +0000, Daniel P. Berrange wrote:
> > On Mon, Mar 01, 2010 at 03:14:48PM +0100, Daniel Veillard wrote:
> > > On Thu, Feb 18, 2010 at 05:54:30PM +0000, Daniel P. Berrange wrote:
> > > > This extends the XML to allow for
> > > > 
> > > >   <clock offset='timezone' timezone='Europe/Paris'/>
> > > > 
> > > > This is useful if the admin has not configured any timezone on the
> > > > host OS, but still wants to synchronize a guest to a specific one.
> > > > 
> > > > * src/conf/domain_conf.h, src/conf/domain_conf.c: Support extra
> > > >   'timezone' attribute on clock configuration
> > > > * docs/schemas/domain.rng: Add 'timezone' attribute
> > > > * src/xen/xend_internal.c, src/xen/xm_internal.c: Reject configs
> > > >   with a configurable timezone
> > > > ---
> > > >  docs/schemas/domain.rng |   18 +++++++++++++++---
> > > >  src/conf/domain_conf.c  |   24 ++++++++++++++++++++----
> > > >  src/conf/domain_conf.h  |   13 ++++++++++---
> > > >  src/qemu/qemu_conf.c    |    2 +-
> > > >  src/xen/xend_internal.c |   10 ++++++++--
> > > >  src/xen/xm_internal.c   |   17 ++++++++++++-----
> > > >  6 files changed, 66 insertions(+), 18 deletions(-)
> > > > 
> > > > diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
> > > > index d295bfe..4a36a97 100644
> > > > --- a/docs/schemas/domain.rng
> > > > +++ b/docs/schemas/domain.rng
> > > > @@ -298,9 +298,16 @@
> > > >      <optional>
> > > >        <element name="clock">
> > > >  	<choice>
> > > > -          <attribute name="offset">
> > > > -            <value>localtime</value>
> > > > -	  </attribute>
> > > > +	  <group>
> > > > +            <attribute name="offset">
> > > > +              <value>localtime</value>
> > > > +	    </attribute>
> > > > +	    <optional>
> > > > +	      <attribute name="timezone">
> > > > +		<ref name="timeZone"/>
> > > > +	      </attribute>
> > > > +	    </optional>
> > > > +	  </group>
> > > >            <attribute name="offset">
> > > >              <value>utc</value>
> > > >  	  </attribute>
> > > > @@ -1584,4 +1591,9 @@
> > > >        <param name="pattern">(-|\+)?[0-9]+</param>
> > > >      </data>
> > > >    </define>
> > > > +  <define name="timeZone">
> > > > +    <data type="string">
> > > > +      <param name="pattern">[a-zA-Z0-9_\.\+\-/]+</param>
> > > 
> > >   Hum ... I wonder if we should not add ':' as it's used for POSIX TZ
> > 
> > How is it used ?  I looked at /usr/share/zoneinfo and all the files
> > there should be matched by this regex ok without needing ':'
> 
>   I looked there
>     http://www.gnu.org/s/libc/manual/html_node/TZ-Variable.html
> seems that the offset allows for : separator for minutes/seconds
> I'm sure there is at least some places not aligned on hourly boundaries :)
> But honnestly it's not a big deal !

Well I've pushed the whole series, but we can add a patchto allow ':' in
the regex. The actual parser code doesn't validate this strictly anyway

Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.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]