From 5cccca9efc054d0f07c055801b4277f83c5f4b12 Mon Sep 17 00:00:00 2001 From: Kevin McDonald Date: Thu, 25 Jun 2015 14:43:36 -0500 Subject: [PATCH 1/3] Resolves unicode issues with image listing --- SoftLayer/CLI/formatting.py | 2 +- SoftLayer/tests/CLI/helper_tests.py | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/SoftLayer/CLI/formatting.py b/SoftLayer/CLI/formatting.py index 4f10980de..6f35a9855 100644 --- a/SoftLayer/CLI/formatting.py +++ b/SoftLayer/CLI/formatting.py @@ -50,7 +50,7 @@ def format_output(data, fmt='table'): # pylint: disable=R0911,R0912 # responds to .formatted if hasattr(data, 'formatted'): if fmt == 'table': - return str(data.formatted) + return data.formatted # responds to .separator if hasattr(data, 'separator'): diff --git a/SoftLayer/tests/CLI/helper_tests.py b/SoftLayer/tests/CLI/helper_tests.py index 7862ef008..873d58a89 100644 --- a/SoftLayer/tests/CLI/helper_tests.py +++ b/SoftLayer/tests/CLI/helper_tests.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ SoftLayer.tests.CLI.helper_tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -357,6 +358,17 @@ def test_format_output_python_keyvaluetable(self): ret = formatting.format_output(t, 'python') self.assertEqual({'nothing': None}, ret) + def test_format_output_unicode(self): + t = formatting.format_output('☃', 'raw') + self.assertEqual('☃', t) + + item = formatting.FormattedItem('raw ☃', '☃') + t = formatting.format_output(item) + self.assertEqual('☃', t) + + t = formatting.format_output(item, 'raw') + self.assertEqual('raw ☃', t) + class TestTemplateArgs(testing.TestCase): From 737e58d9b4f40fe371a59635fe71b93717790c63 Mon Sep 17 00:00:00 2001 From: Peter Parente Date: Mon, 29 Jun 2015 22:17:59 -0400 Subject: [PATCH 2/3] Remove userData from mask --- SoftLayer/managers/vs.py | 1 - 1 file changed, 1 deletion(-) diff --git a/SoftLayer/managers/vs.py b/SoftLayer/managers/vs.py index ebd523f45..30de90b35 100644 --- a/SoftLayer/managers/vs.py +++ b/SoftLayer/managers/vs.py @@ -191,7 +191,6 @@ def get_instance(self, instance_id, **kwargs): 'blockDevices', 'blockDeviceTemplateGroup[id, name, globalIdentifier]', 'postInstallScriptUri', - 'userData', '''operatingSystem[passwords[username,password], softwareLicense.softwareDescription[ manufacturer,name,version, From 5012de4550ddd0b6392d686fc19596af9d3e8dbd Mon Sep 17 00:00:00 2001 From: Kevin McDonald Date: Tue, 30 Jun 2015 09:00:43 -0500 Subject: [PATCH 3/3] Version Bump to v4.0.4 --- CHANGELOG | 6 ++++++ SoftLayer/consts.py | 2 +- docs/conf.py | 4 ++-- setup.py | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 3397760f9..e5e1b8adf 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +4.0.4 + + * Fixes bug with pulling the userData property for the virtual server detail + + * Fixes a class of bugs invloving unicode from the API + 4.0.3 * Fixes bug with `slcli vs ready` command diff --git a/SoftLayer/consts.py b/SoftLayer/consts.py index 674f04608..0279225c5 100644 --- a/SoftLayer/consts.py +++ b/SoftLayer/consts.py @@ -5,7 +5,7 @@ :license: MIT, see LICENSE for more details. """ -VERSION = 'v4.0.3' +VERSION = 'v4.0.4' API_PUBLIC_ENDPOINT = 'https://api.softlayer.com/xmlrpc/v3.1/' API_PRIVATE_ENDPOINT = 'https://api.service.softlayer.com/xmlrpc/v3.1/' API_PUBLIC_ENDPOINT_REST = 'https://api.softlayer.com/rest/v3.1/' diff --git a/docs/conf.py b/docs/conf.py index 0472001bc..8f480496c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -55,9 +55,9 @@ # built documents. # # The short X.Y version. -version = '4.0.3' +version = '4.0.4' # The full version, including alpha/beta/rc tags. -release = '4.0.3' +release = '4.0.4' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.py b/setup.py index 88132dbe8..3f329b77b 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ setup( name='SoftLayer', - version='4.0.3', + version='4.0.4', description=DESCRIPTION, long_description=LONG_DESCRIPTION, author='SoftLayer Technologies, Inc.',