[lxc-devel] [lxd/master] Project limits

freeekanayaka on Github lxc-bot at linuxcontainers.org
Mon Feb 24 12:28:35 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 361 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200224/fc43dc4d/attachment.bin>
-------------- next part --------------
From 7c3c6a8c7b4cfb83d1441ee19ac26ec659d59504 Mon Sep 17 00:00:00 2001
From: Free Ekanayaka <free.ekanayaka at canonical.com>
Date: Mon, 24 Feb 2020 12:26:11 +0000
Subject: [PATCH] Use project.Config as etag field, without specifiying
 individual keys.

Signed-off-by: Free Ekanayaka <free.ekanayaka at canonical.com>
---
 lxd/api_project.go | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/lxd/api_project.go b/lxd/api_project.go
index 30633beaed..4d6915bc64 100644
--- a/lxd/api_project.go
+++ b/lxd/api_project.go
@@ -204,8 +204,7 @@ func projectGet(d *Daemon, r *http.Request) response.Response {
 
 	etag := []interface{}{
 		project.Description,
-		project.Config["features.images"],
-		project.Config["features.profiles"],
+		project.Config,
 	}
 
 	return response.SyncResponseETag(true, project, etag)
@@ -233,8 +232,7 @@ func projectPut(d *Daemon, r *http.Request) response.Response {
 	// Validate ETag
 	etag := []interface{}{
 		project.Description,
-		project.Config["features.images"],
-		project.Config["features.profiles"],
+		project.Config,
 	}
 	err = util.EtagCheck(r, etag)
 	if err != nil {
@@ -274,8 +272,7 @@ func projectPatch(d *Daemon, r *http.Request) response.Response {
 	// Validate ETag
 	etag := []interface{}{
 		project.Description,
-		project.Config["features.images"],
-		project.Config["features.profiles"],
+		project.Config,
 	}
 	err = util.EtagCheck(r, etag)
 	if err != nil {


More information about the lxc-devel mailing list