[libvirt] [PATCH go-xml] Added Storage Pool XML scheme.

Aleksei Slaikovskii aslaikov at redhat.com
Thu Jan 5 17:07:30 UTC 2017


Will add omitempty, thank you.

Also I will add there storage volume.

Thank you!

On Thu, Jan 5, 2017 at 5:48 PM, Daniel P. Berrange <berrange at redhat.com>
wrote:

> On Thu, Jan 05, 2017 at 05:25:09PM +0100, Alexey Slaykovsky wrote:
> > Signed-off-by: Alexey Slaykovsky <aslaikov at redhat.com>
> > ---
> >  storage.go      | 114 +++++++++++++++++++++++++++
> >  storage_test.go | 240 ++++++++++++++++++++++++++++++
> ++++++++++++++++++++++++++
> >  2 files changed, 354 insertions(+)
> >  create mode 100644 storage.go
> >  create mode 100644 storage_test.go
> >
> > diff --git a/storage.go b/storage.go
> > new file mode 100644
> > index 0000000..b45f58e
> > --- /dev/null
> > +++ b/storage.go
> > @@ -0,0 +1,114 @@
> > +/*
> > + * This file is part of the libvirt-go-xml project
> > + *
> > + * Permission is hereby granted, free of charge, to any person
> obtaining a copy
> > + * of this software and associated documentation files (the
> "Software"), to deal
> > + * in the Software without restriction, including without limitation
> the rights
> > + * to use, copy, modify, merge, publish, distribute, sublicense, and/or
> sell
> > + * copies of the Software, and to permit persons to whom the Software is
> > + * furnished to do so, subject to the following conditions:
> > + *
> > + * The above copyright notice and this permission notice shall be
> included in
> > + * all copies or substantial portions of the Software.
> > + *
> > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR
> > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY,
> > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
> SHALL THE
> > + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> OTHER
> > + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> ARISING FROM,
> > + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> DEALINGS IN
> > + * THE SOFTWARE.
> > + *
> > + * Copyright (C) 2017 Red Hat, Inc.
> > + *
> > + */
> > +
> > +package libvirtxml
> > +
> > +import "encoding/xml"
> > +
> > +type StoragePoolTargetPermissions struct {
> > +     Owner string `xml:"owner"`
> > +     Group string `xml:"group"`
> > +     Mode  string `xml:"mode"`
> > +     Label string `xml:"label"`
>
> We need omitempty on all of these, since it is valid to leave any
> of them unset when defining a new storage pool.
>
> The rest of it looks good though.
>
> Regards,
> Daniel
> --
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/
> :|
> |: http://libvirt.org              -o-             http://virt-manager.org
> :|
> |: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/
> :|
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170105/0bfd0758/attachment-0001.htm>


More information about the libvir-list mailing list