← Back to team overview

cloud-init-dev team mailing list archive

[Merge] lp:~harlowja/cloud-init/move-sigma-helper into lp:cloud-init

 

Joshua Harlow has proposed merging lp:~harlowja/cloud-init/move-sigma-helper into lp:cloud-init.

Requested reviews:
  cloud init development team (cloud-init-dev)

For more details, see:
https://code.launchpad.net/~harlowja/cloud-init/move-sigma-helper/+merge/208991

Move the cloudsigma datasource helper

Instead of keeping the cloudsigma datasource
utility/helper at the root cloud-init module
level put it alongside the other datasource
specific helpers instead.

-- 
https://code.launchpad.net/~harlowja/cloud-init/move-sigma-helper/+merge/208991
Your team cloud init development team is requested to review the proposed merge of lp:~harlowja/cloud-init/move-sigma-helper into lp:cloud-init.
=== modified file 'cloudinit/sources/DataSourceCloudSigma.py'
--- cloudinit/sources/DataSourceCloudSigma.py	2014-02-18 16:58:12 +0000
+++ cloudinit/sources/DataSourceCloudSigma.py	2014-03-03 03:43:27 +0000
@@ -19,7 +19,7 @@
 
 from cloudinit import log as logging
 from cloudinit import sources
-from cloudinit.cs_utils import Cepko
+from cloudinit.sources.helpers import cloudsigma
 
 LOG = logging.getLogger(__name__)
 
@@ -35,7 +35,7 @@
     """
     def __init__(self, sys_cfg, distro, paths):
         self.dsmode = 'local'
-        self.cepko = Cepko()
+        self.cepko = cloudsigma.Cepko()
         self.ssh_public_key = ''
         sources.DataSource.__init__(self, sys_cfg, distro, paths)
 

=== renamed file 'cloudinit/cs_utils.py' => 'cloudinit/sources/helpers/cloudsigma.py'
=== renamed file 'tests/unittests/test_cs_util.py' => 'tests/unittests/test_cs_helper.py'
--- tests/unittests/test_cs_util.py	2014-02-12 10:14:49 +0000
+++ tests/unittests/test_cs_helper.py	2014-03-03 03:43:27 +0000
@@ -1,6 +1,6 @@
 from mocker import MockerTestCase
 
-from cloudinit.cs_utils import Cepko
+from cloudinit.sources.helpers import cloudsigma
 
 
 SERVER_CONTEXT = {
@@ -18,7 +18,7 @@
 }
 
 
-class CepkoMock(Cepko):
+class CepkoMock(cloudsigma.Cepko):
     def all(self):
         return SERVER_CONTEXT
 
@@ -28,14 +28,15 @@
 
 class CepkoResultTests(MockerTestCase):
     def setUp(self):
-        self.mocked = self.mocker.replace("cloudinit.cs_utils.Cepko",
+        self.mocked = self.mocker.replace("cloudinit.sources.helpers"
+                                          ".cloudsigma.Cepko",
                             spec=CepkoMock,
                             count=False,
                             passthrough=False)
         self.mocked()
         self.mocker.result(CepkoMock())
         self.mocker.replay()
-        self.c = Cepko()
+        self.c = cloudsigma.Cepko()
 
     def test_getitem(self):
         result = self.c.all()

=== modified file 'tests/unittests/test_datasource/test_cloudsigma.py'
--- tests/unittests/test_datasource/test_cloudsigma.py	2014-02-12 10:14:49 +0000
+++ tests/unittests/test_datasource/test_cloudsigma.py	2014-03-03 03:43:27 +0000
@@ -1,7 +1,7 @@
 # coding: utf-8
 from unittest import TestCase
 
-from cloudinit.cs_utils import Cepko
+from cloudinit.sources.helpers import cloudsigma
 from cloudinit.sources import DataSourceCloudSigma
 
 
@@ -23,7 +23,7 @@
 }
 
 
-class CepkoMock(Cepko):
+class CepkoMock(cloudsigma.Cepko):
     result = SERVER_CONTEXT
 
     def all(self):


Follow ups