[lxc-devel] [lxd/master] Bugfixes
stgraber on Github
lxc-bot at linuxcontainers.org
Fri Mar 17 23:18:45 UTC 2017
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 301 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170317/f2971d59/attachment.bin>
-------------- next part --------------
From 5a534c56aeb7f8a04b99add88fbbf1a08e52b917 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Fri, 17 Mar 2017 16:27:44 +0100
Subject: [PATCH 1/3] api: Update storage.go to cover POST too
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
shared/api/storage.go | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/shared/api/storage.go b/shared/api/storage.go
index fbb8b99..fac6d85 100644
--- a/shared/api/storage.go
+++ b/shared/api/storage.go
@@ -1,5 +1,15 @@
package api
+// StoragePoolsPost represents the fields of a new LXD storage pool
+//
+// API extension: storage
+type StoragePoolsPost struct {
+ StoragePoolPut `yaml:",inline"`
+
+ Name string `json:"name" yaml:"name"`
+ Driver string `json:"driver" yaml:"driver"`
+}
+
// StoragePool represents the fields of a LXD storage pool.
//
// API extension: storage
@@ -18,12 +28,23 @@ type StoragePoolPut struct {
Config map[string]string `json:"config" yaml:"config"`
}
+// StorageVolumesPost represents the fields of a new LXD storage pool volume
+//
+// API extension: storage
+type StorageVolumesPost struct {
+ StorageVolumePut `yaml:",inline"`
+
+ Name string `json:"name" yaml:"name"`
+ Type string `json:"type" yaml:"type"`
+}
+
// StorageVolume represents the fields of a LXD storage volume.
//
// API extension: storage
type StorageVolume struct {
StorageVolumePut `yaml:",inline"`
+ Name string `json:"name" yaml:"name"`
Type string `json:"type" yaml:"type"`
UsedBy []string `json:"used_by" yaml:"used_by"`
}
@@ -32,7 +53,6 @@ type StorageVolume struct {
//
// API extension: storage
type StorageVolumePut struct {
- Name string `json:"name" yaml:"name"`
Config map[string]string `json:"config" yaml:"config"`
}
From 81ef0d62e123ffad519cd5cbff73a6ae3228341c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Fri, 17 Mar 2017 16:40:01 +0100
Subject: [PATCH 2/3] storage: Fix container_lxc to match shared/api
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
lxd/container_lxc.go | 1 -
1 file changed, 1 deletion(-)
diff --git a/lxd/container_lxc.go b/lxd/container_lxc.go
index 4299395..44f3474 100644
--- a/lxd/container_lxc.go
+++ b/lxd/container_lxc.go
@@ -2837,7 +2837,6 @@ func (c *containerLXC) Rename(newName string) error {
// Update the storage volume name in the storage interface.
sNew := c.storage.GetStoragePoolVolumeWritable()
- sNew.Name = newName
c.storage.SetStoragePoolVolumeWritable(&sNew)
// Invalidate the go-lxc cache
From a15ae9d781d18d1bafac35f5cc06f1aa9a13cf6d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Fri, 17 Mar 2017 16:56:53 +0100
Subject: [PATCH 3/3] tests: Fix btrfs detection code
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
test/suites/storage_profiles.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/suites/storage_profiles.sh b/test/suites/storage_profiles.sh
index 8e746af..9631b80 100644
--- a/test/suites/storage_profiles.sh
+++ b/test/suites/storage_profiles.sh
@@ -17,7 +17,7 @@ test_storage_profiles() {
fi
HAS_BTRFS="dir"
- if which zfs >/dev/null 2>&1; then
+ if which btrfs >/dev/null 2>&1; then
HAS_BTRFS="btrfs"
fi
More information about the lxc-devel
mailing list