From 5c4d221c34164d79004e88923d10ac45390f7dbf Mon Sep 17 00:00:00 2001 From: Hugo Trippaers Date: Mon, 17 Nov 2014 15:29:46 +0100 Subject: [PATCH] Let's stick to CamelCase for now --- .../patches/debian/config/opt/cloud/bin/configure.py | 2 +- .../debian/config/opt/cloud/bin/cs/CsDatabag.py | 4 ++-- .../debian/config/opt/cloud/bin/cs/CsGuestNetwork.py | 4 ++-- systemvm/patches/debian/config/opt/cloud/bin/merge.py | 10 +++++----- .../debian/config/opt/cloud/bin/update_config.py | 6 +++--- systemvm/test/python/TestCsAddress.py | 2 +- systemvm/test/python/TestCsApp.py | 2 +- systemvm/test/python/TestCsConfig.py | 2 +- systemvm/test/python/TestCsDatabag.py | 2 +- systemvm/test/python/TestCsDhcp.py | 2 +- systemvm/test/python/TestCsFile.py | 2 +- systemvm/test/python/TestCsGuestNetwork.py | 2 +- systemvm/test/python/TestCsHelper.py | 2 +- systemvm/test/python/TestCsNetfilter.py | 2 +- systemvm/test/python/TestCsProcess.py | 2 +- systemvm/test/python/TestCsRedundant.py | 2 +- systemvm/test/python/TestCsRoute.py | 2 +- systemvm/test/python/TestCsRule.py | 2 +- 18 files changed, 26 insertions(+), 26 deletions(-) diff --git a/systemvm/patches/debian/config/opt/cloud/bin/configure.py b/systemvm/patches/debian/config/opt/cloud/bin/configure.py index 4fac7e07694..6f3c755d46b 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/configure.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/configure.py @@ -19,7 +19,7 @@ import sys import os -from merge import dataBag +from merge import DataBag from pprint import pprint import subprocess import logging diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDatabag.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDatabag.py index 522bd956404..97f3075c665 100644 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDatabag.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDatabag.py @@ -15,14 +15,14 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -from merge import dataBag +from merge import DataBag class CsDataBag(object): def __init__(self, key, config=None): self.data = {} - self.db = dataBag() + self.db = DataBag() self.db.setKey(key) self.db.load() self.dbag = self.db.getDataBag() diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py index 60730a072d8..17d67487b46 100644 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py @@ -14,7 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -from merge import dataBag +from merge import DataBag import CsHelper @@ -22,7 +22,7 @@ class CsGuestNetwork: def __init__(self, device): self.data = {} self.guest = True - db = dataBag() + db = DataBag() db.setKey("guestnetwork") db.load() dbag = db.getDataBag() diff --git a/systemvm/patches/debian/config/opt/cloud/bin/merge.py b/systemvm/patches/debian/config/opt/cloud/bin/merge.py index 509ef61dc5a..f5ae3ef1ee8 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/merge.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/merge.py @@ -33,7 +33,7 @@ import cs_site2sitevpn from pprint import pprint -class dataBag: +class DataBag: DPATH = "/etc/cloudstack" @@ -84,7 +84,7 @@ class updateDataBag: self.process() def process(self): - self.db = dataBag() + self.db = DataBag() if (self.qFile.type == "staticnatrules" or self.qFile.type == "forwardrules"): self.db.setKey("forwardingrules") else: @@ -126,7 +126,7 @@ class updateDataBag: dp['gateway'] = d['router_guest_gateway'] dp['nic_dev_id'] = d['device'][3] dp['nw_type'] = 'guest' - qf = loadQueueFile() + qf = QueueFile() qf.load({'ip_address': [dp], 'type': 'ips'}) if 'domain_name' not in d.keys() or d['domain_name'] == '': d['domain_name'] = "cloudnine.internal" @@ -181,7 +181,7 @@ class updateDataBag: dp['gateway'] = 'None' dp['nic_dev_id'] = num dp['nw_type'] = nw_type - qf = loadQueueFile() + qf = QueueFile() qf.load({'ip_address': [dp], 'type': 'ips'}) def processVmData(self, dbag): @@ -189,7 +189,7 @@ class updateDataBag: return dbag -class loadQueueFile: +class QueueFile: fileName = '' configCache = "/var/cache/cloud" diff --git a/systemvm/patches/debian/config/opt/cloud/bin/update_config.py b/systemvm/patches/debian/config/opt/cloud/bin/update_config.py index 283df6581f3..b3fb68d1a28 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/update_config.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/update_config.py @@ -17,7 +17,7 @@ # under the License. import sys -from merge import loadQueueFile +from merge import QueueFile import logging import subprocess from subprocess import PIPE, STDOUT @@ -41,11 +41,11 @@ if not (os.path.isfile(filePath) and os.access(filePath, os.R_OK)): # If the command line json file is unprocessed process it # This is important or, the control interfaces will get deleted! if os.path.isfile("filePath/%s" % "cmd_line.json"): - qf = loadQueueFile() + qf = QueueFile() qf.setFile("cmd_line.json") qf.load(None) -qf = loadQueueFile() +qf = QueueFile() qf.setFile(sys.argv[1]) qf.load(None) diff --git a/systemvm/test/python/TestCsAddress.py b/systemvm/test/python/TestCsAddress.py index f4430aeaa55..066eb87886f 100644 --- a/systemvm/test/python/TestCsAddress.py +++ b/systemvm/test/python/TestCsAddress.py @@ -6,7 +6,7 @@ import merge class TestCsAddress(unittest.TestCase): def setUp(self): - merge.dataBag.DPATH = "." + merge.DataBag.DPATH = "." def test_needs_vrrp(self): csaddress = CsAddress("ips", {}) diff --git a/systemvm/test/python/TestCsApp.py b/systemvm/test/python/TestCsApp.py index 0c982e87c48..14308e6a309 100644 --- a/systemvm/test/python/TestCsApp.py +++ b/systemvm/test/python/TestCsApp.py @@ -8,7 +8,7 @@ import merge class TestCsApp(unittest.TestCase): def setUp(self): - merge.dataBag.DPATH = "." + merge.DataBag.DPATH = "." def test_init(self): csconfig = CsConfig() diff --git a/systemvm/test/python/TestCsConfig.py b/systemvm/test/python/TestCsConfig.py index 0ec5e364e05..1c0a75135c4 100644 --- a/systemvm/test/python/TestCsConfig.py +++ b/systemvm/test/python/TestCsConfig.py @@ -6,7 +6,7 @@ import merge class TestCsConfig(unittest.TestCase): def setUp(self): - merge.dataBag.DPATH = "." + merge.DataBag.DPATH = "." def test_ini(self): csconfig = CsConfig(False) diff --git a/systemvm/test/python/TestCsDatabag.py b/systemvm/test/python/TestCsDatabag.py index 2135367e83a..5d16ea978c6 100644 --- a/systemvm/test/python/TestCsDatabag.py +++ b/systemvm/test/python/TestCsDatabag.py @@ -6,7 +6,7 @@ import merge class TestCsDatabag(unittest.TestCase): def setUp(self): - merge.dataBag.DPATH = "." + merge.DataBag.DPATH = "." def test_init(self): csdatabag = CsDataBag("koffie") diff --git a/systemvm/test/python/TestCsDhcp.py b/systemvm/test/python/TestCsDhcp.py index 572c90dd2a3..fbe5000f91a 100644 --- a/systemvm/test/python/TestCsDhcp.py +++ b/systemvm/test/python/TestCsDhcp.py @@ -8,7 +8,7 @@ import merge class TestCsDhcp(unittest.TestCase): def setUp(self): - merge.dataBag.DPATH = "." + merge.DataBag.DPATH = "." @mock.patch('cs.CsDhcp.CsHelper') @mock.patch('cs.CsDhcp.CsDnsMasq') diff --git a/systemvm/test/python/TestCsFile.py b/systemvm/test/python/TestCsFile.py index 83e4eff6660..eb2ea704b77 100644 --- a/systemvm/test/python/TestCsFile.py +++ b/systemvm/test/python/TestCsFile.py @@ -6,7 +6,7 @@ import merge class TestCsFile(unittest.TestCase): def setUp(self): - merge.dataBag.DPATH = "." + merge.DataBag.DPATH = "." def test_init(self): csfile = CsFile("testfile") diff --git a/systemvm/test/python/TestCsGuestNetwork.py b/systemvm/test/python/TestCsGuestNetwork.py index 8a0982e32a1..38f403e2093 100644 --- a/systemvm/test/python/TestCsGuestNetwork.py +++ b/systemvm/test/python/TestCsGuestNetwork.py @@ -6,7 +6,7 @@ import merge class TestCsGuestNetwork(unittest.TestCase): def setUp(self): - merge.dataBag.DPATH = "." + merge.DataBag.DPATH = "." def test_init(self): csguestnetwork = CsGuestNetwork({}) diff --git a/systemvm/test/python/TestCsHelper.py b/systemvm/test/python/TestCsHelper.py index 346a0dce46e..57f5d139682 100644 --- a/systemvm/test/python/TestCsHelper.py +++ b/systemvm/test/python/TestCsHelper.py @@ -7,7 +7,7 @@ import merge class TestCsHelper(unittest.TestCase): def setUp(self): - merge.dataBag.DPATH = "." + merge.DataBag.DPATH = "." @mock.patch('cs.CsHelper.subprocess') def test_execute(self, mock_subprocess): diff --git a/systemvm/test/python/TestCsNetfilter.py b/systemvm/test/python/TestCsNetfilter.py index 63d63905262..9a6846c2e8b 100644 --- a/systemvm/test/python/TestCsNetfilter.py +++ b/systemvm/test/python/TestCsNetfilter.py @@ -6,7 +6,7 @@ import merge class TestCsNetfilter(unittest.TestCase): def setUp(self): - merge.dataBag.DPATH = "." + merge.DataBag.DPATH = "." def test_init(self): csnetfilter = CsNetfilter() diff --git a/systemvm/test/python/TestCsProcess.py b/systemvm/test/python/TestCsProcess.py index d236f443b9d..2b701c7c390 100644 --- a/systemvm/test/python/TestCsProcess.py +++ b/systemvm/test/python/TestCsProcess.py @@ -6,7 +6,7 @@ import merge class TestCsProcess(unittest.TestCase): def setUp(self): - merge.dataBag.DPATH = "." + merge.DataBag.DPATH = "." def test_init(self): csprocess = CsProcess({}) diff --git a/systemvm/test/python/TestCsRedundant.py b/systemvm/test/python/TestCsRedundant.py index f5ec1b19a8f..77e542a215c 100644 --- a/systemvm/test/python/TestCsRedundant.py +++ b/systemvm/test/python/TestCsRedundant.py @@ -7,7 +7,7 @@ import merge class TestCsRedundant(unittest.TestCase): def setUp(self): - merge.dataBag.DPATH = "." + merge.DataBag.DPATH = "." def test_init(self): csconfig = CsConfig() diff --git a/systemvm/test/python/TestCsRoute.py b/systemvm/test/python/TestCsRoute.py index 4c65129456b..c422402b03c 100644 --- a/systemvm/test/python/TestCsRoute.py +++ b/systemvm/test/python/TestCsRoute.py @@ -6,7 +6,7 @@ import merge class TestCsRoute(unittest.TestCase): def setUp(self): - merge.dataBag.DPATH = "." + merge.DataBag.DPATH = "." def test_init(self): csroute = CsRoute(["one","two","three","four"]) diff --git a/systemvm/test/python/TestCsRule.py b/systemvm/test/python/TestCsRule.py index e6a22fa5269..b84896d5b9c 100644 --- a/systemvm/test/python/TestCsRule.py +++ b/systemvm/test/python/TestCsRule.py @@ -6,7 +6,7 @@ import merge class TestCsRule(unittest.TestCase): def setUp(self): - merge.dataBag.DPATH = "." + merge.DataBag.DPATH = "." def test_init(self): csrule = CsRule(["one", "two", "three", "four"])