You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2013/04/25 07:52:05 UTC
svn commit: r1475640 - in /libcloud/branches/0.12.x: ./ CHANGES
libcloud/compute/deployment.py libcloud/test/compute/test_deployment.py
Author: tomaz
Date: Thu Apr 25 05:52:05 2013
New Revision: 1475640
URL: http://svn.apache.org/r1475640
Log:
Backport commit from trunk.
Modified:
libcloud/branches/0.12.x/ (props changed)
libcloud/branches/0.12.x/CHANGES
libcloud/branches/0.12.x/libcloud/compute/deployment.py
libcloud/branches/0.12.x/libcloud/test/compute/test_deployment.py
Propchange: libcloud/branches/0.12.x/
------------------------------------------------------------------------------
Merged /libcloud/trunk:r1471675
Modified: libcloud/branches/0.12.x/CHANGES
URL: http://svn.apache.org/viewvc/libcloud/branches/0.12.x/CHANGES?rev=1475640&r1=1475639&r2=1475640&view=diff
==============================================================================
--- libcloud/branches/0.12.x/CHANGES (original)
+++ libcloud/branches/0.12.x/CHANGES Thu Apr 25 05:52:05 2013
@@ -10,6 +10,14 @@ Changes with Apache Libcloud in deveplom
- Add ex_start_node method to the Joyent driver. (LIBCLOUD-319)
[rszabo50]
+ - Fix Python 3 compatibility issue in the ScriptFileDeployment class.
+ (LIBCLOUD-321)
+ [Arfrever Frehtes Taifersar Arahesis]
+
+ *) Load Balancer
+
+ - Add ex_list_current_usage method to the Rackspace driver.
+
Changes with Apache Libcloud 0.12.4:
*) Compute
Modified: libcloud/branches/0.12.x/libcloud/compute/deployment.py
URL: http://svn.apache.org/viewvc/libcloud/branches/0.12.x/libcloud/compute/deployment.py?rev=1475640&r1=1475639&r2=1475640&view=diff
==============================================================================
--- libcloud/branches/0.12.x/libcloud/compute/deployment.py (original)
+++ libcloud/branches/0.12.x/libcloud/compute/deployment.py Thu Apr 25 05:52:05 2013
@@ -22,7 +22,7 @@ from __future__ import with_statement
import os
import binascii
-from libcloud.utils.py3 import basestring
+from libcloud.utils.py3 import basestring, PY3
class Deployment(object):
@@ -188,6 +188,9 @@ class ScriptFileDeployment(ScriptDeploym
with open(script_file, 'rb') as fp:
content = fp.read()
+ if PY3:
+ content = content.decode('utf-8')
+
super(ScriptFileDeployment, self).__init__(script=content,
name=name,
delete=delete)
Modified: libcloud/branches/0.12.x/libcloud/test/compute/test_deployment.py
URL: http://svn.apache.org/viewvc/libcloud/branches/0.12.x/libcloud/test/compute/test_deployment.py?rev=1475640&r1=1475639&r2=1475640&view=diff
==============================================================================
--- libcloud/branches/0.12.x/libcloud/test/compute/test_deployment.py (original)
+++ libcloud/branches/0.12.x/libcloud/test/compute/test_deployment.py Thu Apr 25 05:52:05 2013
@@ -23,7 +23,7 @@ import unittest
from libcloud.utils.py3 import httplib
from libcloud.utils.py3 import u
-from libcloud.utils.py3 import PY32
+from libcloud.utils.py3 import PY3
from libcloud.compute.deployment import MultiStepDeployment, Deployment
from libcloud.compute.deployment import SSHKeyDeployment, ScriptDeployment
@@ -115,14 +115,13 @@ class DeploymentTests(unittest.TestCase)
client=MockClient(hostname='localhost')))
def test_script_file_deployment(self):
- # TODO: Fix 3.2 compatibility
- if PY32:
- return
-
file_path = os.path.abspath(__file__)
with open(file_path, 'rb') as fp:
content = fp.read()
+ if PY3:
+ content = content.decode('utf-8')
+
sfd1 = ScriptFileDeployment(script_file=file_path)
self.assertEqual(sfd1.script, content)