Fix a series of typos
There are some typos in the source codes Change-Id: Id31deb19a277340cbf4d66111c55582e0879bdb5
This commit is contained in:
parent
f1a8fb44b9
commit
67a1bc198b
compute-clone-neat.pycompute-copy-conf.pycompute-data-collector-start.pycompute-data-collector-status.pycompute-data-collector-stop.pycompute-install-deps.pycompute-install-neat.pycompute-local-manager-start.pycompute-local-manager-status.pycompute-local-manager-stop.pycompute-sync-time.py
neat
tests
vm-placement.py@ -17,7 +17,7 @@
|
||||
from neat.config import *
|
||||
import neat.common as common
|
||||
|
||||
config = read_and_validate_config([DEFAILT_CONFIG_PATH, CONFIG_PATH],
|
||||
config = read_and_validate_config([DEFAULT_CONFIG_PATH, CONFIG_PATH],
|
||||
REQUIRED_FIELDS)
|
||||
compute_hosts = common.parse_compute_hosts(config['compute_hosts'])
|
||||
|
||||
|
@ -20,7 +20,7 @@ from neat.config import *
|
||||
import neat.common as common
|
||||
|
||||
|
||||
config = read_and_validate_config([DEFAILT_CONFIG_PATH, CONFIG_PATH],
|
||||
config = read_and_validate_config([DEFAULT_CONFIG_PATH, CONFIG_PATH],
|
||||
REQUIRED_FIELDS)
|
||||
compute_hosts = common.parse_compute_hosts(config['compute_hosts'])
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
from neat.config import *
|
||||
import neat.common as common
|
||||
|
||||
config = read_and_validate_config([DEFAILT_CONFIG_PATH, CONFIG_PATH],
|
||||
config = read_and_validate_config([DEFAULT_CONFIG_PATH, CONFIG_PATH],
|
||||
REQUIRED_FIELDS)
|
||||
compute_hosts = common.parse_compute_hosts(config['compute_hosts'])
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
from neat.config import *
|
||||
import neat.common as common
|
||||
|
||||
config = read_and_validate_config([DEFAILT_CONFIG_PATH, CONFIG_PATH],
|
||||
config = read_and_validate_config([DEFAULT_CONFIG_PATH, CONFIG_PATH],
|
||||
REQUIRED_FIELDS)
|
||||
compute_hosts = common.parse_compute_hosts(config['compute_hosts'])
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
from neat.config import *
|
||||
import neat.common as common
|
||||
|
||||
config = read_and_validate_config([DEFAILT_CONFIG_PATH, CONFIG_PATH],
|
||||
config = read_and_validate_config([DEFAULT_CONFIG_PATH, CONFIG_PATH],
|
||||
REQUIRED_FIELDS)
|
||||
compute_hosts = common.parse_compute_hosts(config['compute_hosts'])
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
from neat.config import *
|
||||
import neat.common as common
|
||||
|
||||
config = read_and_validate_config([DEFAILT_CONFIG_PATH, CONFIG_PATH],
|
||||
config = read_and_validate_config([DEFAULT_CONFIG_PATH, CONFIG_PATH],
|
||||
REQUIRED_FIELDS)
|
||||
compute_hosts = common.parse_compute_hosts(config['compute_hosts'])
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
from neat.config import *
|
||||
import neat.common as common
|
||||
|
||||
config = read_and_validate_config([DEFAILT_CONFIG_PATH, CONFIG_PATH],
|
||||
config = read_and_validate_config([DEFAULT_CONFIG_PATH, CONFIG_PATH],
|
||||
REQUIRED_FIELDS)
|
||||
compute_hosts = common.parse_compute_hosts(config['compute_hosts'])
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
from neat.config import *
|
||||
import neat.common as common
|
||||
|
||||
config = read_and_validate_config([DEFAILT_CONFIG_PATH, CONFIG_PATH],
|
||||
config = read_and_validate_config([DEFAULT_CONFIG_PATH, CONFIG_PATH],
|
||||
REQUIRED_FIELDS)
|
||||
compute_hosts = common.parse_compute_hosts(config['compute_hosts'])
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
from neat.config import *
|
||||
import neat.common as common
|
||||
|
||||
config = read_and_validate_config([DEFAILT_CONFIG_PATH, CONFIG_PATH],
|
||||
config = read_and_validate_config([DEFAULT_CONFIG_PATH, CONFIG_PATH],
|
||||
REQUIRED_FIELDS)
|
||||
compute_hosts = common.parse_compute_hosts(config['compute_hosts'])
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
from neat.config import *
|
||||
import neat.common as common
|
||||
|
||||
config = read_and_validate_config([DEFAILT_CONFIG_PATH, CONFIG_PATH],
|
||||
config = read_and_validate_config([DEFAULT_CONFIG_PATH, CONFIG_PATH],
|
||||
REQUIRED_FIELDS)
|
||||
compute_hosts = common.parse_compute_hosts(config['compute_hosts'])
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
from neat.config import *
|
||||
import neat.common as common
|
||||
|
||||
config = read_and_validate_config([DEFAILT_CONFIG_PATH, CONFIG_PATH],
|
||||
config = read_and_validate_config([DEFAULT_CONFIG_PATH, CONFIG_PATH],
|
||||
REQUIRED_FIELDS)
|
||||
compute_hosts = common.parse_compute_hosts(config['compute_hosts'])
|
||||
|
||||
|
@ -25,7 +25,7 @@ log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# This is the default config, which should not be modified
|
||||
DEFAILT_CONFIG_PATH = os.path.join(os.path.dirname(__file__),
|
||||
DEFAULT_CONFIG_PATH = os.path.join(os.path.dirname(__file__),
|
||||
'..',
|
||||
'neat.conf')
|
||||
|
||||
|
@ -40,7 +40,7 @@ def start():
|
||||
:return: The final state.
|
||||
:rtype: dict(str: *)
|
||||
"""
|
||||
config = read_and_validate_config([DEFAILT_CONFIG_PATH, CONFIG_PATH],
|
||||
config = read_and_validate_config([DEFAULT_CONFIG_PATH, CONFIG_PATH],
|
||||
REQUIRED_FIELDS)
|
||||
|
||||
common.init_logging(
|
||||
|
@ -107,7 +107,7 @@ ERRORS = {
|
||||
|
||||
@contract
|
||||
def raise_error(status_code):
|
||||
""" Raise and HTTPResponse exception with the specified status code.
|
||||
""" Raise an HTTPResponse exception with the specified status code.
|
||||
|
||||
:param status_code: An HTTP status code of the error.
|
||||
:type status_code: int
|
||||
@ -163,7 +163,7 @@ def validate_params(user, password, params):
|
||||
def start():
|
||||
""" Start the global manager web service.
|
||||
"""
|
||||
config = read_and_validate_config([DEFAILT_CONFIG_PATH, CONFIG_PATH],
|
||||
config = read_and_validate_config([DEFAULT_CONFIG_PATH, CONFIG_PATH],
|
||||
REQUIRED_FIELDS)
|
||||
|
||||
common.init_logging(
|
||||
|
@ -114,7 +114,7 @@ def start():
|
||||
:return: The final state.
|
||||
:rtype: dict(str: *)
|
||||
"""
|
||||
config = read_and_validate_config([DEFAILT_CONFIG_PATH, CONFIG_PATH],
|
||||
config = read_and_validate_config([DEFAULT_CONFIG_PATH, CONFIG_PATH],
|
||||
REQUIRED_FIELDS)
|
||||
|
||||
common.init_logging(
|
||||
|
@ -123,7 +123,7 @@ def start():
|
||||
:return: The final state.
|
||||
:rtype: dict(str: *)
|
||||
"""
|
||||
config = read_and_validate_config([DEFAILT_CONFIG_PATH, CONFIG_PATH],
|
||||
config = read_and_validate_config([DEFAULT_CONFIG_PATH, CONFIG_PATH],
|
||||
REQUIRED_FIELDS)
|
||||
|
||||
common.init_logging(
|
||||
|
@ -38,7 +38,7 @@ class DbCleaner(TestCase):
|
||||
'log_directory': 'dir',
|
||||
'log_level': 2,
|
||||
'db_cleaner_interval': str(time_interval)}
|
||||
paths = [cleaner.DEFAILT_CONFIG_PATH, cleaner.CONFIG_PATH]
|
||||
paths = [cleaner.DEFAULT_CONFIG_PATH, cleaner.CONFIG_PATH]
|
||||
fields = cleaner.REQUIRED_FIELDS
|
||||
expect(cleaner).read_and_validate_config(paths, fields). \
|
||||
and_return(config).once()
|
||||
|
@ -170,7 +170,7 @@ class GlobalManager(TestCase):
|
||||
'global_manager_host': 'localhost',
|
||||
'global_manager_port': 8080,
|
||||
'ether_wake_interface': 'eth0'}
|
||||
paths = [manager.DEFAILT_CONFIG_PATH, manager.CONFIG_PATH]
|
||||
paths = [manager.DEFAULT_CONFIG_PATH, manager.CONFIG_PATH]
|
||||
fields = manager.REQUIRED_FIELDS
|
||||
expect(manager).read_and_validate_config(paths, fields). \
|
||||
and_return(config).once()
|
||||
|
@ -41,7 +41,7 @@ class Collector(TestCase):
|
||||
'log_level': 2,
|
||||
'local_data_directory': 'data_dir',
|
||||
'data_collector_interval': str(time_interval)}
|
||||
paths = [collector.DEFAILT_CONFIG_PATH, collector.CONFIG_PATH]
|
||||
paths = [collector.DEFAULT_CONFIG_PATH, collector.CONFIG_PATH]
|
||||
fields = collector.REQUIRED_FIELDS
|
||||
expect(collector).read_and_validate_config(paths, fields). \
|
||||
and_return(config).once()
|
||||
|
@ -40,7 +40,7 @@ class LocalManager(TestCase):
|
||||
'log_directory': 'dir',
|
||||
'log_level': 2,
|
||||
'local_manager_interval': str(time_interval)}
|
||||
paths = [manager.DEFAILT_CONFIG_PATH, manager.CONFIG_PATH]
|
||||
paths = [manager.DEFAULT_CONFIG_PATH, manager.CONFIG_PATH]
|
||||
fields = manager.REQUIRED_FIELDS
|
||||
expect(manager).read_and_validate_config(paths, fields). \
|
||||
and_return(config).once()
|
||||
|
@ -25,13 +25,13 @@ class Config(TestCase):
|
||||
|
||||
@qc
|
||||
def read_default_config():
|
||||
paths = [config.DEFAILT_CONFIG_PATH]
|
||||
paths = [config.DEFAULT_CONFIG_PATH]
|
||||
test_config = config.read_config(paths)
|
||||
assert config.validate_config(test_config, config.REQUIRED_FIELDS)
|
||||
|
||||
@qc
|
||||
def read_config():
|
||||
paths = [config.DEFAILT_CONFIG_PATH, config.CONFIG_PATH]
|
||||
paths = [config.DEFAULT_CONFIG_PATH, config.CONFIG_PATH]
|
||||
test_config = config.read_config(paths)
|
||||
assert config.validate_config(test_config, config.REQUIRED_FIELDS)
|
||||
|
||||
@ -75,7 +75,7 @@ class Config(TestCase):
|
||||
):
|
||||
with MockTransaction:
|
||||
test_config = dict(zip(x, x))
|
||||
paths = [config.DEFAILT_CONFIG_PATH, config.CONFIG_PATH]
|
||||
paths = [config.DEFAULT_CONFIG_PATH, config.CONFIG_PATH]
|
||||
expect(config).read_config(paths).and_return(test_config).once()
|
||||
expect(config).validate_config(test_config, y). \
|
||||
and_return(False).once()
|
||||
|
@ -25,7 +25,7 @@ def vm_hostname(vm):
|
||||
return str(getattr(vm, 'OS-EXT-SRV-ATTR:host'))
|
||||
|
||||
|
||||
config = read_and_validate_config([DEFAILT_CONFIG_PATH, CONFIG_PATH],
|
||||
config = read_and_validate_config([DEFAULT_CONFIG_PATH, CONFIG_PATH],
|
||||
REQUIRED_FIELDS)
|
||||
db = manager.init_db(config['sql_connection'])
|
||||
nova = client.Client(config['os_admin_user'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user