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

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

 



On Thu, Jan 05, 2017 at 05:25:09PM +0100, Alexey Slaykovsky wrote:
> Signed-off-by: Alexey Slaykovsky <aslaikov@xxxxxxxxxx>
> ---
>  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/ :|

--
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]
  Powered by Linux