[libvirt] [PATCH go-xml] Added Storage Pool and Storage Volume XML schemes.
Daniel P. Berrange
berrange at redhat.com
Tue Jan 10 13:48:31 UTC 2017
On Mon, Jan 09, 2017 at 08:15:21AM +0100, Alexey Slaykovsky wrote:
> Signed-off-by: Alexey Slaykovsky <aslaikov at redhat.com>
> ---
> storage_encryption.go | 50 ++++++++++
> storage_pool.go | 121 +++++++++++++++++++++++++
> storage_pool_test.go | 240 ++++++++++++++++++++++++++++++++++++++++++++++++
> storage_vol.go | 83 +++++++++++++++++
> storage_vol_test.go | 246 ++++++++++++++++++++++++++++++++++++++++++++++++++
> 5 files changed, 740 insertions(+)
> create mode 100644 storage_encryption.go
> create mode 100644 storage_pool.go
> create mode 100644 storage_pool_test.go
> create mode 100644 storage_vol.go
> create mode 100644 storage_vol_test.go
>
> +type StoragePool struct {
> + XMLName xml.Name `xml:"pool"`
> + Type string `xml:"type,attr"`
> + Name string `xml:"name"`
> + UUID string `xml:"uuid,omitempty"`
> + Allocation uint64 `xml:"allocation,omitempty"`
> + Capacity uint64 `xml:"capacity,omitempty"`
> + Available uint64 `xml:"available,omitempty"`
These should support units too, as with storage vols.
> + Target *StoragePoolTarget `xml:"target"`
> + Source *StoragePoolSource `xml:"source"`
> +}
> +
> +type StorageVolumeMemory struct {
s/Memory/Size/
> + Unit string `xml:"unit,attr,omitempty"`
> + Value uint64 `xml:",chardata"`
> +}
I've pushed this with the changes mentioned above.
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/ :|
More information about the libvir-list
mailing list