Update requirements
* Requirements and test requirements updated to match ones from openstack/requirements. * Clean-up pep8 errors that appeared after requirements update. Change-Id: Id9a01f83d0904d82a592492abad667f42e07389b
This commit is contained in:
parent
53733f8d2f
commit
75f656b4ba
@ -146,5 +146,5 @@ class Virsh(object):
|
||||
header="Found %s old domains to destroy" % (len(kill_domains)))
|
||||
for domain in sorted(kill_domains):
|
||||
self._destroy_domain(libvirt, ch, domain)
|
||||
except libvirt.libvirtError, e:
|
||||
except libvirt.libvirtError as e:
|
||||
LOG.warn("Could not clear out libvirt domains due to: %s", e)
|
||||
|
@ -64,7 +64,7 @@ class RabbitRuntime(rabbit.RabbitRuntime):
|
||||
# Seems like we need root perms to list that directory...
|
||||
for fn in sh.listdir(base_dir):
|
||||
if re.match("(.*?)(err|log)$", fn, re.I):
|
||||
sh.chmod(sh.joinpths(base_dir, fn), 0666)
|
||||
sh.chmod(sh.joinpths(base_dir, fn), 0o666)
|
||||
|
||||
def start(self):
|
||||
self._fix_log_dir()
|
||||
|
@ -312,7 +312,7 @@ def shellquote(text):
|
||||
|
||||
|
||||
def fileperms(path):
|
||||
return (os.stat(path).st_mode & 0777)
|
||||
return (os.stat(path).st_mode & 0o777)
|
||||
|
||||
|
||||
def listdir(path, recursive=False, dirs_only=False, files_only=False, filter_func=None):
|
||||
|
@ -389,7 +389,7 @@ class TestYamlRefLoader(unittest.TestCase):
|
||||
|
||||
processed = self.loader.load('sample2')
|
||||
|
||||
self.assertEquals(processed, {
|
||||
self.assertEqual(processed, {
|
||||
'stable': 10,
|
||||
'ref1': 9,
|
||||
'ref2': 11,
|
||||
|
@ -1,3 +1,19 @@
|
||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||
|
||||
# Copyright (C) 2013 Yahoo! Inc. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import unittest
|
||||
|
||||
from anvil import downloader
|
||||
@ -11,36 +27,36 @@ class TestGitDownloader(unittest.TestCase):
|
||||
|
||||
def test_constructor_basic(self):
|
||||
d = downloader.GitDownloader(self._uri, self._dst)
|
||||
self.assertEquals(d._uri, self._uri)
|
||||
self.assertEquals(d._dst, self._dst)
|
||||
self.assertEquals(d._branch, 'master')
|
||||
self.assertEquals(d._tag, None)
|
||||
self.assertEqual(d._uri, self._uri)
|
||||
self.assertEqual(d._dst, self._dst)
|
||||
self.assertEqual(d._branch, 'master')
|
||||
self.assertEqual(d._tag, None)
|
||||
|
||||
def test_constructor_branch(self):
|
||||
branch = 'stable/havana'
|
||||
d = downloader.GitDownloader(self._uri, self._dst,
|
||||
branch=branch)
|
||||
self.assertEquals(d._branch, branch)
|
||||
self.assertEquals(d._tag, None)
|
||||
self.assertEqual(d._branch, branch)
|
||||
self.assertEqual(d._tag, None)
|
||||
|
||||
def test_constructor_tag(self):
|
||||
tag = '1.0.6'
|
||||
d = downloader.GitDownloader(self._uri, self._dst,
|
||||
tag=tag)
|
||||
self.assertEquals(d._branch, 'master')
|
||||
self.assertEquals(d._tag, tag)
|
||||
self.assertEqual(d._branch, 'master')
|
||||
self.assertEqual(d._tag, tag)
|
||||
|
||||
def test_constructor_float_tag(self):
|
||||
tag = 2013.2
|
||||
d = downloader.GitDownloader(self._uri, self._dst,
|
||||
tag=tag)
|
||||
self.assertEquals(d._branch, 'master')
|
||||
self.assertEquals(d._tag, str(tag))
|
||||
self.assertEqual(d._branch, 'master')
|
||||
self.assertEqual(d._tag, str(tag))
|
||||
|
||||
def test_constructor_branch_and_tag(self):
|
||||
branch = 'stable/havana'
|
||||
tag = 2013.2
|
||||
d = downloader.GitDownloader(self._uri, self._dst,
|
||||
branch=branch, tag=tag)
|
||||
self.assertEquals(d._branch, branch)
|
||||
self.assertEquals(d._tag, str(tag))
|
||||
self.assertEqual(d._branch, branch)
|
||||
self.assertEqual(d._tag, str(tag))
|
||||
|
@ -1,3 +1,19 @@
|
||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||
|
||||
# Copyright (C) 2013 Yahoo! Inc. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import unittest
|
||||
|
||||
from anvil import exceptions
|
||||
|
@ -78,7 +78,7 @@ class TestAnvilConfigParser(unittest.TestCase):
|
||||
|
||||
# 7 global scope elements
|
||||
global_elements = self.config_parser.data._data.contents
|
||||
self.assertEquals(len(global_elements), 7)
|
||||
self.assertEqual(len(global_elements), 7)
|
||||
|
||||
def test_readfp_comments_one_section(self):
|
||||
ini = """
|
||||
@ -93,11 +93,11 @@ class TestAnvilConfigParser(unittest.TestCase):
|
||||
|
||||
# 3 global scope elements
|
||||
global_elements = self.config_parser.data._data.contents
|
||||
self.assertEquals(len(global_elements), 3)
|
||||
self.assertEqual(len(global_elements), 3)
|
||||
|
||||
# 6 lines in default section
|
||||
default_section = global_elements[1]
|
||||
self.assertEquals(len(default_section.contents), 6)
|
||||
self.assertEqual(len(default_section.contents), 6)
|
||||
|
||||
def test_readfp_comments_several_section(self):
|
||||
ini = """
|
||||
@ -114,15 +114,15 @@ class TestAnvilConfigParser(unittest.TestCase):
|
||||
|
||||
# 5 global scope elements
|
||||
global_elements = self.config_parser.data._data.contents
|
||||
self.assertEquals(len(global_elements), 5)
|
||||
self.assertEqual(len(global_elements), 5)
|
||||
|
||||
# 3 lines in default section
|
||||
default_section = global_elements[1]
|
||||
self.assertEquals(len(default_section.contents), 3)
|
||||
self.assertEqual(len(default_section.contents), 3)
|
||||
|
||||
# 4 lines in another section
|
||||
another_section = global_elements[3]
|
||||
self.assertEquals(len(another_section.contents), 4)
|
||||
self.assertEqual(len(another_section.contents), 4)
|
||||
|
||||
def test_readfp_no_sections(self):
|
||||
ini = """
|
||||
@ -136,7 +136,7 @@ class TestAnvilConfigParser(unittest.TestCase):
|
||||
|
||||
# 7 global scope elements
|
||||
global_elements = self.config_parser.data._data.contents
|
||||
self.assertEquals(len(global_elements), 7)
|
||||
self.assertEqual(len(global_elements), 7)
|
||||
|
||||
def test_readfp_with_global_comment(self):
|
||||
ini = """
|
||||
@ -154,15 +154,15 @@ option2 = value2
|
||||
|
||||
# 7 global scope elements
|
||||
global_elements = self.config_parser.data._data.contents
|
||||
self.assertEquals(len(global_elements), 7)
|
||||
self.assertEqual(len(global_elements), 7)
|
||||
|
||||
# 3 lines in default section
|
||||
default_section = global_elements[1]
|
||||
self.assertEquals(len(default_section.contents), 3)
|
||||
self.assertEqual(len(default_section.contents), 3)
|
||||
|
||||
# 3 lines in another section
|
||||
another_section = global_elements[5]
|
||||
self.assertEquals(len(another_section.contents), 3)
|
||||
self.assertEqual(len(another_section.contents), 3)
|
||||
|
||||
def test_set_one_option_simple(self):
|
||||
ini = """
|
||||
@ -181,7 +181,7 @@ option1 = True
|
||||
|
||||
output = StringIO.StringIO()
|
||||
self.config_parser.write(output)
|
||||
self.assertEquals(output.getvalue(), pattern)
|
||||
self.assertEqual(output.getvalue(), pattern)
|
||||
|
||||
def test_set_one_option_same_commented(self):
|
||||
ini = """
|
||||
@ -212,7 +212,7 @@ option1 = True
|
||||
|
||||
output = StringIO.StringIO()
|
||||
self.config_parser.write(output)
|
||||
self.assertEquals(output.getvalue(), pattern)
|
||||
self.assertEqual(output.getvalue(), pattern)
|
||||
|
||||
def test_set_one_option_non_existent(self):
|
||||
ini = """
|
||||
@ -231,7 +231,7 @@ option3 = False
|
||||
|
||||
output = StringIO.StringIO()
|
||||
self.config_parser.write(output)
|
||||
self.assertEquals(output.getvalue(), pattern)
|
||||
self.assertEqual(output.getvalue(), pattern)
|
||||
|
||||
def test_set_several_options_complex(self):
|
||||
ini = """
|
||||
@ -254,4 +254,4 @@ option2 = False
|
||||
|
||||
output = StringIO.StringIO()
|
||||
self.config_parser.write(output)
|
||||
self.assertEquals(output.getvalue(), pattern)
|
||||
self.assertEqual(output.getvalue(), pattern)
|
||||
|
@ -1,3 +1,19 @@
|
||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||
|
||||
# Copyright (C) 2013 Yahoo! Inc. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import unittest
|
||||
|
||||
from anvil import utils
|
||||
@ -9,4 +25,4 @@ class TestUtils(unittest.TestCase):
|
||||
text = utils.expand_template(text, {
|
||||
'v': 'blah',
|
||||
})
|
||||
self.assertEquals(text, "blah blah")
|
||||
self.assertEqual(text, "blah blah")
|
||||
|
@ -1,3 +1,19 @@
|
||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||
|
||||
# Copyright (C) 2013 Yahoo! Inc. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
@ -3,14 +3,12 @@ pbr>=0.5.21,<1.0
|
||||
argparse
|
||||
cheetah>=2.4.4
|
||||
iniparse
|
||||
iso8601>=0.1.4
|
||||
iso8601>=0.1.8
|
||||
keyring>=1.6.1,<2.0
|
||||
netifaces>=0.5
|
||||
ordereddict
|
||||
progressbar
|
||||
psutil
|
||||
pyyaml>=3.1.0
|
||||
# NOTE(imelnikov): required for nova, because pip-download is too
|
||||
# straightforward and yum is not too clever
|
||||
six<1.4
|
||||
psutil>=0.6.1,<1.0
|
||||
PyYAML>=3.1.0
|
||||
six>=1.4.1
|
||||
termcolor
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Install bounded pep8/pyflakes first, then let flake8 install
|
||||
pep8==1.4.5
|
||||
pyflakes==0.7.2
|
||||
pyflakes>=0.7.2,<0.7.4
|
||||
flake8==2.0
|
||||
pylint==0.25.2
|
||||
hacking>=0.5.3,<0.6
|
||||
mock
|
||||
hacking>=0.8.0,<0.9
|
||||
mock>=1.0
|
||||
|
Loading…
Reference in New Issue
Block a user