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/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/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/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, 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): 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.',