[lxc-devel] [pylxd/master] Make architecture a string type

jpic on Github lxc-bot at linuxcontainers.org
Mon May 23 17:55:41 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 425 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160523/d0cdaddc/attachment.bin>
-------------- next part --------------
From 5322d4fe57efdd5867e6d6242cef2fbb8229ad97 Mon Sep 17 00:00:00 2001
From: jpic <jamespic at gmail.com>
Date: Thu, 19 May 2016 13:14:26 +0200
Subject: [PATCH] Make architecture a string type

Fixes:

    {u'type': u'error', u'error_code': 400, u'error': u'json: cannot unmarshal number into Go value of type string'}
---
 integration/test_containers.py | 2 +-
 integration/testing.py         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/integration/test_containers.py b/integration/test_containers.py
index d72d4fb..74ef376 100644
--- a/integration/test_containers.py
+++ b/integration/test_containers.py
@@ -40,7 +40,7 @@ def test_create(self):
         """Creates and returns a new container."""
         config = {
             'name': 'an-container',
-            'architecture': 2,
+            'architecture': '2',
             'profiles': ['default'],
             'ephemeral': True,
             'config': {'limits.cpu': '2'},
diff --git a/integration/testing.py b/integration/testing.py
index e6e3cfe..ba2d1da 100644
--- a/integration/testing.py
+++ b/integration/testing.py
@@ -37,7 +37,7 @@ def create_container(self):
         name = self.generate_object_name()
         machine = {
             'name': name,
-            'architecture': 2,
+            'architecture': '2',
             'profiles': ['default'],
             'ephemeral': False,
             'config': {'limits.cpu': '2'},


More information about the lxc-devel mailing list