diff --git a/ostack_validator/__init__.py b/ostack_validator/__init__.py index 31245c0..16ffa97 100644 --- a/ostack_validator/__init__.py +++ b/ostack_validator/__init__.py @@ -1,6 +1,5 @@ if __name__ == '__main__': - import sys - from ostack_validator.main import main - main(sys.argv[1:]) - + import sys + from ostack_validator.main import main + main(sys.argv[1:]) diff --git a/ostack_validator/celery.py b/ostack_validator/celery.py index e5c5357..5bc9ec7 100644 --- a/ostack_validator/celery.py +++ b/ostack_validator/celery.py @@ -15,51 +15,61 @@ backend_url = os.getenv('CELERY_RESULT_BACKEND', broker_url) app = Celery('ostack_validator', broker=broker_url, backend=backend_url) app.conf.update( - CELERY_TRACK_STARTED=True + CELERY_TRACK_STARTED=True ) + class InspectionRequest(object): - def __init__(self, nodes, username, password=None, private_key=None): - super(InspectionRequest, self).__init__() - self.nodes = nodes - self.username = username - self.password = password - self.private_key = private_key + + def __init__(self, nodes, username, password=None, private_key=None): + super(InspectionRequest, self).__init__() + self.nodes = nodes + self.username = username + self.password = password + self.private_key = private_key + class InspectionResult(object): - def __init__(self, request, value): - super(InspectionResult, self).__init__() - self.request = request - self.value = value + + def __init__(self, request, value): + super(InspectionResult, self).__init__() + self.request = request + self.value = value + @app.task def ostack_inspect_task(request): - logger = logging.getLogger('ostack_validator.task.inspect') + logger = logging.getLogger('ostack_validator.task.inspect') - discovery = OpenstackDiscovery() + discovery = OpenstackDiscovery() - try: - openstack = discovery.discover(request.nodes, request.username, private_key=request.private_key) - except: - message = traceback.format_exc() - logger.error(message) + try: + openstack = discovery.discover(request.nodes, request.username, + private_key=request.private_key) + except: + message = traceback.format_exc() + logger.error(message) return InspectionResult(request, message) - all_inspections = [KeystoneAuthtokenSettingsInspection] - for inspection in all_inspections: - try: - x = inspection() - x.inspect(openstack) - except: - message = traceback.format_exc() - logger.error(message) - openstack.report_issue(Issue(Issue.ERROR, 'Unexpected error running inspection "%s". See log for details' % inspection.name)) + all_inspections = [KeystoneAuthtokenSettingsInspection] + for inspection in all_inspections: + try: + x = inspection() + x.inspect(openstack) + except: + message = traceback.format_exc() + logger.error(message) + openstack.report_issue( + Issue( + Issue.ERROR, + 'Unexpected error running inspection "%s". See log for details' % + inspection.name)) + + return InspectionResult(request, openstack) - return InspectionResult(request, openstack) if __name__ == '__main__': - logging.basicConfig(level=logging.WARNING) - logging.getLogger('ostack_validator').setLevel(logging.DEBUG) - - app.start() + logging.basicConfig(level=logging.WARNING) + logging.getLogger('ostack_validator').setLevel(logging.DEBUG) + app.start() diff --git a/ostack_validator/common.py b/ostack_validator/common.py index c928cd0..1566d16 100644 --- a/ostack_validator/common.py +++ b/ostack_validator/common.py @@ -1,146 +1,188 @@ import copy + def find(l, predicate): - results = [x for x in l if predicate(x)] - return results[0] if len(results) > 0 else None + results = [x for x in l if predicate(x)] + return results[0] if len(results) > 0 else None + def index(l, predicate): - i = 0 - while i' % str(self) + def __str__(self): + return '.'.join([str(p) for p in self.parts]) - def __cmp__(self, other): - for i in xrange(0, 3): - x = self.parts[i] - other.parts[i] - if x != 0: - return -1 if x < 0 else 1 + def __repr__(self): + return '' % str(self) - return 0 + def __cmp__(self, other): + for i in xrange(0, 3): + x = self.parts[i] - other.parts[i] + if x != 0: + return -1 if x < 0 else 1 + + return 0 class Mark(object): - def __init__(self, source, line=0, column=0): - self.source = source - self.line = line - self.column = column - def __eq__(self, other): - return (self.source == source) and (self.line == other.line) and (self.column == other.column) + def __init__(self, source, line=0, column=0): + self.source = source + self.line = line + self.column = column - def __ne__(self, other): - return not self == other + def __eq__(self, other): + return ( + (self.source == source) and ( + self.line == other.line) and (self.column == other.column) + ) - def merge(self, other): - return Mark(self.source, self.line + other.line, self.column + other.column) + def __ne__(self, other): + return not self == other + + def merge(self, other): + return ( + Mark( + self.source, + self.line + + other.line, + self.column + + other.column) + ) + + def __repr__(self): + return '%s line %d column %d' % (self.source, self.line, self.column) - def __repr__(self): - return '%s line %d column %d' % (self.source, self.line, self.column) class Error: - def __init__(self, message): - self.message = message - def __repr__(self): - return '<%s "%s">' % (str(self.__class__).split('.')[-1][:-2], self.message) + def __init__(self, message): + self.message = message + + def __repr__(self): + return ( + '<%s "%s">' % ( + str(self.__class__).split('.')[-1][:-2], + self.message) + ) + + def __str__(self): + return self.message - def __str__(self): - return self.message class Issue(object): - FATAL = 'FATAL' - ERROR = 'ERROR' - WARNING = 'WARNING' - INFO = 'INFO' + FATAL = 'FATAL' + ERROR = 'ERROR' + WARNING = 'WARNING' + INFO = 'INFO' - def __init__(self, type, message): - self.type = type - self.message = message + def __init__(self, type, message): + self.type = type + self.message = message - def __repr__(self): - return '<%s type=%s message=%s>' % (str(self.__class__).split('.')[-1][:-2], self.type, self.message) + def __repr__(self): + return ( + '<%s type=%s message=%s>' % ( + str(self.__class__).split('.')[-1][:-2], + self.type, + self.message) + ) + + def __str__(self): + return '%s: %s' % (self.type, self.message) - def __str__(self): - return '%s: %s' % (self.type, self.message) class MarkedIssue(Issue): - def __init__(self, type, message, mark): - super(MarkedIssue, self).__init__(type, message) - self.mark = mark - def offset_by(self, base_mark): - other = copy.copy(self) - other.mark = base_mark.merge(self.mark) - return other + def __init__(self, type, message, mark): + super(MarkedIssue, self).__init__(type, message) + self.mark = mark - def __repr__(self): - return '<%s type=%s message=%s mark=%s>' % (str(self.__class__).split('.')[-1][:-2], self.type, self.message, self.mark) + def offset_by(self, base_mark): + other = copy.copy(self) + other.mark = base_mark.merge(self.mark) + return other + + def __repr__(self): + return ( + '<%s type=%s message=%s mark=%s>' % ( + str(self.__class__).split('.')[-1][:-2], + self.type, + self.message, + self.mark) + ) + + def __str__(self): + return ( + super( + MarkedIssue, self).__str__() + (' (source "%s" line %d column %d)' % + (self.mark.source, self.mark.line + 1, self.mark.column + 1)) + ) - def __str__(self): - return super(MarkedIssue, self).__str__() + (' (source "%s" line %d column %d)' % (self.mark.source, self.mark.line+1, self.mark.column+1)) class Inspection(object): - @classmethod - def all_inspections(klass): - return [c for c in all_subclasses(klass)] - def inspect(self, openstack): - pass + @classmethod + def all_inspections(klass): + return [c for c in all_subclasses(klass)] + def inspect(self, openstack): + pass diff --git a/ostack_validator/config_formats/__init__.py b/ostack_validator/config_formats/__init__.py index 2934e00..45865f8 100644 --- a/ostack_validator/config_formats/__init__.py +++ b/ostack_validator/config_formats/__init__.py @@ -1,4 +1,3 @@ from common import * from ini import IniConfigParser - diff --git a/ostack_validator/config_formats/common.py b/ostack_validator/config_formats/common.py index ce91169..b13ff0c 100644 --- a/ostack_validator/config_formats/common.py +++ b/ostack_validator/config_formats/common.py @@ -1,6 +1,7 @@ from ostack_validator.common import Mark, Issue, MarkedIssue -class ParseError(MarkedIssue): - def __init__(self, message, mark): - super(ParseError, self).__init__(Issue.ERROR, message, mark) +class ParseError(MarkedIssue): + + def __init__(self, message, mark): + super(ParseError, self).__init__(Issue.ERROR, message, mark) diff --git a/ostack_validator/config_formats/ini.py b/ostack_validator/config_formats/ini.py index 027952b..221af0a 100644 --- a/ostack_validator/config_formats/ini.py +++ b/ostack_validator/config_formats/ini.py @@ -4,123 +4,150 @@ from StringIO import StringIO from ostack_validator.config_model import * from ostack_validator.config_formats.common import * + class IniConfigParser: - key_value_re = re.compile("^(\S+?)\s*([:=])\s*('.*'|\".*\"|.*)\s*$") + key_value_re = re.compile("^(\S+?)\s*([:=])\s*('.*'|\".*\"|.*)\s*$") - def parse(self, name, base_mark, io): - if not hasattr(io, 'readlines'): - io = StringIO(io) + def parse(self, name, base_mark, io): + if not hasattr(io, 'readlines'): + io = StringIO(io) - def mark(line, column=0): - return base_mark.merge(Mark('', line, column)) - - errors = [] - current_section_name = ConfigSectionName(mark(0), mark(0), '') - current_param_name = None - current_param_value = None - current_param_delimiter = None - sections = [] - parameters = [] - - line_number = -1 - for line in io.readlines(): - line = line.rstrip() - - line_number += 1 - - if current_param_name and (current_param_value.quotechar or (line == '' or not line[0].isspace())): - param = ConfigParameter(current_param_name.start_mark, current_param_value.end_mark, current_param_name, current_param_value, current_param_delimiter) - parameters.append(param) + def mark(line, column=0): + return base_mark.merge(Mark('', line, column)) + errors = [] + current_section_name = ConfigSectionName(mark(0), mark(0), '') current_param_name = None current_param_value = None current_param_delimiter = None + sections = [] + parameters = [] - if line == '': continue + line_number = -1 + for line in io.readlines(): + line = line.rstrip() - if line[0] in '#;': continue + line_number += 1 + + if current_param_name and (current_param_value.quotechar or (line == '' or not line[0].isspace())): + param = ConfigParameter( + current_param_name.start_mark, + current_param_value.end_mark, + current_param_name, + current_param_value, + current_param_delimiter) + parameters.append(param) + + current_param_name = None + current_param_value = None + current_param_delimiter = None + + if line == '': + continue + + if line[0] in '#;': + continue + + if line[0].isspace(): + if current_param_name: + current_param_value.end_mark = mark(line_number, len(line)) + current_param_value.text += line.lstrip() + continue + else: + errors.append( + ParseError('Unexpected multiline value continuation', mark(line_number))) + continue + + if line[0] == '[': + end_index = line.find(']') + if end_index == -1: + errors.append( + ParseError('Unclosed section', mark(line_number, len(line)))) + + end_index = len(line) + while line[end_index - 1].isspace(): + end_index -= 1 + if end_index <= 1: + errors.append( + ParseError('Missing section name', mark(line_number))) + continue + else: + i = end_index + 1 + while i < len(line): + if not line[i].isspace(): + errors.append( + ParseError('Extra chars after section name', mark(line_number, i))) + break + i += 1 + + if current_section_name.text != '' or len(parameters) > 0: + section = ConfigSection( + current_section_name.start_mark, + mark(line_number), + current_section_name, + parameters) + sections.append(section) + parameters = [] + + current_section_name = ConfigSectionName( + mark(line_number, 0), + mark(line_number, end_index), + line[1:end_index] + ) + else: + m = self.key_value_re.match(line) + if m: + current_param_name = ConfigParameterName( + mark(line_number, m.start(1)), + mark(line_number, m.end(1)), + m.group(1) + ) + current_param_delimiter = TextElement( + mark(line_number, m.start(2)), + mark(line_number, m.end(2)), + m.group(2) + ) + + # Unquote value + value = m.group(3) + quotechar = None + if len(value) > 0 and (value[0] == value[-1] and value[0] in "\"'"): + quotechar = value[0] + value = value[1:-1] + + current_param_value = ConfigParameterValue( + mark(line_number, m.start(3)), + mark(line_number, m.end(3)), + value, + quotechar=quotechar + ) + else: + errors.append( + ParseError('Syntax error in line "%s"' % + line, mark(line_number))) - if line[0].isspace(): if current_param_name: - current_param_value.end_mark = mark(line_number, len(line)) - current_param_value.text += line.lstrip() - continue - else: - errors.append(ParseError('Unexpected multiline value continuation', mark(line_number))) - continue - - if line[0] == '[': - end_index = line.find(']') - if end_index == -1: - errors.append(ParseError('Unclosed section', mark(line_number, len(line)))) - - end_index = len(line) - while line[end_index-1].isspace(): end_index -= 1 - if end_index <= 1: - errors.append(ParseError('Missing section name', mark(line_number))) - continue - else: - i = end_index+1 - while i < len(line): - if not line[i].isspace(): - errors.append(ParseError('Extra chars after section name', mark(line_number, i))) - break - i += 1 + param = ConfigParameter( + current_param_name.start_mark, + current_param_value.end_mark, + current_param_name, + current_param_value, + current_param_delimiter) + parameters.append(param) if current_section_name.text != '' or len(parameters) > 0: - section = ConfigSection(current_section_name.start_mark, mark(line_number), current_section_name, parameters) - sections.append(section) - parameters = [] + section = ConfigSection( + current_section_name.start_mark, + mark(line_number), + current_section_name, + parameters) + sections.append(section) + parameters = [] - current_section_name = ConfigSectionName( - mark(line_number, 0), - mark(line_number, end_index), - line[1:end_index] - ) - else: - m = self.key_value_re.match(line) - if m: - current_param_name = ConfigParameterName( - mark(line_number, m.start(1)), - mark(line_number, m.end(1)), - m.group(1) - ) - current_param_delimiter = TextElement( - mark(line_number, m.start(2)), - mark(line_number, m.end(2)), - m.group(2) - ) + end_mark = base_mark + if len(sections) > 0: + end_mark = base_mark.merge(sections[-1].end_mark) - # Unquote value - value = m.group(3) - quotechar = None - if len(value) > 0 and (value[0] == value[-1] and value[0] in "\"'"): - quotechar = value[0] - value = value[1:-1] - - current_param_value = ConfigParameterValue( - mark(line_number, m.start(3)), - mark(line_number, m.end(3)), - value, - quotechar=quotechar - ) - else: - errors.append(ParseError('Syntax error in line "%s"' % line, mark(line_number))) - - if current_param_name: - param = ConfigParameter(current_param_name.start_mark, current_param_value.end_mark, current_param_name, current_param_value, current_param_delimiter) - parameters.append(param) - - if current_section_name.text != '' or len(parameters) > 0: - section = ConfigSection(current_section_name.start_mark, mark(line_number), current_section_name, parameters) - sections.append(section) - parameters = [] - - end_mark = base_mark - if len(sections) > 0: - end_mark = base_mark.merge(sections[-1].end_mark) - - config = ComponentConfig(base_mark, end_mark, name, sections, errors) - - return config + config = ComponentConfig(base_mark, end_mark, name, sections, errors) + return config diff --git a/ostack_validator/config_formats/test_ini.py b/ostack_validator/config_formats/test_ini.py index 8d26116..20be637 100644 --- a/ostack_validator/config_formats/test_ini.py +++ b/ostack_validator/config_formats/test_ini.py @@ -2,214 +2,229 @@ import unittest from ostack_validator.config_formats.ini import * + class IniConfigParserTests(unittest.TestCase): - def setUp(self): - self.parser = IniConfigParser() - def _strip_margin(self, content): - lines = content.split("\n") - if lines[0] == '' and lines[-1].strip() == '': - lines = lines[1:-1] - first_line = lines[0] - margin_size = 0 - while margin_size < len(first_line) and first_line[margin_size].isspace(): margin_size += 1 + def setUp(self): + self.parser = IniConfigParser() - stripped_lines = [line[margin_size:] for line in lines] + def _strip_margin(self, content): + lines = content.split("\n") + if lines[0] == '' and lines[-1].strip() == '': + lines = lines[1:-1] + first_line = lines[0] + margin_size = 0 + while margin_size < len(first_line) and first_line[margin_size].isspace(): + margin_size += 1 - return "\n".join(stripped_lines) + stripped_lines = [line[margin_size:] for line in lines] - def parse(self, content, margin=False): - if margin: - content = self._strip_margin(content) + return "\n".join(stripped_lines) - return self.parser.parse('test.conf', Mark(''), content) + def parse(self, content, margin=False): + if margin: + content = self._strip_margin(content) - def test_parsing(self): - config = self.parse("param1 = value1") + return self.parser.parse('test.conf', Mark(''), content) - self.assertEqual(0, len(config.errors)) + def test_parsing(self): + config = self.parse("param1 = value1") - self.assertParameter('param1', 'value1', config.sections[0].parameters[0]) - self.assertEqual(1, len(config.sections[0].parameters)) + self.assertEqual(0, len(config.errors)) - def test_colon_as_delimiter(self): - c = self.parse('param1 : value1') + self.assertParameter( + 'param1', + 'value1', + config.sections[0].parameters[0]) + self.assertEqual(1, len(config.sections[0].parameters)) - self.assertEqual(0, len(c.errors)) - self.assertParameter('param1', 'value1', c.sections[0].parameters[0]) + def test_colon_as_delimiter(self): + c = self.parse('param1 : value1') - def test_use_colon_delimiter_if_it_comes_before_equals_sign(self): - c = self.parse('param1: value=123') - self.assertEqual(0, len(c.errors)) - self.assertParameter('param1', 'value=123', c.sections[0].parameters[0]) + self.assertEqual(0, len(c.errors)) + self.assertParameter('param1', 'value1', c.sections[0].parameters[0]) - def test_use_equals_delimiter_if_it_comes_before_colon(self): - c = self.parse('param1=value:123') - self.assertEqual(0, len(c.errors)) - self.assertParameter('param1', 'value:123', c.sections[0].parameters[0]) + def test_use_colon_delimiter_if_it_comes_before_equals_sign(self): + c = self.parse('param1: value=123') + self.assertEqual(0, len(c.errors)) + self.assertParameter( + 'param1', + 'value=123', + c.sections[0].parameters[0]) - def test_wrapping_value_with_single_quotes(self): - c = self.parse("param = 'foo bar'") + def test_use_equals_delimiter_if_it_comes_before_colon(self): + c = self.parse('param1=value:123') + self.assertEqual(0, len(c.errors)) + self.assertParameter( + 'param1', + 'value:123', + c.sections[0].parameters[0]) - self.assertEqual(0, len(c.errors)) - self.assertParameter('param', 'foo bar', c.sections[0].parameters[0]) - self.assertEqual("'", c.sections[0].parameters[0].value.quotechar) + def test_wrapping_value_with_single_quotes(self): + c = self.parse("param = 'foo bar'") - def test_wrapping_value_with_single_quotes_and_trailing_whitespace(self): - c = self.parse("param = 'foo bar' ") + self.assertEqual(0, len(c.errors)) + self.assertParameter('param', 'foo bar', c.sections[0].parameters[0]) + self.assertEqual("'", c.sections[0].parameters[0].value.quotechar) - self.assertEqual(0, len(c.errors)) - self.assertParameter('param', 'foo bar', c.sections[0].parameters[0]) + def test_wrapping_value_with_single_quotes_and_trailing_whitespace(self): + c = self.parse("param = 'foo bar' ") - def test_wrapping_value_with_double_quotes(self): - c = self.parse("param = \"foo bar\"") + self.assertEqual(0, len(c.errors)) + self.assertParameter('param', 'foo bar', c.sections[0].parameters[0]) - self.assertEqual(0, len(c.errors)) - self.assertParameter('param', 'foo bar', c.sections[0].parameters[0]) - self.assertEqual('"', c.sections[0].parameters[0].value.quotechar) + def test_wrapping_value_with_double_quotes(self): + c = self.parse("param = \"foo bar\"") - def test_wrapping_value_with_double_quotes_and_trailing_whitespace(self): - c = self.parse("param = \"foo bar\" ") + self.assertEqual(0, len(c.errors)) + self.assertParameter('param', 'foo bar', c.sections[0].parameters[0]) + self.assertEqual('"', c.sections[0].parameters[0].value.quotechar) - self.assertEqual(0, len(c.errors)) - self.assertParameter('param', 'foo bar', c.sections[0].parameters[0]) + def test_wrapping_value_with_double_quotes_and_trailing_whitespace(self): + c = self.parse("param = \"foo bar\" ") - def test_parsing_iolike_source(self): - c = self.parse(StringIO("param1 = value1")) + self.assertEqual(0, len(c.errors)) + self.assertParameter('param', 'foo bar', c.sections[0].parameters[0]) - self.assertEqual(0, len(c.errors)) + def test_parsing_iolike_source(self): + c = self.parse(StringIO("param1 = value1")) - self.assertParameter('param1', 'value1', c.sections[0].parameters[0]) - self.assertEqual(1, len(c.sections[0].parameters)) + self.assertEqual(0, len(c.errors)) - def test_default_section_name(self): - c = self.parse("param1 = value1") + self.assertParameter('param1', 'value1', c.sections[0].parameters[0]) + self.assertEqual(1, len(c.sections[0].parameters)) - self.assertEqual('', c.sections[0].name.text) + def test_default_section_name(self): + c = self.parse("param1 = value1") - def test_parsing_with_section(self): - c = self.parse(""" + self.assertEqual('', c.sections[0].name.text) + + def test_parsing_with_section(self): + c = self.parse(""" [section1] param1 = value1 """, margin=True) - self.assertEqual(0, len(c.errors)) - self.assertEqual('section1', c.sections[0].name.text) - self.assertEqual(1, len(c.sections[0].parameters)) + self.assertEqual(0, len(c.errors)) + self.assertEqual('section1', c.sections[0].name.text) + self.assertEqual(1, len(c.sections[0].parameters)) - def test_parsing_with_same_section(self): - c = self.parse(""" + def test_parsing_with_same_section(self): + c = self.parse(""" [section1] param1 = value1 param2 = value2 """, margin=True) - self.assertEqual(0, len(c.errors)) - self.assertEqual(2, len(c.sections[0].parameters)) + self.assertEqual(0, len(c.errors)) + self.assertEqual(2, len(c.sections[0].parameters)) - def test_parsing_with_different_sections(self): - c = self.parse(""" + def test_parsing_with_different_sections(self): + c = self.parse(""" [section1] param1 = value1 [section2] param2 = value2 """, margin=True) - self.assertEqual(0, len(c.errors)) + self.assertEqual(0, len(c.errors)) - self.assertEqual('section1', c.sections[0].name.text) - self.assertParameter('param1', 'value1', c.sections[0].parameters[0]) - self.assertEqual(1, len(c.sections[0].parameters)) - self.assertEqual('section2', c.sections[1].name.text) - self.assertParameter('param2', 'value2', c.sections[1].parameters[0]) - self.assertEqual(1, len(c.sections[1].parameters)) + self.assertEqual('section1', c.sections[0].name.text) + self.assertParameter('param1', 'value1', c.sections[0].parameters[0]) + self.assertEqual(1, len(c.sections[0].parameters)) + self.assertEqual('section2', c.sections[1].name.text) + self.assertParameter('param2', 'value2', c.sections[1].parameters[0]) + self.assertEqual(1, len(c.sections[1].parameters)) - def test_whole_line_comments_starting_with_hash(self): - c = self.parse("#param=value") - self.assertEqual(0, len(c.errors)) - self.assertEqual(0, len(c.sections)) + def test_whole_line_comments_starting_with_hash(self): + c = self.parse("#param=value") + self.assertEqual(0, len(c.errors)) + self.assertEqual(0, len(c.sections)) - def test_whole_line_comments_starting_with_semicolon(self): - c = self.parse(";param=value") - self.assertEqual(0, len(c.errors)) - self.assertEqual(0, len(c.sections)) + def test_whole_line_comments_starting_with_semicolon(self): + c = self.parse(";param=value") + self.assertEqual(0, len(c.errors)) + self.assertEqual(0, len(c.sections)) - def test_hash_in_value_is_part_of_the_value(self): - c = self.parse("param=value#123") - self.assertEqual(0, len(c.errors)) - self.assertParameter("param", "value#123", c.sections[0].parameters[0]) + def test_hash_in_value_is_part_of_the_value(self): + c = self.parse("param=value#123") + self.assertEqual(0, len(c.errors)) + self.assertParameter("param", "value#123", c.sections[0].parameters[0]) - def test_multiline_value(self): - c = self.parse(""" + def test_multiline_value(self): + c = self.parse(""" param1 = line1 line2 """, margin=True) - self.assertEqual(0, len(c.errors)) - self.assertParameter('param1', 'line1line2', c.sections[0].parameters[0]) + self.assertEqual(0, len(c.errors)) + self.assertParameter( + 'param1', + 'line1line2', + c.sections[0].parameters[0]) - def test_multiline_value_finished_by_other_parameter(self): - c = self.parse(""" + def test_multiline_value_finished_by_other_parameter(self): + c = self.parse(""" param1 = foo bar param2 = baz """, margin=True) - self.assertEqual(0, len(c.errors)) - self.assertParameter('param1', 'foobar', c.sections[0].parameters[0]) + self.assertEqual(0, len(c.errors)) + self.assertParameter('param1', 'foobar', c.sections[0].parameters[0]) - def test_multiline_value_finished_by_empty_line(self): - c = self.parse(""" + def test_multiline_value_finished_by_empty_line(self): + c = self.parse(""" param1 = foo bar param2 = baz """, margin=True) - self.assertEqual(0, len(c.errors)) - self.assertParameter('param1', 'foobar', c.sections[0].parameters[0]) + self.assertEqual(0, len(c.errors)) + self.assertParameter('param1', 'foobar', c.sections[0].parameters[0]) - def test_unclosed_section_causes_error(self): - c = self.parse("[section1\nparam1=123") - self.assertEqual(1, len(c.errors)) - - def test_missing_equals_sign_or_colon_causes_error(self): - c = self.parse("param1 value1") - self.assertEqual(1, len(c.errors)) + def test_unclosed_section_causes_error(self): + c = self.parse("[section1\nparam1=123") + self.assertEqual(1, len(c.errors)) - def test_spaces_in_key_causes_error(self): - c = self.parse("param 1 = value1") - self.assertEqual(1, len(c.errors)) + def test_missing_equals_sign_or_colon_causes_error(self): + c = self.parse("param1 value1") + self.assertEqual(1, len(c.errors)) - def test_returning_multiple_errors(self): - c = self.parse("[unclosed section\npararm 1 = value1") - self.assertEqual(2, len(c.errors)) + def test_spaces_in_key_causes_error(self): + c = self.parse("param 1 = value1") + self.assertEqual(1, len(c.errors)) - def test_errors_doesnt_affect_valid_parameters(self): - c = self.parse('param1 value1\nparam2 = value2') - self.assertEqual(1, len(c.errors)) - self.assertParameter('param2', 'value2', c.sections[0].parameters[0]) + def test_returning_multiple_errors(self): + c = self.parse("[unclosed section\npararm 1 = value1") + self.assertEqual(2, len(c.errors)) + def test_errors_doesnt_affect_valid_parameters(self): + c = self.parse('param1 value1\nparam2 = value2') + self.assertEqual(1, len(c.errors)) + self.assertParameter('param2', 'value2', c.sections[0].parameters[0]) - def _getattr(self, o, name): - if name.find('.') != -1: - parts = name.split('.') - o = getattr(o, parts[0]) - if o == None: - return None - return self._getattr(o, '.'.join(parts[1:])) - else: - return getattr(o, name) + def _getattr(self, o, name): + if name.find('.') != -1: + parts = name.split('.') + o = getattr(o, parts[0]) + if o is None: + return None + return self._getattr(o, '.'.join(parts[1:])) + else: + return getattr(o, name) - def assertAttributes(self, attribute_values, subject): - for attr, expected in attribute_values.items(): - actual = self._getattr(subject, attr) - self.assertEqual(expected, actual, "%s expected to have %s = %s, but the value was %s" % (subject, attr, expected, actual)) - - def assertParameter(self, name, value, o): - self.assertAttributes({'name.text': name, 'value.text': value}, o) + def assertAttributes(self, attribute_values, subject): + for attr, expected in attribute_values.items(): + actual = self._getattr(subject, attr) + self.assertEqual( + expected, actual, "%s expected to have %s = %s, but the value was %s" % + (subject, attr, expected, actual)) + + def assertParameter(self, name, value, o): + self.assertAttributes({'name.text': name, 'value.text': value}, o) if __name__ == '__main__': - unittest.main() - + unittest.main() diff --git a/ostack_validator/config_model.py b/ostack_validator/config_model.py index 656da50..9c92c61 100644 --- a/ostack_validator/config_model.py +++ b/ostack_validator/config_model.py @@ -2,235 +2,306 @@ import string from ostack_validator.common import Mark + class ConfigurationSection(object): - def __init__(self, config, section): - super(ConfigurationSection, self).__init__() - self.config = config - self.section = section - def _combine_names(self, section, param): - if section == 'DEFAULT': - return param + def __init__(self, config, section): + super(ConfigurationSection, self).__init__() + self.config = config + self.section = section - return '%s.%s' % (section, param) + def _combine_names(self, section, param): + if section == 'DEFAULT': + return param - def get(self, name, *args, **kwargs): - return self.config.get(self._combine_names(self.section, name), *args, **kwargs) + return '%s.%s' % (section, param) - def set(self, name, *args, **kwargs): - self.config.set(self._combine_names(self.section, name), *args, **kwargs) + def get(self, name, *args, **kwargs): + return ( + self.config.get( + self._combine_names( + self.section, + name), + *args, + **kwargs) + ) - def set_default(self, name, *args, **kwargs): - self.config.set_default(self._combine_names(self.section, name), *args, **kwargs) + def set(self, name, *args, **kwargs): + self.config.set( + self._combine_names( + self.section, + name), + *args, + **kwargs) - def contains(self, name, *args, **kwargs): - return self.config.contains(self._combine_names(self.section, name), *args, **kwargs) + def set_default(self, name, *args, **kwargs): + self.config.set_default( + self._combine_names( + self.section, + name), + *args, + **kwargs) - def is_default(self, name, *args, **kwargs): - return self.config.is_default(self._combine_names(self.section, name), *args, **kwargs) + def contains(self, name, *args, **kwargs): + return ( + self.config.contains( + self._combine_names( + self.section, + name), + *args, + **kwargs) + ) - def __getitem__(self, key): - return self.config.get(self._combine_names(self.section, key)) + def is_default(self, name, *args, **kwargs): + return ( + self.config.is_default( + self._combine_names( + self.section, + name), + *args, + **kwargs) + ) - def __setitem__(self, key, value): - return self.config.set(self._combine_names(self.section, key), value) + def __getitem__(self, key): + return self.config.get(self._combine_names(self.section, key)) - def __contains__(self, key): - return self.config.contains(self._combine_names(self.section, key)) + def __setitem__(self, key, value): + return self.config.set(self._combine_names(self.section, key), value) - def keys(self): - return self.config.keys(self.section) + def __contains__(self, key): + return self.config.contains(self._combine_names(self.section, key)) + + def keys(self): + return self.config.keys(self.section) + + def items(self, *args, **kwargs): + return self.config.items(self.section, *args, **kwargs) - def items(self, *args, **kwargs): - return self.config.items(self.section, *args, **kwargs) class ConfigurationWrapper(object): - def __init__(self, config, state): - super(ConfigurationWrapper, self).__init__() - self.config = config - self.state = state - def __getitem__(self, key): - if key in self.state: - return '' + def __init__(self, config, state): + super(ConfigurationWrapper, self).__init__() + self.config = config + self.state = state - return self.config.get(key, _state=self.state) + def __getitem__(self, key): + if key in self.state: + return '' + + return self.config.get(key, _state=self.state) class Configuration(object): - def __init__(self): - super(Configuration, self).__init__() - self._defaults = dict() - self._normal = dict() - def _normalize_name(self, name): - if name.find('.') == -1: - section = 'DEFAULT' - else: - section, name = name.split('.', 1) + def __init__(self): + super(Configuration, self).__init__() + self._defaults = dict() + self._normal = dict() - return (section, name) + def _normalize_name(self, name): + if name.find('.') == -1: + section = 'DEFAULT' + else: + section, name = name.split('.', 1) - def _combine_names(self, section, param): - if section == 'DEFAULT': - return param + return (section, name) - return '%s.%s' % (section, param) + def _combine_names(self, section, param): + if section == 'DEFAULT': + return param - def get(self, name, default=None, raw=False, _state=[]): - section, name = self._normalize_name(name) + return '%s.%s' % (section, param) - if section in self._normal and name in self._normal[section]: - value = self._normal[section][name] - elif section in self._defaults and name in self._defaults[section]: - value = self._defaults[section][name] - else: - value = default + def get(self, name, default=None, raw=False, _state=[]): + section, name = self._normalize_name(name) - if not isinstance(value, str): - return value + if section in self._normal and name in self._normal[section]: + value = self._normal[section][name] + elif section in self._defaults and name in self._defaults[section]: + value = self._defaults[section][name] + else: + value = default - if raw: - return value + if not isinstance(value, str): + return value - tmpl = string.Template(value) - return tmpl.safe_substitute(ConfigurationWrapper(self, _state + [name])) + if raw: + return value - def contains(self, name, ignoreDefault=False): - section, name = self._normalize_name(name) + tmpl = string.Template(value) + return ( + tmpl.safe_substitute(ConfigurationWrapper(self, _state + [name])) + ) - if section in self._normal and name in self._normal[section]: - return True + def contains(self, name, ignoreDefault=False): + section, name = self._normalize_name(name) - if not ignoreDefault and section in self._defaults and name in self._defaults[section]: - return True + if section in self._normal and name in self._normal[section]: + return True - return False + if not ignoreDefault and section in self._defaults and name in self._defaults[section]: + return True - def is_default(self, name): - section, name = self._normalize_name(name) + return False - return not (section in self._normal and name in self._normal[section]) and (section in self._defaults and name in self._defaults[section]) + def is_default(self, name): + section, name = self._normalize_name(name) - def set_default(self, name, value): - section, name = self._normalize_name(name) + return ( + not (section in self._normal and name in self._normal[section]) and ( + section in self._defaults and name in self._defaults[section]) + ) - if not section in self._defaults: - self._defaults[section] = dict() + def set_default(self, name, value): + section, name = self._normalize_name(name) - self._defaults[section][name] = value + if not section in self._defaults: + self._defaults[section] = dict() - def set(self, name, value): - section, name = self._normalize_name(name) + self._defaults[section][name] = value - if not section in self._normal: - self._normal[section] = dict() + def set(self, name, value): + section, name = self._normalize_name(name) - self._normal[section][name] = value + if not section in self._normal: + self._normal[section] = dict() - def section(self, section): - return ConfigurationSection(self, section) + self._normal[section][name] = value - def __getitem__(self, key): - return self.get(key) + def section(self, section): + return ConfigurationSection(self, section) - def __setitem__(self, key, value): - self.set(key, value) + def __getitem__(self, key): + return self.get(key) - def __contains__(self, section): - return (section in self._defaults) or (section in self._normal) + def __setitem__(self, key, value): + self.set(key, value) - def keys(self, section=None): - if section: - names = set() - if section in self._defaults: - for param in self._defaults[section].keys(): - names.add(param) - if section in self._normal: - for param in self._normal[section].keys(): - names.add(param) + def __contains__(self, section): + return (section in self._defaults) or (section in self._normal) - return list(names) - else: - sections = set() - for section in self._defaults.keys(): - sections.add(section) + def keys(self, section=None): + if section: + names = set() + if section in self._defaults: + for param in self._defaults[section].keys(): + names.add(param) + if section in self._normal: + for param in self._normal[section].keys(): + names.add(param) - for section in self._normal.keys(): - sections.add(section) + return list(names) + else: + sections = set() + for section in self._defaults.keys(): + sections.add(section) - return list(sections) + for section in self._normal.keys(): + sections.add(section) - def items(self, section=None): - if section: - return [(name, self.get(self._combine_names(section, name))) for name in self.keys(section)] - else: - return [(name, ConfigurationSection(self, name)) for name in self.keys()] + return list(sections) + + def items(self, section=None): + if section: + return ( + [(name, self.get(self._combine_names(section, name))) + for name in self.keys(section)] + ) + else: + return ( + [(name, ConfigurationSection(self, name)) + for name in self.keys()] + ) class Element(object): - def __init__(self, start_mark, end_mark): - self.start_mark = start_mark - self.end_mark = end_mark - def __eq__(self, other): - return (self.__class__ == other.__class__) and (self.start_mark == other.start_mark) and (self.end_mark == other.end_mark) + def __init__(self, start_mark, end_mark): + self.start_mark = start_mark + self.end_mark = end_mark + + def __eq__(self, other): + return ( + (self.__class__ == other.__class__) and ( + self.start_mark == other.start_mark) and (self.end_mark == other.end_mark) + ) + + def __ne__(self, other): + return not self == other - def __ne__(self, other): - return not self == other class ComponentConfig(Element): - def __init__(self, start_mark, end_mark, name, sections=[], errors=[]): - super(ComponentConfig, self).__init__(start_mark, end_mark) - self.name = name - self.sections = sections - for section in self.sections: - section.parent = self - self.errors = errors + def __init__(self, start_mark, end_mark, name, sections=[], errors=[]): + super(ComponentConfig, self).__init__(start_mark, end_mark) + self.name = name + self.sections = sections + for section in self.sections: + section.parent = self + + self.errors = errors + class TextElement(Element): - def __init__(self, start_mark, end_mark, text): - super(TextElement, self).__init__(start_mark, end_mark) - self.text = text + + def __init__(self, start_mark, end_mark, text): + super(TextElement, self).__init__(start_mark, end_mark) + self.text = text + class ConfigSection(Element): - def __init__(self, start_mark, end_mark, name, parameters): - super(ConfigSection, self).__init__(start_mark, end_mark) - self.name = name - self.parameters = parameters - for parameter in self.parameters: - parameter.parent = self -class ConfigSectionName(TextElement): pass + def __init__(self, start_mark, end_mark, name, parameters): + super(ConfigSection, self).__init__(start_mark, end_mark) + self.name = name + self.parameters = parameters + for parameter in self.parameters: + parameter.parent = self + + +class ConfigSectionName(TextElement): + pass + class ConfigParameter(Element): - def __init__(self, start_mark, end_mark, name, value, delimiter): - super(ConfigParameter, self).__init__(start_mark, end_mark) - self.name = name - self.name.parent = self - self.value = value - self.value.parent = self + def __init__(self, start_mark, end_mark, name, value, delimiter): + super(ConfigParameter, self).__init__(start_mark, end_mark) + self.name = name + self.name.parent = self - self.delimiter = delimiter - self.delimiter.parent = self + self.value = value + self.value.parent = self - def __eq__(self, other): - return (self.name.text == other.name.text) and (self.value.text == other.value.text) + self.delimiter = delimiter + self.delimiter.parent = self - def __ne__(self, other): - return not self == other - - def __repr__(self): - return "" % (self.name.text, self.value.text, self.delimiter.text) + def __eq__(self, other): + return ( + (self.name.text == other.name.text) and ( + self.value.text == other.value.text) + ) + + def __ne__(self, other): + return not self == other + + def __repr__(self): + return ( + "" % ( + self.name.text, + self.value.text, + self.delimiter.text) + ) -class ConfigParameterName(TextElement): pass +class ConfigParameterName(TextElement): + pass + class ConfigParameterValue(TextElement): - def __init__(self, start_mark, end_mark, text, value=None, quotechar=None): - super(ConfigParameterValue, self).__init__(start_mark, end_mark, text) - self.value = value - self.quotechar = quotechar + def __init__(self, start_mark, end_mark, text, value=None, quotechar=None): + super(ConfigParameterValue, self).__init__(start_mark, end_mark, text) + self.value = value + self.quotechar = quotechar diff --git a/ostack_validator/discovery.py b/ostack_validator/discovery.py index a25d409..a61ade2 100644 --- a/ostack_validator/discovery.py +++ b/ostack_validator/discovery.py @@ -11,405 +11,454 @@ from ostack_validator.model import * class NodeClient(object): - def __init__(self, node_address, username, private_key_file, ssh_port=22): - super(NodeClient, self).__init__() - self.shell = spur.SshShell(hostname=node_address, port=ssh_port, username=username, private_key_file=private_key_file, missing_host_key=spur.ssh.MissingHostKey.accept) - def run(self, command, *args, **kwargs): - return self.shell.run(command, allow_error=True, *args, **kwargs) + def __init__(self, node_address, username, private_key_file, ssh_port=22): + super(NodeClient, self).__init__() + self.shell = spur.SshShell( + hostname=node_address, + port=ssh_port, + username=username, + private_key_file=private_key_file, + missing_host_key=spur.ssh.MissingHostKey.accept) - def open(self, path, mode='r'): - return self.shell.open(path, mode) + def run(self, command, *args, **kwargs): + return self.shell.run(command, allow_error=True, *args, **kwargs) + + def open(self, path, mode='r'): + return self.shell.open(path, mode) python_re = re.compile('(/?([^/]*/)*)python[0-9.]*') host_port_re = re.compile('(\d+\.\d+\.\d+\.\d+):(\d+)') + class OpenstackDiscovery(object): - def discover(self, initial_nodes, username, private_key): - "Takes a list of node addresses and returns discovered openstack installation info" - openstack = Openstack() - private_key_file = None - if private_key: - private_key_file = tempfile.NamedTemporaryFile(suffix='.key') - private_key_file.write(private_key) - private_key_file.flush() + def discover(self, initial_nodes, username, private_key): + "Takes a list of node addresses and returns discovered openstack installation info" + openstack = Openstack() - for address in initial_nodes: - try: - m = host_port_re.match(address) - if m: - host = m.group(1) - port = int(m.group(2)) + private_key_file = None + if private_key: + private_key_file = tempfile.NamedTemporaryFile(suffix='.key') + private_key_file.write(private_key) + private_key_file.flush() + + for address in initial_nodes: + try: + m = host_port_re.match(address) + if m: + host = m.group(1) + port = int(m.group(2)) + else: + host = address + port = 22 + client = NodeClient( + host, + ssh_port=port, + username=username, + private_key_file=private_key_file.name) + client.run(['echo', 'test']) + except: + openstack.report_issue( + Issue( + Issue.WARNING, + "Can't connect to node %s" % + address)) + continue + + host = self._discover_node(client) + + if len(host.components) == 0: + continue + + openstack.add_host(host) + + if len(openstack.hosts) == 0: + openstack.report_issue( + Issue(Issue.FATAL, "No OpenStack nodes were discovered")) + + if private_key_file: + private_key_file.close() + + return openstack + + def _discover_node(self, client): + hostname = client.run(['hostname']).output.strip() + + host = Host(name=hostname) + host.id = self._collect_host_id(client) + host.network_addresses = self._collect_host_network_addresses(client) + + host.add_component(self._collect_keystone_data(client)) + host.add_component(self._collect_nova_api_data(client)) + host.add_component(self._collect_nova_compute_data(client)) + host.add_component(self._collect_nova_scheduler_data(client)) + host.add_component(self._collect_glance_api_data(client)) + host.add_component(self._collect_glance_registry_data(client)) + host.add_component(self._collect_cinder_api_data(client)) + host.add_component(self._collect_cinder_volume_data(client)) + host.add_component(self._collect_cinder_scheduler_data(client)) + host.add_component(self._collect_mysql_data(client)) + host.add_component(self._collect_rabbitmq_data(client)) + + return host + + def _find_process(self, client, name): + processes = self._get_processes(client) + for line in processes: + if len(line) > 0 and os.path.basename(line[0]) == name: + return line + + return None + + def _find_python_process(self, client, name): + processes = self._get_processes(client) + for line in processes: + if len(line) > 0 and (line[0] == name or line[0].endswith('/' + name)): + return line + if len(line) > 1 and python_re.match(line[0]) and (line[1] == name or line[1].endswith('/' + name)): + return line + + return None + + def _find_python_package_version(self, client, package): + result = client.run( + ['python', '-c', 'import pkg_resources; version = pkg_resources.get_provider(pkg_resources.Requirement.parse("%s")).version; print(version)' % + package]) + + s = result.output.strip() + parts = [] + for p in s.split('.'): + if not p[0].isdigit(): + break + + parts.append(p) + + version = '.'.join(parts) + + return version + + def _get_processes(self, client): + return ( + [line.split() + for line in client.run(['ps', '-Ao', 'cmd', '--no-headers']).output.split("\n")] + ) + + def _collect_host_id(self, client): + ether_re = re.compile('link/ether (([0-9a-f]{2}:){5}([0-9a-f]{2})) ') + result = client.run(['bash', '-c', 'ip link | grep "link/ether "']) + macs = [] + for match in ether_re.finditer(result.output): + macs.append(match.group(1).replace(':', '')) + return ''.join(macs) + + def _collect_host_network_addresses(self, client): + ipaddr_re = re.compile('inet (\d+\.\d+\.\d+\.\d+)/\d+') + addresses = [] + result = client.run(['bash', '-c', 'ip address list | grep "inet "']) + for match in ipaddr_re.finditer(result.output): + addresses.append(match.group(1)) + return addresses + + def _permissions_string_to_number(self, s): + return 0 + + def _collect_file(self, client, path): + ls = client.run(['ls', '-l', '--time-style=full-iso', path]) + if ls.return_code != 0: + return None + + line = ls.output.split("\n")[0] + perm, links, owner, group, size, date, time, timezone, name = line.split( + ) + permissions = self._permissions_string_to_number(perm) + + with client.open(path) as f: + contents = f.read() + + return FileResource(path, contents, owner, group, permissions) + + def _get_keystone_db_data(self, client, command, env={}): + result = client.run(['keystone', command], update_env=env) + if result.return_code != 0: + return [] + + lines = result.output.strip().split("\n") + + columns = [] + last_pos = 0 + l = lines[0] + while True: + pos = l.find('+', last_pos + 1) + if pos == -1: + break + + columns.append({'start': last_pos + 1, 'end': pos - 1}) + + last_pos = pos + + l = lines[1] + for c in columns: + c['name'] = l[c['start']:c['end']].strip() + + data = [] + for l in lines[3:-1]: + d = dict() + for c in columns: + d[c['name']] = l[c['start']:c['end']].strip() + + data.append(d) + + return data + + def _collect_keystone_data(self, client): + keystone_process = self._find_python_process(client, 'keystone-all') + if not keystone_process: + return None + + p = index(keystone_process, lambda s: s == '--config-file') + if p != -1 and p + 1 < len(keystone_process): + config_path = keystone_process[p + 1] else: - host = address - port = 22 - client = NodeClient(host, ssh_port=port, username=username, private_key_file=private_key_file.name) - client.run(['echo', 'test']) - except: - openstack.report_issue(Issue(Issue.WARNING, "Can't connect to node %s" % address)) - continue - - host = self._discover_node(client) - - if len(host.components) == 0: - continue - - openstack.add_host(host) - - if len(openstack.hosts) == 0: - openstack.report_issue(Issue(Issue.FATAL, "No OpenStack nodes were discovered")) - - if private_key_file: - private_key_file.close() - - return openstack - - def _discover_node(self, client): - hostname = client.run(['hostname']).output.strip() - - host = Host(name=hostname) - host.id = self._collect_host_id(client) - host.network_addresses = self._collect_host_network_addresses(client) - - host.add_component(self._collect_keystone_data(client)) - host.add_component(self._collect_nova_api_data(client)) - host.add_component(self._collect_nova_compute_data(client)) - host.add_component(self._collect_nova_scheduler_data(client)) - host.add_component(self._collect_glance_api_data(client)) - host.add_component(self._collect_glance_registry_data(client)) - host.add_component(self._collect_cinder_api_data(client)) - host.add_component(self._collect_cinder_volume_data(client)) - host.add_component(self._collect_cinder_scheduler_data(client)) - host.add_component(self._collect_mysql_data(client)) - host.add_component(self._collect_rabbitmq_data(client)) - - return host - - - def _find_process(self, client, name): - processes = self._get_processes(client) - for line in processes: - if len(line) > 0 and os.path.basename(line[0]) == name: - return line - - return None - - def _find_python_process(self, client, name): - processes = self._get_processes(client) - for line in processes: - if len(line) > 0 and (line[0] == name or line[0].endswith('/'+name)): - return line - if len(line) > 1 and python_re.match(line[0]) and (line[1] == name or line[1].endswith('/'+name)): - return line - - return None - - def _find_python_package_version(self, client, package): - result = client.run(['python', '-c', 'import pkg_resources; version = pkg_resources.get_provider(pkg_resources.Requirement.parse("%s")).version; print(version)' % package]) - - s = result.output.strip() - parts = [] - for p in s.split('.'): - if not p[0].isdigit(): break - - parts.append(p) - - version = '.'.join(parts) - - return version - - def _get_processes(self, client): - return [line.split() for line in client.run(['ps', '-Ao', 'cmd', '--no-headers']).output.split("\n")] - - def _collect_host_id(self, client): - ether_re = re.compile('link/ether (([0-9a-f]{2}:){5}([0-9a-f]{2})) ') - result = client.run(['bash', '-c', 'ip link | grep "link/ether "']) - macs = [] - for match in ether_re.finditer(result.output): - macs.append(match.group(1).replace(':', '')) - return ''.join(macs) - - def _collect_host_network_addresses(self, client): - ipaddr_re = re.compile('inet (\d+\.\d+\.\d+\.\d+)/\d+') - addresses = [] - result = client.run(['bash', '-c', 'ip address list | grep "inet "']) - for match in ipaddr_re.finditer(result.output): - addresses.append(match.group(1)) - return addresses - - def _permissions_string_to_number(self, s): - return 0 - - def _collect_file(self, client, path): - ls = client.run(['ls', '-l', '--time-style=full-iso', path]) - if ls.return_code != 0: - return None - - line = ls.output.split("\n")[0] - perm, links, owner, group, size, date, time, timezone, name = line.split() - permissions = self._permissions_string_to_number(perm) - - with client.open(path) as f: - contents = f.read() - - return FileResource(path, contents, owner, group, permissions) - - - def _get_keystone_db_data(self, client, command, env={}): - result = client.run(['keystone', command], update_env=env) - if result.return_code != 0: - return [] - - lines = result.output.strip().split("\n") - - columns = [] - last_pos = 0 - l = lines[0] - while True: - pos = l.find('+', last_pos+1) - if pos == -1: - break - - columns.append({'start': last_pos+1, 'end': pos-1}) - - last_pos = pos - - l = lines[1] - for c in columns: - c['name'] = l[c['start']:c['end']].strip() - - data = [] - for l in lines[3:-1]: - d = dict() - for c in columns: - d[c['name']] = l[c['start']:c['end']].strip() - - data.append(d) - - return data - - def _collect_keystone_data(self, client): - keystone_process = self._find_python_process(client, 'keystone-all') - if not keystone_process: - return None - - p = index(keystone_process, lambda s: s == '--config-file') - if p != -1 and p+1 < len(keystone_process): - config_path = keystone_process[p+1] - else: - config_path = '/etc/keystone/keystone.conf' - - keystone = KeystoneComponent() - keystone.version = self._find_python_package_version(client, 'keystone') - keystone.config_files = [] - keystone.config_files.append(self._collect_file(client, config_path)) - - token = keystone.config['admin_token'] - host = keystone.config['bind_host'] - if host == '0.0.0.0': - host = '127.0.0.1' - port = int(keystone.config['admin_port']) - - keystone_env = { - 'OS_SERVICE_TOKEN': token, - 'OS_SERVICE_ENDPOINT': 'http://%s:%d/v2.0' % (host, port) - } - - keystone.db = dict() - keystone.db['tenants'] = self._get_keystone_db_data(client, 'tenant-list', env=keystone_env) - keystone.db['users'] = self._get_keystone_db_data(client, 'user-list', env=keystone_env) - keystone.db['services'] = self._get_keystone_db_data(client, 'service-list', env=keystone_env) - keystone.db['endpoints'] = self._get_keystone_db_data(client, 'endpoint-list', env=keystone_env) - - return keystone - - def _collect_nova_api_data(self, client): - process = self._find_python_process(client, 'nova-api') - if not process: - return None - - p = index(process, lambda s: s == '--config-file') - if p != -1 and p+1 < len(process): - config_path = process[p+1] - else: - config_path = '/etc/nova/nova.conf' - - nova_api = NovaApiComponent() - nova_api.version = self._find_python_package_version(client, 'nova') - nova_api.config_files = [] - nova_api.config_files.append(self._collect_file(client, config_path)) - - paste_config_path = path_relative_to(nova_api.config['api_paste_config'], os.path.dirname(config_path)) - nova_api.paste_config_file = self._collect_file(client, paste_config_path) - - return nova_api - - def _collect_nova_compute_data(self, client): - process = self._find_python_process(client, 'nova-compute') - if not process: - return None - - p = index(process, lambda s: s == '--config-file') - if p != -1 and p+1 < len(process): - config_path = process[p+1] - else: - config_path = '/etc/nova/nova.conf' - - nova_compute = NovaComputeComponent() - nova_compute.version = self._find_python_package_version(client, 'nova') - nova_compute.config_files = [] - nova_compute.config_files.append(self._collect_file(client, config_path)) - - return nova_compute - - def _collect_nova_scheduler_data(self, client): - process = self._find_python_process(client, 'nova-scheduler') - if not process: - return None - - p = index(process, lambda s: s == '--config-file') - if p != -1 and p+1 < len(process): - config_path = process[p+1] - else: - config_path = '/etc/nova/nova.conf' - - nova_scheduler = NovaSchedulerComponent() - nova_scheduler.version = self._find_python_package_version(client, 'nova') - nova_scheduler.config_files = [] - nova_scheduler.config_files.append(self._collect_file(client, config_path)) - - return nova_scheduler - - def _collect_glance_api_data(self, client): - process = self._find_python_process(client, 'glance-api') - if not process: - return None - - p = index(process, lambda s: s == '--config-file') - if p != -1 and p+1 < len(process): - config_path = process[p+1] - else: - config_path = '/etc/glance/glance-api.conf' - - glance_api = GlanceApiComponent() - glance_api.version = self._find_python_package_version(client, 'glance') - glance_api.config_files = [] - glance_api.config_files.append(self._collect_file(client, config_path)) - - return glance_api - - def _collect_glance_registry_data(self, client): - process = self._find_python_process(client, 'glance-registry') - if not process: - return None - - p = index(process, lambda s: s == '--config-file') - if p != -1 and p+1 < len(process): - config_path = process[p+1] - else: - config_path = '/etc/glance/glance-registry.conf' - - glance_registry = GlanceRegistryComponent() - glance_registry.version = self._find_python_package_version(client, 'glance') - glance_registry.config_files = [] - glance_registry.config_files.append(self._collect_file(client, config_path)) - - return glance_registry - - def _collect_cinder_api_data(self, client): - process = self._find_python_process(client, 'cinder-api') - if not process: - return None - - p = index(process, lambda s: s == '--config-file') - if p != -1 and p+1 < len(process): - config_path = process[p+1] - else: - config_path = '/etc/cinder/cinder.conf' - - cinder_api = CinderApiComponent() - cinder_api.version = self._find_python_package_version(client, 'cinder') - cinder_api.config_files = [] - cinder_api.config_files.append(self._collect_file(client, config_path)) - - paste_config_path = path_relative_to(cinder_api.config['api_paste_config'], os.path.dirname(config_path)) - cinder_api.paste_config_file = self._collect_file(client, paste_config_path) - - return cinder_api - - def _collect_cinder_volume_data(self, client): - process = self._find_python_process(client, 'cinder-volume') - if not process: - return None - - p = index(process, lambda s: s == '--config-file') - if p != -1 and p+1 < len(process): - config_path = process[p+1] - else: - config_path = '/etc/cinder/cinder.conf' - - cinder_volume = CinderVolumeComponent() - cinder_volume.version = self._find_python_package_version(client, 'cinder') - cinder_volume.config_files = [] - cinder_volume.config_files.append(self._collect_file(client, config_path)) - - rootwrap_config_path = path_relative_to(cinder_volume.config['rootwrap_config'], os.path.dirname(config_path)) - cinder_volume.rootwrap_config = self._collect_file(client, rootwrap_config_path) - - return cinder_volume - - def _collect_cinder_scheduler_data(self, client): - process = self._find_python_process(client, 'cinder-scheduler') - if not process: - return None - - p = index(process, lambda s: s == '--config-file') - if p != -1 and p+1 < len(process): - config_path = process[p+1] - else: - config_path = '/etc/cinder/cinder.conf' - - cinder_scheduler = CinderSchedulerComponent() - cinder_scheduler.version = self._find_python_package_version(client, 'cinder') - cinder_scheduler.config_files = [] - cinder_scheduler.config_files.append(self._collect_file(client, config_path)) - - return cinder_scheduler - - def _collect_mysql_data(self, client): - process = self._find_process(client, 'mysqld') - if not process: - return None - - mysqld_version_re = re.compile('mysqld\s+Ver\s(\S+)\s') - - mysql = MysqlComponent() - - version_result = client.run(['mysqld', '--version']) - m = mysqld_version_re.match(version_result.output) - mysql.version = m.group(1) if m else 'unknown' - - mysql.config_files = [] - config_locations_result = client.run(['bash', '-c', 'mysqld --help --verbose | grep "Default options are read from the following files in the given order" -A 1']) - config_locations = config_locations_result.output.strip().split("\n")[-1].split() - for path in config_locations: - f = self._collect_file(client, path) - if f: - mysql.config_files.append(f) - - return mysql - - def _collect_rabbitmq_data(self, client): - process = self._find_process(client, 'beam.smp') - if not process: - return None - - if ' '.join(process).find('rabbit') == -1: - return None - - rabbitmq = RabbitMqComponent() - rabbitmq.version = 'unknown' - - return rabbitmq - + config_path = '/etc/keystone/keystone.conf' + + keystone = KeystoneComponent() + keystone.version = self._find_python_package_version( + client, 'keystone') + keystone.config_files = [] + keystone.config_files.append(self._collect_file(client, config_path)) + + token = keystone.config['admin_token'] + host = keystone.config['bind_host'] + if host == '0.0.0.0': + host = '127.0.0.1' + port = int(keystone.config['admin_port']) + + keystone_env = { + 'OS_SERVICE_TOKEN': token, + 'OS_SERVICE_ENDPOINT': 'http://%s:%d/v2.0' % (host, port) + } + + keystone.db = dict() + keystone.db['tenants'] = self._get_keystone_db_data( + client, 'tenant-list', env=keystone_env) + keystone.db['users'] = self._get_keystone_db_data( + client, 'user-list', env=keystone_env) + keystone.db['services'] = self._get_keystone_db_data( + client, 'service-list', env=keystone_env) + keystone.db['endpoints'] = self._get_keystone_db_data( + client, 'endpoint-list', env=keystone_env) + + return keystone + + def _collect_nova_api_data(self, client): + process = self._find_python_process(client, 'nova-api') + if not process: + return None + + p = index(process, lambda s: s == '--config-file') + if p != -1 and p + 1 < len(process): + config_path = process[p + 1] + else: + config_path = '/etc/nova/nova.conf' + + nova_api = NovaApiComponent() + nova_api.version = self._find_python_package_version(client, 'nova') + nova_api.config_files = [] + nova_api.config_files.append(self._collect_file(client, config_path)) + + paste_config_path = path_relative_to( + nova_api.config['api_paste_config'], + os.path.dirname(config_path)) + nova_api.paste_config_file = self._collect_file( + client, paste_config_path) + + return nova_api + + def _collect_nova_compute_data(self, client): + process = self._find_python_process(client, 'nova-compute') + if not process: + return None + + p = index(process, lambda s: s == '--config-file') + if p != -1 and p + 1 < len(process): + config_path = process[p + 1] + else: + config_path = '/etc/nova/nova.conf' + + nova_compute = NovaComputeComponent() + nova_compute.version = self._find_python_package_version( + client, 'nova') + nova_compute.config_files = [] + nova_compute.config_files.append( + self._collect_file(client, config_path)) + + return nova_compute + + def _collect_nova_scheduler_data(self, client): + process = self._find_python_process(client, 'nova-scheduler') + if not process: + return None + + p = index(process, lambda s: s == '--config-file') + if p != -1 and p + 1 < len(process): + config_path = process[p + 1] + else: + config_path = '/etc/nova/nova.conf' + + nova_scheduler = NovaSchedulerComponent() + nova_scheduler.version = self._find_python_package_version( + client, 'nova') + nova_scheduler.config_files = [] + nova_scheduler.config_files.append( + self._collect_file(client, config_path)) + + return nova_scheduler + + def _collect_glance_api_data(self, client): + process = self._find_python_process(client, 'glance-api') + if not process: + return None + + p = index(process, lambda s: s == '--config-file') + if p != -1 and p + 1 < len(process): + config_path = process[p + 1] + else: + config_path = '/etc/glance/glance-api.conf' + + glance_api = GlanceApiComponent() + glance_api.version = self._find_python_package_version( + client, 'glance') + glance_api.config_files = [] + glance_api.config_files.append(self._collect_file(client, config_path)) + + return glance_api + + def _collect_glance_registry_data(self, client): + process = self._find_python_process(client, 'glance-registry') + if not process: + return None + + p = index(process, lambda s: s == '--config-file') + if p != -1 and p + 1 < len(process): + config_path = process[p + 1] + else: + config_path = '/etc/glance/glance-registry.conf' + + glance_registry = GlanceRegistryComponent() + glance_registry.version = self._find_python_package_version( + client, 'glance') + glance_registry.config_files = [] + glance_registry.config_files.append( + self._collect_file(client, config_path)) + + return glance_registry + + def _collect_cinder_api_data(self, client): + process = self._find_python_process(client, 'cinder-api') + if not process: + return None + + p = index(process, lambda s: s == '--config-file') + if p != -1 and p + 1 < len(process): + config_path = process[p + 1] + else: + config_path = '/etc/cinder/cinder.conf' + + cinder_api = CinderApiComponent() + cinder_api.version = self._find_python_package_version( + client, 'cinder') + cinder_api.config_files = [] + cinder_api.config_files.append(self._collect_file(client, config_path)) + + paste_config_path = path_relative_to( + cinder_api.config['api_paste_config'], + os.path.dirname(config_path)) + cinder_api.paste_config_file = self._collect_file( + client, paste_config_path) + + return cinder_api + + def _collect_cinder_volume_data(self, client): + process = self._find_python_process(client, 'cinder-volume') + if not process: + return None + + p = index(process, lambda s: s == '--config-file') + if p != -1 and p + 1 < len(process): + config_path = process[p + 1] + else: + config_path = '/etc/cinder/cinder.conf' + + cinder_volume = CinderVolumeComponent() + cinder_volume.version = self._find_python_package_version( + client, 'cinder') + cinder_volume.config_files = [] + cinder_volume.config_files.append( + self._collect_file(client, config_path)) + + rootwrap_config_path = path_relative_to( + cinder_volume.config['rootwrap_config'], + os.path.dirname(config_path)) + cinder_volume.rootwrap_config = self._collect_file( + client, rootwrap_config_path) + + return cinder_volume + + def _collect_cinder_scheduler_data(self, client): + process = self._find_python_process(client, 'cinder-scheduler') + if not process: + return None + + p = index(process, lambda s: s == '--config-file') + if p != -1 and p + 1 < len(process): + config_path = process[p + 1] + else: + config_path = '/etc/cinder/cinder.conf' + + cinder_scheduler = CinderSchedulerComponent() + cinder_scheduler.version = self._find_python_package_version( + client, 'cinder') + cinder_scheduler.config_files = [] + cinder_scheduler.config_files.append( + self._collect_file(client, config_path)) + + return cinder_scheduler + + def _collect_mysql_data(self, client): + process = self._find_process(client, 'mysqld') + if not process: + return None + + mysqld_version_re = re.compile('mysqld\s+Ver\s(\S+)\s') + + mysql = MysqlComponent() + + version_result = client.run(['mysqld', '--version']) + m = mysqld_version_re.match(version_result.output) + mysql.version = m.group(1) if m else 'unknown' + + mysql.config_files = [] + config_locations_result = client.run( + ['bash', '-c', 'mysqld --help --verbose | grep "Default options are read from the following files in the given order" -A 1']) + config_locations = config_locations_result.output.strip().split( + "\n")[-1].split() + for path in config_locations: + f = self._collect_file(client, path) + if f: + mysql.config_files.append(f) + + return mysql + + def _collect_rabbitmq_data(self, client): + process = self._find_process(client, 'beam.smp') + if not process: + return None + + if ' '.join(process).find('rabbit') == -1: + return None + + rabbitmq = RabbitMqComponent() + rabbitmq.version = 'unknown' + + return rabbitmq diff --git a/ostack_validator/inspections/__init__.py b/ostack_validator/inspections/__init__.py index 3126d17..f0b8e52 100644 --- a/ostack_validator/inspections/__init__.py +++ b/ostack_validator/inspections/__init__.py @@ -1,4 +1,3 @@ from ostack_validator.inspections.keystone_authtoken import KeystoneAuthtokenSettingsInspection from ostack_validator.inspections.keystone_endpoints import KeystoneEndpointsInspection from ostack_validator.inspections.lettuce_runner import LettuceRunnerInspection - diff --git a/ostack_validator/inspections/keystone_authtoken.py b/ostack_validator/inspections/keystone_authtoken.py index 18cdafc..717df28 100644 --- a/ostack_validator/inspections/keystone_authtoken.py +++ b/ostack_validator/inspections/keystone_authtoken.py @@ -3,81 +3,137 @@ from ostack_validator.common import Inspection, Issue, find KEYSTONE_AUTHTOKEN_FILTER_FACTORY = 'keystoneclient.middleware.auth_token:filter_factory' + class KeystoneAuthtokenSettingsInspection(Inspection): - name = 'Keystone auth' - description = 'Validate correctness of keystone settings' + name = 'Keystone auth' + description = 'Validate correctness of keystone settings' - def inspect(self, openstack): - components = [] - for host in openstack.hosts: - components.extend(host.components) + def inspect(self, openstack): + components = [] + for host in openstack.hosts: + components.extend(host.components) - keystones = [c for c in components if c.name == 'keystone'] - if len(keystones) == 0: - openstack.report_issue(Issue(Issue.FATAL, 'No keystone service found')) - return + keystones = [c for c in components if c.name == 'keystone'] + if len(keystones) == 0: + openstack.report_issue( + Issue(Issue.FATAL, 'No keystone service found')) + return - keystone = keystones[0] - keystone_addresses = [keystone.config['bind_host']] - if keystone_addresses == ['0.0.0.0']: - keystone_addresses = keystone.host.network_addresses + keystone = keystones[0] + keystone_addresses = [keystone.config['bind_host']] + if keystone_addresses == ['0.0.0.0']: + keystone_addresses = keystone.host.network_addresses - for nova in [c for c in components if c.name == 'nova-api']: - if nova.config['auth_strategy'] != 'keystone': - continue + for nova in [c for c in components if c.name == 'nova-api']: + if nova.config['auth_strategy'] != 'keystone': + continue - (authtoken_section,_) = find( - nova.paste_config.items(), - lambda (name, values): name.startswith('filter:') and values.get('paste.filter_factory') == KEYSTONE_AUTHTOKEN_FILTER_FACTORY - ) + (authtoken_section, _) = find( + nova.paste_config.items(), + lambda name_values: name_values[0].startswith('filter:') and name_values[ + 1].get('paste.filter_factory') == KEYSTONE_AUTHTOKEN_FILTER_FACTORY + ) - if not authtoken_section: continue + if not authtoken_section: + continue - authtoken_settings = nova.paste_config.section(authtoken_section) + authtoken_settings = nova.paste_config.section(authtoken_section) + def get_value(name): + return ( + authtoken_settings[ + name] or nova.config[ + 'keystone_authtoken.%s' % + name] + ) - def get_value(name): - return authtoken_settings[name] or nova.config['keystone_authtoken.%s' % name] + auth_host = get_value('auth_host') + auth_port = get_value('auth_port') + auth_protocol = get_value('auth_protocol') + admin_user = get_value('admin_user') + admin_password = get_value('admin_password') + admin_tenant_name = get_value('admin_tenant_name') + admin_token = get_value('admin_token') - auth_host = get_value('auth_host') - auth_port = get_value('auth_port') - auth_protocol = get_value('auth_protocol') - admin_user = get_value('admin_user') - admin_password = get_value('admin_password') - admin_tenant_name = get_value('admin_tenant_name') - admin_token = get_value('admin_token') + msg_prefix = 'Service "%s" on host "%s"' % ( + nova.name, nova.host.name) - msg_prefix = 'Service "%s" on host "%s"' % (nova.name, nova.host.name) + if not auth_host: + nova.report_issue( + Issue( + Issue.ERROR, + msg_prefix + + ' miss "auth_host" setting in keystone authtoken config')) + elif not auth_host in keystone_addresses: + nova.report_issue( + Issue( + Issue.ERROR, + msg_prefix + + ' has incorrect "auth_host" setting in keystone authtoken config')) - if not auth_host: - nova.report_issue(Issue(Issue.ERROR, msg_prefix + ' miss "auth_host" setting in keystone authtoken config')) - elif not auth_host in keystone_addresses: - nova.report_issue(Issue(Issue.ERROR, msg_prefix + ' has incorrect "auth_host" setting in keystone authtoken config')) + if not auth_port: + nova.report_issue( + Issue( + Issue.ERROR, + msg_prefix + + ' miss "auth_port" setting in keystone authtoken config')) + elif auth_port != keystone.config['admin_port']: + nova.report_issue( + Issue( + Issue.ERROR, + msg_prefix + + ' has incorrect "auth_port" setting in keystone authtoken config')) - if not auth_port: - nova.report_issue(Issue(Issue.ERROR, msg_prefix + ' miss "auth_port" setting in keystone authtoken config')) - elif auth_port != keystone.config['admin_port']: - nova.report_issue(Issue(Issue.ERROR, msg_prefix + ' has incorrect "auth_port" setting in keystone authtoken config')) + if not auth_protocol: + nova.report_issue( + Issue( + Issue.ERROR, + msg_prefix + + ' miss "auth_protocol" setting in keystone authtoken config')) + elif not auth_protocol in ['http', 'https']: + nova.report_issue( + Issue( + Issue.ERROR, + msg_prefix + + ' has incorrect "auth_protocol" setting in keystone authtoken config')) - if not auth_protocol: - nova.report_issue(Issue(Issue.ERROR, msg_prefix + ' miss "auth_protocol" setting in keystone authtoken config')) - elif not auth_protocol in ['http', 'https']: - nova.report_issue(Issue(Issue.ERROR, msg_prefix + ' has incorrect "auth_protocol" setting in keystone authtoken config')) + if not admin_user: + nova.report_issue( + Issue( + Issue.ERROR, + msg_prefix + + ' miss "admin_user" setting in keystone authtoken config')) + else: + user = find( + keystone.db['users'], + lambda u: u['name'] == admin_user) + if not user: + nova.report_issue( + Issue( + Issue.ERROR, + msg_prefix + + ' has "admin_user" that is missing in Keystone catalog')) - if not admin_user: - nova.report_issue(Issue(Issue.ERROR, msg_prefix + ' miss "admin_user" setting in keystone authtoken config')) - else: - user = find(keystone.db['users'], lambda u: u['name'] == admin_user) - if not user: - nova.report_issue(Issue(Issue.ERROR, msg_prefix + ' has "admin_user" that is missing in Keystone catalog')) - - if not admin_tenant_name: - nova.report_issue(Issue(Issue.ERROR, msg_prefix + ' miss "admin_tenant_name" setting in keystone authtoken config')) - else: - tenant = find(keystone.db['tenants'], lambda t: t['name'] == admin_tenant_name) - if not tenant: - nova.report_issue(Issue(Issue.ERROR, msg_prefix + ' has "admin_tenant_name" that is missing in Keystone catalog')) - - if admin_token: - nova.report_issue(Issue(Issue.WARNING, msg_prefix + ' uses insecure admin_token for authentication')) + if not admin_tenant_name: + nova.report_issue( + Issue( + Issue.ERROR, + msg_prefix + + ' miss "admin_tenant_name" setting in keystone authtoken config')) + else: + tenant = find( + keystone.db['tenants'], + lambda t: t['name'] == admin_tenant_name) + if not tenant: + nova.report_issue( + Issue( + Issue.ERROR, + msg_prefix + + ' has "admin_tenant_name" that is missing in Keystone catalog')) + if admin_token: + nova.report_issue( + Issue( + Issue.WARNING, + msg_prefix + + ' uses insecure admin_token for authentication')) diff --git a/ostack_validator/inspections/keystone_endpoints.py b/ostack_validator/inspections/keystone_endpoints.py index 52abb80..c9ea0bb 100644 --- a/ostack_validator/inspections/keystone_endpoints.py +++ b/ostack_validator/inspections/keystone_endpoints.py @@ -2,40 +2,53 @@ from urlparse import urlparse from ostack_validator.common import Inspection, Issue, find + class KeystoneEndpointsInspection(Inspection): - name = 'Keystone endpoints' - description = 'Validate that each keystone endpoint leads to proper service' + name = 'Keystone endpoints' + description = 'Validate that each keystone endpoint leads to proper service' - def inspect(self, openstack): - keystone = find(openstack.components, lambda c: c.name == 'keystone') - if not keystone: - return + def inspect(self, openstack): + keystone = find(openstack.components, lambda c: c.name == 'keystone') + if not keystone: + return - for service in keystone.db['services']: - if service['type'] == 'compute': - endpoint = find(keystone.db['endpoints'], lambda e: e['service_id'] == service['id']) - if not endpoint: - keystone.report_issue(Issue(Issue.WARNING, 'Keystone catalog contains service "%s" that has no defined endpoints' % service['name'])) - continue + for service in keystone.db['services']: + if service['type'] == 'compute': + endpoint = find( + keystone.db['endpoints'], + lambda e: e['service_id'] == service['id']) + if not endpoint: + keystone.report_issue( + Issue( + Issue.WARNING, 'Keystone catalog contains service "%s" that has no defined endpoints' % + service['name'])) + continue - for url_attr in ['adminurl', 'publicurl', 'internalurl']: - url = urlparse(endpoint[url_attr]) + for url_attr in ['adminurl', 'publicurl', 'internalurl']: + url = urlparse(endpoint[url_attr]) - # TODO: resolve endpoint url host address - host = find(openstack.hosts, lambda h: url.hostname in h.network_addresses) - if not host: - keystone.report_issue(Issue(Issue.ERROR, 'Keystone catalog has endpoint for service "%s" (id %s) that has "%s" set pointing to unknown host' % (service['name'], service['id'], url_attr))) - continue + # TODO: resolve endpoint url host address + host = find( + openstack.hosts, + lambda h: url.hostname in h.network_addresses) + if not host: + keystone.report_issue( + Issue( + Issue.ERROR, 'Keystone catalog has endpoint for service "%s" (id %s) that has "%s" set pointing to unknown host' % + (service['name'], service['id'], url_attr))) + continue - nova_compute = None - for c in host.components: - if c.name != 'nova-compute': continue - - if c.config['osapi_compute_listen'] in ['0.0.0.0', url.hostname] and c.config['osapi_compute_listen_port'] == url.port: - nova_compute = c - break - - if not nova_compute: - keystone.report_issue(Issue(Issue.ERROR, 'Keystone catalog has endpoint for service "%s" (id %s) that has "%s" set pointing to no service' % (service['name'], service['id'], url_attr))) + nova_compute = None + for c in host.components: + if c.name != 'nova-compute': + continue + if c.config['osapi_compute_listen'] in ['0.0.0.0', url.hostname] and c.config['osapi_compute_listen_port'] == url.port: + nova_compute = c + break + if not nova_compute: + keystone.report_issue( + Issue( + Issue.ERROR, 'Keystone catalog has endpoint for service "%s" (id %s) that has "%s" set pointing to no service' % + (service['name'], service['id'], url_attr))) diff --git a/ostack_validator/inspections/lettuce/steps.py b/ostack_validator/inspections/lettuce/steps.py index 469de87..0b56da9 100644 --- a/ostack_validator/inspections/lettuce/steps.py +++ b/ostack_validator/inspections/lettuce/steps.py @@ -4,77 +4,94 @@ from lettuce import * from ostack_validator.common import Issue, Version, find from ostack_validator.model import * -def get_variable(name): - if not hasattr(world, 'variables'): - return None - return world.variables.get(name) +def get_variable(name): + if not hasattr(world, 'variables'): + return None + + return world.variables.get(name) + def set_variable(name, value): - if not hasattr(world, 'variables'): - world.variables = {} + if not hasattr(world, 'variables'): + world.variables = {} + + world.variables[name] = value - world.variables[name] = value def subst(template): - if not hasattr(world, 'variables'): - return template + if not hasattr(world, 'variables'): + return template + + tmpl = string.Template(template) + return tmpl.safe_substitute(world.variables) - tmpl = string.Template(template) - return tmpl.safe_substitute(world.variables) def stop(): - assert False, "stop" + assert False, "stop" + # Openstack general step description section @step(r'I use OpenStack (\w+)') def use_openstack_version(step, version): - version = Version(version) - for component in [c for c in world.openstack.components if isinstance(c, OpenstackComponent)]: - if not Version(component.version) >= version: stop() + version = Version(version) + for component in [c for c in world.openstack.components if isinstance(c, OpenstackComponent)]: + if not Version(component.version) >= version: + stop() + @step(r'Controller addresses are @(\w+)') def controller_addresses(self, variable): - controller = find(world.openstack.components, lambda c: c.name == 'nova') + controller = find(world.openstack.components, lambda c: c.name == 'nova') - if controller.config['s3_host'] == '0.0.0.0': - addresses = filter(lambda ip: not ip.startswith('127.'), controller.host.network_addresses) - else: - addresses = [controller.config['s3_host']] + if controller.config['s3_host'] == '0.0.0.0': + addresses = filter( + lambda ip: not ip.startswith('127.'), + controller.host.network_addresses) + else: + addresses = [controller.config['s3_host']] + + set_variable(variable, addresses) - set_variable(variable, addresses) # Keystone steps section @step(r'Keystone addresses are @(\w+)') def keystone_addresses(self, variable): - keystone = find(world.openstack.components, lambda c: c.name == 'keystone') + keystone = find(world.openstack.components, lambda c: c.name == 'keystone') - if keystone.config['bind_host'] == '0.0.0.0': - addresses = filter(lambda ip: not ip.startswith('127.'), keystone.host.network_addresses) - else: - addresses = [keystone.config['bind_host']] + if keystone.config['bind_host'] == '0.0.0.0': + addresses = filter( + lambda ip: not ip.startswith('127.'), + keystone.host.network_addresses) + else: + addresses = [keystone.config['bind_host']] + + set_variable(variable, addresses) - set_variable(variable, addresses) # Nova steps section @step(r'Nova has "(.+)" equal to "(.*)"') def nova_has_property(step, name, value): - name = subst(name) - value = subst(value) + name = subst(name) + value = subst(value) + + for nova in [c for c in world.openstack.components if c.name.startswith('nova')]: + if not nova.config[name] == value: + stop() - for nova in [c for c in world.openstack.components if c.name.startswith('nova')]: - if not nova.config[name] == value: stop() @step(r'Nova should have "(.+)" in "(.*)"') def nova_property_assertion(self, name, values): - name = subst(name) - values = subst(values) + name = subst(name) + values = subst(values) - if not values: - return + if not values: + return - for nova in [c for c in world.openstack.components if c.name.startswith('nova')]: - nova_value = nova.config[name] + for nova in [c for c in world.openstack.components if c.name.startswith('nova')]: + nova_value = nova.config[name] - if not (nova_value and nova_value in values): - nova.report_issue(Issue(Issue.ERROR, 'Nova should have "%s" in %s' % (name, values))) + if not (nova_value and nova_value in values): + nova.report_issue( + Issue(Issue.ERROR, 'Nova should have "%s" in %s' % + (name, values))) diff --git a/ostack_validator/inspections/lettuce_runner.py b/ostack_validator/inspections/lettuce_runner.py index cec92f1..54dbb04 100644 --- a/ostack_validator/inspections/lettuce_runner.py +++ b/ostack_validator/inspections/lettuce_runner.py @@ -3,18 +3,23 @@ import lettuce from ostack_validator.common import Inspection, Issue + class LettuceRunnerInspection(Inspection): - def inspect(self, openstack): - runner = lettuce.Runner( - base_path=os.path.join(os.path.dirname(__file__), 'lettuce') - ) - lettuce.world.openstack = openstack - result = runner.run() - del lettuce.world.openstack + def inspect(self, openstack): + runner = lettuce.Runner( + base_path=os.path.join(os.path.dirname(__file__), 'lettuce') + ) - for feature_result in result.feature_results: - for scenario_result in [s for s in feature_result.scenario_results if not s.passed]: - for step in scenario_result.steps_undefined: - openstack.report_issue(Issue(Issue.ERROR, 'Undefined step "%s"' % step.sentence)) + lettuce.world.openstack = openstack + result = runner.run() + del lettuce.world.openstack + for feature_result in result.feature_results: + for scenario_result in [s for s in feature_result.scenario_results if not s.passed]: + for step in scenario_result.steps_undefined: + openstack.report_issue( + Issue( + Issue.ERROR, + 'Undefined step "%s"' % + step.sentence)) diff --git a/ostack_validator/main.py b/ostack_validator/main.py index 0e00a2b..f886ee0 100644 --- a/ostack_validator/main.py +++ b/ostack_validator/main.py @@ -5,38 +5,42 @@ import argparse from ostack_validator.model_parser import ModelParser from ostack_validator.inspection import MainConfigValidationInspection + def main(args): - parser = argparse.ArgumentParser() - parser.add_argument('-d', '--debug', help='set debug log level', action='store_true') - parser.add_argument('path', help='Path to config snapshot') + parser = argparse.ArgumentParser() + parser.add_argument( + '-d', + '--debug', + help='set debug log level', + action='store_true') + parser.add_argument('path', help='Path to config snapshot') - args = parser.parse_args(args) + args = parser.parse_args(args) - if args.debug: - logging.basicConfig(level=logging.DEBUG) - else: - logging.basicConfig(level=logging.WARN) + if args.debug: + logging.basicConfig(level=logging.DEBUG) + else: + logging.basicConfig(level=logging.WARN) - model_parser = ModelParser() + model_parser = ModelParser() - print('Analyzing configs in "%s"' % args.path) + print('Analyzing configs in "%s"' % args.path) - model = model_parser.parse(args.path) + model = model_parser.parse(args.path) - inspections = [MainConfigValidationInspection()] + inspections = [MainConfigValidationInspection()] - issues = [] - for inspection in inspections: - issues.extend(inspection.inspect(model)) + issues = [] + for inspection in inspections: + issues.extend(inspection.inspect(model)) + + if len(issues) == 0: + print('No issues found') + else: + print('Found issues:') + for issue in issues: + print(issue) - if len(issues) == 0: - print('No issues found') - else: - print('Found issues:') - for issue in issues: - print(issue) - if __name__ == '__main__': - main(sys.argv[1:]) - + main(sys.argv[1:]) diff --git a/ostack_validator/model.py b/ostack_validator/model.py index 4dc66e3..533cfe5 100644 --- a/ostack_validator/model.py +++ b/ostack_validator/model.py @@ -10,277 +10,341 @@ import ostack_validator.schemas from ostack_validator.config_formats import IniConfigParser from ostack_validator.utils import memoized + class IssueReporter(object): - def __init__(self): - super(IssueReporter, self).__init__() - self.issues = [] - def report_issue(self, issue): - issue.subject = self - self.issues.append(issue) + def __init__(self): + super(IssueReporter, self).__init__() + self.issues = [] + + def report_issue(self, issue): + issue.subject = self + self.issues.append(issue) + + @property + def all_issues(self): + return list(self.issues) - @property - def all_issues(self): - return list(self.issues) class Openstack(IssueReporter): - def __init__(self): - super(Openstack, self).__init__() - self.hosts = [] - def add_host(self, host): - if not host: return + def __init__(self): + super(Openstack, self).__init__() + self.hosts = [] - self.hosts.append(host) - host.parent = self + def add_host(self, host): + if not host: + return - @property - def all_issues(self): - result = super(Openstack, self).all_issues + self.hosts.append(host) + host.parent = self - for host in self.hosts: - result.extend(host.all_issues) + @property + def all_issues(self): + result = super(Openstack, self).all_issues - return result + for host in self.hosts: + result.extend(host.all_issues) - @property - def components(self): - components = [] - for host in self.hosts: - components.extend(host.components) + return result - return components + @property + def components(self): + components = [] + for host in self.hosts: + components.extend(host.components) + + return components class Host(IssueReporter): - def __init__(self, name): - super(Host, self).__init__() - self.name = name - self.components = [] - def __str__(self): - return 'Host "%s"' % self.name + def __init__(self, name): + super(Host, self).__init__() + self.name = name + self.components = [] - def add_component(self, component): - if not component: return + def __str__(self): + return 'Host "%s"' % self.name - self.components.append(component) - component.parent = self + def add_component(self, component): + if not component: + return - @property - def openstack(self): - return self.parent + self.components.append(component) + component.parent = self - @property - def all_issues(self): - result = super(Host, self).all_issues + @property + def openstack(self): + return self.parent - for component in self.components: - result.extend(component.all_issues) + @property + def all_issues(self): + result = super(Host, self).all_issues - return result + for component in self.components: + result.extend(component.all_issues) + + return result class Service(IssueReporter): - def __init__(self): - super(Service, self).__init__() - self.issues = [] - def report_issue(self, issue): - self.issues.append(issue) + def __init__(self): + super(Service, self).__init__() + self.issues = [] - @property - def host(self): - return self.parent + def report_issue(self, issue): + self.issues.append(issue) - @property - def openstack(self): - return self.host.openstack + @property + def host(self): + return self.parent - @property - def all_issues(self): - result = super(Service, self).all_issues + @property + def openstack(self): + return self.host.openstack - if hasattr(self, 'config_files') and self.config_files: - [result.extend(config_file.all_issues) for config_file in self.config_files] + @property + def all_issues(self): + result = super(Service, self).all_issues - return result + if hasattr(self, 'config_files') and self.config_files: + [result.extend(config_file.all_issues) + for config_file in self.config_files] - def __str__(self): - return 'Service "%s"' % self.name + return result + + def __str__(self): + return 'Service "%s"' % self.name class OpenstackComponent(Service): - logger = logging.getLogger('ostack_validator.model.openstack_component') - component = None + logger = logging.getLogger('ostack_validator.model.openstack_component') + component = None - @property - @memoized - def config(self): - schema = ConfigSchemaRegistry.get_schema(self.component, self.version) - if not schema: - self.logger.debug('No schema for component "%s" main config version %s. Skipping it' % (self.component, self.version)) - return None + @property + @memoized + def config(self): + schema = ConfigSchemaRegistry.get_schema(self.component, self.version) + if not schema: + self.logger.debug( + 'No schema for component "%s" main config version %s. Skipping it' % + (self.component, self.version)) + return None - return self._parse_config_resources(self.config_files, schema) + return self._parse_config_resources(self.config_files, schema) - def _parse_config_resources(self, resources, schema=None): - config = Configuration() + def _parse_config_resources(self, resources, schema=None): + config = Configuration() - # Apply defaults - if schema: - for parameter in filter(lambda p: p.default, schema.parameters): - if parameter.section == 'DEFAULT': - config.set_default(parameter.name, parameter.default) - else: - config.set_default('%s.%s' % (parameter.section, parameter.name), parameter.default) - - for resource in reversed(resources): - self._parse_config_file(Mark(resource.path), resource.contents, config, schema, issue_reporter=resource) - - return config - - def _parse_config_file(self, base_mark, config_contents, config=Configuration(), schema=None, issue_reporter=None): - if issue_reporter: - def report_issue(issue): - issue_reporter.report_issue(issue) - else: - def report_issue(issue): pass - - # Parse config file - config_parser = IniConfigParser() - parsed_config = config_parser.parse('', base_mark, config_contents) - for error in parsed_config.errors: - report_issue(error) - - # Validate config parameters and store them - section_name_text_f = lambda s: s.name.text - sections_by_name = groupby(sorted(parsed_config.sections, key=section_name_text_f), key=section_name_text_f) - - for section_name, sections in sections_by_name: - sections = list(sections) - - if len(sections) > 1: - report_issue(Issue(Issue.INFO, 'Section "%s" appears multiple times' % section_name)) - - seen_parameters = set() - - for section in sections: - unknown_section = False + # Apply defaults if schema: - unknown_section = not schema.has_section(section.name.text) + for parameter in filter(lambda p: p.default, schema.parameters): + if parameter.section == 'DEFAULT': + config.set_default(parameter.name, parameter.default) + else: + config.set_default( + '%s.%s' % + (parameter.section, parameter.name), parameter.default) - if unknown_section: - report_issue(MarkedIssue(Issue.WARNING, 'Unknown section "%s"' % (section_name), section.start_mark)) - continue + for resource in reversed(resources): + self._parse_config_file( + Mark(resource.path), + resource.contents, + config, + schema, + issue_reporter=resource) - for parameter in section.parameters: - parameter_schema = None - if schema: - parameter_schema = schema.get_parameter(name=parameter.name.text, section=section.name.text) - if not (parameter_schema or unknown_section): - report_issue(MarkedIssue(Issue.WARNING, 'Unknown parameter: section "%s" name "%s"' % (section_name, parameter.name.text), parameter.start_mark)) - continue + return config - if parameter.name.text in seen_parameters: - report_issue(MarkedIssue(Issue.WARNING, 'Parameter "%s" in section "%s" redeclared' % (parameter.name.text, section_name), parameter.start_mark)) - else: - seen_parameters.add(parameter.name.text) + def _parse_config_file( + self, + base_mark, + config_contents, + config=Configuration(), + schema=None, + issue_reporter=None): + if issue_reporter: + def report_issue(issue): + issue_reporter.report_issue(issue) + else: + def report_issue(issue): + pass - parameter_fullname = parameter.name.text - if section_name != 'DEFAULT': - parameter_fullname = section_name + '.' + parameter_fullname + # Parse config file + config_parser = IniConfigParser() + parsed_config = config_parser.parse('', base_mark, config_contents) + for error in parsed_config.errors: + report_issue(error) - if parameter_schema: - type_validator = TypeValidatorRegistry.get_validator(parameter_schema.type) - type_validation_result = type_validator.validate(parameter.value.text) - if isinstance(type_validation_result, Issue): - type_validation_result.mark = parameter.value.start_mark.merge(type_validation_result.mark) - type_validation_result.message = 'Property "%s" in section "%s": %s' % (parameter.name.text, section_name, type_validation_result.message) - report_issue(type_validation_result) + # Validate config parameters and store them + section_name_text_f = lambda s: s.name.text + sections_by_name = groupby( + sorted( + parsed_config.sections, + key=section_name_text_f), + key=section_name_text_f) - config.set(parameter_fullname, parameter.value.text) - else: - value = type_validation_result + for section_name, sections in sections_by_name: + sections = list(sections) - config.set(parameter_fullname, value) + if len(sections) > 1: + report_issue( + Issue( + Issue.INFO, + 'Section "%s" appears multiple times' % + section_name)) - # if value == parameter_schema.default: - # report_issue(MarkedIssue(Issue.INFO, 'Explicit value equals default: section "%s" parameter "%s"' % (section_name, parameter.name.text), parameter.start_mark)) - if parameter_schema.deprecation_message: - report_issue(MarkedIssue(Issue.WARNING, 'Deprecated parameter: section "%s" name "%s". %s' % (section_name, parameter.name.text, parameter_schema.deprecation_message), parameter.start_mark)) - else: - config.set(parameter_fullname, parameter.value.text) + seen_parameters = set() - return config + for section in sections: + unknown_section = False + if schema: + unknown_section = not schema.has_section(section.name.text) + + if unknown_section: + report_issue( + MarkedIssue(Issue.WARNING, 'Unknown section "%s"' % + (section_name), section.start_mark)) + continue + + for parameter in section.parameters: + parameter_schema = None + if schema: + parameter_schema = schema.get_parameter( + name=parameter.name.text, + section=section.name.text) + if not (parameter_schema or unknown_section): + report_issue( + MarkedIssue( + Issue.WARNING, 'Unknown parameter: section "%s" name "%s"' % + (section_name, parameter.name.text), parameter.start_mark)) + continue + + if parameter.name.text in seen_parameters: + report_issue( + MarkedIssue( + Issue.WARNING, 'Parameter "%s" in section "%s" redeclared' % + (parameter.name.text, section_name), parameter.start_mark)) + else: + seen_parameters.add(parameter.name.text) + + parameter_fullname = parameter.name.text + if section_name != 'DEFAULT': + parameter_fullname = section_name + \ + '.' + parameter_fullname + + if parameter_schema: + type_validator = TypeValidatorRegistry.get_validator( + parameter_schema.type) + type_validation_result = type_validator.validate( + parameter.value.text) + if isinstance(type_validation_result, Issue): + type_validation_result.mark = parameter.value.start_mark.merge( + type_validation_result.mark) + type_validation_result.message = 'Property "%s" in section "%s": %s' % ( + parameter.name.text, section_name, type_validation_result.message) + report_issue(type_validation_result) + + config.set( + parameter_fullname, + parameter.value.text) + else: + value = type_validation_result + + config.set(parameter_fullname, value) + + # if value == parameter_schema.default: + # report_issue(MarkedIssue(Issue.INFO, 'Explicit value equals default: section "%s" parameter "%s"' % (section_name, parameter.name.text), parameter.start_mark)) + if parameter_schema.deprecation_message: + report_issue( + MarkedIssue( + Issue.WARNING, 'Deprecated parameter: section "%s" name "%s". %s' % + (section_name, parameter.name.text, parameter_schema.deprecation_message), parameter.start_mark)) + else: + config.set(parameter_fullname, parameter.value.text) + + return config class KeystoneComponent(OpenstackComponent): - component = 'keystone' - name = 'keystone' + component = 'keystone' + name = 'keystone' + class GlanceApiComponent(OpenstackComponent): - component = 'glance' - name = 'glance-api' + component = 'glance' + name = 'glance-api' + class GlanceRegistryComponent(OpenstackComponent): - component = 'glance' - name = 'glance-registry' + component = 'glance' + name = 'glance-registry' + class NovaApiComponent(OpenstackComponent): - component = 'nova' - name = 'nova-api' + component = 'nova' + name = 'nova-api' - @property - @memoized - def paste_config(self): - return self._parse_config_resources([self.paste_config_file]) + @property + @memoized + def paste_config(self): + return self._parse_config_resources([self.paste_config_file]) - @property - def all_issues(self): - result = super(NovaApiComponent, self).all_issues + @property + def all_issues(self): + result = super(NovaApiComponent, self).all_issues + + if hasattr(self, 'paste_config_file') and self.paste_config_file: + result.extend(self.paste_config_file.all_issues) + + return result - if hasattr(self, 'paste_config_file') and self.paste_config_file: - result.extend(self.paste_config_file.all_issues) - return result - class NovaComputeComponent(OpenstackComponent): - component = 'nova' - name = 'nova-compute' + component = 'nova' + name = 'nova-compute' + class NovaSchedulerComponent(OpenstackComponent): - component = 'nova' - name = 'nova-scheduler' + component = 'nova' + name = 'nova-scheduler' + class CinderApiComponent(OpenstackComponent): - component = 'cinder' - name = 'cinder-api' + component = 'cinder' + name = 'cinder-api' + class CinderVolumeComponent(OpenstackComponent): - component = 'cinder' - name = 'cinder-volume' + component = 'cinder' + name = 'cinder-volume' + class CinderSchedulerComponent(OpenstackComponent): - component = 'cinder' - name = 'cinder-scheduler' + component = 'cinder' + name = 'cinder-scheduler' + class MysqlComponent(Service): - component = 'mysql' - name = 'mysql' + component = 'mysql' + name = 'mysql' + class RabbitMqComponent(Service): - name = 'rabbitmq' + name = 'rabbitmq' + class FileResource(IssueReporter): - def __init__(self, path, contents, owner, group, permissions): - super(FileResource, self).__init__() - self.path = path - self.contents = contents - self.owner = owner - self.group = group - self.permissions = permissions - def __str__(self): - return 'File "%s"' % self.path + def __init__(self, path, contents, owner, group, permissions): + super(FileResource, self).__init__() + self.path = path + self.contents = contents + self.owner = owner + self.group = group + self.permissions = permissions + def __str__(self): + return 'File "%s"' % self.path diff --git a/ostack_validator/resource.py b/ostack_validator/resource.py index 3390efa..f500e78 100644 --- a/ostack_validator/resource.py +++ b/ostack_validator/resource.py @@ -4,162 +4,205 @@ import json from ostack_validator.common import Error, Version + class Resource(object): - HOST = 'host' - FILE = 'file' - DIRECTORY = 'directory' - SERVICE = 'service' + HOST = 'host' + FILE = 'file' + DIRECTORY = 'directory' + SERVICE = 'service' - def __init__(self, name): - super(Resource, self).__init__() - self.name = name + def __init__(self, name): + super(Resource, self).__init__() + self.name = name - def __str__(self): - return self.name + def __str__(self): + return self.name - def __repr__(self): - return '<%s name=%s>' % (str(self.__class__).split('.')[-1], self.name) + def __repr__(self): + return '<%s name=%s>' % (str(self.__class__).split('.')[-1], self.name) + + def get_contents(self): + raise Error('Not implemented') - def get_contents(self): - raise Error, 'Not implemented' class ResourceLocator(object): - def find_resource(self, resource_type, name, host=None, **kwargs): - return None + + def find_resource(self, resource_type, name, host=None, **kwargs): + return None + class HostResource(Resource): - def __init__(self, name, resource_locator, interfaces=[]): - super(HostResource, self).__init__(name) - self.resource_locator = resource_locator - self.interfaces = interfaces - def find_resource(self, resource_type, name=None, **kwargs): - return self.resource_locator.find_resource(resource_type, name, host=self, **kwargs) + def __init__(self, name, resource_locator, interfaces=[]): + super(HostResource, self).__init__(name) + self.resource_locator = resource_locator + self.interfaces = interfaces + + def find_resource(self, resource_type, name=None, **kwargs): + return ( + self.resource_locator.find_resource( + resource_type, + name, + host=self, + **kwargs) + ) + class DirectoryResource(Resource): - def __init__(self, name, owner=None, group=None, permissions=None): - super(DirectoryResource, self).__init__(name) - self.owner = owner - self.group = group - self.permissions = permissions + + def __init__(self, name, owner=None, group=None, permissions=None): + super(DirectoryResource, self).__init__(name) + self.owner = owner + self.group = group + self.permissions = permissions + class FileResource(Resource): - def __init__(self, name, path, owner=None, group=None, permissions=None): - super(FileResource, self).__init__(name) - self.path = path - self.owner = owner - self.group = group - self.permissions = permissions - def get_contents(self): - with open(self.path) as f: - return f.read() + def __init__(self, name, path, owner=None, group=None, permissions=None): + super(FileResource, self).__init__(name) + self.path = path + self.owner = owner + self.group = group + self.permissions = permissions + + def get_contents(self): + with open(self.path) as f: + return f.read() + class ServiceResource(Resource): - def __init__(self, name, version, metadata={}): - super(ServiceResource, self).__init__(name) - self.version = Version(version) - self.metadata = metadata + + def __init__(self, name, version, metadata={}): + super(ServiceResource, self).__init__(name) + self.version = Version(version) + self.metadata = metadata class FilesystemSnapshot(object): - def __init__(self, path): - super(FilesystemSnapshot, self).__init__() - self.path = path - self.basedir = os.path.join(os.path.dirname(self.path), 'root') - self._parse_snapshot() - def get_resource(self, path): - if path in self._resources: - return self._resources[path] + def __init__(self, path): + super(FilesystemSnapshot, self).__init__() + self.path = path + self.basedir = os.path.join(os.path.dirname(self.path), 'root') + self._parse_snapshot() - return None + def get_resource(self, path): + if path in self._resources: + return self._resources[path] - def _parse_snapshot(self): - self._resources = {} - if not os.path.isfile(self.path): return - with open(self.path) as f: - for line in f.readlines(): - line = line.lstrip() - if line == '' or line.startswith('#'): continue + return None + + def _parse_snapshot(self): + self._resources = {} + if not os.path.isfile(self.path): + return + with open(self.path) as f: + for line in f.readlines(): + line = line.lstrip() + if line == '' or line.startswith('#'): + continue + + resource_type = line.split('|')[0] + if resource_type == 'dir': + source_path, owner, group, permissions = line.split( + '|')[1:] + self._resources[source_path] = DirectoryResource( + source_path, + owner=owner, + group=group, + permissions=permissions) + elif resource_type == 'file': + source_path, local_path, owner, group, permissions = line.split( + '|')[1:] + self._resources[source_path] = FileResource( + os.path.basename(source_path), + path=os.path.join(self.basedir, + local_path), + owner=owner, + group=group, + permissions=permissions) + else: + self.logger.warn( + 'Unknown resource "%s" in line "%s"' % + (resource_type, line)) - resource_type = line.split('|')[0] - if resource_type == 'dir': - source_path, owner, group, permissions = line.split('|')[1:] - self._resources[source_path] = DirectoryResource(source_path, owner=owner, group=group, permissions=permissions) - elif resource_type == 'file': - source_path, local_path, owner, group, permissions = line.split('|')[1:] - self._resources[source_path] = FileResource(os.path.basename(source_path), path=os.path.join(self.basedir, local_path), owner=owner, group=group, permissions=permissions) - else: - self.logger.warn('Unknown resource "%s" in line "%s"' % (resource_type, line)) class ConfigSnapshotResourceLocator(object): - def __init__(self, basedir): - super(ConfigSnapshotResourceLocator, self).__init__() - self.basedir = basedir - if not os.path.isdir(self.basedir): - raise Error, 'Invalid argument: base directory does not exist' - self._services = None - self._filesystem_snapshots = {} - def find_resource(self, resource_type, name=None, host=None, **kwargs): - if resource_type == Resource.HOST: - if name: - host_path = os.path.join(self.basedir, name) - if not os.path.isdir(host_path): - return None - return HostResource(name, self) - else: - return [HostResource(os.path.basename(host_path), self) for host_path in glob.glob(os.path.join(self.basedir, '*')) if os.path.isdir(host_path)] - if resource_type == Resource.FILE: - if not host: - raise Error, 'Invalid argument: "host" need to be specified' + def __init__(self, basedir): + super(ConfigSnapshotResourceLocator, self).__init__() + self.basedir = basedir + if not os.path.isdir(self.basedir): + raise Error('Invalid argument: base directory does not exist') + self._services = None + self._filesystem_snapshots = {} - if isinstance(host, HostResource): - host = host.name + def find_resource(self, resource_type, name=None, host=None, **kwargs): + if resource_type == Resource.HOST: + if name: + host_path = os.path.join(self.basedir, name) + if not os.path.isdir(host_path): + return None + return HostResource(name, self) + else: + return ( + [HostResource(os.path.basename(host_path), self) + for host_path in glob.glob(os.path.join(self.basedir, '*')) if os.path.isdir(host_path)] + ) + if resource_type == Resource.FILE: + if not host: + raise Error('Invalid argument: "host" need to be specified') - if name: - return self._get_filesystem_snapshot(host).get_resource(name) - else: - return [] - elif resource_type == Resource.SERVICE: - if not host: - raise Error, 'Invalid argument: "host" need to be specified' + if isinstance(host, HostResource): + host = host.name - if isinstance(host, HostResource): - host = host.name + if name: + return self._get_filesystem_snapshot(host).get_resource(name) + else: + return [] + elif resource_type == Resource.SERVICE: + if not host: + raise Error('Invalid argument: "host" need to be specified') - self._ensure_services_loaded() + if isinstance(host, HostResource): + host = host.name - if name: - if name in self._services: - return self._services[host][name] + self._ensure_services_loaded() + + if name: + if name in self._services: + return self._services[host][name] + else: + return None + else: + return self._services[host].values() else: - return None - else: - return self._services[host].values() - else: - return None + return None - def _ensure_services_loaded(self): - if self._services: return + def _ensure_services_loaded(self): + if self._services: + return - self._services = {} - for host_path in glob.glob(os.path.join(self.basedir, '*')): - if not os.path.isdir(host_path): continue + self._services = {} + for host_path in glob.glob(os.path.join(self.basedir, '*')): + if not os.path.isdir(host_path): + continue - services_json_path = os.path.join(host_path, 'services.json') - if not os.path.isfile(services_json_path): continue + services_json_path = os.path.join(host_path, 'services.json') + if not os.path.isfile(services_json_path): + continue - host_name = os.path.basename(host_path) - self._services[host_name] = {} - with open(services_json_path) as f: - for service_name, metadata in json.loads(f.read()).items(): - version = metadata.pop('version') - self._services[host_name][service_name] = ServiceResource(service_name, str(version), metadata) - - def _get_filesystem_snapshot(self, host): - if not host in self._filesystem_snapshots: - self._filesystem_snapshots[host] = FilesystemSnapshot(os.path.join(self.basedir, host, 'filesystem')) - return self._filesystem_snapshots[host] + host_name = os.path.basename(host_path) + self._services[host_name] = {} + with open(services_json_path) as f: + for service_name, metadata in json.loads(f.read()).items(): + version = metadata.pop('version') + self._services[host_name][service_name] = ServiceResource( + service_name, str(version), metadata) + def _get_filesystem_snapshot(self, host): + if not host in self._filesystem_snapshots: + self._filesystem_snapshots[host] = FilesystemSnapshot( + os.path.join(self.basedir, host, 'filesystem')) + return self._filesystem_snapshots[host] diff --git a/ostack_validator/schema.py b/ostack_validator/schema.py index 171e29c..52c7e0a 100644 --- a/ostack_validator/schema.py +++ b/ostack_validator/schema.py @@ -2,415 +2,528 @@ import sys from ostack_validator.common import Issue, MarkedIssue, Mark, Version, find, index -class SchemaUpdateRecord(object): - # checkpoint's data is version number - def __init__(self, version, operation, data=None): - super(SchemaUpdateRecord, self).__init__() - if not operation in ['checkpoint', 'add', 'remove']: - raise Error, 'Unknown operation "%s"' % operation - version = Version(version) - self.version = version - self.operation = operation - self.data = data - def __repr__(self): - return ' 0 or len(self.removals) > 0: - sys.stderr.write("WARNING: Uncommitted config schema \"%s\" version %s\n" % (self.name, self.current_version)) + self.current_version = None + self.current_section = None + self.adds = [] + self.removals = [] - def version(self, version, checkpoint=False): - version = Version(version) + def __del__(self): + if len(self.adds) > 0 or len(self.removals) > 0: + sys.stderr.write( + "WARNING: Uncommitted config schema \"%s\" version %s\n" % + (self.name, self.current_version)) - if self.current_version and self.current_version != version: - self.commit() + def version(self, version, checkpoint=False): + version = Version(version) - if checkpoint or self.data == []: - self.data.append(SchemaUpdateRecord(version, 'checkpoint')) + if self.current_version and self.current_version != version: + self.commit() - self.current_version = version + if checkpoint or self.data == []: + self.data.append(SchemaUpdateRecord(version, 'checkpoint')) - def section(self, name): - self.current_section = name + self.current_version = version - def param(self, *args, **kwargs): - self._ensure_version() + def section(self, name): + self.current_section = name - if not 'section' in kwargs and self.current_section: - kwargs['section'] = self.current_section + def param(self, *args, **kwargs): + self._ensure_version() - self.adds.append(ConfigParameterSchema(*args, **kwargs)) + if not 'section' in kwargs and self.current_section: + kwargs['section'] = self.current_section - def remove_param(self, name): - self._ensure_version() + self.adds.append(ConfigParameterSchema(*args, **kwargs)) - self.removals.append(name) + def remove_param(self, name): + self._ensure_version() - def commit(self): - "Finalize schema building" - self._ensure_version() + self.removals.append(name) - if len(self.removals) > 0: - self.data.append(SchemaUpdateRecord(self.current_version, 'remove', self.removals)) - self.removals = [] - if len(self.adds) > 0: - self.data.append(SchemaUpdateRecord(self.current_version, 'add', self.adds)) - self.adds = [] + def commit(self): + "Finalize schema building" + self._ensure_version() + + if len(self.removals) > 0: + self.data.append( + SchemaUpdateRecord( + self.current_version, + 'remove', + self.removals)) + self.removals = [] + if len(self.adds) > 0: + self.data.append( + SchemaUpdateRecord( + self.current_version, + 'add', + self.adds)) + self.adds = [] + + def _ensure_version(self): + if not self.current_version: + raise Error( + 'Schema version is not specified. Please call version() method first') - def _ensure_version(self): - if not self.current_version: - raise Error, 'Schema version is not specified. Please call version() method first' class ConfigSchemaRegistry: - __schemas = {} - @classmethod - def register_schema(self, project, configname=None): - if not configname: - configname = '%s.conf' % project - fullname = '%s/%s' % (project, configname) - self.__schemas[fullname] = [] - return SchemaBuilder(fullname, self.__schemas[fullname]) + __schemas = {} - @classmethod - def get_schema(self, project, version, configname=None): - if not configname: - configname = '%s.conf' % project - fullname = '%s/%s' % (project, configname) - version = Version(version) + @classmethod + def register_schema(self, project, configname=None): + if not configname: + configname = '%s.conf' % project + fullname = '%s/%s' % (project, configname) + self.__schemas[fullname] = [] + return SchemaBuilder(fullname, self.__schemas[fullname]) - if not fullname in self.__schemas: - return None + @classmethod + def get_schema(self, project, version, configname=None): + if not configname: + configname = '%s.conf' % project + fullname = '%s/%s' % (project, configname) + version = Version(version) - records = self.__schemas[fullname] - i = len(records)-1 - # Find latest checkpoint prior given version - while i>=0 and not (records[i].operation == 'checkpoint' and records[i].version <= version): i-=1 + if not fullname in self.__schemas: + return None - if i < 0: - return None + records = self.__schemas[fullname] + i = len(records) - 1 + # Find latest checkpoint prior given version + while i >= 0 and not (records[i].operation == 'checkpoint' and records[i].version <= version): + i -= 1 - parameters = [] - seen_parameters = set() - last_version = None + if i < 0: + return None - while i < len(records) and records[i].version <= version: - last_version = records[i].version - if records[i].operation == 'add': - for param in records[i].data: - if param.name in seen_parameters: - old_param_index = index(parameters, lambda p: p.name == param.name) - if old_param_index != -1: - parameters[old_param_index] = param - else: - parameters.append(param) - seen_parameters.add(param.name) - elif records[i].operation == 'remove': - for param_name in records[i].data: - param_index = index(parameters, lambda p: p.name == param_name) - if index != -1: - parameters.pop(param_index) - seen_parameters.remove(param_name) - i += 1 + parameters = [] + seen_parameters = set() + last_version = None - return ConfigSchema(fullname, last_version, 'ini', parameters) + while i < len(records) and records[i].version <= version: + last_version = records[i].version + if records[i].operation == 'add': + for param in records[i].data: + if param.name in seen_parameters: + old_param_index = index( + parameters, + lambda p: p.name == param.name) + if old_param_index != -1: + parameters[old_param_index] = param + else: + parameters.append(param) + seen_parameters.add(param.name) + elif records[i].operation == 'remove': + for param_name in records[i].data: + param_index = index( + parameters, + lambda p: p.name == param_name) + if index != -1: + parameters.pop(param_index) + seen_parameters.remove(param_name) + i += 1 + + return ConfigSchema(fullname, last_version, 'ini', parameters) class ConfigSchema: - def __init__(self, name, version, format, parameters): - self.name = name - self.version = Version(version) - self.format = format - self.parameters = parameters - def has_section(self, section): - return find(self.parameters, lambda p: p.section == section) != None + def __init__(self, name, version, format, parameters): + self.name = name + self.version = Version(version) + self.format = format + self.parameters = parameters + + def has_section(self, section): + return ( + find(self.parameters, lambda p: p.section == section) is not None + ) + + def get_parameter(self, name, section=None): + # TODO: optimize this + return ( + find( + self.parameters, + lambda p: p.name == name and p.section == section) + ) + + def __repr__(self): + return ( + '' % ( + self.name, self.version, self.format, self.parameters) + ) - def get_parameter(self, name, section=None): - # TODO: optimize this - return find(self.parameters, lambda p: p.name == name and p.section == section) - def __repr__(self): - return '' % (self.name, self.version, self.format, self.parameters) - class ConfigParameterSchema: - def __init__(self, name, type, section=None, description=None, default=None, required=False, deprecation_message=None): - self.section = section - self.name = name - self.type = type - self.description = description - self.default = default - self.required = required - self.deprecation_message = deprecation_message - def __repr__(self): - return '' % ' '.join(['%s=%s' % (attr, getattr(self, attr)) for attr in ['section', 'name', 'type', 'description', 'default', 'required']]) + def __init__( + self, + name, + type, + section=None, + description=None, + default=None, + required=False, + deprecation_message=None): + self.section = section + self.name = name + self.type = type + self.description = description + self.default = default + self.required = required + self.deprecation_message = deprecation_message + + def __repr__(self): + return ( + '' % ' '.join(['%s=%s' % (attr, getattr(self, attr)) + for attr in ['section', 'name', 'type', 'description', 'default', 'required']]) + ) class TypeValidatorRegistry: - __validators = {} - @classmethod - def register_validator(self, type_name, type_validator): - self.__validators[type_name] = type_validator + __validators = {} - @classmethod - def get_validator(self, name): - return self.__validators[name] + @classmethod + def register_validator(self, type_name, type_validator): + self.__validators[type_name] = type_validator + + @classmethod + def get_validator(self, name): + return self.__validators[name] class SchemaError(Issue): - def __init__(self, message): - super(SchemaError, self).__init__(Issue.ERROR, message) + + def __init__(self, message): + super(SchemaError, self).__init__(Issue.ERROR, message) + class InvalidValueError(MarkedIssue): - def __init__(self, message, mark=Mark('', 0, 0)): - super(InvalidValueError, self).__init__(Issue.ERROR, 'Invalid value: '+message, mark) + + def __init__(self, message, mark=Mark('', 0, 0)): + super( + InvalidValueError, + self).__init__( + Issue.ERROR, + 'Invalid value: ' + + message, + mark) + class TypeValidator(object): - def __init__(self, f): - super(TypeValidator, self).__init__() - self.f = f - def validate(self, value): - return getattr(self, 'f')(value) + def __init__(self, f): + super(TypeValidator, self).__init__() + self.f = f + + def validate(self, value): + return getattr(self, 'f')(value) def type_validator(name, **kwargs): - def wrap(fn): - def wrapped(s): - return fn(s, **kwargs) - o = TypeValidator(wrapped) - TypeValidatorRegistry.register_validator(name, o) - return fn - return wrap + def wrap(fn): + def wrapped(s): + return fn(s, **kwargs) + o = TypeValidator(wrapped) + TypeValidatorRegistry.register_validator(name, o) + return fn + return wrap + def isissue(o): - return isinstance(o, Issue) + return isinstance(o, Issue) + @type_validator('boolean') def validate_boolean(s): - s = s.lower() - if s == 'true': - return True - elif s == 'false': - return False - else: - return InvalidValueError('Value should be "true" or "false"') + s = s.lower() + if s == 'true': + return True + elif s == 'false': + return False + else: + return InvalidValueError('Value should be "true" or "false"') + def validate_enum(s, values=[]): - if s in values: - return None - if len(values) == 0: - message = 'There should be no value' - elif len(values) == 1: - message = 'The only valid value is %s' % values[0] - else: - message = 'Valid values are %s and %s' % (', '.join(values[:-1]), values[-1]) - return InvalidValueError('%s' % message) + if s in values: + return None + if len(values) == 0: + message = 'There should be no value' + elif len(values) == 1: + message = 'The only valid value is %s' % values[0] + else: + message = 'Valid values are %s and %s' % ( + ', '.join(values[:-1]), values[-1]) + return InvalidValueError('%s' % message) + def validate_ipv4_address(s): - s = s.strip() - parts = s.split('.') - if len(parts) == 4: - if all([all([c.isdigit() for c in part]) for part in parts]): - parts = [int(part) for part in parts] - if all([part < 256 for part in parts]): - return '.'.join([str(part) for part in parts]) + s = s.strip() + parts = s.split('.') + if len(parts) == 4: + if all([all([c.isdigit() for c in part]) for part in parts]): + parts = [int(part) for part in parts] + if all([part < 256 for part in parts]): + return '.'.join([str(part) for part in parts]) + + return InvalidValueError('Value should be ipv4 address') - return InvalidValueError('Value should be ipv4 address') def validate_ipv4_network(s): - s = s.strip() - parts = s.split('/') - if len(parts) != 2: - return InvalidValueError('Should have "/" character separating address and prefix length') + s = s.strip() + parts = s.split('/') + if len(parts) != 2: + return ( + InvalidValueError( + 'Should have "/" character separating address and prefix length') + ) - address, prefix = parts - prefix = prefix.strip() + address, prefix = parts + prefix = prefix.strip() - if prefix.strip() == '': - return InvalidValueError('Prefix length is required') + if prefix.strip() == '': + return InvalidValueError('Prefix length is required') - address = validate_ipv4_address(address) - if isissue(address): - return address + address = validate_ipv4_address(address) + if isissue(address): + return address - if not all([c.isdigit() for c in prefix]): - return InvalidValueError('Prefix length should be an integer') + if not all([c.isdigit() for c in prefix]): + return InvalidValueError('Prefix length should be an integer') - prefix = int(prefix) - if prefix > 32: - return InvalidValueError('Prefix length should be less than or equal to 32') + prefix = int(prefix) + if prefix > 32: + return ( + InvalidValueError( + 'Prefix length should be less than or equal to 32') + ) + + return '%s/%d' % (address, prefix) - return '%s/%d' % (address, prefix) def validate_host_label(s): - if len(s) == 0: - return InvalidValueError('Host label should have at least one character') + if len(s) == 0: + return ( + InvalidValueError('Host label should have at least one character') + ) - if not s[0].isalpha(): - return InvalidValueError('Host label should start with a letter, but it starts with "%s"' % s[0]) + if not s[0].isalpha(): + return ( + InvalidValueError( + 'Host label should start with a letter, but it starts with "%s"' % + s[0]) + ) - if len(s) == 1: return s + if len(s) == 1: + return s - if not (s[-1].isdigit() or s[-1].isalpha()): - return InvalidValueError('Host label should end with letter or digit, but it ends with "%s"' % s[-1], Mark('', 0, len(s)-1)) + if not (s[-1].isdigit() or s[-1].isalpha()): + return ( + InvalidValueError( + 'Host label should end with letter or digit, but it ends with "%s"' % + s[-1], Mark('', 0, len(s) - 1)) + ) - if len(s) == 2: return s + if len(s) == 2: + return s - for i, c in enumerate(s[1:-1]): - if not (c.isalpha() or c.isdigit() or c == '-'): - return InvalidValueError('Host label should contain only letters, digits or hypens, but it contains "%s"' % c, Mark('', 0, i+1)) - - return s + for i, c in enumerate(s[1:-1]): + if not (c.isalpha() or c.isdigit() or c == '-'): + return ( + InvalidValueError( + 'Host label should contain only letters, digits or hypens, but it contains "%s"' % + c, Mark('', 0, i + 1)) + ) + return s @type_validator('host') @type_validator('host_address') def validate_host_address(s): - result = validate_ipv4_address(s) - if not isissue(result): - return result + result = validate_ipv4_address(s) + if not isissue(result): + return result - offset = len(s) - len(s.lstrip()) + offset = len(s) - len(s.lstrip()) - parts = s.strip().split('.') - part_offset = offset - labels = [] - for part in parts: - host_label = validate_host_label(part) - if isissue(host_label): - return host_label.offset_by(Mark('', 0, part_offset)) + parts = s.strip().split('.') + part_offset = offset + labels = [] + for part in parts: + host_label = validate_host_label(part) + if isissue(host_label): + return host_label.offset_by(Mark('', 0, part_offset)) - part_offset += len(part)+1 - labels.append(host_label) + part_offset += len(part) + 1 + labels.append(host_label) + + return '.'.join(labels) - return '.'.join(labels) @type_validator('network') @type_validator('network_address') def validate_network_address(s): - return validate_ipv4_network(s) + return validate_ipv4_network(s) + @type_validator('host_and_port') def validate_host_and_port(s, default_port=None): - parts = s.strip().split(':', 2) + parts = s.strip().split(':', 2) - host_address = validate_host_address(parts[0]) - if isissue(host_address): - return host_address + host_address = validate_host_address(parts[0]) + if isissue(host_address): + return host_address - if len(parts) == 2: - port = validate_port(parts[1]) - if isissue(port): - return port - elif default_port: - port = default_port - else: - return InvalidValueError('No port specified') + if len(parts) == 2: + port = validate_port(parts[1]) + if isissue(port): + return port + elif default_port: + port = default_port + else: + return InvalidValueError('No port specified') + + return (host_address, port) - return (host_address, port) @type_validator('string') @type_validator('list') @type_validator('multi') def validate_string(s): - return s + return s + @type_validator('integer') def validate_integer(s, min=None, max=None): - leading_whitespace_len = 0 - while leading_whitespace_len < len(s) and s[leading_whitespace_len].isspace(): leading_whitespace_len += 1 + leading_whitespace_len = 0 + while leading_whitespace_len < len(s) and s[leading_whitespace_len].isspace(): + leading_whitespace_len += 1 - s = s.strip() - if s == '': - return InvalidValueError('Should not be empty') + s = s.strip() + if s == '': + return InvalidValueError('Should not be empty') - for i, c in enumerate(s): - if not c.isdigit() and not ((c == '-') and (i == 0)): - return InvalidValueError('Only digits are allowed, but found char "%s"' % c, Mark('', 1, i+1+leading_whitespace_len)) + for i, c in enumerate(s): + if not c.isdigit() and not ((c == '-') and (i == 0)): + return ( + InvalidValueError( + 'Only digits are allowed, but found char "%s"' % + c, Mark('', 1, i + 1 + leading_whitespace_len)) + ) - v = int(s) - if min and v < min: - return InvalidValueError('Should be greater than or equal to %d' % min, Mark('', 1, leading_whitespace_len)) - if max and v > max: - return InvalidValueError('Should be less than or equal to %d' % max, Mark('', 1, leading_whitespace_len)) + v = int(s) + if min and v < min: + return ( + InvalidValueError( + 'Should be greater than or equal to %d' % + min, Mark('', 1, leading_whitespace_len)) + ) + if max and v > max: + return ( + InvalidValueError( + 'Should be less than or equal to %d' % + max, Mark('', 1, leading_whitespace_len)) + ) + + return v - return v @type_validator('float') def validate_float(s): - # TODO: Implement proper validation - return float(s) + # TODO: Implement proper validation + return float(s) + @type_validator('port') def validate_port(s, min=1, max=65535): - return validate_integer(s, min=min, max=max) + return validate_integer(s, min=min, max=max) + @type_validator('string_list') def validate_list(s, element_type='string'): - element_type_validator = TypeValidatorRegistry.get_validator(element_type) - if not element_type_validator: - return SchemaError('Invalid element type "%s"' % element_type) + element_type_validator = TypeValidatorRegistry.get_validator(element_type) + if not element_type_validator: + return SchemaError('Invalid element type "%s"' % element_type) - result = [] - s = s.strip() + result = [] + s = s.strip() + + if s == '': + return result + + values = s.split(',') + for value in values: + validated_value = element_type_validator.validate(value.strip()) + if isinstance(validated_value, Issue): + # TODO: provide better position reporting + return validated_value + result.append(validated_value) - if s == '': return result - values = s.split(',') - for value in values: - validated_value = element_type_validator.validate(value.strip()) - if isinstance(validated_value, Issue): - # TODO: provide better position reporting - return validated_value - result.append(validated_value) - - return result @type_validator('string_dict') def validate_dict(s, element_type='string'): - element_type_validator = TypeValidatorRegistry.get_validator(element_type) - if not element_type_validator: - return SchemaError('Invalid element type "%s"' % element_type) + element_type_validator = TypeValidatorRegistry.get_validator(element_type) + if not element_type_validator: + return SchemaError('Invalid element type "%s"' % element_type) - result = {} - s = s.strip() + result = {} + s = s.strip() - if s == '': + if s == '': + return result + + pairs = s.split(',') + for pair in pairs: + key_value = pair.split(':', 2) + if len(key_value) < 2: + return ( + InvalidValueError( + 'Value should be NAME:VALUE pairs separated by ","') + ) + + key, value = key_value + key = key.strip() + value = value.strip() + + if key == '': + # TODO: provide better position reporting + return InvalidValueError('Key name should not be empty') + + validated_value = element_type_validator.validate(value) + if isinstance(validated_value, Issue): + # TODO: provide better position reporting + return validated_value + result[key] = validated_value return result - - pairs = s.split(',') - for pair in pairs: - key_value = pair.split(':', 2) - if len(key_value) < 2: - return InvalidValueError('Value should be NAME:VALUE pairs separated by ","') - - key, value = key_value - key = key.strip() - value = value.strip() - - if key == '': - # TODO: provide better position reporting - return InvalidValueError('Key name should not be empty') - - validated_value = element_type_validator.validate(value) - if isinstance(validated_value, Issue): - # TODO: provide better position reporting - return validated_value - result[key] = validated_value - return result - diff --git a/ostack_validator/schemas/__init__.py b/ostack_validator/schemas/__init__.py index 764f1cc..d9634ec 100644 --- a/ostack_validator/schemas/__init__.py +++ b/ostack_validator/schemas/__init__.py @@ -1,4 +1,3 @@ import ostack_validator.schemas.keystone import ostack_validator.schemas.nova import ostack_validator.schemas.cinder - diff --git a/ostack_validator/schemas/cinder/__init__.py b/ostack_validator/schemas/cinder/__init__.py index 90f39d3..6ecdc0b 100644 --- a/ostack_validator/schemas/cinder/__init__.py +++ b/ostack_validator/schemas/cinder/__init__.py @@ -1,2 +1 @@ import ostack_validator.schemas.cinder.v2013_1_3 - diff --git a/ostack_validator/schemas/cinder/v2013_1_3.py b/ostack_validator/schemas/cinder/v2013_1_3.py index 0e4ca0c..1e3a6f2 100644 --- a/ostack_validator/schemas/cinder/v2013_1_3.py +++ b/ostack_validator/schemas/cinder/v2013_1_3.py @@ -10,763 +10,2279 @@ cinder.param('', type='string', default='', description="cinder.conf sample") cinder.section('DEFAULT') -cinder.param('fatal_exception_format_errors', type='boolean', default='false', description="make exception message format errors fatal") - -cinder.param('policy_file', type='string', default='policy.json', description="JSON file representing policy") - -cinder.param('policy_default_rule', type='string', default='default', description="Rule checked when requested rule is not found") - -cinder.param('quota_volumes', type='integer', default='10', description="number of volumes allowed per project") - -cinder.param('quota_snapshots', type='integer', default='10', description="number of volume snapshots allowed per project") - -cinder.param('quota_gigabytes', type='integer', default='1000', description="number of volume gigabytes") - -cinder.param('reservation_expire', type='integer', default='86400', description="number of seconds until a reservation expires") - -cinder.param('until_refresh', type='integer', default='0', description="count of reservations until usage is refreshed") - -cinder.param('max_age', type='integer', default='0', description="number of seconds between subsequent usage refreshes") - -cinder.param('quota_driver', type='string', default='cinder.quota.DbQuotaDriver', description="default driver to use for quota checks") - -cinder.param('use_default_quota_class', type='boolean', default='true', description="whether to use default quota class for default quota") - -cinder.param('report_interval', type='integer', default='10', description="seconds between nodes reporting state to datastore") - -cinder.param('periodic_interval', type='integer', default='60', description="seconds between running periodic tasks") - -cinder.param('periodic_fuzzy_delay', type='integer', default='60', description="range of seconds to randomly delay when starting the periodic task scheduler to reduce stampeding.") - -cinder.param('osapi_volume_listen', type='string', default='0.0.0.0', description="IP address for OpenStack Volume API to listen") - -cinder.param('osapi_volume_listen_port', type='integer', default='8776', description="port for os volume api to listen") - -cinder.param('sqlite_clean_db', type='string', default='clean.sqlite', description="File name of clean sqlite db") - -cinder.param('fake_tests', type='boolean', default='true', description="should we use everything for testing") - -cinder.param('backlog', type='integer', default='4096', description="Number of backlog requests to configure the socket with") - -cinder.param('tcp_keepidle', type='integer', default='600', description="Sets the value of TCP_KEEPIDLE in seconds for each server socket. Not supported on OS X.") - -cinder.param('ssl_ca_file', type='string', default='', description="CA certificate file to use to verify connecting clients") - -cinder.param('ssl_cert_file', type='string', default='', description="Certificate file to use when starting the server securely") - -cinder.param('ssl_key_file', type='string', default='', description="Private key file to use when starting the server securely") - -cinder.param('osapi_max_limit', type='integer', default='1000', description="the maximum number of items returned in a single response from a collection resource") - -cinder.param('osapi_volume_base_URL', type='string', default='', description="Base URL that will be presented to users in links to the OpenStack Volume API") - -cinder.param('use_forwarded_for', type='boolean', default='false', description="Treat X-Forwarded-For as the canonical remote address. Only enable this if you have a sanitizing proxy.") - -cinder.param('osapi_max_request_body_size', type='integer', default='114688', description="Max size for body of a request") - -cinder.param('backup_ceph_conf', type='string', default='/etc/ceph/ceph.conf', description="Ceph config file to use.") - -cinder.param('backup_ceph_user', type='string', default='cinder', description="the Ceph user to connect with") - -cinder.param('backup_ceph_chunk_size', type='integer', default='134217728', description="the chunk size in bytes that a backup will be broken into before transfer to backup store") - -cinder.param('backup_ceph_pool', type='string', default='backups', description="the Ceph pool to backup to") - -cinder.param('backup_ceph_stripe_unit', type='integer', default='0', description="RBD stripe unit to use when creating a backup image") - -cinder.param('backup_ceph_stripe_count', type='integer', default='0', description="RBD stripe count to use when creating a backup image") - -cinder.param('restore_discard_excess_bytes', type='boolean', default='true', description="If True, always discard excess bytes when restoring volumes.") - -cinder.param('backup_swift_url', type='string', default='http://localhost:8080/v1/AUTH_', description="The URL of the Swift endpoint") - -cinder.param('backup_swift_auth', type='string', default='per_user', description="Swift authentication mechanism") - -cinder.param('backup_swift_user', type='string', default='', description="Swift user name") - -cinder.param('backup_swift_key', type='string', default='', description="Swift key for authentication") - -cinder.param('backup_swift_container', type='string', default='volumebackups', description="The default Swift container to use") - -cinder.param('backup_swift_object_size', type='integer', default='52428800', description="The size in bytes of Swift backup objects") - -cinder.param('backup_swift_retry_attempts', type='integer', default='3', description="The number of retries to make for Swift operations") - -cinder.param('backup_swift_retry_backoff', type='integer', default='2', description="The backoff time in seconds between Swift retries") - -cinder.param('backup_compression_algorithm', type='string', default='zlib', description="Compression algorithm") - -cinder.param('backup_tsm_volume_prefix', type='string', default='backup', description="Volume prefix for the backup id when backing up to TSM") - -cinder.param('backup_tsm_password', type='string', default='password', description="TSM password for the running username") - -cinder.param('backup_tsm_compression', type='boolean', default='true', description="Enable or Disable compression for backups") - -cinder.param('backup_driver', type='string', default='cinder.backup.drivers.swift', description="Driver to use for backups.") - -cinder.param('num_volume_device_scan_tries', type='integer', default='3', description="The maximum number of times to rescan targetsto find volume") - -cinder.param('iscsi_helper', type='string', default='tgtadm', description="iscsi target user-land tool to use") - -cinder.param('volumes_dir', type='string', default='$state_path/volumes', description="Volume configuration file storage directory") - -cinder.param('iet_conf', type='string', default='/etc/iet/ietd.conf', description="IET configuration file") - -cinder.param('lio_initiator_iqns', type='string', default='', description="Comma-separatd list of initiator IQNs allowed to connect to the iSCSI target.") - -cinder.param('iscsi_iotype', type='string', default='fileio', description="Sets the behavior of the iSCSI target to either perform blockio or fileio optionally, auto can be set and Cinder will autodetect type of backing device") - -cinder.param('iser_helper', type='string', default='tgtadm', description="iser target user-land tool to use") - -cinder.param('volumes_dir', type='string', default='$state_path/volumes', description="Volume configuration file storage directory") - -cinder.param('nfs_mount_point_base', type='string', default='$state_path/mnt', description="Base dir containing mount points for nfs shares") - -cinder.param('nfs_mount_options', type='string', default='', description="Mount options passed to the nfs client. See section of the nfs man page for details") - -cinder.param('glusterfs_mount_point_base', type='string', default='$state_path/mnt', description="Base dir containing mount points for gluster shares") - -cinder.param('connection_type', type='string', default='', description="Virtualization api connection type : libvirt, xenapi, or fake") - -cinder.param('api_paste_config', type='string', default='api-paste.ini', description="File name for the paste.deploy config for cinder-api") - -cinder.param('pybasedir', type='string', default='/usr/lib/python/site-packages', description="Directory where the cinder python module is installed") - -cinder.param('bindir', type='string', default='$pybasedir/bin', description="Directory where cinder binaries are installed") - -cinder.param('state_path', type='string', default='$pybasedir', description="Top-level directory for maintaining cinder's state") - -cinder.param('my_ip', type='string', default='10.0.0.1', description="ip address of this host") - -cinder.param('glance_host', type='string', default='$my_ip', description="default glance hostname or ip") - -cinder.param('glance_port', type='integer', default='9292', description="default glance port") - -cinder.param('glance_api_servers', type='list', default='$glance_host:$glance_port', description="A list of the glance api servers available to cinder") - -cinder.param('glance_api_version', type='integer', default='1', description="Version of the glance api to use") - -cinder.param('glance_num_retries', type='integer', default='0', description="Number retries when downloading an image from glance") - -cinder.param('glance_api_insecure', type='boolean', default='false', description="Allow to perform insecure SSL") - -cinder.param('glance_api_ssl_compression', type='boolean', default='false', description="Whether to attempt to negotiate SSL layer compression when using SSL") - -cinder.param('glance_request_timeout', type='integer', default='', description="http/https timeout value for glance operations. If no value") - -cinder.param('scheduler_topic', type='string', default='cinder-scheduler', description="the topic scheduler nodes listen on") - -cinder.param('volume_topic', type='string', default='cinder-volume', description="the topic volume nodes listen on") - -cinder.param('backup_topic', type='string', default='cinder-backup', description="the topic volume backup nodes listen on") - -cinder.param('enable_v1_api', type='boolean', default='true', description="Deploy v1 of the Cinder API. ") - -cinder.param('enable_v2_api', type='boolean', default='true', description="Deploy v2 of the Cinder API. ") - -cinder.param('api_rate_limit', type='boolean', default='true', description="whether to rate limit the api") - -cinder.param('osapi_volume_ext_list', type='list', default='', description="Specify list of extensions to load when using osapi_volume_extension option with cinder.api.contrib.select_extensions") - -cinder.param('osapi_volume_extension', type='multi', default='cinder.api.contrib.standard_extensions', description="osapi volume extension to load") - -cinder.param('volume_manager', type='string', default='cinder.volume.manager.VolumeManager', description="full class name for the Manager for volume") - -cinder.param('backup_manager', type='string', default='cinder.backup.manager.BackupManager', description="full class name for the Manager for volume backup") - -cinder.param('scheduler_manager', type='string', default='cinder.scheduler.manager.SchedulerManager', description="full class name for the Manager for scheduler") - -cinder.param('host', type='string', default='cinder', description="Name of this node. This can be an opaque identifier. It is not necessarily a hostname, FQDN, or IP address.") - -cinder.param('storage_availability_zone', type='string', default='nova', description="availability zone of this node") - -cinder.param('default_availability_zone', type='string', default='', description="default availability zone to use when creating a new volume. If this is not set then we use the value from the storage_availability_zone option as the default availability_zone for new volumes.") - -cinder.param('memcached_servers', type='list', default='', description="Memcached servers or None for in process cache.") - -cinder.param('default_volume_type', type='string', default='', description="default volume type to use") - -cinder.param('volume_usage_audit_period', type='string', default='month', description="time period to generate volume usages for. Time period must be hour, day, month or year") - -cinder.param('root_helper', type='string', default='sudo', description="Deprecated: command to use for running commands as root") - -cinder.param('rootwrap_config', type='string', default='/etc/cinder/rootwrap.conf', description="Path to the rootwrap configuration file to use for running commands as root") - -cinder.param('monkey_patch', type='boolean', default='false', description="Enable monkey patching") - -cinder.param('monkey_patch_modules', type='list', default='', description="List of modules/decorators to monkey patch") - -cinder.param('service_down_time', type='integer', default='60', description="maximum time since last check-in for up service") - -cinder.param('volume_api_class', type='string', default='cinder.volume.api.API', description="The full class name of the volume API class to use") - -cinder.param('backup_api_class', type='string', default='cinder.backup.api.API', description="The full class name of the volume backup API class") - -cinder.param('auth_strategy', type='string', default='noauth', description="The strategy to use for auth. Supports noauth, keystone, and deprecated.") - -cinder.param('enabled_backends', type='list', default='', description="A list of backend names to use. These backend names should be backed by a unique [CONFIG] group with its options") - -cinder.param('no_snapshot_gb_quota', type='boolean', default='false', description="Whether snapshots count against GigaByte quota") - -cinder.param('transfer_api_class', type='string', default='cinder.transfer.api.API', description="The full class name of the volume transfer API class") - -cinder.param('compute_api_class', type='string', default='cinder.compute.nova.API', description="The full class name of the compute API class to use") - -cinder.param('nova_catalog_info', type='string', default='compute:nova:publicURL', description="Info to match when looking for nova in the service catalog. Format is : separated values of the form: ::") - -cinder.param('nova_catalog_admin_info', type='string', default='compute:nova:adminURL', description="Same as nova_catalog_info, but for admin endpoint.") - -cinder.param('nova_endpoint_template', type='string', default='', description="Override service catalog lookup with template for nova endpoint e.g. http://localhost:8774/v2/%(tenant_id)s") - -cinder.param('nova_endpoint_admin_template', type='string', default='', description="Same as nova_endpoint_template, but for admin endpoint.") - -cinder.param('os_region_name', type='string', default='', description="region name of this node") - -cinder.param('nova_ca_certificates_file', type='string', default='', description="Location of ca certicates file to use for nova client requests.") - -cinder.param('nova_api_insecure', type='boolean', default='false', description="Allow to perform insecure SSL requests to nova") - -cinder.param('db_backend', type='string', default='sqlalchemy', description="The backend to use for db") - -cinder.param('enable_new_services', type='boolean', default='true', description="Services to be added to the available pool on create") - -cinder.param('volume_name_template', type='string', default='volume-%s', description="Template string to be used to generate volume names") - -cinder.param('snapshot_name_template', type='string', default='snapshot-%s', description="Template string to be used to generate snapshot names") - -cinder.param('backup_name_template', type='string', default='backup-%s', description="Template string to be used to generate backup names") - -cinder.param('db_driver', type='string', default='cinder.db', description="driver to use for database access") - -cinder.param('allowed_direct_url_schemes', type='list', default='', description="A list of url schemes that can be downloaded directly via the direct_url. Currently supported schemes: [file].") - -cinder.param('image_conversion_dir', type='string', default='$state_path/conversion', description="Directory used for temporary storage during image conversion") - -cinder.param('keymgr_api_class', type='string', default='cinder.keymgr.not_implemented_key_mgr.NotImplementedKeyManager', description="The full class name of the key manager API class") - -cinder.param('backend', type='string', default='sqlalchemy', description="The backend to use for db") - -cinder.param('use_tpool', type='boolean', default='false', description="Enable the experimental use of thread pooling for all DB API calls") - -cinder.param('connection', type='string', default='sqlite:////cinder/openstack/common/db/$sqlite_db', description="The SQLAlchemy connection string used to connect to the database") - -cinder.param('sql_connection', type='string', default='sqlite:////nova/openstack/common/db/$sqlite_db', description="The SQLAlchemy connection string used to connect to the database", deprecation_message='Deprecated in favor of "[DEFAULT]connection" parameter') - -cinder.param('idle_timeout', type='integer', default='3600', description="timeout before idle sql connections are reaped") - -cinder.param('min_pool_size', type='integer', default='1', description="Minimum number of SQL connections to keep open in a pool") - -cinder.param('max_pool_size', type='integer', default='5', description="Maximum number of SQL connections to keep open in a pool") - -cinder.param('max_retries', type='integer', default='10', description="maximum db connection retries during startup.") - -cinder.param('retry_interval', type='integer', default='10', description="interval between retries of opening a sql connection") - -cinder.param('max_overflow', type='integer', default='', description="If set, use this value for max_overflow with sqlalchemy") - -cinder.param('connection_debug', type='integer', default='0', description="Verbosity of SQL debugging information. 0=None, 100=Everything") - -cinder.param('connection_trace', type='boolean', default='false', description="Add python stack traces to SQL as comment strings") - -cinder.param('sqlite_db', type='string', default='cinder.sqlite', description="the filename to use with sqlite") - -cinder.param('sqlite_synchronous', type='boolean', default='true', description="If true, use synchronous mode for sqlite") - -cinder.param('backdoor_port', type='integer', default='', description="port for eventlet backdoor to listen") - -cinder.param('disable_process_locking', type='boolean', default='false', description="Whether to disable inter-process locks") - -cinder.param('lock_path', type='string', default='', description="Directory to use for lock files. Default to a temp directory") - -cinder.param('debug', type='boolean', default='false', description="Print debugging output") - -cinder.param('verbose', type='boolean', default='false', description="Print more verbose output") - -cinder.param('use_stderr', type='boolean', default='true', description="Log output to standard error") - -cinder.param('logging_context_format_string', type='string', default='%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user)s %(tenant)s] %(instance)s%(message)s', description="format string to use for log messages with context") - -cinder.param('logging_default_format_string', type='string', default='%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s', description="format string to use for log messages without context") - -cinder.param('logging_debug_format_suffix', type='string', default='%(funcName)s %(pathname)s:%(lineno)d', description="data to append to log format when level is DEBUG") - -cinder.param('logging_exception_prefix', type='string', default='%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s', description="prefix each line of exception output with this format") - -cinder.param('default_log_levels', type='list', default='amqplibWARN,sqlalchemyWARN,botoWARN,sudsINFO,keystoneINFO,eventlet.wsgi.serverWARN', description="list of logger=LEVEL pairs") - -cinder.param('publish_errors', type='boolean', default='false', description="publish error events") - -cinder.param('fatal_deprecations', type='boolean', default='false', description="make deprecations fatal") - -cinder.param('instance_format', type='string', default='"[instance: %(uuid)s] "', description="If an instance is passed with the log message, format it like this") - -cinder.param('instance_uuid_format', type='string', default='"[instance: %(uuid)s] "', description="If an instance UUID is passed with the log message, format it like this") - -cinder.param('log_config', type='string', default='', description="If this option is specified, the logging configuration file specified is used and overrides any other logging options specified. Please see the Python logging module documentation for details on logging configuration files.") - -cinder.param('log_format', type='string', default='', description="A logging.Formatter log message format string which may use any of the available logging.LogRecord attributes. This option is deprecated. Please use logging_context_format_string and logging_default_format_string instead.") - -cinder.param('log_date_format', type='string', default='%Y-%m-%d %H:%M:%S', description="Format string for %%(asctime)s in log records. Default: %(default)s") - -cinder.param('log_file', type='string', default='', description="(Optional) Name of log file to output to. If no default is set, logging will go to stdout.") - -cinder.param('log_dir', type='string', default='', description="(Optional) The base directory used for relative --log-file paths") - -cinder.param('use_syslog', type='boolean', default='false', description="Use syslog for logging.") - -cinder.param('syslog_log_facility', type='string', default='LOG_USER', description="syslog facility to receive log lines") - -cinder.param('default_notification_level', type='string', default='INFO', description="Default notification level for outgoing notifications") - -cinder.param('default_publisher_id', type='string', default='', description="Default publisher_id for outgoing notifications") - -cinder.param('notification_topics', type='list', default='notifications', description="AMQP topic used for OpenStack notifications") - -cinder.param('topics', type='list', default='notifications', description="AMQP topic(s) used for OpenStack notifications") - -cinder.param('run_external_periodic_tasks', type='boolean', default='true', description="Some periodic tasks can be run in a separate process. Should we run them here?") - -cinder.param('rpc_backend', type='string', default='cinder.openstack.common.rpc.impl_kombu', description="The messaging module to use, defaults to kombu.") - -cinder.param('rpc_thread_pool_size', type='integer', default='64', description="Size of RPC thread pool") - -cinder.param('rpc_conn_pool_size', type='integer', default='30', description="Size of RPC connection pool") - -cinder.param('rpc_response_timeout', type='integer', default='60', description="Seconds to wait for a response from call or multicall") - -cinder.param('rpc_cast_timeout', type='integer', default='30', description="Seconds to wait before a cast expires") - -cinder.param('allowed_rpc_exception_modules', type='list', default='cinder.openstack.common.exception,nova.exception,cinder.exception,exceptions', description="Modules of exceptions that are permitted to be recreatedupon receiving exception data from an rpc call.") - -cinder.param('fake_rabbit', type='boolean', default='false', description="If passed, use a fake RabbitMQ provider") - -cinder.param('control_exchange', type='string', default='openstack', description="AMQP exchange to connect to if using RabbitMQ or Qpid") - -cinder.param('amqp_rpc_single_reply_queue', type='boolean', default='false', description="Enable a fast single reply queue if using AMQP based RPC like RabbitMQ or Qpid.") - -cinder.param('amqp_durable_queues', type='boolean', default='false', description="Use durable queues in amqp.") - -cinder.param('amqp_auto_delete', type='boolean', default='false', description="Auto-delete queues in amqp.") - -cinder.param('kombu_ssl_version', type='string', default='', description="SSL version to use") - -cinder.param('kombu_ssl_keyfile', type='string', default='', description="SSL key file") - -cinder.param('kombu_ssl_certfile', type='string', default='', description="SSL cert file") - -cinder.param('kombu_ssl_ca_certs', type='string', default='', description="SSL certification authority file") - -cinder.param('rabbit_host', type='string', default='localhost', description="The RabbitMQ broker address where a single node is used") - -cinder.param('rabbit_port', type='integer', default='5672', description="The RabbitMQ broker port where a single node is used") - -cinder.param('rabbit_hosts', type='list', default='$rabbit_host:$rabbit_port', description="RabbitMQ HA cluster host:port pairs") - -cinder.param('rabbit_use_ssl', type='boolean', default='false', description="connect over SSL for RabbitMQ") - -cinder.param('rabbit_userid', type='string', default='guest', description="the RabbitMQ userid") - -cinder.param('rabbit_password', type='string', default='guest', description="the RabbitMQ password") - -cinder.param('rabbit_virtual_host', type='string', default='/', description="the RabbitMQ virtual host") - -cinder.param('rabbit_retry_interval', type='integer', default='1', description="how frequently to retry connecting with RabbitMQ") - -cinder.param('rabbit_retry_backoff', type='integer', default='2', description="how long to backoff for between retries when connecting to RabbitMQ") - -cinder.param('rabbit_max_retries', type='integer', default='0', description="maximum retries with trying to connect to RabbitMQ") - -cinder.param('rabbit_ha_queues', type='boolean', default='false', description="use H/A queues in RabbitMQ") - -cinder.param('qpid_hostname', type='string', default='localhost', description="Qpid broker hostname") - -cinder.param('qpid_port', type='integer', default='5672', description="Qpid broker port") - -cinder.param('qpid_hosts', type='list', default='$qpid_hostname:$qpid_port', description="Qpid HA cluster host:port pairs") - -cinder.param('qpid_username', type='string', default='', description="Username for qpid connection") - -cinder.param('qpid_password', type='string', default='', description="Password for qpid connection") - -cinder.param('qpid_sasl_mechanisms', type='string', default='', description="Space separated list of SASL mechanisms to use for auth") - -cinder.param('qpid_heartbeat', type='integer', default='60', description="Seconds between connection keepalive heartbeats") - -cinder.param('qpid_protocol', type='string', default='tcp', description="Transport to use, either 'tcp' or 'ssl'") - -cinder.param('qpid_tcp_nodelay', type='boolean', default='true', description="Disable Nagle algorithm") - -cinder.param('qpid_topology_version', type='integer', default='1', description="The qpid topology version to use. Version 1 is what was originally used by impl_qpid. Version 2 includes some backwards-incompatible changes that allow broker federation to work. Users should update to version 2 when they are able to take everything down, as it requires a clean break.") - -cinder.param('rpc_zmq_bind_address', type='string', default='*', description="ZeroMQ bind address. Should be a wildcard") - -cinder.param('rpc_zmq_matchmaker', type='string', default='cinder.openstack.common.rpc.matchmaker.MatchMakerLocalhost', description="MatchMaker driver") - -cinder.param('rpc_zmq_port', type='integer', default='9501', description="ZeroMQ receiver listening port") - -cinder.param('rpc_zmq_contexts', type='integer', default='1', description="Number of ZeroMQ contexts, defaults to 1") - -cinder.param('rpc_zmq_topic_backlog', type='integer', default='', description="Maximum number of ingress messages to locally buffer per topic. Default is unlimited.") - -cinder.param('rpc_zmq_ipc_dir', type='string', default='/var/run/openstack', description="Directory for holding IPC sockets") - -cinder.param('rpc_zmq_host', type='string', default='cinder', description="Name of this node. Must be a valid hostname, FQDN, or IP address. Must match 'host' option, if running Nova.") - -cinder.param('matchmaker_ringfile', type='string', default='/etc/nova/matchmaker_ring.json', description="Matchmaker ring file") - -cinder.param('matchmaker_heartbeat_freq', type='integer', default='300', description="Heartbeat frequency") - -cinder.param('matchmaker_heartbeat_ttl', type='integer', default='600', description="Heartbeat time-to-live.") - -cinder.param('host', type='string', default='127.0.0.1', description="Host to locate redis") - -cinder.param('port', type='integer', default='6379', description="Use this port to connect to redis host.") - -cinder.param('password', type='string', default='', description="Password for Redis server.") - -cinder.param('scheduler_host_manager', type='string', default='cinder.scheduler.host_manager.HostManager', description="The scheduler host manager class to use") - -cinder.param('scheduler_max_attempts', type='integer', default='3', description="Maximum number of attempts to schedule an volume") - -cinder.param('scheduler_default_filters', type='list', default='AvailabilityZoneFilter,CapacityFilter,CapabilitiesFilter', description="Which filter class names to use for filtering hosts when not specified in the request.") - -cinder.param('scheduler_default_weighers', type='list', default='CapacityWeigher', description="Which weigher class names to use for weighing hosts.") - -cinder.param('scheduler_driver', type='string', default='cinder.scheduler.filter_scheduler.FilterScheduler', description="Default scheduler driver to use") - -cinder.param('scheduler_json_config_location', type='string', default='', description="Absolute path to scheduler configuration JSON file.") - -cinder.param('max_gigabytes', type='integer', default='10000', description="maximum number of volume gigabytes to allow per host") - -cinder.param('capacity_weight_multiplier', type='floating point', default='1.0', description="Multiplier used for weighing volume capacity. Negative numbers mean to stack vs spread.") - -cinder.param('volume_transfer_salt_length', type='integer', default='8', description="The number of characters in the salt.") - -cinder.param('volume_transfer_key_length', type='integer', default='16', description="The number of characters in the autogenerated auth key.") - -cinder.param('snapshot_same_host', type='boolean', default='true', description="Create volume from snapshot at the host where snapshot resides") - -cinder.param('cloned_volume_same_az', type='boolean', default='true', description="Ensure that the new volumes are the same AZ as snapshot or source volume") - -cinder.param('num_shell_tries', type='integer', default='3', description="number of times to attempt to run flakey shell commands") - -cinder.param('reserved_percentage', type='integer', default='0', description="The percentage of backend capacity is reserved") - -cinder.param('iscsi_num_targets', type='integer', default='100', description="The maximum number of iscsi target ids per host") - -cinder.param('iscsi_target_prefix', type='string', default='iqn.2010-10.org.openstack:', description="prefix for iscsi volumes") - -cinder.param('iscsi_ip_address', type='string', default='$my_ip', description="The IP address that the iSCSI daemon is listening on") - -cinder.param('iscsi_port', type='integer', default='3260', description="The port that the iSCSI daemon is listening on") - -cinder.param('num_iser_scan_tries', type='integer', default='3', description="The maximum number of times to rescan iSER targetto find volume") - -cinder.param('iser_num_targets', type='integer', default='100', description="The maximum number of iser target ids per host") - -cinder.param('iser_target_prefix', type='string', default='iqn.2010-10.org.iser.openstack:', description="prefix for iser volumes") - -cinder.param('iser_ip_address', type='string', default='$my_ip', description="The IP address that the iSER daemon is listening on") - -cinder.param('iser_port', type='integer', default='3260', description="The port that the iSER daemon is listening on") - -cinder.param('volume_backend_name', type='string', default='', description="The backend name for a given driver implementation") - -cinder.param('use_multipath_for_image_xfer', type='boolean', default='false', description="Do we attach/detach volumes in cinder using multipath for volume to image and image to volume transfers?") - -cinder.param('volume_clear', type='string', default='zero', description="Method used to wipe old voumes") - -cinder.param('volume_clear_size', type='integer', default='0', description="Size in MiB to wipe at start of old volumes. 0 => all") - -cinder.param('available_devices', type='list', default='', description="List of all available devices") - -cinder.param('coraid_esm_address', type='string', default='', description="IP address of Coraid ESM") - -cinder.param('coraid_user', type='string', default='admin', description="User name to connect to Coraid ESM") - -cinder.param('coraid_group', type='string', default='admin', description="Name of group on Coraid ESM to which coraid_user belongs") - -cinder.param('coraid_password', type='string', default='password', description="Password to connect to Coraid ESM") - -cinder.param('coraid_repository_key', type='string', default='coraid_repository', description="Volume Type key name to store ESM Repository Name") - -cinder.param('eqlx_group_name', type='string', default='group-0', description="Group name to use for creating volumes") - -cinder.param('eqlx_cli_timeout', type='integer', default='30', description="Timeout for the Group Manager cli command execution") - -cinder.param('eqlx_cli_max_retries', type='integer', default='5', description="Maximum retry count for reconnection") - -cinder.param('eqlx_use_chap', type='boolean', default='false', description="Use CHAP authentificaion for targets?") - -cinder.param('eqlx_chap_login', type='string', default='admin', description="Existing CHAP account name") - -cinder.param('eqlx_chap_password', type='string', default='password', description="Password for specified CHAP account name") - -cinder.param('eqlx_pool', type='string', default='default', description="Pool in which volumes will be created") - -cinder.param('glusterfs_shares_config', type='string', default='/etc/cinder/glusterfs_shares', description="File with the list of available gluster shares") - -cinder.param('glusterfs_disk_util', type='string', default='df', description="Use du or df for free space calculation") - -cinder.param('glusterfs_sparsed_volumes', type='boolean', default='true', description="Create volumes as sparsed files which take no space.If set to False volume is created as regular file.In such case volume creation takes a lot of time.") - -cinder.param('glusterfs_qcow2_volumes', type='boolean', default='false', description="Create volumes as QCOW2 files rather than raw files.") - -cinder.param('gpfs_mount_point_base', type='string', default='', description="Path to the directory on GPFS mount point where volumes are stored") - -cinder.param('gpfs_images_dir', type='string', default='', description="Path to GPFS Glance repository as mounted on Nova nodes") - -cinder.param('gpfs_images_share_mode', type='string', default='', description="Set this if Glance image repo is on GPFS as well so that the image bits can be transferred efficiently between Glance and Cinder. Valid values are copy or copy_on_write. copy performs a full copy of the image, copy_on_write efficiently shares unmodified blocks of the image.") - -cinder.param('gpfs_max_clone_depth', type='integer', default='0', description="A lengthy chain of copy-on-write snapshots or clones could have impact on performance. This option limits the number of indirections required to reach a specific block. 0 indicates unlimited.") - -cinder.param('gpfs_sparse_volumes', type='boolean', default='true', description="Create volumes as sparse files which take no space. If set to False volume is created as regular file. In this case volume creation may take a significantly longer time.") - -cinder.param('hds_cinder_config_file', type='string', default='/opt/hds/hus/cinder_hus_conf.xml', description="configuration file for HDS cinder plugin for HUS") - -cinder.param('cinder_huawei_conf_file', type='string', default='/etc/cinder/cinder_huawei_conf.xml', description="config data for cinder huawei plugin") - -cinder.param('volume_group', type='string', default='cinder-volumes', description="Name for the VG that will contain exported volumes") - -cinder.param('pool_size', type='string', default='', description="Size of thin provisioning pool") - -cinder.param('lvm_mirrors', type='integer', default='0', description="If set, create lvms with multiple mirrors. Note that this requires lvm_mirrors + 2 pvs with available space") - -cinder.param('lvm_type', type='string', default='default', description="Type of LVM volumes to deploy;") - -cinder.param('netapp_vfiler', type='string', default='', description="Vfiler to use for provisioning") - -cinder.param('netapp_login', type='string', default='', description="User name for the storage controller") - -cinder.param('netapp_password', type='string', default='', description="Password for the storage controller") - -cinder.param('netapp_vserver', type='string', default='', description="Cluster vserver to use for provisioning") - -cinder.param('netapp_server_hostname', type='string', default='', description="Host name for the storage controller") - -cinder.param('netapp_server_port', type='integer', default='80', description="Port number for the storage controller") - -cinder.param('thres_avl_size_perc_start', type='integer', default='20', description="Threshold available percent to start cache cleaning.") - -cinder.param('thres_avl_size_perc_stop', type='integer', default='60', description="Threshold available percent to stop cache cleaning.") - -cinder.param('expiry_thres_minutes', type='integer', default='720', description="Threshold minutes after which cache file can be cleaned.") - -cinder.param('netapp_size_multiplier', type='floating point', default='1.2', description="Volume size multiplier to ensure while creation") - -cinder.param('netapp_volume_list', type='string', default='', description="Comma separated volumes to be used for provisioning") - -cinder.param('netapp_storage_family', type='string', default='ontap_cluster', description="Storage family type.") - -cinder.param('netapp_storage_protocol', type='string', default='', description="Storage protocol type.") - -cinder.param('netapp_transport_type', type='string', default='http', description="Transport type protocol") - -cinder.param('nexenta_host', type='string', default='', description="IP address of Nexenta SA") - -cinder.param('nexenta_rest_port', type='integer', default='2000', description="HTTP port to connect to Nexenta REST API server") - -cinder.param('nexenta_rest_protocol', type='string', default='auto', description="Use http or https for REST connection") - -cinder.param('nexenta_user', type='string', default='admin', description="User name to connect to Nexenta SA") - -cinder.param('nexenta_password', type='string', default='nexenta', description="Password to connect to Nexenta SA") - -cinder.param('nexenta_iscsi_target_portal_port', type='integer', default='3260', description="Nexenta target portal port") - -cinder.param('nexenta_volume', type='string', default='cinder', description="pool on SA that will hold all volumes") - -cinder.param('nexenta_target_prefix', type='string', default='iqn.1986-03.com.sun:02:cinder-', description="IQN prefix for iSCSI targets") - -cinder.param('nexenta_target_group_prefix', type='string', default='cinder/', description="prefix for iSCSI target groups on SA") - -cinder.param('nexenta_shares_config', type='string', default='/etc/cinder/nfs_shares', description="File with the list of available nfs shares") - -cinder.param('nexenta_mount_point_base', type='string', default='$state_path/mnt', description="Base dir containing mount points for nfs shares") - -cinder.param('nexenta_sparsed_volumes', type='boolean', default='true', description="Create volumes as sparsed files which take no space.If set to False volume is created as regular file.In such case volume creation takes a lot of time.") - -cinder.param('nexenta_volume_compression', type='string', default='on', description="Default compression value for new ZFS folders.") - -cinder.param('nexenta_mount_options', type='string', default='', description="Mount options passed to the nfs client. See section of the nfs man page for details") - -cinder.param('nexenta_used_ratio', type='floating point', default='0.95', description="Percent of ACTUAL usage of the underlying volume before no new volumes can be allocated to the volume destination.") - -cinder.param('nexenta_oversub_ratio', type='floating point', default='1.0', description="This will compare the allocated to available space on the volume destination. If the ratio exceeds this number, the destination will no longer be valid.") - -cinder.param('nexenta_blocksize', type='string', default='', description="block size for volumes") - -cinder.param('nexenta_sparse', type='boolean', default='false', description="flag to create sparse volumes") - -cinder.param('nfs_shares_config', type='string', default='/etc/cinder/nfs_shares', description="File with the list of available nfs shares") - -cinder.param('nfs_sparsed_volumes', type='boolean', default='true', description="Create volumes as sparsed files which take no space.If set to False volume is created as regular file.In such case volume creation takes a lot of time.") - -cinder.param('nfs_used_ratio', type='floating point', default='0.95', description="Percent of ACTUAL usage of the underlying volume before no new volumes can be allocated to the volume destination.") - -cinder.param('nfs_oversub_ratio', type='floating point', default='1.0', description="This will compare the allocated to available space on the volume destination. If the ratio exceeds this number, the destination will no longer be valid.") - -cinder.param('rbd_pool', type='string', default='rbd', description="the RADOS pool in which rbd volumes are stored") - -cinder.param('rbd_user', type='string', default='', description="the RADOS client name for accessing rbd volumes - only set when using cephx authentication") - -cinder.param('rbd_ceph_conf', type='string', default='', description="path to the ceph configuration file to use") - -cinder.param('rbd_flatten_volume_from_snapshot', type='boolean', default='false', description="flatten volumes created from snapshots to remove dependency") - -cinder.param('rbd_secret_uuid', type='string', default='', description="the libvirt uuid of the secret for the rbd_uservolumes") - -cinder.param('volume_tmp_dir', type='string', default='', description="where to store temporary image files if the volume driver does not write them directly to the volume") - -cinder.param('rbd_max_clone_depth', type='integer', default='5', description="maximum number of nested clones that can be taken of a volume before enforcing a flatten prior to next clone. A value of zero disables cloning") - -cinder.param('hp3par_api_url', type='string', default='', description="3PAR WSAPI Server Url like https://<3par ip>:8080/api/v1") - -cinder.param('hp3par_username', type='string', default='', description="3PAR Super user username") - -cinder.param('hp3par_password', type='string', default='', description="3PAR Super user password") - -cinder.param('hp3par_domain', type='string', default='', description="This option is DEPRECATED and no longer used. The 3par domain name to use.") - -cinder.param('hp3par_cpg', type='string', default='OpenStack', description="The CPG to use for volume creation") - -cinder.param('hp3par_cpg_snap', type='string', default='', description="The CPG to use for Snapshots for volumes. If empty hp3par_cpg will be used") - -cinder.param('hp3par_snapshot_retention', type='string', default='', description="The time in hours to retain a snapshot. You can't delete it before this expires.") - -cinder.param('hp3par_snapshot_expiration', type='string', default='', description="The time in hours when a snapshot expires and is deleted. This must be larger than expiration") - -cinder.param('hp3par_debug', type='boolean', default='false', description="Enable HTTP debugging to 3PAR") - -cinder.param('hp3par_iscsi_ips', type='list', default='', description="List of target iSCSI addresses to use.") - -cinder.param('san_thin_provision', type='boolean', default='true', description="Use thin provisioning for SAN volumes?") - -cinder.param('san_ip', type='string', default='', description="IP address of SAN controller") - -cinder.param('san_login', type='string', default='admin', description="Username for SAN controller") - -cinder.param('san_password', type='string', default='', description="Password for SAN controller") - -cinder.param('san_private_key', type='string', default='', description="Filename of private key to use for SSH authentication") - -cinder.param('san_clustername', type='string', default='', description="Cluster name to use for creating volumes") - -cinder.param('san_ssh_port', type='integer', default='22', description="SSH port to use with SAN") - -cinder.param('san_is_local', type='boolean', default='false', description="Execute commands locally instead of over SSH; use if the volume service is running on the SAN device") - -cinder.param('ssh_conn_timeout', type='integer', default='30', description="SSH connection timeout in seconds") - -cinder.param('ssh_min_pool_conn', type='integer', default='1', description="Minimum ssh connections in the pool") - -cinder.param('ssh_max_pool_conn', type='integer', default='5', description="Maximum ssh connections in the pool") - -cinder.param('san_zfs_volume_base', type='string', default='rpool/', description="The ZFS path under which to create zvols for volumes.") - -cinder.param('scality_sofs_config', type='string', default='', description="Path or URL to Scality SOFS configuration file") - -cinder.param('scality_sofs_mount_point', type='string', default='$state_path/scality', description="Base dir where Scality SOFS shall be mounted") - -cinder.param('scality_sofs_volume_dir', type='string', default='cinder/volumes', description="Path from Scality SOFS root to volume dir") - -cinder.param('sf_emulate_512', type='boolean', default='true', description="Set 512 byte emulation on volume creation; ") - -cinder.param('sf_allow_tenant_qos', type='boolean', default='false', description="Allow tenants to specify QOS on create") - -cinder.param('sf_account_prefix', type='string', default='cinder', description="Create SolidFire accounts with this prefix") - -cinder.param('sf_api_port', type='integer', default='443', description="SolidFire API port. Useful if the device api is behind a proxy on a different port.") - -cinder.param('storwize_svc_volpool_name', type='string', default='volpool', description="Storage system storage pool for volumes") - -cinder.param('storwize_svc_vol_rsize', type='integer', default='2', description="Storage system space-efficiency parameter for volumes") - -cinder.param('storwize_svc_vol_warning', type='integer', default='0', description="Storage system threshold for volume capacity warnings") - -cinder.param('storwize_svc_vol_autoexpand', type='boolean', default='true', description="Storage system autoexpand parameter for volumes") - -cinder.param('storwize_svc_vol_grainsize', type='integer', default='256', description="Storage system grain size parameter for volumes") - -cinder.param('storwize_svc_vol_compression', type='boolean', default='false', description="Storage system compression option for volumes") - -cinder.param('storwize_svc_vol_easytier', type='boolean', default='true', description="Enable Easy Tier for volumes") - -cinder.param('storwize_svc_vol_iogrp', type='integer', default='0', description="The I/O group in which to allocate volumes") - -cinder.param('storwize_svc_flashcopy_timeout', type='integer', default='120', description="Maximum number of seconds to wait for FlashCopy to be prepared. Maximum value is 600 seconds") - -cinder.param('storwize_svc_connection_protocol', type='string', default='iSCSI', description="Connection protocol") - -cinder.param('storwize_svc_multipath_enabled', type='boolean', default='false', description="Connect with multipath") - -cinder.param('storwize_svc_multihostmap_enabled', type='boolean', default='true', description="Allows vdisk to multi host mapping") - -cinder.param('vmware_host_ip', type='string', default='', description="IP address for connecting to VMware ESX/VC server.") - -cinder.param('vmware_host_username', type='string', default='', description="Username for authenticating with VMware ESX/VC server.") - -cinder.param('vmware_host_password', type='string', default='', description="Password for authenticating with VMware ESX/VC server.") - -cinder.param('vmware_wsdl_location', type='string', default='', description="Optional VIM service WSDL Location e.g http:///vimService.wsdl. Optional over-ride to default location for bug work-arounds.") - -cinder.param('vmware_api_retry_count', type='integer', default='10', description="Number of times VMware ESX/VC server API must be retried upon connection related issues.") - -cinder.param('vmware_task_poll_interval', type='integer', default='5', description="The interval used for polling remote tasks invoked on VMware ESX/VC server.") - -cinder.param('vmware_volume_folder', type='string', default='cinder-volumes', description="Name for the folder in the VC datacenter that will contain cinder volumes.") - -cinder.param('vmware_image_transfer_timeout_secs', type='integer', default='7200', description="Timeout in seconds for VMDK volume transfer between Cinder and Glance.") - -cinder.param('windows_iscsi_lun_path', type='string', default='C:\iSCSIVirtualDisks', description="Path to store VHD backed volumes") - -cinder.param('xenapi_nfs_server', type='string', default='', description="NFS server to be used by XenAPINFSDriver") - -cinder.param('xenapi_nfs_serverpath', type='string', default='', description="Path of exported NFS, used by XenAPINFSDriver") - -cinder.param('xenapi_connection_url', type='string', default='', description="URL for XenAPI connection") - -cinder.param('xenapi_connection_username', type='string', default='root', description="Username for XenAPI connection") - -cinder.param('xenapi_connection_password', type='string', default='', description="Password for XenAPI connection") - -cinder.param('xenapi_sr_base_path', type='string', default='/var/run/sr-mount', description="Base path to the storage repository") - -cinder.param('xiv_ds8k_proxy', type='string', default='xiv_ds8k_openstack.nova_proxy.XIVDS8KNovaProxy', description="Proxy driver that connects to the IBM Storage Array") - -cinder.param('xiv_ds8k_connection_type', type='string', default='iscsi', description="Connection type to the IBM Storage Array") - -cinder.param('zadara_vpsa_ip', type='string', default='', description="Management IP of Zadara VPSA") - -cinder.param('zadara_vpsa_port', type='string', default='', description="Zadara VPSA port number") - -cinder.param('zadara_vpsa_use_ssl', type='boolean', default='false', description="Use SSL connection") - -cinder.param('zadara_user', type='string', default='', description="User name for the VPSA") - -cinder.param('zadara_password', type='string', default='', description="Password for the VPSA") - -cinder.param('zadara_vpsa_poolname', type='string', default='', description="Name of VPSA storage pool for volumes") - -cinder.param('zadara_vol_thin', type='boolean', default='true', description="Default thin provisioning policy for volumes") - -cinder.param('zadara_vol_encrypt', type='boolean', default='false', description="Default encryption policy for volumes") - -cinder.param('zadara_default_striping_mode', type='string', default='simple', description="Default striping mode for volumes") - -cinder.param('zadara_default_stripesize', type='string', default='64', description="Default stripe size for volumes") - -cinder.param('zadara_vol_name_template', type='string', default='OS_%s', description="Default template for VPSA volume names") - -cinder.param('zadara_vpsa_auto_detach_on_delete', type='boolean', default='true', description="Automatically detach from servers on volume delete") - -cinder.param('zadara_vpsa_allow_nonexistent_delete', type='boolean', default='true', description="Don't halt on deletion of non-existing volumes") - -cinder.param('volume_driver', type='string', default='cinder.volume.drivers.lvm.LVMISCSIDriver', description="Driver to use for volume creation") - -cinder.param('migration_create_volume_timeout_secs', type='integer', default='300', description="Timeout for creating the volume to migrate to when performing volume migration") - -cinder.param('volume_dd_blocksize', type='string', default='1M', description="The default block size used when copying/clearing volumes") +cinder.param( + 'fatal_exception_format_errors', + type='boolean', + default='false', + description="make exception message format errors fatal") + +cinder.param( + 'policy_file', + type='string', + default='policy.json', + description="JSON file representing policy") + +cinder.param( + 'policy_default_rule', + type='string', + default='default', + description="Rule checked when requested rule is not found") + +cinder.param( + 'quota_volumes', + type='integer', + default='10', + description="number of volumes allowed per project") + +cinder.param( + 'quota_snapshots', + type='integer', + default='10', + description="number of volume snapshots allowed per project") + +cinder.param( + 'quota_gigabytes', + type='integer', + default='1000', + description="number of volume gigabytes") + +cinder.param( + 'reservation_expire', + type='integer', + default='86400', + description="number of seconds until a reservation expires") + +cinder.param( + 'until_refresh', + type='integer', + default='0', + description="count of reservations until usage is refreshed") + +cinder.param( + 'max_age', + type='integer', + default='0', + description="number of seconds between subsequent usage refreshes") + +cinder.param( + 'quota_driver', + type='string', + default='cinder.quota.DbQuotaDriver', + description="default driver to use for quota checks") + +cinder.param( + 'use_default_quota_class', + type='boolean', + default='true', + description="whether to use default quota class for default quota") + +cinder.param( + 'report_interval', + type='integer', + default='10', + description="seconds between nodes reporting state to datastore") + +cinder.param( + 'periodic_interval', + type='integer', + default='60', + description="seconds between running periodic tasks") + +cinder.param( + 'periodic_fuzzy_delay', + type='integer', + default='60', + description="range of seconds to randomly delay when starting the periodic task scheduler to reduce stampeding.") + +cinder.param( + 'osapi_volume_listen', + type='string', + default='0.0.0.0', + description="IP address for OpenStack Volume API to listen") + +cinder.param( + 'osapi_volume_listen_port', + type='integer', + default='8776', + description="port for os volume api to listen") + +cinder.param( + 'sqlite_clean_db', + type='string', + default='clean.sqlite', + description="File name of clean sqlite db") + +cinder.param( + 'fake_tests', + type='boolean', + default='true', + description="should we use everything for testing") + +cinder.param( + 'backlog', + type='integer', + default='4096', + description="Number of backlog requests to configure the socket with") + +cinder.param( + 'tcp_keepidle', + type='integer', + default='600', + description="Sets the value of TCP_KEEPIDLE in seconds for each server socket. Not supported on OS X.") + +cinder.param( + 'ssl_ca_file', + type='string', + default='', + description="CA certificate file to use to verify connecting clients") + +cinder.param( + 'ssl_cert_file', + type='string', + default='', + description="Certificate file to use when starting the server securely") + +cinder.param( + 'ssl_key_file', + type='string', + default='', + description="Private key file to use when starting the server securely") + +cinder.param( + 'osapi_max_limit', + type='integer', + default='1000', + description="the maximum number of items returned in a single response from a collection resource") + +cinder.param( + 'osapi_volume_base_URL', + type='string', + default='', + description="Base URL that will be presented to users in links to the OpenStack Volume API") + +cinder.param( + 'use_forwarded_for', + type='boolean', + default='false', + description="Treat X-Forwarded-For as the canonical remote address. Only enable this if you have a sanitizing proxy.") + +cinder.param( + 'osapi_max_request_body_size', + type='integer', + default='114688', + description="Max size for body of a request") + +cinder.param( + 'backup_ceph_conf', + type='string', + default='/etc/ceph/ceph.conf', + description="Ceph config file to use.") + +cinder.param( + 'backup_ceph_user', + type='string', + default='cinder', + description="the Ceph user to connect with") + +cinder.param( + 'backup_ceph_chunk_size', + type='integer', + default='134217728', + description="the chunk size in bytes that a backup will be broken into before transfer to backup store") + +cinder.param( + 'backup_ceph_pool', + type='string', + default='backups', + description="the Ceph pool to backup to") + +cinder.param( + 'backup_ceph_stripe_unit', + type='integer', + default='0', + description="RBD stripe unit to use when creating a backup image") + +cinder.param( + 'backup_ceph_stripe_count', + type='integer', + default='0', + description="RBD stripe count to use when creating a backup image") + +cinder.param( + 'restore_discard_excess_bytes', + type='boolean', + default='true', + description="If True, always discard excess bytes when restoring volumes.") + +cinder.param( + 'backup_swift_url', + type='string', + default='http://localhost:8080/v1/AUTH_', + description="The URL of the Swift endpoint") + +cinder.param( + 'backup_swift_auth', + type='string', + default='per_user', + description="Swift authentication mechanism") + +cinder.param( + 'backup_swift_user', + type='string', + default='', + description="Swift user name") + +cinder.param( + 'backup_swift_key', + type='string', + default='', + description="Swift key for authentication") + +cinder.param( + 'backup_swift_container', + type='string', + default='volumebackups', + description="The default Swift container to use") + +cinder.param( + 'backup_swift_object_size', + type='integer', + default='52428800', + description="The size in bytes of Swift backup objects") + +cinder.param( + 'backup_swift_retry_attempts', + type='integer', + default='3', + description="The number of retries to make for Swift operations") + +cinder.param( + 'backup_swift_retry_backoff', + type='integer', + default='2', + description="The backoff time in seconds between Swift retries") + +cinder.param( + 'backup_compression_algorithm', + type='string', + default='zlib', + description="Compression algorithm") + +cinder.param( + 'backup_tsm_volume_prefix', + type='string', + default='backup', + description="Volume prefix for the backup id when backing up to TSM") + +cinder.param( + 'backup_tsm_password', + type='string', + default='password', + description="TSM password for the running username") + +cinder.param( + 'backup_tsm_compression', + type='boolean', + default='true', + description="Enable or Disable compression for backups") + +cinder.param( + 'backup_driver', + type='string', + default='cinder.backup.drivers.swift', + description="Driver to use for backups.") + +cinder.param( + 'num_volume_device_scan_tries', + type='integer', + default='3', + description="The maximum number of times to rescan targetsto find volume") + +cinder.param( + 'iscsi_helper', + type='string', + default='tgtadm', + description="iscsi target user-land tool to use") + +cinder.param( + 'volumes_dir', + type='string', + default='$state_path/volumes', + description="Volume configuration file storage directory") + +cinder.param( + 'iet_conf', + type='string', + default='/etc/iet/ietd.conf', + description="IET configuration file") + +cinder.param( + 'lio_initiator_iqns', + type='string', + default='', + description="Comma-separatd list of initiator IQNs allowed to connect to the iSCSI target.") + +cinder.param( + 'iscsi_iotype', + type='string', + default='fileio', + description="Sets the behavior of the iSCSI target to either perform blockio or fileio optionally, auto can be set and Cinder will autodetect type of backing device") + +cinder.param( + 'iser_helper', + type='string', + default='tgtadm', + description="iser target user-land tool to use") + +cinder.param( + 'volumes_dir', + type='string', + default='$state_path/volumes', + description="Volume configuration file storage directory") + +cinder.param( + 'nfs_mount_point_base', + type='string', + default='$state_path/mnt', + description="Base dir containing mount points for nfs shares") + +cinder.param( + 'nfs_mount_options', + type='string', + default='', + description="Mount options passed to the nfs client. See section of the nfs man page for details") + +cinder.param( + 'glusterfs_mount_point_base', + type='string', + default='$state_path/mnt', + description="Base dir containing mount points for gluster shares") + +cinder.param( + 'connection_type', + type='string', + default='', + description="Virtualization api connection type : libvirt, xenapi, or fake") + +cinder.param( + 'api_paste_config', + type='string', + default='api-paste.ini', + description="File name for the paste.deploy config for cinder-api") + +cinder.param( + 'pybasedir', + type='string', + default='/usr/lib/python/site-packages', + description="Directory where the cinder python module is installed") + +cinder.param( + 'bindir', + type='string', + default='$pybasedir/bin', + description="Directory where cinder binaries are installed") + +cinder.param( + 'state_path', + type='string', + default='$pybasedir', + description="Top-level directory for maintaining cinder's state") + +cinder.param( + 'my_ip', + type='string', + default='10.0.0.1', + description="ip address of this host") + +cinder.param( + 'glance_host', + type='string', + default='$my_ip', + description="default glance hostname or ip") + +cinder.param( + 'glance_port', + type='integer', + default='9292', + description="default glance port") + +cinder.param( + 'glance_api_servers', + type='list', + default='$glance_host:$glance_port', + description="A list of the glance api servers available to cinder") + +cinder.param( + 'glance_api_version', + type='integer', + default='1', + description="Version of the glance api to use") + +cinder.param( + 'glance_num_retries', + type='integer', + default='0', + description="Number retries when downloading an image from glance") + +cinder.param( + 'glance_api_insecure', + type='boolean', + default='false', + description="Allow to perform insecure SSL") + +cinder.param( + 'glance_api_ssl_compression', + type='boolean', + default='false', + description="Whether to attempt to negotiate SSL layer compression when using SSL") + +cinder.param( + 'glance_request_timeout', + type='integer', + default='', + description="http/https timeout value for glance operations. If no value") + +cinder.param( + 'scheduler_topic', + type='string', + default='cinder-scheduler', + description="the topic scheduler nodes listen on") + +cinder.param( + 'volume_topic', + type='string', + default='cinder-volume', + description="the topic volume nodes listen on") + +cinder.param( + 'backup_topic', + type='string', + default='cinder-backup', + description="the topic volume backup nodes listen on") + +cinder.param( + 'enable_v1_api', + type='boolean', + default='true', + description="Deploy v1 of the Cinder API. ") + +cinder.param( + 'enable_v2_api', + type='boolean', + default='true', + description="Deploy v2 of the Cinder API. ") + +cinder.param( + 'api_rate_limit', + type='boolean', + default='true', + description="whether to rate limit the api") + +cinder.param( + 'osapi_volume_ext_list', + type='list', + default='', + description="Specify list of extensions to load when using osapi_volume_extension option with cinder.api.contrib.select_extensions") + +cinder.param( + 'osapi_volume_extension', + type='multi', + default='cinder.api.contrib.standard_extensions', + description="osapi volume extension to load") + +cinder.param( + 'volume_manager', + type='string', + default='cinder.volume.manager.VolumeManager', + description="full class name for the Manager for volume") + +cinder.param( + 'backup_manager', + type='string', + default='cinder.backup.manager.BackupManager', + description="full class name for the Manager for volume backup") + +cinder.param( + 'scheduler_manager', + type='string', + default='cinder.scheduler.manager.SchedulerManager', + description="full class name for the Manager for scheduler") + +cinder.param( + 'host', + type='string', + default='cinder', + description="Name of this node. This can be an opaque identifier. It is not necessarily a hostname, FQDN, or IP address.") + +cinder.param( + 'storage_availability_zone', + type='string', + default='nova', + description="availability zone of this node") + +cinder.param( + 'default_availability_zone', + type='string', + default='', + description="default availability zone to use when creating a new volume. If this is not set then we use the value from the storage_availability_zone option as the default availability_zone for new volumes.") + +cinder.param( + 'memcached_servers', + type='list', + default='', + description="Memcached servers or None for in process cache.") + +cinder.param( + 'default_volume_type', + type='string', + default='', + description="default volume type to use") + +cinder.param( + 'volume_usage_audit_period', + type='string', + default='month', + description="time period to generate volume usages for. Time period must be hour, day, month or year") + +cinder.param( + 'root_helper', + type='string', + default='sudo', + description="Deprecated: command to use for running commands as root") + +cinder.param( + 'rootwrap_config', + type='string', + default='/etc/cinder/rootwrap.conf', + description="Path to the rootwrap configuration file to use for running commands as root") + +cinder.param( + 'monkey_patch', + type='boolean', + default='false', + description="Enable monkey patching") + +cinder.param( + 'monkey_patch_modules', + type='list', + default='', + description="List of modules/decorators to monkey patch") + +cinder.param( + 'service_down_time', + type='integer', + default='60', + description="maximum time since last check-in for up service") + +cinder.param( + 'volume_api_class', + type='string', + default='cinder.volume.api.API', + description="The full class name of the volume API class to use") + +cinder.param( + 'backup_api_class', + type='string', + default='cinder.backup.api.API', + description="The full class name of the volume backup API class") + +cinder.param( + 'auth_strategy', + type='string', + default='noauth', + description="The strategy to use for auth. Supports noauth, keystone, and deprecated.") + +cinder.param( + 'enabled_backends', + type='list', + default='', + description="A list of backend names to use. These backend names should be backed by a unique [CONFIG] group with its options") + +cinder.param( + 'no_snapshot_gb_quota', + type='boolean', + default='false', + description="Whether snapshots count against GigaByte quota") + +cinder.param( + 'transfer_api_class', + type='string', + default='cinder.transfer.api.API', + description="The full class name of the volume transfer API class") + +cinder.param( + 'compute_api_class', + type='string', + default='cinder.compute.nova.API', + description="The full class name of the compute API class to use") + +cinder.param( + 'nova_catalog_info', + type='string', + default='compute:nova:publicURL', + description="Info to match when looking for nova in the service catalog. Format is : separated values of the form: ::") + +cinder.param( + 'nova_catalog_admin_info', + type='string', + default='compute:nova:adminURL', + description="Same as nova_catalog_info, but for admin endpoint.") + +cinder.param( + 'nova_endpoint_template', + type='string', + default='', + description="Override service catalog lookup with template for nova endpoint e.g. http://localhost:8774/v2/%(tenant_id)s") + +cinder.param( + 'nova_endpoint_admin_template', + type='string', + default='', + description="Same as nova_endpoint_template, but for admin endpoint.") + +cinder.param( + 'os_region_name', + type='string', + default='', + description="region name of this node") + +cinder.param( + 'nova_ca_certificates_file', + type='string', + default='', + description="Location of ca certicates file to use for nova client requests.") + +cinder.param( + 'nova_api_insecure', + type='boolean', + default='false', + description="Allow to perform insecure SSL requests to nova") + +cinder.param( + 'db_backend', + type='string', + default='sqlalchemy', + description="The backend to use for db") + +cinder.param( + 'enable_new_services', + type='boolean', + default='true', + description="Services to be added to the available pool on create") + +cinder.param( + 'volume_name_template', + type='string', + default='volume-%s', + description="Template string to be used to generate volume names") + +cinder.param( + 'snapshot_name_template', + type='string', + default='snapshot-%s', + description="Template string to be used to generate snapshot names") + +cinder.param( + 'backup_name_template', + type='string', + default='backup-%s', + description="Template string to be used to generate backup names") + +cinder.param( + 'db_driver', + type='string', + default='cinder.db', + description="driver to use for database access") + +cinder.param( + 'allowed_direct_url_schemes', + type='list', + default='', + description="A list of url schemes that can be downloaded directly via the direct_url. Currently supported schemes: [file].") + +cinder.param( + 'image_conversion_dir', + type='string', + default='$state_path/conversion', + description="Directory used for temporary storage during image conversion") + +cinder.param( + 'keymgr_api_class', + type='string', + default='cinder.keymgr.not_implemented_key_mgr.NotImplementedKeyManager', + description="The full class name of the key manager API class") + +cinder.param( + 'backend', + type='string', + default='sqlalchemy', + description="The backend to use for db") + +cinder.param( + 'use_tpool', + type='boolean', + default='false', + description="Enable the experimental use of thread pooling for all DB API calls") + +cinder.param( + 'connection', + type='string', + default='sqlite:////cinder/openstack/common/db/$sqlite_db', + description="The SQLAlchemy connection string used to connect to the database") + +cinder.param( + 'sql_connection', + type='string', + default='sqlite:////nova/openstack/common/db/$sqlite_db', + description="The SQLAlchemy connection string used to connect to the database", + deprecation_message='Deprecated in favor of "[DEFAULT]connection" parameter') + +cinder.param( + 'idle_timeout', + type='integer', + default='3600', + description="timeout before idle sql connections are reaped") + +cinder.param( + 'min_pool_size', + type='integer', + default='1', + description="Minimum number of SQL connections to keep open in a pool") + +cinder.param( + 'max_pool_size', + type='integer', + default='5', + description="Maximum number of SQL connections to keep open in a pool") + +cinder.param( + 'max_retries', + type='integer', + default='10', + description="maximum db connection retries during startup.") + +cinder.param( + 'retry_interval', + type='integer', + default='10', + description="interval between retries of opening a sql connection") + +cinder.param( + 'max_overflow', + type='integer', + default='', + description="If set, use this value for max_overflow with sqlalchemy") + +cinder.param( + 'connection_debug', + type='integer', + default='0', + description="Verbosity of SQL debugging information. 0=None, 100=Everything") + +cinder.param( + 'connection_trace', + type='boolean', + default='false', + description="Add python stack traces to SQL as comment strings") + +cinder.param( + 'sqlite_db', + type='string', + default='cinder.sqlite', + description="the filename to use with sqlite") + +cinder.param( + 'sqlite_synchronous', + type='boolean', + default='true', + description="If true, use synchronous mode for sqlite") + +cinder.param( + 'backdoor_port', + type='integer', + default='', + description="port for eventlet backdoor to listen") + +cinder.param( + 'disable_process_locking', + type='boolean', + default='false', + description="Whether to disable inter-process locks") + +cinder.param( + 'lock_path', + type='string', + default='', + description="Directory to use for lock files. Default to a temp directory") + +cinder.param( + 'debug', + type='boolean', + default='false', + description="Print debugging output") + +cinder.param( + 'verbose', + type='boolean', + default='false', + description="Print more verbose output") + +cinder.param( + 'use_stderr', + type='boolean', + default='true', + description="Log output to standard error") + +cinder.param( + 'logging_context_format_string', + type='string', + default='%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user)s %(tenant)s] %(instance)s%(message)s', + description="format string to use for log messages with context") + +cinder.param( + 'logging_default_format_string', + type='string', + default='%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s', + description="format string to use for log messages without context") + +cinder.param( + 'logging_debug_format_suffix', + type='string', + default='%(funcName)s %(pathname)s:%(lineno)d', + description="data to append to log format when level is DEBUG") + +cinder.param( + 'logging_exception_prefix', + type='string', + default='%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s', + description="prefix each line of exception output with this format") + +cinder.param( + 'default_log_levels', + type='list', + default='amqplibWARN,sqlalchemyWARN,botoWARN,sudsINFO,keystoneINFO,eventlet.wsgi.serverWARN', + description="list of logger=LEVEL pairs") + +cinder.param( + 'publish_errors', + type='boolean', + default='false', + description="publish error events") + +cinder.param( + 'fatal_deprecations', + type='boolean', + default='false', + description="make deprecations fatal") + +cinder.param( + 'instance_format', + type='string', + default='"[instance: %(uuid)s] "', + description="If an instance is passed with the log message, format it like this") + +cinder.param( + 'instance_uuid_format', + type='string', + default='"[instance: %(uuid)s] "', + description="If an instance UUID is passed with the log message, format it like this") + +cinder.param( + 'log_config', + type='string', + default='', + description="If this option is specified, the logging configuration file specified is used and overrides any other logging options specified. Please see the Python logging module documentation for details on logging configuration files.") + +cinder.param( + 'log_format', + type='string', + default='', + description="A logging.Formatter log message format string which may use any of the available logging.LogRecord attributes. This option is deprecated. Please use logging_context_format_string and logging_default_format_string instead.") + +cinder.param( + 'log_date_format', + type='string', + default='%Y-%m-%d %H:%M:%S', + description="Format string for %%(asctime)s in log records. Default: %(default)s") + +cinder.param( + 'log_file', + type='string', + default='', + description="(Optional) Name of log file to output to. If no default is set, logging will go to stdout.") + +cinder.param( + 'log_dir', + type='string', + default='', + description="(Optional) The base directory used for relative --log-file paths") + +cinder.param( + 'use_syslog', + type='boolean', + default='false', + description="Use syslog for logging.") + +cinder.param( + 'syslog_log_facility', + type='string', + default='LOG_USER', + description="syslog facility to receive log lines") + +cinder.param( + 'default_notification_level', + type='string', + default='INFO', + description="Default notification level for outgoing notifications") + +cinder.param( + 'default_publisher_id', + type='string', + default='', + description="Default publisher_id for outgoing notifications") + +cinder.param( + 'notification_topics', + type='list', + default='notifications', + description="AMQP topic used for OpenStack notifications") + +cinder.param( + 'topics', + type='list', + default='notifications', + description="AMQP topic(s) used for OpenStack notifications") + +cinder.param( + 'run_external_periodic_tasks', + type='boolean', + default='true', + description="Some periodic tasks can be run in a separate process. Should we run them here?") + +cinder.param( + 'rpc_backend', + type='string', + default='cinder.openstack.common.rpc.impl_kombu', + description="The messaging module to use, defaults to kombu.") + +cinder.param( + 'rpc_thread_pool_size', + type='integer', + default='64', + description="Size of RPC thread pool") + +cinder.param( + 'rpc_conn_pool_size', + type='integer', + default='30', + description="Size of RPC connection pool") + +cinder.param( + 'rpc_response_timeout', + type='integer', + default='60', + description="Seconds to wait for a response from call or multicall") + +cinder.param( + 'rpc_cast_timeout', + type='integer', + default='30', + description="Seconds to wait before a cast expires") + +cinder.param( + 'allowed_rpc_exception_modules', + type='list', + default='cinder.openstack.common.exception,nova.exception,cinder.exception,exceptions', + description="Modules of exceptions that are permitted to be recreatedupon receiving exception data from an rpc call.") + +cinder.param( + 'fake_rabbit', + type='boolean', + default='false', + description="If passed, use a fake RabbitMQ provider") + +cinder.param( + 'control_exchange', + type='string', + default='openstack', + description="AMQP exchange to connect to if using RabbitMQ or Qpid") + +cinder.param( + 'amqp_rpc_single_reply_queue', + type='boolean', + default='false', + description="Enable a fast single reply queue if using AMQP based RPC like RabbitMQ or Qpid.") + +cinder.param( + 'amqp_durable_queues', + type='boolean', + default='false', + description="Use durable queues in amqp.") + +cinder.param( + 'amqp_auto_delete', + type='boolean', + default='false', + description="Auto-delete queues in amqp.") + +cinder.param( + 'kombu_ssl_version', + type='string', + default='', + description="SSL version to use") + +cinder.param( + 'kombu_ssl_keyfile', + type='string', + default='', + description="SSL key file") + +cinder.param( + 'kombu_ssl_certfile', + type='string', + default='', + description="SSL cert file") + +cinder.param( + 'kombu_ssl_ca_certs', + type='string', + default='', + description="SSL certification authority file") + +cinder.param( + 'rabbit_host', + type='string', + default='localhost', + description="The RabbitMQ broker address where a single node is used") + +cinder.param( + 'rabbit_port', + type='integer', + default='5672', + description="The RabbitMQ broker port where a single node is used") + +cinder.param( + 'rabbit_hosts', + type='list', + default='$rabbit_host:$rabbit_port', + description="RabbitMQ HA cluster host:port pairs") + +cinder.param( + 'rabbit_use_ssl', + type='boolean', + default='false', + description="connect over SSL for RabbitMQ") + +cinder.param( + 'rabbit_userid', + type='string', + default='guest', + description="the RabbitMQ userid") + +cinder.param( + 'rabbit_password', + type='string', + default='guest', + description="the RabbitMQ password") + +cinder.param( + 'rabbit_virtual_host', + type='string', + default='/', + description="the RabbitMQ virtual host") + +cinder.param( + 'rabbit_retry_interval', + type='integer', + default='1', + description="how frequently to retry connecting with RabbitMQ") + +cinder.param( + 'rabbit_retry_backoff', + type='integer', + default='2', + description="how long to backoff for between retries when connecting to RabbitMQ") + +cinder.param( + 'rabbit_max_retries', + type='integer', + default='0', + description="maximum retries with trying to connect to RabbitMQ") + +cinder.param( + 'rabbit_ha_queues', + type='boolean', + default='false', + description="use H/A queues in RabbitMQ") + +cinder.param( + 'qpid_hostname', + type='string', + default='localhost', + description="Qpid broker hostname") + +cinder.param( + 'qpid_port', + type='integer', + default='5672', + description="Qpid broker port") + +cinder.param( + 'qpid_hosts', + type='list', + default='$qpid_hostname:$qpid_port', + description="Qpid HA cluster host:port pairs") + +cinder.param( + 'qpid_username', + type='string', + default='', + description="Username for qpid connection") + +cinder.param( + 'qpid_password', + type='string', + default='', + description="Password for qpid connection") + +cinder.param( + 'qpid_sasl_mechanisms', + type='string', + default='', + description="Space separated list of SASL mechanisms to use for auth") + +cinder.param( + 'qpid_heartbeat', + type='integer', + default='60', + description="Seconds between connection keepalive heartbeats") + +cinder.param( + 'qpid_protocol', + type='string', + default='tcp', + description="Transport to use, either 'tcp' or 'ssl'") + +cinder.param( + 'qpid_tcp_nodelay', + type='boolean', + default='true', + description="Disable Nagle algorithm") + +cinder.param( + 'qpid_topology_version', + type='integer', + default='1', + description="The qpid topology version to use. Version 1 is what was originally used by impl_qpid. Version 2 includes some backwards-incompatible changes that allow broker federation to work. Users should update to version 2 when they are able to take everything down, as it requires a clean break.") + +cinder.param( + 'rpc_zmq_bind_address', + type='string', + default='*', + description="ZeroMQ bind address. Should be a wildcard") + +cinder.param( + 'rpc_zmq_matchmaker', + type='string', + default='cinder.openstack.common.rpc.matchmaker.MatchMakerLocalhost', + description="MatchMaker driver") + +cinder.param( + 'rpc_zmq_port', + type='integer', + default='9501', + description="ZeroMQ receiver listening port") + +cinder.param( + 'rpc_zmq_contexts', + type='integer', + default='1', + description="Number of ZeroMQ contexts, defaults to 1") + +cinder.param( + 'rpc_zmq_topic_backlog', + type='integer', + default='', + description="Maximum number of ingress messages to locally buffer per topic. Default is unlimited.") + +cinder.param( + 'rpc_zmq_ipc_dir', + type='string', + default='/var/run/openstack', + description="Directory for holding IPC sockets") + +cinder.param( + 'rpc_zmq_host', + type='string', + default='cinder', + description="Name of this node. Must be a valid hostname, FQDN, or IP address. Must match 'host' option, if running Nova.") + +cinder.param( + 'matchmaker_ringfile', + type='string', + default='/etc/nova/matchmaker_ring.json', + description="Matchmaker ring file") + +cinder.param( + 'matchmaker_heartbeat_freq', + type='integer', + default='300', + description="Heartbeat frequency") + +cinder.param( + 'matchmaker_heartbeat_ttl', + type='integer', + default='600', + description="Heartbeat time-to-live.") + +cinder.param( + 'host', + type='string', + default='127.0.0.1', + description="Host to locate redis") + +cinder.param( + 'port', + type='integer', + default='6379', + description="Use this port to connect to redis host.") + +cinder.param( + 'password', + type='string', + default='', + description="Password for Redis server.") + +cinder.param( + 'scheduler_host_manager', + type='string', + default='cinder.scheduler.host_manager.HostManager', + description="The scheduler host manager class to use") + +cinder.param( + 'scheduler_max_attempts', + type='integer', + default='3', + description="Maximum number of attempts to schedule an volume") + +cinder.param( + 'scheduler_default_filters', + type='list', + default='AvailabilityZoneFilter,CapacityFilter,CapabilitiesFilter', + description="Which filter class names to use for filtering hosts when not specified in the request.") + +cinder.param( + 'scheduler_default_weighers', + type='list', + default='CapacityWeigher', + description="Which weigher class names to use for weighing hosts.") + +cinder.param( + 'scheduler_driver', + type='string', + default='cinder.scheduler.filter_scheduler.FilterScheduler', + description="Default scheduler driver to use") + +cinder.param( + 'scheduler_json_config_location', + type='string', + default='', + description="Absolute path to scheduler configuration JSON file.") + +cinder.param( + 'max_gigabytes', + type='integer', + default='10000', + description="maximum number of volume gigabytes to allow per host") + +cinder.param( + 'capacity_weight_multiplier', + type='floating point', + default='1.0', + description="Multiplier used for weighing volume capacity. Negative numbers mean to stack vs spread.") + +cinder.param( + 'volume_transfer_salt_length', + type='integer', + default='8', + description="The number of characters in the salt.") + +cinder.param( + 'volume_transfer_key_length', + type='integer', + default='16', + description="The number of characters in the autogenerated auth key.") + +cinder.param( + 'snapshot_same_host', + type='boolean', + default='true', + description="Create volume from snapshot at the host where snapshot resides") + +cinder.param( + 'cloned_volume_same_az', + type='boolean', + default='true', + description="Ensure that the new volumes are the same AZ as snapshot or source volume") + +cinder.param( + 'num_shell_tries', + type='integer', + default='3', + description="number of times to attempt to run flakey shell commands") + +cinder.param( + 'reserved_percentage', + type='integer', + default='0', + description="The percentage of backend capacity is reserved") + +cinder.param( + 'iscsi_num_targets', + type='integer', + default='100', + description="The maximum number of iscsi target ids per host") + +cinder.param( + 'iscsi_target_prefix', + type='string', + default='iqn.2010-10.org.openstack:', + description="prefix for iscsi volumes") + +cinder.param( + 'iscsi_ip_address', + type='string', + default='$my_ip', + description="The IP address that the iSCSI daemon is listening on") + +cinder.param( + 'iscsi_port', + type='integer', + default='3260', + description="The port that the iSCSI daemon is listening on") + +cinder.param( + 'num_iser_scan_tries', + type='integer', + default='3', + description="The maximum number of times to rescan iSER targetto find volume") + +cinder.param( + 'iser_num_targets', + type='integer', + default='100', + description="The maximum number of iser target ids per host") + +cinder.param( + 'iser_target_prefix', + type='string', + default='iqn.2010-10.org.iser.openstack:', + description="prefix for iser volumes") + +cinder.param( + 'iser_ip_address', + type='string', + default='$my_ip', + description="The IP address that the iSER daemon is listening on") + +cinder.param( + 'iser_port', + type='integer', + default='3260', + description="The port that the iSER daemon is listening on") + +cinder.param( + 'volume_backend_name', + type='string', + default='', + description="The backend name for a given driver implementation") + +cinder.param( + 'use_multipath_for_image_xfer', + type='boolean', + default='false', + description="Do we attach/detach volumes in cinder using multipath for volume to image and image to volume transfers?") + +cinder.param( + 'volume_clear', + type='string', + default='zero', + description="Method used to wipe old voumes") + +cinder.param( + 'volume_clear_size', + type='integer', + default='0', + description="Size in MiB to wipe at start of old volumes. 0 => all") + +cinder.param( + 'available_devices', + type='list', + default='', + description="List of all available devices") + +cinder.param( + 'coraid_esm_address', + type='string', + default='', + description="IP address of Coraid ESM") + +cinder.param( + 'coraid_user', + type='string', + default='admin', + description="User name to connect to Coraid ESM") + +cinder.param( + 'coraid_group', + type='string', + default='admin', + description="Name of group on Coraid ESM to which coraid_user belongs") + +cinder.param( + 'coraid_password', + type='string', + default='password', + description="Password to connect to Coraid ESM") + +cinder.param( + 'coraid_repository_key', + type='string', + default='coraid_repository', + description="Volume Type key name to store ESM Repository Name") + +cinder.param( + 'eqlx_group_name', + type='string', + default='group-0', + description="Group name to use for creating volumes") + +cinder.param( + 'eqlx_cli_timeout', + type='integer', + default='30', + description="Timeout for the Group Manager cli command execution") + +cinder.param( + 'eqlx_cli_max_retries', + type='integer', + default='5', + description="Maximum retry count for reconnection") + +cinder.param( + 'eqlx_use_chap', + type='boolean', + default='false', + description="Use CHAP authentificaion for targets?") + +cinder.param( + 'eqlx_chap_login', + type='string', + default='admin', + description="Existing CHAP account name") + +cinder.param( + 'eqlx_chap_password', + type='string', + default='password', + description="Password for specified CHAP account name") + +cinder.param( + 'eqlx_pool', + type='string', + default='default', + description="Pool in which volumes will be created") + +cinder.param( + 'glusterfs_shares_config', + type='string', + default='/etc/cinder/glusterfs_shares', + description="File with the list of available gluster shares") + +cinder.param( + 'glusterfs_disk_util', + type='string', + default='df', + description="Use du or df for free space calculation") + +cinder.param( + 'glusterfs_sparsed_volumes', + type='boolean', + default='true', + description="Create volumes as sparsed files which take no space.If set to False volume is created as regular file.In such case volume creation takes a lot of time.") + +cinder.param( + 'glusterfs_qcow2_volumes', + type='boolean', + default='false', + description="Create volumes as QCOW2 files rather than raw files.") + +cinder.param( + 'gpfs_mount_point_base', + type='string', + default='', + description="Path to the directory on GPFS mount point where volumes are stored") + +cinder.param( + 'gpfs_images_dir', + type='string', + default='', + description="Path to GPFS Glance repository as mounted on Nova nodes") + +cinder.param( + 'gpfs_images_share_mode', + type='string', + default='', + description="Set this if Glance image repo is on GPFS as well so that the image bits can be transferred efficiently between Glance and Cinder. Valid values are copy or copy_on_write. copy performs a full copy of the image, copy_on_write efficiently shares unmodified blocks of the image.") + +cinder.param( + 'gpfs_max_clone_depth', + type='integer', + default='0', + description="A lengthy chain of copy-on-write snapshots or clones could have impact on performance. This option limits the number of indirections required to reach a specific block. 0 indicates unlimited.") + +cinder.param( + 'gpfs_sparse_volumes', + type='boolean', + default='true', + description="Create volumes as sparse files which take no space. If set to False volume is created as regular file. In this case volume creation may take a significantly longer time.") + +cinder.param( + 'hds_cinder_config_file', + type='string', + default='/opt/hds/hus/cinder_hus_conf.xml', + description="configuration file for HDS cinder plugin for HUS") + +cinder.param( + 'cinder_huawei_conf_file', + type='string', + default='/etc/cinder/cinder_huawei_conf.xml', + description="config data for cinder huawei plugin") + +cinder.param( + 'volume_group', + type='string', + default='cinder-volumes', + description="Name for the VG that will contain exported volumes") + +cinder.param( + 'pool_size', + type='string', + default='', + description="Size of thin provisioning pool") + +cinder.param( + 'lvm_mirrors', + type='integer', + default='0', + description="If set, create lvms with multiple mirrors. Note that this requires lvm_mirrors + 2 pvs with available space") + +cinder.param( + 'lvm_type', + type='string', + default='default', + description="Type of LVM volumes to deploy;") + +cinder.param( + 'netapp_vfiler', + type='string', + default='', + description="Vfiler to use for provisioning") + +cinder.param( + 'netapp_login', + type='string', + default='', + description="User name for the storage controller") + +cinder.param( + 'netapp_password', + type='string', + default='', + description="Password for the storage controller") + +cinder.param( + 'netapp_vserver', + type='string', + default='', + description="Cluster vserver to use for provisioning") + +cinder.param( + 'netapp_server_hostname', + type='string', + default='', + description="Host name for the storage controller") + +cinder.param( + 'netapp_server_port', + type='integer', + default='80', + description="Port number for the storage controller") + +cinder.param( + 'thres_avl_size_perc_start', + type='integer', + default='20', + description="Threshold available percent to start cache cleaning.") + +cinder.param( + 'thres_avl_size_perc_stop', + type='integer', + default='60', + description="Threshold available percent to stop cache cleaning.") + +cinder.param( + 'expiry_thres_minutes', + type='integer', + default='720', + description="Threshold minutes after which cache file can be cleaned.") + +cinder.param( + 'netapp_size_multiplier', + type='floating point', + default='1.2', + description="Volume size multiplier to ensure while creation") + +cinder.param( + 'netapp_volume_list', + type='string', + default='', + description="Comma separated volumes to be used for provisioning") + +cinder.param( + 'netapp_storage_family', + type='string', + default='ontap_cluster', + description="Storage family type.") + +cinder.param( + 'netapp_storage_protocol', + type='string', + default='', + description="Storage protocol type.") + +cinder.param( + 'netapp_transport_type', + type='string', + default='http', + description="Transport type protocol") + +cinder.param( + 'nexenta_host', + type='string', + default='', + description="IP address of Nexenta SA") + +cinder.param( + 'nexenta_rest_port', + type='integer', + default='2000', + description="HTTP port to connect to Nexenta REST API server") + +cinder.param( + 'nexenta_rest_protocol', + type='string', + default='auto', + description="Use http or https for REST connection") + +cinder.param( + 'nexenta_user', + type='string', + default='admin', + description="User name to connect to Nexenta SA") + +cinder.param( + 'nexenta_password', + type='string', + default='nexenta', + description="Password to connect to Nexenta SA") + +cinder.param( + 'nexenta_iscsi_target_portal_port', + type='integer', + default='3260', + description="Nexenta target portal port") + +cinder.param( + 'nexenta_volume', + type='string', + default='cinder', + description="pool on SA that will hold all volumes") + +cinder.param( + 'nexenta_target_prefix', + type='string', + default='iqn.1986-03.com.sun:02:cinder-', + description="IQN prefix for iSCSI targets") + +cinder.param( + 'nexenta_target_group_prefix', + type='string', + default='cinder/', + description="prefix for iSCSI target groups on SA") + +cinder.param( + 'nexenta_shares_config', + type='string', + default='/etc/cinder/nfs_shares', + description="File with the list of available nfs shares") + +cinder.param( + 'nexenta_mount_point_base', + type='string', + default='$state_path/mnt', + description="Base dir containing mount points for nfs shares") + +cinder.param( + 'nexenta_sparsed_volumes', + type='boolean', + default='true', + description="Create volumes as sparsed files which take no space.If set to False volume is created as regular file.In such case volume creation takes a lot of time.") + +cinder.param( + 'nexenta_volume_compression', + type='string', + default='on', + description="Default compression value for new ZFS folders.") + +cinder.param( + 'nexenta_mount_options', + type='string', + default='', + description="Mount options passed to the nfs client. See section of the nfs man page for details") + +cinder.param( + 'nexenta_used_ratio', + type='floating point', + default='0.95', + description="Percent of ACTUAL usage of the underlying volume before no new volumes can be allocated to the volume destination.") + +cinder.param( + 'nexenta_oversub_ratio', + type='floating point', + default='1.0', + description="This will compare the allocated to available space on the volume destination. If the ratio exceeds this number, the destination will no longer be valid.") + +cinder.param( + 'nexenta_blocksize', + type='string', + default='', + description="block size for volumes") + +cinder.param( + 'nexenta_sparse', + type='boolean', + default='false', + description="flag to create sparse volumes") + +cinder.param( + 'nfs_shares_config', + type='string', + default='/etc/cinder/nfs_shares', + description="File with the list of available nfs shares") + +cinder.param( + 'nfs_sparsed_volumes', + type='boolean', + default='true', + description="Create volumes as sparsed files which take no space.If set to False volume is created as regular file.In such case volume creation takes a lot of time.") + +cinder.param( + 'nfs_used_ratio', + type='floating point', + default='0.95', + description="Percent of ACTUAL usage of the underlying volume before no new volumes can be allocated to the volume destination.") + +cinder.param( + 'nfs_oversub_ratio', + type='floating point', + default='1.0', + description="This will compare the allocated to available space on the volume destination. If the ratio exceeds this number, the destination will no longer be valid.") + +cinder.param( + 'rbd_pool', + type='string', + default='rbd', + description="the RADOS pool in which rbd volumes are stored") + +cinder.param( + 'rbd_user', + type='string', + default='', + description="the RADOS client name for accessing rbd volumes - only set when using cephx authentication") + +cinder.param( + 'rbd_ceph_conf', + type='string', + default='', + description="path to the ceph configuration file to use") + +cinder.param( + 'rbd_flatten_volume_from_snapshot', + type='boolean', + default='false', + description="flatten volumes created from snapshots to remove dependency") + +cinder.param( + 'rbd_secret_uuid', + type='string', + default='', + description="the libvirt uuid of the secret for the rbd_uservolumes") + +cinder.param( + 'volume_tmp_dir', + type='string', + default='', + description="where to store temporary image files if the volume driver does not write them directly to the volume") + +cinder.param( + 'rbd_max_clone_depth', + type='integer', + default='5', + description="maximum number of nested clones that can be taken of a volume before enforcing a flatten prior to next clone. A value of zero disables cloning") + +cinder.param( + 'hp3par_api_url', + type='string', + default='', + description="3PAR WSAPI Server Url like https://<3par ip>:8080/api/v1") + +cinder.param( + 'hp3par_username', + type='string', + default='', + description="3PAR Super user username") + +cinder.param( + 'hp3par_password', + type='string', + default='', + description="3PAR Super user password") + +cinder.param( + 'hp3par_domain', + type='string', + default='', + description="This option is DEPRECATED and no longer used. The 3par domain name to use.") + +cinder.param( + 'hp3par_cpg', + type='string', + default='OpenStack', + description="The CPG to use for volume creation") + +cinder.param( + 'hp3par_cpg_snap', + type='string', + default='', + description="The CPG to use for Snapshots for volumes. If empty hp3par_cpg will be used") + +cinder.param( + 'hp3par_snapshot_retention', + type='string', + default='', + description="The time in hours to retain a snapshot. You can't delete it before this expires.") + +cinder.param( + 'hp3par_snapshot_expiration', + type='string', + default='', + description="The time in hours when a snapshot expires and is deleted. This must be larger than expiration") + +cinder.param( + 'hp3par_debug', + type='boolean', + default='false', + description="Enable HTTP debugging to 3PAR") + +cinder.param( + 'hp3par_iscsi_ips', + type='list', + default='', + description="List of target iSCSI addresses to use.") + +cinder.param( + 'san_thin_provision', + type='boolean', + default='true', + description="Use thin provisioning for SAN volumes?") + +cinder.param( + 'san_ip', + type='string', + default='', + description="IP address of SAN controller") + +cinder.param( + 'san_login', + type='string', + default='admin', + description="Username for SAN controller") + +cinder.param( + 'san_password', + type='string', + default='', + description="Password for SAN controller") + +cinder.param( + 'san_private_key', + type='string', + default='', + description="Filename of private key to use for SSH authentication") + +cinder.param( + 'san_clustername', + type='string', + default='', + description="Cluster name to use for creating volumes") + +cinder.param( + 'san_ssh_port', + type='integer', + default='22', + description="SSH port to use with SAN") + +cinder.param( + 'san_is_local', + type='boolean', + default='false', + description="Execute commands locally instead of over SSH; use if the volume service is running on the SAN device") + +cinder.param( + 'ssh_conn_timeout', + type='integer', + default='30', + description="SSH connection timeout in seconds") + +cinder.param( + 'ssh_min_pool_conn', + type='integer', + default='1', + description="Minimum ssh connections in the pool") + +cinder.param( + 'ssh_max_pool_conn', + type='integer', + default='5', + description="Maximum ssh connections in the pool") + +cinder.param( + 'san_zfs_volume_base', + type='string', + default='rpool/', + description="The ZFS path under which to create zvols for volumes.") + +cinder.param( + 'scality_sofs_config', + type='string', + default='', + description="Path or URL to Scality SOFS configuration file") + +cinder.param( + 'scality_sofs_mount_point', + type='string', + default='$state_path/scality', + description="Base dir where Scality SOFS shall be mounted") + +cinder.param( + 'scality_sofs_volume_dir', + type='string', + default='cinder/volumes', + description="Path from Scality SOFS root to volume dir") + +cinder.param( + 'sf_emulate_512', + type='boolean', + default='true', + description="Set 512 byte emulation on volume creation; ") + +cinder.param( + 'sf_allow_tenant_qos', + type='boolean', + default='false', + description="Allow tenants to specify QOS on create") + +cinder.param( + 'sf_account_prefix', + type='string', + default='cinder', + description="Create SolidFire accounts with this prefix") + +cinder.param( + 'sf_api_port', + type='integer', + default='443', + description="SolidFire API port. Useful if the device api is behind a proxy on a different port.") + +cinder.param( + 'storwize_svc_volpool_name', + type='string', + default='volpool', + description="Storage system storage pool for volumes") + +cinder.param( + 'storwize_svc_vol_rsize', + type='integer', + default='2', + description="Storage system space-efficiency parameter for volumes") + +cinder.param( + 'storwize_svc_vol_warning', + type='integer', + default='0', + description="Storage system threshold for volume capacity warnings") + +cinder.param( + 'storwize_svc_vol_autoexpand', + type='boolean', + default='true', + description="Storage system autoexpand parameter for volumes") + +cinder.param( + 'storwize_svc_vol_grainsize', + type='integer', + default='256', + description="Storage system grain size parameter for volumes") + +cinder.param( + 'storwize_svc_vol_compression', + type='boolean', + default='false', + description="Storage system compression option for volumes") + +cinder.param( + 'storwize_svc_vol_easytier', + type='boolean', + default='true', + description="Enable Easy Tier for volumes") + +cinder.param( + 'storwize_svc_vol_iogrp', + type='integer', + default='0', + description="The I/O group in which to allocate volumes") + +cinder.param( + 'storwize_svc_flashcopy_timeout', + type='integer', + default='120', + description="Maximum number of seconds to wait for FlashCopy to be prepared. Maximum value is 600 seconds") + +cinder.param( + 'storwize_svc_connection_protocol', + type='string', + default='iSCSI', + description="Connection protocol") + +cinder.param( + 'storwize_svc_multipath_enabled', + type='boolean', + default='false', + description="Connect with multipath") + +cinder.param( + 'storwize_svc_multihostmap_enabled', + type='boolean', + default='true', + description="Allows vdisk to multi host mapping") + +cinder.param( + 'vmware_host_ip', + type='string', + default='', + description="IP address for connecting to VMware ESX/VC server.") + +cinder.param( + 'vmware_host_username', + type='string', + default='', + description="Username for authenticating with VMware ESX/VC server.") + +cinder.param( + 'vmware_host_password', + type='string', + default='', + description="Password for authenticating with VMware ESX/VC server.") + +cinder.param( + 'vmware_wsdl_location', + type='string', + default='', + description="Optional VIM service WSDL Location e.g http:///vimService.wsdl. Optional over-ride to default location for bug work-arounds.") + +cinder.param( + 'vmware_api_retry_count', + type='integer', + default='10', + description="Number of times VMware ESX/VC server API must be retried upon connection related issues.") + +cinder.param( + 'vmware_task_poll_interval', + type='integer', + default='5', + description="The interval used for polling remote tasks invoked on VMware ESX/VC server.") + +cinder.param( + 'vmware_volume_folder', + type='string', + default='cinder-volumes', + description="Name for the folder in the VC datacenter that will contain cinder volumes.") + +cinder.param( + 'vmware_image_transfer_timeout_secs', + type='integer', + default='7200', + description="Timeout in seconds for VMDK volume transfer between Cinder and Glance.") + +cinder.param( + 'windows_iscsi_lun_path', + type='string', + default='C:\iSCSIVirtualDisks', + description="Path to store VHD backed volumes") + +cinder.param( + 'xenapi_nfs_server', + type='string', + default='', + description="NFS server to be used by XenAPINFSDriver") + +cinder.param( + 'xenapi_nfs_serverpath', + type='string', + default='', + description="Path of exported NFS, used by XenAPINFSDriver") + +cinder.param( + 'xenapi_connection_url', + type='string', + default='', + description="URL for XenAPI connection") + +cinder.param( + 'xenapi_connection_username', + type='string', + default='root', + description="Username for XenAPI connection") + +cinder.param( + 'xenapi_connection_password', + type='string', + default='', + description="Password for XenAPI connection") + +cinder.param( + 'xenapi_sr_base_path', + type='string', + default='/var/run/sr-mount', + description="Base path to the storage repository") + +cinder.param( + 'xiv_ds8k_proxy', + type='string', + default='xiv_ds8k_openstack.nova_proxy.XIVDS8KNovaProxy', + description="Proxy driver that connects to the IBM Storage Array") + +cinder.param( + 'xiv_ds8k_connection_type', + type='string', + default='iscsi', + description="Connection type to the IBM Storage Array") + +cinder.param( + 'zadara_vpsa_ip', + type='string', + default='', + description="Management IP of Zadara VPSA") + +cinder.param( + 'zadara_vpsa_port', + type='string', + default='', + description="Zadara VPSA port number") + +cinder.param( + 'zadara_vpsa_use_ssl', + type='boolean', + default='false', + description="Use SSL connection") + +cinder.param( + 'zadara_user', + type='string', + default='', + description="User name for the VPSA") + +cinder.param( + 'zadara_password', + type='string', + default='', + description="Password for the VPSA") + +cinder.param( + 'zadara_vpsa_poolname', + type='string', + default='', + description="Name of VPSA storage pool for volumes") + +cinder.param( + 'zadara_vol_thin', + type='boolean', + default='true', + description="Default thin provisioning policy for volumes") + +cinder.param( + 'zadara_vol_encrypt', + type='boolean', + default='false', + description="Default encryption policy for volumes") + +cinder.param( + 'zadara_default_striping_mode', + type='string', + default='simple', + description="Default striping mode for volumes") + +cinder.param( + 'zadara_default_stripesize', + type='string', + default='64', + description="Default stripe size for volumes") + +cinder.param( + 'zadara_vol_name_template', + type='string', + default='OS_%s', + description="Default template for VPSA volume names") + +cinder.param( + 'zadara_vpsa_auto_detach_on_delete', + type='boolean', + default='true', + description="Automatically detach from servers on volume delete") + +cinder.param( + 'zadara_vpsa_allow_nonexistent_delete', + type='boolean', + default='true', + description="Don't halt on deletion of non-existing volumes") + +cinder.param( + 'volume_driver', + type='string', + default='cinder.volume.drivers.lvm.LVMISCSIDriver', + description="Driver to use for volume creation") + +cinder.param( + 'migration_create_volume_timeout_secs', + type='integer', + default='300', + description="Timeout for creating the volume to migrate to when performing volume migration") + +cinder.param( + 'volume_dd_blocksize', + type='string', + default='1M', + description="The default block size used when copying/clearing volumes") cinder.commit() - diff --git a/ostack_validator/schemas/keystone/__init__.py b/ostack_validator/schemas/keystone/__init__.py index a324600..d7ea11a 100644 --- a/ostack_validator/schemas/keystone/__init__.py +++ b/ostack_validator/schemas/keystone/__init__.py @@ -1,2 +1 @@ import ostack_validator.schemas.keystone.v2013_1_3 - diff --git a/ostack_validator/schemas/keystone/v2013_1_3.py b/ostack_validator/schemas/keystone/v2013_1_3.py index 2151eb8..42b1753 100644 --- a/ostack_validator/schemas/keystone/v2013_1_3.py +++ b/ostack_validator/schemas/keystone/v2013_1_3.py @@ -6,185 +6,481 @@ keystone.version('2013.1.3') keystone.section('DEFAULT') -keystone.param('admin_token', type='string', default='ADMIN', description="A 'shared secret' between keystone and other openstack services") +keystone.param( + 'admin_token', + type='string', + default='ADMIN', + description="A 'shared secret' between keystone and other openstack services") -keystone.param('bind_host', type='host', default='0.0.0.0', description="The IP address of the network interface to listen on") +keystone.param( + 'bind_host', + type='host', + default='0.0.0.0', + description="The IP address of the network interface to listen on") -keystone.param('public_port', type='port', default='5000', description="The port number which the public service listens on") +keystone.param( + 'public_port', + type='port', + default='5000', + description="The port number which the public service listens on") -keystone.param('admin_port', type='port', default='35357', description="The port number which the public admin listens on") +keystone.param( + 'admin_port', + type='port', + default='35357', + description="The port number which the public admin listens on") -keystone.param('public_endpoint', type='string', default='http://localhost:%(public_port)s/', description="The base endpoint URLs for keystone that are advertised to clients (NOTE: this does NOT affect how keystone listens for connections)") +keystone.param( + 'public_endpoint', + type='string', + default='http://localhost:%(public_port)s/', + description="The base endpoint URLs for keystone that are advertised to clients (NOTE: this does NOT affect how keystone listens for connections)") -keystone.param('admin_endpoint', type='string', default='http://localhost:%(admin_port)s/', description="") +keystone.param( + 'admin_endpoint', + type='string', + default='http://localhost:%(admin_port)s/', + description="") -keystone.param('compute_port', type='port', default='8774', description="The port number which the OpenStack Compute service listens on") +keystone.param( + 'compute_port', + type='port', + default='8774', + description="The port number which the OpenStack Compute service listens on") -keystone.param('policy_file', type='string', default='policy.json', description="Path to your policy definition containing identity actions") +keystone.param( + 'policy_file', + type='string', + default='policy.json', + description="Path to your policy definition containing identity actions") -keystone.param('policy_default_rule', type='string', default='admin_required', description="Rule to check if no matching policy definition is found FIXME(dolph): This should really be defined as [policy] default_rule") +keystone.param( + 'policy_default_rule', + type='string', + default='admin_required', + description="Rule to check if no matching policy definition is found FIXME(dolph): This should really be defined as [policy] default_rule") -keystone.param('member_role_id', type='string', default='9fe2ff9ee4384b1894a90878d3e92bab', description="Role for migrating membership relationships During a SQL upgrade, the following values will be used to create a new role that will replace records in the user_tenant_membership table with explicit role grants. After migration, the member_role_id will be used in the API add_user_to_project, and member_role_name will be ignored.") +keystone.param( + 'member_role_id', + type='string', + default='9fe2ff9ee4384b1894a90878d3e92bab', + description="Role for migrating membership relationships During a SQL upgrade, the following values will be used to create a new role that will replace records in the user_tenant_membership table with explicit role grants. After migration, the member_role_id will be used in the API add_user_to_project, and member_role_name will be ignored.") -keystone.param('member_role_name', type='string', default='_member_', description="") +keystone.param( + 'member_role_name', + type='string', + default='_member_', + description="") -keystone.param('max_request_body_size', type='string', default='114688', description="enforced by optional sizelimit middleware (keystone.middleware:RequestBodySizeLimiter)") +keystone.param( + 'max_request_body_size', + type='string', + default='114688', + description="enforced by optional sizelimit middleware (keystone.middleware:RequestBodySizeLimiter)") -keystone.param('max_param_size', type='integer', default=64, description="limit the sizes of user & tenant ID/names") +keystone.param( + 'max_param_size', + type='integer', + default=64, + description="limit the sizes of user & tenant ID/names") -keystone.param('max_token_size', type='integer', default=8192, description="similar to max_param_size, but provides an exception for token values") +keystone.param( + 'max_token_size', + type='integer', + default=8192, + description="similar to max_param_size, but provides an exception for token values") -keystone.param('debug', type='boolean', default=False, description="=== Logging Options === Print debugging output (includes plaintext request logging, potentially including passwords)") +keystone.param( + 'debug', + type='boolean', + default=False, + description="=== Logging Options === Print debugging output (includes plaintext request logging, potentially including passwords)") -keystone.param('verbose', type='boolean', default=False, description="Print more verbose output") +keystone.param( + 'verbose', + type='boolean', + default=False, + description="Print more verbose output") -keystone.param('log_file', type='string', default='keystone.log', description="Name of log file to output to. If not set, logging will go to stdout.") +keystone.param( + 'log_file', + type='string', + default='keystone.log', + description="Name of log file to output to. If not set, logging will go to stdout.") -keystone.param('log_dir', type='string', default='/var/log/keystone', description="The directory to keep log files in (will be prepended to --logfile)") +keystone.param( + 'log_dir', + type='string', + default='/var/log/keystone', + description="The directory to keep log files in (will be prepended to --logfile)") -keystone.param('use_syslog', type='boolean', default=False, description="Use syslog for logging.") +keystone.param( + 'use_syslog', + type='boolean', + default=False, + description="Use syslog for logging.") -keystone.param('syslog_log_facility', type='string', default='LOG_USER', description="syslog facility to receive log lines") +keystone.param( + 'syslog_log_facility', + type='string', + default='LOG_USER', + description="syslog facility to receive log lines") -keystone.param('log_config', type='string', default='logging.conf', description="If this option is specified, the logging configuration file specified is used and overrides any other logging options specified. Please see the Python logging module documentation for details on logging configuration files.") +keystone.param( + 'log_config', + type='string', + default='logging.conf', + description="If this option is specified, the logging configuration file specified is used and overrides any other logging options specified. Please see the Python logging module documentation for details on logging configuration files.") -keystone.param('log_format', type='string', default='%(asctime)s %(levelname)8s [%(name)s] %(message)s', description="A logging.Formatter log message format string which may use any of the available logging.LogRecord attributes.") +keystone.param( + 'log_format', + type='string', + default='%(asctime)s %(levelname)8s [%(name)s] %(message)s', + description="A logging.Formatter log message format string which may use any of the available logging.LogRecord attributes.") -keystone.param('log_date_format', type='string', default='%Y-%m-%d %H:%M:%S', description="Format string for %(asctime)s in log records.") +keystone.param( + 'log_date_format', + type='string', + default='%Y-%m-%d %H:%M:%S', + description="Format string for %(asctime)s in log records.") -keystone.param('onready', type='string', default='keystone.common.systemd', description="onready allows you to send a notification when the process is ready to serve For example, to have it notify using systemd, one could set shell command: onready = systemd-notify --ready or a module with notify() method:") +keystone.param( + 'onready', + type='string', + default='keystone.common.systemd', + description="onready allows you to send a notification when the process is ready to serve For example, to have it notify using systemd, one could set shell command: onready = systemd-notify --ready or a module with notify() method:") -keystone.param('default_notification_level', type='string', default='INFO', description="Default notification level for outgoing notifications") +keystone.param( + 'default_notification_level', + type='string', + default='INFO', + description="Default notification level for outgoing notifications") -keystone.param('default_publisher_id', type='string', default='', description="Default publisher_id for outgoing notifications; included in the payload.") +keystone.param( + 'default_publisher_id', + type='string', + default='', + description="Default publisher_id for outgoing notifications; included in the payload.") -keystone.param('rpc_backend', type='string', default='keystone.openstack.common.rpc.impl_kombu', description="The messaging module to use, defaults to kombu.") +keystone.param( + 'rpc_backend', + type='string', + default='keystone.openstack.common.rpc.impl_kombu', + description="The messaging module to use, defaults to kombu.") -keystone.param('rpc_thread_pool_size', type='integer', default=64, description="Size of RPC thread pool") +keystone.param( + 'rpc_thread_pool_size', + type='integer', + default=64, + description="Size of RPC thread pool") -keystone.param('rpc_conn_pool_size', type='integer', default=30, description="Size of RPC connection pool") +keystone.param( + 'rpc_conn_pool_size', + type='integer', + default=30, + description="Size of RPC connection pool") -keystone.param('rpc_response_timeout', type='integer', default=60, description="Seconds to wait for a response from call or multicall") +keystone.param( + 'rpc_response_timeout', + type='integer', + default=60, + description="Seconds to wait for a response from call or multicall") -keystone.param('rpc_cast_timeout', type='integer', default=30, description="Seconds to wait before a cast expires (TTL). Only supported by impl_zmq.") +keystone.param( + 'rpc_cast_timeout', + type='integer', + default=30, + description="Seconds to wait before a cast expires (TTL). Only supported by impl_zmq.") -keystone.param('fake_rabbit', type='boolean', default=False, description="If True, use a fake RabbitMQ provider") +keystone.param( + 'fake_rabbit', + type='boolean', + default=False, + description="If True, use a fake RabbitMQ provider") -keystone.param('control_exchange', type='string', default='openstack', description="AMQP exchange to connect to if using RabbitMQ or Qpid") +keystone.param( + 'control_exchange', + type='string', + default='openstack', + description="AMQP exchange to connect to if using RabbitMQ or Qpid") keystone.section('sql') -keystone.param('connection', type='string', default='sqlite:///keystone.db', description="The SQLAlchemy connection string used to connect to the database") +keystone.param( + 'connection', + type='string', + default='sqlite:///keystone.db', + description="The SQLAlchemy connection string used to connect to the database") -keystone.param('idle_timeout', type='integer', default=200, description="the timeout before idle sql connections are reaped") +keystone.param( + 'idle_timeout', + type='integer', + default=200, + description="the timeout before idle sql connections are reaped") keystone.section('identity') -keystone.param('driver', type='string', default='keystone.identity.backends.sql.Identity', description="") +keystone.param( + 'driver', + type='string', + default='keystone.identity.backends.sql.Identity', + description="") -keystone.param('default_domain_id', type='string', default='default', description="This references the domain to use for all Identity API v2 requests (which are not aware of domains). A domain with this ID will be created for you by keystone-manage db_sync in migration 008. The domain referenced by this ID cannot be deleted on the v3 API, to prevent accidentally breaking the v2 API. There is nothing special about this domain, other than the fact that it must exist to order to maintain support for your v2 clients.") +keystone.param( + 'default_domain_id', + type='string', + default='default', + description="This references the domain to use for all Identity API v2 requests (which are not aware of domains). A domain with this ID will be created for you by keystone-manage db_sync in migration 008. The domain referenced by this ID cannot be deleted on the v3 API, to prevent accidentally breaking the v2 API. There is nothing special about this domain, other than the fact that it must exist to order to maintain support for your v2 clients.") -keystone.param('domain_specific_drivers_enabled', type='boolean', default=False, description="A subset (or all) of domains can have their own identity driver, each with their own partial configuration file in a domain configuration directory. Only") +keystone.param( + 'domain_specific_drivers_enabled', + type='boolean', + default=False, + description="A subset (or all) of domains can have their own identity driver, each with their own partial configuration file in a domain configuration directory. Only") -keystone.param('domain_config_dir', type='string', default='/etc/keystone/domains', description="") +keystone.param( + 'domain_config_dir', + type='string', + default='/etc/keystone/domains', + description="") -keystone.param('max_password_length', type='integer', default=4096, description="Maximum supported length for user passwords; decrease to improve performance.") +keystone.param( + 'max_password_length', + type='integer', + default=4096, + description="Maximum supported length for user passwords; decrease to improve performance.") keystone.section('credential') -keystone.param('driver', type='string', default='keystone.credential.backends.sql.Credential', description="") +keystone.param( + 'driver', + type='string', + default='keystone.credential.backends.sql.Credential', + description="") keystone.section('trust') -keystone.param('enabled', type='boolean', default=True, description="delegation and impersonation features can be optionally disabled") +keystone.param( + 'enabled', + type='boolean', + default=True, + description="delegation and impersonation features can be optionally disabled") keystone.section('os_inherit') -keystone.param('enabled', type='boolean', default=False, description="role-assignment inheritance to projects from owning domain can be optionally enabled") +keystone.param( + 'enabled', + type='boolean', + default=False, + description="role-assignment inheritance to projects from owning domain can be optionally enabled") keystone.section('catalog') -keystone.param('driver', type='string', default='keystone.catalog.backends.sql.Catalog', description="dynamic, sql-based backend (supports API/CLI-based management commands)") +keystone.param( + 'driver', + type='string', + default='keystone.catalog.backends.sql.Catalog', + description="dynamic, sql-based backend (supports API/CLI-based management commands)") -keystone.param('driver', type='string', default='keystone.catalog.backends.templated.TemplatedCatalog', description="static, file-based backend (does *NOT* support any management commands)") +keystone.param( + 'driver', + type='string', + default='keystone.catalog.backends.templated.TemplatedCatalog', + description="static, file-based backend (does *NOT* support any management commands)") -keystone.param('template_file', type='string', default='default_catalog.templates', description="") +keystone.param( + 'template_file', + type='string', + default='default_catalog.templates', + description="") keystone.section('endpoint_filter') -keystone.param('driver', type='string', default='keystone.contrib.endpoint_filter.backends.sql.EndpointFilter', description="extension for creating associations between project and endpoints in order to provide a tailored catalog for project-scoped token requests.") +keystone.param( + 'driver', + type='string', + default='keystone.contrib.endpoint_filter.backends.sql.EndpointFilter', + description="extension for creating associations between project and endpoints in order to provide a tailored catalog for project-scoped token requests.") -keystone.param('return_all_endpoints_if_no_filter', type='boolean', default=True, description="") +keystone.param( + 'return_all_endpoints_if_no_filter', + type='boolean', + default=True, + description="") keystone.section('token') -keystone.param('driver', type='string', default='keystone.token.backends.sql.Token', description="Provides token persistence.") +keystone.param( + 'driver', + type='string', + default='keystone.token.backends.sql.Token', + description="Provides token persistence.") -keystone.param('provider', type='string', default='', description="Controls the token construction, validation, and revocation operations. Core providers are keystone.token.providers.[pki|uuid].Provider") +keystone.param( + 'provider', + type='string', + default='', + description="Controls the token construction, validation, and revocation operations. Core providers are keystone.token.providers.[pki|uuid].Provider") -keystone.param('expiration', type='integer', default=86400, description="Amount of time a token should remain valid (in seconds)") +keystone.param( + 'expiration', + type='integer', + default=86400, + description="Amount of time a token should remain valid (in seconds)") -keystone.param('bind', type='string', default='', description="External auth mechanisms that should add bind information to token. eg kerberos, x509") +keystone.param( + 'bind', + type='string', + default='', + description="External auth mechanisms that should add bind information to token. eg kerberos, x509") -keystone.param('enforce_token_bind', type='string', default='permissive', description="Enforcement policy on tokens presented to keystone with bind information. One of disabled, permissive, strict, required or a specifically required bind mode e.g. kerberos or x509 to require binding to that authentication.") +keystone.param( + 'enforce_token_bind', + type='string', + default='permissive', + description="Enforcement policy on tokens presented to keystone with bind information. One of disabled, permissive, strict, required or a specifically required bind mode e.g. kerberos or x509 to require binding to that authentication.") -keystone.param('caching', type='boolean', default=True, description="Token specific caching toggle. This has no effect unless the global caching option is set to True") +keystone.param( + 'caching', + type='boolean', + default=True, + description="Token specific caching toggle. This has no effect unless the global caching option is set to True") -keystone.param('cache_time', type='integer', default=0, description="Token specific cache time-to-live (TTL) in seconds.") +keystone.param( + 'cache_time', + type='integer', + default=0, + description="Token specific cache time-to-live (TTL) in seconds.") -keystone.param('revocation_cache_time', type='integer', default=3600, description="Revocation-List specific cache time-to-live (TTL) in seconds.") +keystone.param( + 'revocation_cache_time', + type='integer', + default=3600, + description="Revocation-List specific cache time-to-live (TTL) in seconds.") keystone.section('cache') -keystone.param('enabled', type='boolean', default=False, description="Global cache functionality toggle.") +keystone.param( + 'enabled', + type='boolean', + default=False, + description="Global cache functionality toggle.") -keystone.param('config_prefix', type='string', default='cache.keystone', description="Prefix for building the configuration dictionary for the cache region. This should not need to be changed unless there is another dogpile.cache region with the same configuration name") +keystone.param( + 'config_prefix', + type='string', + default='cache.keystone', + description="Prefix for building the configuration dictionary for the cache region. This should not need to be changed unless there is another dogpile.cache region with the same configuration name") -keystone.param('backend', type='string', default='keystone.common.cache.noop', description="Dogpile.cache backend module. It is recommended that Memcache (dogpile.cache.memcache) or Redis (dogpile.cache.redis) be used in production deployments. Small workloads (single process) like devstack can use the dogpile.cache.memory backend.") +keystone.param( + 'backend', + type='string', + default='keystone.common.cache.noop', + description="Dogpile.cache backend module. It is recommended that Memcache (dogpile.cache.memcache) or Redis (dogpile.cache.redis) be used in production deployments. Small workloads (single process) like devstack can use the dogpile.cache.memory backend.") -keystone.param('backend_argument', type='string', default='', description="Arguments supplied to the backend module. Specify this option once per argument to be passed to the dogpile.cache backend. Example format: :") +keystone.param( + 'backend_argument', + type='string', + default='', + description="Arguments supplied to the backend module. Specify this option once per argument to be passed to the dogpile.cache backend. Example format: :") -keystone.param('proxies', type='string', default='', description="Proxy Classes to import that will affect the way the dogpile.cache backend functions. See the dogpile.cache documentation on changing-backend-behavior. Comma delimited list e.g. my.dogpile.proxy.Class, my.dogpile.proxyClass2") +keystone.param( + 'proxies', + type='string', + default='', + description="Proxy Classes to import that will affect the way the dogpile.cache backend functions. See the dogpile.cache documentation on changing-backend-behavior. Comma delimited list e.g. my.dogpile.proxy.Class, my.dogpile.proxyClass2") -keystone.param('use_key_mangler', type='boolean', default=True, description="Use a key-mangling function (sha1) to ensure fixed length cache-keys. This is toggle-able for debugging purposes, it is highly recommended to always leave this set to True.") +keystone.param( + 'use_key_mangler', + type='boolean', + default=True, + description="Use a key-mangling function (sha1) to ensure fixed length cache-keys. This is toggle-able for debugging purposes, it is highly recommended to always leave this set to True.") -keystone.param('debug_cache_backend', type='boolean', default=False, description="Extra debugging from the cache backend (cache keys, get/set/delete/etc calls) This is only really useful if you need to see the specific cache-backend get/set/delete calls with the keys/values. Typically this should be left set to False.") +keystone.param( + 'debug_cache_backend', + type='boolean', + default=False, + description="Extra debugging from the cache backend (cache keys, get/set/delete/etc calls) This is only really useful if you need to see the specific cache-backend get/set/delete calls with the keys/values. Typically this should be left set to False.") keystone.section('policy') -keystone.param('driver', type='string', default='keystone.policy.backends.sql.Policy', description="") +keystone.param( + 'driver', + type='string', + default='keystone.policy.backends.sql.Policy', + description="") keystone.section('ec2') -keystone.param('driver', type='string', default='keystone.contrib.ec2.backends.kvs.Ec2', description="") +keystone.param( + 'driver', + type='string', + default='keystone.contrib.ec2.backends.kvs.Ec2', + description="") keystone.section('assignment') keystone.param('driver', type='string', default='', description="") -keystone.param('caching', type='boolean', default=True, description="Assignment specific caching toggle. This has no effect unless the global caching option is set to True") +keystone.param( + 'caching', + type='boolean', + default=True, + description="Assignment specific caching toggle. This has no effect unless the global caching option is set to True") -keystone.param('cache_time', type='integer', default=0, description="Assignment specific cache time-to-live (TTL) in seconds.") +keystone.param( + 'cache_time', + type='integer', + default=0, + description="Assignment specific cache time-to-live (TTL) in seconds.") keystone.section('oauth1') -keystone.param('driver', type='string', default='keystone.contrib.oauth1.backends.sql.OAuth1', description="") +keystone.param( + 'driver', + type='string', + default='keystone.contrib.oauth1.backends.sql.OAuth1', + description="") -keystone.param('request_token_duration', type='integer', default=28800, description="The Identity service may include expire attributes. If no such attribute is included, then the token lasts indefinitely. Specify how quickly the request token will expire (in seconds)") +keystone.param( + 'request_token_duration', + type='integer', + default=28800, + description="The Identity service may include expire attributes. If no such attribute is included, then the token lasts indefinitely. Specify how quickly the request token will expire (in seconds)") -keystone.param('access_token_duration', type='integer', default=86400, description="Specify how quickly the access token will expire (in seconds)") +keystone.param( + 'access_token_duration', + type='integer', + default=86400, + description="Specify how quickly the access token will expire (in seconds)") keystone.section('ssl') keystone.param('enable', type='boolean', default=True, description="") -keystone.param('certfile', type='string', default='/etc/keystone/pki/certs/ssl_cert.pem', description="") +keystone.param( + 'certfile', + type='string', + default='/etc/keystone/pki/certs/ssl_cert.pem', + description="") -keystone.param('keyfile', type='string', default='/etc/keystone/pki/private/ssl_key.pem', description="") +keystone.param( + 'keyfile', + type='string', + default='/etc/keystone/pki/private/ssl_key.pem', + description="") -keystone.param('ca_certs', type='string', default='/etc/keystone/pki/certs/cacert.pem', description="") +keystone.param( + 'ca_certs', + type='string', + default='/etc/keystone/pki/certs/cacert.pem', + description="") -keystone.param('ca_key', type='string', default='/etc/keystone/pki/private/cakey.pem', description="") +keystone.param( + 'ca_key', + type='string', + default='/etc/keystone/pki/private/cakey.pem', + description="") keystone.param('key_size', type='integer', default=1024, description="") @@ -192,155 +488,411 @@ keystone.param('valid_days', type='integer', default=3650, description="") keystone.param('cert_required', type='boolean', default=False, description="") -keystone.param('cert_subject', type='string', default='/CUS/STUnset/LUnset/OUnset/CNlocalhost', description="") +keystone.param( + 'cert_subject', + type='string', + default='/CUS/STUnset/LUnset/OUnset/CNlocalhost', + description="") keystone.section('signing') -keystone.param('token_format', type='string', default='', description="Deprecated in favor of provider in the [token] section Allowed values are PKI or UUID") +keystone.param( + 'token_format', + type='string', + default='', + description="Deprecated in favor of provider in the [token] section Allowed values are PKI or UUID") -keystone.param('certfile', type='string', default='/etc/keystone/pki/certs/signing_cert.pem', description="") +keystone.param( + 'certfile', + type='string', + default='/etc/keystone/pki/certs/signing_cert.pem', + description="") -keystone.param('keyfile', type='string', default='/etc/keystone/pki/private/signing_key.pem', description="") +keystone.param( + 'keyfile', + type='string', + default='/etc/keystone/pki/private/signing_key.pem', + description="") -keystone.param('ca_certs', type='string', default='/etc/keystone/pki/certs/cacert.pem', description="") +keystone.param( + 'ca_certs', + type='string', + default='/etc/keystone/pki/certs/cacert.pem', + description="") -keystone.param('ca_key', type='string', default='/etc/keystone/pki/private/cakey.pem', description="") +keystone.param( + 'ca_key', + type='string', + default='/etc/keystone/pki/private/cakey.pem', + description="") keystone.param('key_size', type='boolean', default=2048, description="") keystone.param('valid_days', type='boolean', default=3650, description="") -keystone.param('cert_subject', type='string', default='/CUS/STUnset/LUnset/OUnset/CNwww.example.com', description="") +keystone.param( + 'cert_subject', + type='string', + default='/CUS/STUnset/LUnset/OUnset/CNwww.example.com', + description="") keystone.section('ldap') -keystone.param('url', type='string', default='ldap://localhost', description="") +keystone.param( + 'url', + type='string', + default='ldap://localhost', + description="") -keystone.param('user', type='string', default='dcManager,dcexample,dccom', description="") +keystone.param( + 'user', + type='string', + default='dcManager,dcexample,dccom', + description="") keystone.param('password', type='string', default=None, description="") -keystone.param('suffix', type='string', default='cnexample,cncom', description="") +keystone.param( + 'suffix', + type='string', + default='cnexample,cncom', + description="") -keystone.param('use_dumb_member', type='boolean', default=False, description="") +keystone.param( + 'use_dumb_member', + type='boolean', + default=False, + description="") -keystone.param('allow_subtree_delete', type='boolean', default=False, description="") +keystone.param( + 'allow_subtree_delete', + type='boolean', + default=False, + description="") -keystone.param('dumb_member', type='string', default='cndumb,dcexample,dccom', description="") +keystone.param( + 'dumb_member', + type='string', + default='cndumb,dcexample,dccom', + description="") -keystone.param('page_size', type='integer', default=0, description="Maximum results per page; a value of zero ('0') disables paging (default)") +keystone.param( + 'page_size', + type='integer', + default=0, + description="Maximum results per page; a value of zero ('0') disables paging (default)") -keystone.param('alias_dereferencing', type='string', default='default', description="The LDAP dereferencing option for queries. This can be either 'never', 'searching', 'always', 'finding' or 'default'. The 'default' option falls back to using default dereferencing configured by your ldap.conf.") +keystone.param( + 'alias_dereferencing', + type='string', + default='default', + description="The LDAP dereferencing option for queries. This can be either 'never', 'searching', 'always', 'finding' or 'default'. The 'default' option falls back to using default dereferencing configured by your ldap.conf.") -keystone.param('query_scope', type='string', default='one', description="The LDAP scope for queries, this can be either 'one' (onelevel/singleLevel) or 'sub' (subtree/wholeSubtree)") +keystone.param( + 'query_scope', + type='string', + default='one', + description="The LDAP scope for queries, this can be either 'one' (onelevel/singleLevel) or 'sub' (subtree/wholeSubtree)") -keystone.param('user_tree_dn', type='string', default='ouUsers,dcexample,dccom', description="") +keystone.param( + 'user_tree_dn', + type='string', + default='ouUsers,dcexample,dccom', + description="") keystone.param('user_filter', type='string', default='', description="") -keystone.param('user_objectclass', type='string', default='inetOrgPerson', description="") +keystone.param( + 'user_objectclass', + type='string', + default='inetOrgPerson', + description="") -keystone.param('user_domain_id_attribute', type='string', default='businessCategory', description="") +keystone.param( + 'user_domain_id_attribute', + type='string', + default='businessCategory', + description="") -keystone.param('user_id_attribute', type='string', default='cn', description="") +keystone.param( + 'user_id_attribute', + type='string', + default='cn', + description="") -keystone.param('user_name_attribute', type='string', default='sn', description="") +keystone.param( + 'user_name_attribute', + type='string', + default='sn', + description="") -keystone.param('user_mail_attribute', type='string', default='email', description="") +keystone.param( + 'user_mail_attribute', + type='string', + default='email', + description="") -keystone.param('user_pass_attribute', type='string', default='userPassword', description="") +keystone.param( + 'user_pass_attribute', + type='string', + default='userPassword', + description="") -keystone.param('user_enabled_attribute', type='string', default='enabled', description="") +keystone.param( + 'user_enabled_attribute', + type='string', + default='enabled', + description="") keystone.param('user_enabled_mask', type='integer', default=0, description="") -keystone.param('user_enabled_default', type='boolean', default=True, description="") +keystone.param( + 'user_enabled_default', + type='boolean', + default=True, + description="") -keystone.param('user_attribute_ignore', type='string', default='tenant_id,tenants', description="") +keystone.param( + 'user_attribute_ignore', + type='string', + default='tenant_id,tenants', + description="") -keystone.param('user_allow_create', type='boolean', default=True, description="") +keystone.param( + 'user_allow_create', + type='boolean', + default=True, + description="") -keystone.param('user_allow_update', type='boolean', default=True, description="") +keystone.param( + 'user_allow_update', + type='boolean', + default=True, + description="") -keystone.param('user_allow_delete', type='boolean', default=True, description="") +keystone.param( + 'user_allow_delete', + type='boolean', + default=True, + description="") -keystone.param('user_enabled_emulation', type='boolean', default=False, description="") +keystone.param( + 'user_enabled_emulation', + type='boolean', + default=False, + description="") -keystone.param('user_enabled_emulation_dn', type='string', default='', description="") +keystone.param( + 'user_enabled_emulation_dn', + type='string', + default='', + description="") -keystone.param('tenant_tree_dn', type='string', default='ouProjects,dcexample,dccom', description="") +keystone.param( + 'tenant_tree_dn', + type='string', + default='ouProjects,dcexample,dccom', + description="") keystone.param('tenant_filter', type='string', default='', description="") -keystone.param('tenant_objectclass', type='string', default='groupOfNames', description="") +keystone.param( + 'tenant_objectclass', + type='string', + default='groupOfNames', + description="") -keystone.param('tenant_domain_id_attribute', type='string', default='businessCategory', description="") +keystone.param( + 'tenant_domain_id_attribute', + type='string', + default='businessCategory', + description="") -keystone.param('tenant_id_attribute', type='string', default='cn', description="") +keystone.param( + 'tenant_id_attribute', + type='string', + default='cn', + description="") -keystone.param('tenant_member_attribute', type='string', default='member', description="") +keystone.param( + 'tenant_member_attribute', + type='string', + default='member', + description="") -keystone.param('tenant_name_attribute', type='string', default='ou', description="") +keystone.param( + 'tenant_name_attribute', + type='string', + default='ou', + description="") -keystone.param('tenant_desc_attribute', type='string', default='desc', description="") +keystone.param( + 'tenant_desc_attribute', + type='string', + default='desc', + description="") -keystone.param('tenant_enabled_attribute', type='string', default='enabled', description="") +keystone.param( + 'tenant_enabled_attribute', + type='string', + default='enabled', + description="") -keystone.param('tenant_attribute_ignore', type='string', default='', description="") +keystone.param( + 'tenant_attribute_ignore', + type='string', + default='', + description="") -keystone.param('tenant_allow_create', type='boolean', default=True, description="") +keystone.param( + 'tenant_allow_create', + type='boolean', + default=True, + description="") -keystone.param('tenant_allow_update', type='boolean', default=True, description="") +keystone.param( + 'tenant_allow_update', + type='boolean', + default=True, + description="") -keystone.param('tenant_allow_delete', type='boolean', default=True, description="") +keystone.param( + 'tenant_allow_delete', + type='boolean', + default=True, + description="") -keystone.param('tenant_enabled_emulation', type='boolean', default=False, description="") +keystone.param( + 'tenant_enabled_emulation', + type='boolean', + default=False, + description="") -keystone.param('tenant_enabled_emulation_dn', type='string', default='', description="") +keystone.param( + 'tenant_enabled_emulation_dn', + type='string', + default='', + description="") -keystone.param('role_tree_dn', type='string', default='ouRoles,dcexample,dccom', description="") +keystone.param( + 'role_tree_dn', + type='string', + default='ouRoles,dcexample,dccom', + description="") keystone.param('role_filter', type='string', default='', description="") -keystone.param('role_objectclass', type='string', default='organizationalRole', description="") +keystone.param( + 'role_objectclass', + type='string', + default='organizationalRole', + description="") -keystone.param('role_id_attribute', type='string', default='cn', description="") +keystone.param( + 'role_id_attribute', + type='string', + default='cn', + description="") -keystone.param('role_name_attribute', type='string', default='ou', description="") +keystone.param( + 'role_name_attribute', + type='string', + default='ou', + description="") -keystone.param('role_member_attribute', type='string', default='roleOccupant', description="") +keystone.param( + 'role_member_attribute', + type='string', + default='roleOccupant', + description="") -keystone.param('role_attribute_ignore', type='string', default='', description="") +keystone.param( + 'role_attribute_ignore', + type='string', + default='', + description="") -keystone.param('role_allow_create', type='boolean', default=True, description="") +keystone.param( + 'role_allow_create', + type='boolean', + default=True, + description="") -keystone.param('role_allow_update', type='boolean', default=True, description="") +keystone.param( + 'role_allow_update', + type='boolean', + default=True, + description="") -keystone.param('role_allow_delete', type='boolean', default=True, description="") +keystone.param( + 'role_allow_delete', + type='boolean', + default=True, + description="") keystone.param('group_tree_dn', type='string', default='', description="") keystone.param('group_filter', type='string', default='', description="") -keystone.param('group_objectclass', type='string', default='groupOfNames', description="") +keystone.param( + 'group_objectclass', + type='string', + default='groupOfNames', + description="") -keystone.param('group_id_attribute', type='string', default='cn', description="") +keystone.param( + 'group_id_attribute', + type='string', + default='cn', + description="") -keystone.param('group_name_attribute', type='string', default='ou', description="") +keystone.param( + 'group_name_attribute', + type='string', + default='ou', + description="") -keystone.param('group_member_attribute', type='string', default='member', description="") +keystone.param( + 'group_member_attribute', + type='string', + default='member', + description="") -keystone.param('group_desc_attribute', type='string', default='desc', description="") +keystone.param( + 'group_desc_attribute', + type='string', + default='desc', + description="") -keystone.param('group_attribute_ignore', type='string', default='', description="") +keystone.param( + 'group_attribute_ignore', + type='string', + default='', + description="") -keystone.param('group_allow_create', type='boolean', default=True, description="") +keystone.param( + 'group_allow_create', + type='boolean', + default=True, + description="") -keystone.param('group_allow_update', type='boolean', default=True, description="") +keystone.param( + 'group_allow_update', + type='boolean', + default=True, + description="") -keystone.param('group_allow_delete', type='boolean', default=True, description="") +keystone.param( + 'group_allow_delete', + type='boolean', + default=True, + description="") -keystone.param('use_tls', type='boolean', default=False, description="ldap TLS options if both tls_cacertfile and tls_cacertdir are set then tls_cacertfile will be used and tls_cacertdir is ignored valid options for tls_req_cert are demand, never, and allow") +keystone.param( + 'use_tls', + type='boolean', + default=False, + description="ldap TLS options if both tls_cacertfile and tls_cacertdir are set then tls_cacertfile will be used and tls_cacertdir is ignored valid options for tls_req_cert are demand, never, and allow") keystone.param('tls_cacertfile', type='string', default='', description="") @@ -348,33 +900,80 @@ keystone.param('tls_cacertdir', type='string', default='', description="") keystone.param('tls_req_cert', type='string', default='demand', description="") -keystone.param('user_additional_attribute_mapping', type='string', default='description:name, gecos:name', description="Additional attribute mappings can be used to map ldap attributes to internal keystone attributes. This allows keystone to fulfill ldap objectclass requirements. An example to map the description and gecos attributes to a user's name would be:") +keystone.param( + 'user_additional_attribute_mapping', + type='string', + default='description:name, gecos:name', + description="Additional attribute mappings can be used to map ldap attributes to internal keystone attributes. This allows keystone to fulfill ldap objectclass requirements. An example to map the description and gecos attributes to a user's name would be:") -keystone.param('domain_additional_attribute_mapping', type='string', default='', description="") +keystone.param( + 'domain_additional_attribute_mapping', + type='string', + default='', + description="") -keystone.param('group_additional_attribute_mapping', type='string', default='', description="") +keystone.param( + 'group_additional_attribute_mapping', + type='string', + default='', + description="") -keystone.param('role_additional_attribute_mapping', type='string', default='', description="") +keystone.param( + 'role_additional_attribute_mapping', + type='string', + default='', + description="") -keystone.param('project_additional_attribute_mapping', type='string', default='', description="") +keystone.param( + 'project_additional_attribute_mapping', + type='string', + default='', + description="") -keystone.param('user_additional_attribute_mapping', type='string', default='', description="") +keystone.param( + 'user_additional_attribute_mapping', + type='string', + default='', + description="") keystone.section('auth') -keystone.param('methods', type='string', default='external,password,token,oauth1', description="") +keystone.param( + 'methods', + type='string', + default='external,password,token,oauth1', + description="") -keystone.param('external', type='string', default='keystone.auth.plugins.external.ExternalDefault', description="") +keystone.param( + 'external', + type='string', + default='keystone.auth.plugins.external.ExternalDefault', + description="") -keystone.param('password', type='string', default='keystone.auth.plugins.password.Password', description="") +keystone.param( + 'password', + type='string', + default='keystone.auth.plugins.password.Password', + description="") -keystone.param('token', type='string', default='keystone.auth.plugins.token.Token', description="") +keystone.param( + 'token', + type='string', + default='keystone.auth.plugins.token.Token', + description="") -keystone.param('oauth1', type='string', default='keystone.auth.plugins.oauth1.OAuth', description="") +keystone.param( + 'oauth1', + type='string', + default='keystone.auth.plugins.oauth1.OAuth', + description="") keystone.section('paste_deploy') -keystone.param('config_file', type='string', default='keystone-paste.ini', description="Name of the paste configuration file that defines the available pipelines") +keystone.param( + 'config_file', + type='string', + default='keystone-paste.ini', + description="Name of the paste configuration file that defines the available pipelines") keystone.commit() - diff --git a/ostack_validator/schemas/nova/__init__.py b/ostack_validator/schemas/nova/__init__.py index 9736e0c..f8d26ed 100644 --- a/ostack_validator/schemas/nova/__init__.py +++ b/ostack_validator/schemas/nova/__init__.py @@ -1,3 +1,2 @@ import ostack_validator.schemas.nova.v2013_1 import ostack_validator.schemas.nova.v2013_1_3 - diff --git a/ostack_validator/schemas/nova/v2013_1.py b/ostack_validator/schemas/nova/v2013_1.py index a82102a..544cd4f 100644 --- a/ostack_validator/schemas/nova/v2013_1.py +++ b/ostack_validator/schemas/nova/v2013_1.py @@ -11,10 +11,13 @@ nova.section('DEFAULT') # availability_zone to show internal services under (string # value) -nova.param('internal_service_availability_zone', type='string', default='internal') +nova.param( + 'internal_service_availability_zone', + type='string', + default='internal') # default compute node availability_zone (string value) -#default_availability_zone=nova +# default_availability_zone=nova nova.param('default_availability_zone', type='string', default='nova') @@ -23,30 +26,30 @@ nova.param('default_availability_zone', type='string', default='nova') # # Filename of root CA (string value) -#ca_file=cacert.pem +# ca_file=cacert.pem # Filename of private key (string value) -#key_file=private/cakey.pem +# key_file=private/cakey.pem # Filename of root Certificate Revocation List (string value) -#crl_file=crl.pem +# crl_file=crl.pem # Where we keep our keys (string value) -#keys_path=$state_path/keys +# keys_path=$state_path/keys # Where we keep our root CA (string value) -#ca_path=$state_path/CA +# ca_path=$state_path/CA # Should we use a CA for each project? (boolean value) -#use_project_ca=false +# use_project_ca=false # Subject for certificate for users, %s for project, user, # timestamp (string value) -#user_cert_subject=/C=US/ST=California/O=OpenStack/OU=NovaDev/CN=%.16s-%.16s-%s +# user_cert_subject=/C=US/ST=California/O=OpenStack/OU=NovaDev/CN=%.16s-%.16s-%s # Subject for certificate for projects, %s for project, # timestamp (string value) -#project_cert_subject=/C=US/ST=California/O=OpenStack/OU=NovaDev/CN=project-ca-%.16s-%s +# project_cert_subject=/C=US/ST=California/O=OpenStack/OU=NovaDev/CN=project-ca-%.16s-%s # @@ -54,7 +57,7 @@ nova.param('default_availability_zone', type='string', default='nova') # # make exception message format errors fatal (boolean value) -#fatal_exception_format_errors=false +# fatal_exception_format_errors=false # @@ -62,13 +65,13 @@ nova.param('default_availability_zone', type='string', default='nova') # # ip address of this host (string value) -#my_ip=10.0.0.1 +# my_ip=10.0.0.1 # Name of this node. This can be an opaque identifier. It is # not necessarily a hostname, FQDN, or IP address. However, # the node name must be valid within an AMQP key, and if using # ZeroMQ, a valid hostname, FQDN, or IP address (string value) -#host=nova +# host=nova nova.param('host', type='string') nova.param('use_ipv6', type='boolean') @@ -83,11 +86,11 @@ nova.param('use_ipv6', type='boolean') # notifications, "vm_state" for notifications on VM state # changes, or "vm_and_task_state" for notifications on VM and # task state changes. (string value) -#notify_on_state_change= +# notify_on_state_change= # If set, send api.fault notifications on caught exceptions in # the API service. (boolean value) -#notify_api_faults=false +# notify_api_faults=false # @@ -96,14 +99,14 @@ nova.param('use_ipv6', type='boolean') # Directory where the nova python module is installed (string # value) -#pybasedir=/usr/lib/python/site-packages +# pybasedir=/usr/lib/python/site-packages # Directory where nova binaries are installed (string value) -#bindir=/usr/local/bin +# bindir=/usr/local/bin # Top-level directory for maintaining nova's state (string # value) -#state_path=$pybasedir +# state_path=$pybasedir # @@ -111,10 +114,10 @@ nova.param('use_ipv6', type='boolean') # # JSON file representing policy (string value) -#policy_file=policy.json +# policy_file=policy.json # Rule checked when requested rule is not found (string value) -#policy_default_rule=default +# policy_default_rule=default # @@ -122,59 +125,59 @@ nova.param('use_ipv6', type='boolean') # # number of instances allowed per project (integer value) -#quota_instances=10 +# quota_instances=10 # number of instance cores allowed per project (integer value) -#quota_cores=20 +# quota_cores=20 # megabytes of instance ram allowed per project (integer # value) -#quota_ram=51200 +# quota_ram=51200 # number of floating ips allowed per project (integer value) -#quota_floating_ips=10 +# quota_floating_ips=10 # number of fixed ips allowed per project (this should be at # least the number of instances allowed) (integer value) -#quota_fixed_ips=-1 +# quota_fixed_ips=-1 # number of metadata items allowed per instance (integer # value) -#quota_metadata_items=128 +# quota_metadata_items=128 # number of injected files allowed (integer value) -#quota_injected_files=5 +# quota_injected_files=5 # number of bytes allowed per injected file (integer value) -#quota_injected_file_content_bytes=10240 +# quota_injected_file_content_bytes=10240 # number of bytes allowed per injected file path (integer # value) -#quota_injected_file_path_bytes=255 +# quota_injected_file_path_bytes=255 # number of security groups per project (integer value) -#quota_security_groups=10 +# quota_security_groups=10 # number of security rules per security group (integer value) -#quota_security_group_rules=20 +# quota_security_group_rules=20 # number of key pairs per user (integer value) -#quota_key_pairs=100 +# quota_key_pairs=100 # number of seconds until a reservation expires (integer # value) -#reservation_expire=86400 +# reservation_expire=86400 # count of reservations until usage is refreshed (integer # value) -#until_refresh=0 +# until_refresh=0 # number of seconds between subsequent usage refreshes # (integer value) -#max_age=0 +# max_age=0 # default driver to use for quota checks (string value) -#quota_driver=nova.quota.DbQuotaDriver +# quota_driver=nova.quota.DbQuotaDriver # @@ -183,71 +186,71 @@ nova.param('use_ipv6', type='boolean') # seconds between nodes reporting state to datastore (integer # value) -#report_interval=10 +# report_interval=10 # enable periodic tasks (boolean value) -#periodic_enable=true +# periodic_enable=true # range of seconds to randomly delay when starting the # periodic task scheduler to reduce stampeding. (Disable by # setting to 0) (integer value) -#periodic_fuzzy_delay=60 +# periodic_fuzzy_delay=60 # a list of APIs to enable by default (list value) -#enabled_apis=ec2,osapi_compute,metadata +# enabled_apis=ec2,osapi_compute,metadata # a list of APIs with enabled SSL (list value) -#enabled_ssl_apis= +# enabled_ssl_apis= # IP address for EC2 API to listen (string value) -#ec2_listen=0.0.0.0 +# ec2_listen=0.0.0.0 # port for ec2 api to listen (integer value) -#ec2_listen_port=8773 +# ec2_listen_port=8773 # Number of workers for EC2 API service (integer value) -#ec2_workers= +# ec2_workers= # IP address for OpenStack API to listen (string value) -#osapi_compute_listen=0.0.0.0 +# osapi_compute_listen=0.0.0.0 # list port for osapi compute (integer value) -#osapi_compute_listen_port=8774 +# osapi_compute_listen_port=8774 # Number of workers for OpenStack API service (integer value) -#osapi_compute_workers= +# osapi_compute_workers= # OpenStack metadata service manager (string value) -#metadata_manager=nova.api.manager.MetadataManager +# metadata_manager=nova.api.manager.MetadataManager # IP address for metadata api to listen (string value) -#metadata_listen=0.0.0.0 +# metadata_listen=0.0.0.0 # port for metadata api to listen (integer value) -#metadata_listen_port=8775 +# metadata_listen_port=8775 # Number of workers for metadata service (integer value) -#metadata_workers= +# metadata_workers= # full class name for the Manager for compute (string value) -#compute_manager=nova.compute.manager.ComputeManager +# compute_manager=nova.compute.manager.ComputeManager # full class name for the Manager for console proxy (string # value) -#console_manager=nova.console.manager.ConsoleProxyManager +# console_manager=nova.console.manager.ConsoleProxyManager # full class name for the Manager for cert (string value) -#cert_manager=nova.cert.manager.CertManager +# cert_manager=nova.cert.manager.CertManager # full class name for the Manager for network (string value) -#network_manager=nova.network.manager.VlanManager +# network_manager=nova.network.manager.VlanManager # full class name for the Manager for scheduler (string value) -#scheduler_manager=nova.scheduler.manager.SchedulerManager +# scheduler_manager=nova.scheduler.manager.SchedulerManager # maximum time since last check-in for up service (integer # value) -#service_down_time=60 +# service_down_time=60 # @@ -255,7 +258,7 @@ nova.param('use_ipv6', type='boolean') # # File name of clean sqlite db (string value) -#sqlite_clean_db=clean.sqlite +# sqlite_clean_db=clean.sqlite # @@ -263,25 +266,25 @@ nova.param('use_ipv6', type='boolean') # # Whether to log monkey patching (boolean value) -#monkey_patch=false +# monkey_patch=false # List of modules/decorators to monkey patch (list value) -#monkey_patch_modules=nova.api.ec2.cloud:nova.notifications.notify_decorator,nova.compute.api:nova.notifications.notify_decorator +# monkey_patch_modules=nova.api.ec2.cloud:nova.notifications.notify_decorator,nova.compute.api:nova.notifications.notify_decorator # Length of generated instance admin passwords (integer value) -#password_length=12 +# password_length=12 # time period to generate instance usages for. Time period # must be hour, day, month or year (string value) -#instance_usage_audit_period=month +# instance_usage_audit_period=month # Path to the rootwrap configuration file to use for running # commands as root (string value) -#rootwrap_config=/etc/nova/rootwrap.conf +# rootwrap_config=/etc/nova/rootwrap.conf # Explicitly specify the temporary working directory (string # value) -#tempdir= +# tempdir= # @@ -290,27 +293,28 @@ nova.param('use_ipv6', type='boolean') # File name for the paste.deploy config for nova-api (string # value) -#api_paste_config=api-paste.ini +# api_paste_config=api-paste.ini # A python format string that is used as the template to # generate log lines. The following values can be formatted # into it: client_ip, date_time, request_line, status_code, # body_length, wall_seconds. (string value) -#wsgi_log_format=%(client_ip)s "%(request_line)s" status: %(status_code)s len: %(body_length)s time: %(wall_seconds).7f +# wsgi_log_format=%(client_ip)s "%(request_line)s" status: %(status_code)s +# len: %(body_length)s time: %(wall_seconds).7f # CA certificate file to use to verify connecting clients # (string value) -#ssl_ca_file= +# ssl_ca_file= # SSL certificate of API server (string value) -#ssl_cert_file= +# ssl_cert_file= # SSL private key of API server (string value) -#ssl_key_file= +# ssl_key_file= # Sets the value of TCP_KEEPIDLE in seconds for each server # socket. Not supported on OS X. (integer value) -#tcp_keepidle=600 +# tcp_keepidle=600 # @@ -319,15 +323,15 @@ nova.param('use_ipv6', type='boolean') # whether to use per-user rate limiting for the api. (boolean # value) -#api_rate_limit=false +# api_rate_limit=false # The strategy to use for auth: noauth or keystone. (string # value) -#auth_strategy=noauth +# auth_strategy=noauth # Treat X-Forwarded-For as the canonical remote address. Only # enable this if you have a sanitizing proxy. (boolean value) -#use_forwarded_for=false +# use_forwarded_for=false # @@ -335,27 +339,27 @@ nova.param('use_ipv6', type='boolean') # # Number of failed auths before lockout. (integer value) -#lockout_attempts=5 +# lockout_attempts=5 # Number of minutes to lockout if triggered. (integer value) -#lockout_minutes=15 +# lockout_minutes=15 # Number of minutes for lockout window. (integer value) -#lockout_window=15 +# lockout_window=15 # URL to get token from ec2 request. (string value) -#keystone_ec2_url=http://localhost:5000/v2.0/ec2tokens +# keystone_ec2_url=http://localhost:5000/v2.0/ec2tokens # Return the IP address as private dns hostname in describe # instances (boolean value) -#ec2_private_dns_show_ip=false +# ec2_private_dns_show_ip=false # Validate security group names according to EC2 specification # (boolean value) -#ec2_strict_validation=true +# ec2_strict_validation=true # Time in seconds before ec2 timestamp expires (integer value) -#ec2_timestamp_expiry=300 +# ec2_timestamp_expiry=300 # @@ -363,24 +367,24 @@ nova.param('use_ipv6', type='boolean') # # the ip of the ec2 api server (string value) -#ec2_host=$my_ip +# ec2_host=$my_ip # the internal ip of the ec2 api server (string value) -#ec2_dmz_host=$my_ip +# ec2_dmz_host=$my_ip # the port of the ec2 api server (integer value) -#ec2_port=8773 +# ec2_port=8773 # the protocol to use when connecting to the ec2 api server # (http, https) (string value) -#ec2_scheme=http +# ec2_scheme=http # the path prefix used to call the ec2 api server (string # value) -#ec2_path=/services/Cloud +# ec2_path=/services/Cloud # list of region=fqdn pairs separated by commas (list value) -#region_list= +# region_list= # @@ -389,10 +393,11 @@ nova.param('use_ipv6', type='boolean') # List of metadata versions to skip placing into the config # drive (string value) -#config_drive_skip_versions=1.0 2007-01-19 2007-03-01 2007-08-29 2007-10-10 2007-12-15 2008-02-01 2008-09-01 +# config_drive_skip_versions=1.0 2007-01-19 2007-03-01 2007-08-29 +# 2007-10-10 2007-12-15 2008-02-01 2008-09-01 # Driver to use for vendor data (string value) -#vendordata_driver=nova.api.metadata.vendordata_json.JsonFileVendorData +# vendordata_driver=nova.api.metadata.vendordata_json.JsonFileVendorData # @@ -401,11 +406,11 @@ nova.param('use_ipv6', type='boolean') # Set flag to indicate Neutron will proxy metadata requests # and resolve instance ids. (boolean value) -#service_neutron_metadata_proxy=false +# service_neutron_metadata_proxy=false # Shared secret to validate proxies Neutron metadata requests # (string value) -#neutron_metadata_proxy_shared_secret= +# neutron_metadata_proxy_shared_secret= # @@ -413,7 +418,7 @@ nova.param('use_ipv6', type='boolean') # # File to load json formated vendor data from (string value) -#vendordata_jsonfile_path= +# vendordata_jsonfile_path= # @@ -422,15 +427,15 @@ nova.param('use_ipv6', type='boolean') # the maximum number of items returned in a single response # from a collection resource (integer value) -#osapi_max_limit=1000 +# osapi_max_limit=1000 # Base URL that will be presented to users in links to the # OpenStack Compute API (string value) -#osapi_compute_link_prefix= +# osapi_compute_link_prefix= # Base URL that will be presented to users in links to glance # resources (string value) -#osapi_glance_link_prefix= +# osapi_glance_link_prefix= # @@ -438,7 +443,7 @@ nova.param('use_ipv6', type='boolean') # # Permit instance snapshot operations. (boolean value) -#allow_instance_snapshots=true +# allow_instance_snapshots=true # @@ -449,7 +454,7 @@ nova.param('use_ipv6', type='boolean') # osapi_compute_extension option with # nova.api.openstack.compute.contrib.select_extensions (list # value) -#osapi_compute_ext_list= +# osapi_compute_ext_list= # @@ -457,7 +462,7 @@ nova.param('use_ipv6', type='boolean') # # Full path to fping. (string value) -#fping_path=/usr/sbin/fping +# fping_path=/usr/sbin/fping # @@ -466,14 +471,14 @@ nova.param('use_ipv6', type='boolean') # Enables or disables quotaing of tenant networks (boolean # value) -#enable_network_quota=false +# enable_network_quota=false # Control for checking for default networks (string value) -#use_neutron_default_nets=False +# use_neutron_default_nets=False # Default tenant id when creating neutron networks (string # value) -#neutron_default_tenant_id=default +# neutron_default_tenant_id=default # @@ -481,7 +486,7 @@ nova.param('use_ipv6', type='boolean') # # osapi compute extension to load (multi valued) -#osapi_compute_extension=nova.api.openstack.compute.contrib.standard_extensions +# osapi_compute_extension=nova.api.openstack.compute.contrib.standard_extensions # @@ -490,7 +495,7 @@ nova.param('use_ipv6', type='boolean') # List of instance states that should hide network info (list # value) -#osapi_hide_server_address_states=building +# osapi_hide_server_address_states=building # @@ -499,7 +504,7 @@ nova.param('use_ipv6', type='boolean') # Allows use of instance password during server creation # (boolean value) -#enable_instance_password=true +# enable_instance_password=true # @@ -508,7 +513,7 @@ nova.param('use_ipv6', type='boolean') # the maximum body size per each osapi request(bytes) (integer # value) -#osapi_max_request_body_size=114688 +# osapi_max_request_body_size=114688 # @@ -517,7 +522,7 @@ nova.param('use_ipv6', type='boolean') # The full class name of the compute API class to use # (deprecated) (string value) -#compute_api_class=nova.compute.api.API +# compute_api_class=nova.compute.api.API # @@ -525,7 +530,7 @@ nova.param('use_ipv6', type='boolean') # # the topic cert nodes listen on (string value) -#cert_topic=cert +# cert_topic=cert # @@ -534,23 +539,23 @@ nova.param('use_ipv6', type='boolean') # image id used when starting up a cloudpipe vpn server # (string value) -#vpn_image_id=0 +# vpn_image_id=0 # Flavor for vpn instances (string value) -#vpn_flavor=m1.tiny +# vpn_flavor=m1.tiny # Template for cloudpipe instance boot script (string value) -#boot_script_template=$pybasedir/nova/cloudpipe/bootscript.template +# boot_script_template=$pybasedir/nova/cloudpipe/bootscript.template # Network to push into openvpn config (string value) -#dmz_net=10.0.0.0 +# dmz_net=10.0.0.0 # Netmask to push into openvpn config (string value) -#dmz_mask=255.255.255.0 +# dmz_mask=255.255.255.0 # Suffix to add to project name for vpn key and secgroups # (string value) -#vpn_key_suffix=-vpn +# vpn_key_suffix=-vpn # @@ -558,26 +563,26 @@ nova.param('use_ipv6', type='boolean') # # Record sessions to FILE.[session_number] (boolean value) -#record=false +# record=false # Become a daemon (background process) (boolean value) -#daemon=false +# daemon=false # Disallow non-encrypted connections (boolean value) -#ssl_only=false +# ssl_only=false # Source is ipv6 (boolean value) -#source_is_ipv6=false +# source_is_ipv6=false # SSL certificate file (string value) -#cert=self.pem +# cert=self.pem # SSL key file (if separate from cert) (string value) -#key= +# key= # Run webserver on same port. Serve files from DIR. (string # value) -#web=/usr/share/spice-html5 +# web=/usr/share/spice-html5 # @@ -585,11 +590,11 @@ nova.param('use_ipv6', type='boolean') # # Host on which to listen for incoming requests (string value) -#novncproxy_host=0.0.0.0 +# novncproxy_host=0.0.0.0 # Port on which to listen for incoming requests (integer # value) -#novncproxy_port=6080 +# novncproxy_port=6080 # @@ -597,11 +602,11 @@ nova.param('use_ipv6', type='boolean') # # Host on which to listen for incoming requests (string value) -#spicehtml5proxy_host=0.0.0.0 +# spicehtml5proxy_host=0.0.0.0 # Port on which to listen for incoming requests (integer # value) -#spicehtml5proxy_port=6082 +# spicehtml5proxy_port=6082 # @@ -610,23 +615,23 @@ nova.param('use_ipv6', type='boolean') # Allow destination machine to match source for resize. Useful # when testing in single-host environments. (boolean value) -#allow_resize_to_same_host=false +# allow_resize_to_same_host=false # Allow migrate machine to the same host. Useful when testing # in single-host environments. (boolean value) -#allow_migrate_to_same_host=false +# allow_migrate_to_same_host=false # availability zone to use when user doesn't specify one # (string value) -#default_schedule_zone= +# default_schedule_zone= # These are image properties which a snapshot should not # inherit from an instance (list value) -#non_inheritable_image_properties=cache_in_nova,bittorrent +# non_inheritable_image_properties=cache_in_nova,bittorrent # kernel image that indicates not to use a kernel, but to use # a raw disk image instead (string value) -#null_kernel=nokernel +# null_kernel=nokernel # When creating multiple instances with a single request using # the os-multiple-create API extension, this template will be @@ -635,13 +640,13 @@ nova.param('use_ipv6', type='boolean') # hostnames. To restore legacy behavior of every instance # having the same name, set this option to "%(name)s". Valid # keys for the template are: name, uuid, count. (string value) -#multi_instance_display_name_template=%(name)s-%(uuid)s +# multi_instance_display_name_template=%(name)s-%(uuid)s # Maximum number of devices that will result in a local image # being created on the hypervisor node. Setting this to 0 # means nova will allow only boot from volume. A negative # number means unlimited. (integer value) -#max_local_block_devices=3 +# max_local_block_devices=3 # @@ -650,7 +655,7 @@ nova.param('use_ipv6', type='boolean') # default flavor to use for the EC2 API only. The Nova API # does not support a default flavor. (string value) -#default_flavor=m1.small +# default_flavor=m1.small # @@ -659,110 +664,110 @@ nova.param('use_ipv6', type='boolean') # Console proxy host to use to connect to instances on this # host. (string value) -#console_host=nova +# console_host=nova # Name of network to use to set access ips for instances # (string value) -#default_access_ip_network_name= +# default_access_ip_network_name= # Whether to batch up the application of IPTables rules during # a host restart and apply all at the end of the init phase # (boolean value) -#defer_iptables_apply=false +# defer_iptables_apply=false # where instances are stored on disk (string value) -#instances_path=$state_path/instances +# instances_path=$state_path/instances # Generate periodic compute.instance.exists notifications # (boolean value) -#instance_usage_audit=false +# instance_usage_audit=false # Number of 1 second retries needed in live_migration (integer # value) -#live_migration_retry_count=30 +# live_migration_retry_count=30 # Whether to start guests that were running before the host # rebooted (boolean value) -#resume_guests_state_on_host_boot=false +# resume_guests_state_on_host_boot=false # Number of times to retry network allocation on failures # (integer value) -#network_allocate_retries=0 +# network_allocate_retries=0 # The number of times to attempt to reap an instance's files. # (integer value) -#maximum_instance_delete_attempts=5 +# maximum_instance_delete_attempts=5 # interval to pull bandwidth usage info (integer value) -#bandwidth_poll_interval=600 +# bandwidth_poll_interval=600 # interval to sync power states between the database and the # hypervisor (integer value) -#sync_power_state_interval=600 +# sync_power_state_interval=600 # Number of seconds between instance info_cache self healing # updates (integer value) -#heal_instance_info_cache_interval=60 +# heal_instance_info_cache_interval=60 # Interval in seconds for querying the host status (integer # value) -#host_state_interval=120 +# host_state_interval=120 # Number of seconds to wait between runs of the image cache # manager (integer value) -#image_cache_manager_interval=2400 +# image_cache_manager_interval=2400 # Interval in seconds for reclaiming deleted instances # (integer value) -#reclaim_instance_interval=0 +# reclaim_instance_interval=0 # Interval in seconds for gathering volume usages (integer # value) -#volume_usage_poll_interval=0 +# volume_usage_poll_interval=0 # Interval in seconds for polling shelved instances to offload # (integer value) -#shelved_poll_interval=3600 +# shelved_poll_interval=3600 # Time in seconds before a shelved instance is eligible for # removing from a host. -1 never offload, 0 offload when # shelved (integer value) -#shelved_offload_time=0 +# shelved_offload_time=0 # Interval in seconds for retrying failed instance file # deletes (integer value) -#instance_delete_interval=300 +# instance_delete_interval=300 # Action to take if a running deleted instance is # detected.Valid options are 'noop', 'log' and 'reap'. Set to # 'noop' to disable. (string value) -#running_deleted_instance_action=log +# running_deleted_instance_action=log # Number of seconds to wait between runs of the cleanup task. # (integer value) -#running_deleted_instance_poll_interval=1800 +# running_deleted_instance_poll_interval=1800 # Number of seconds after being deleted when a running # instance should be considered eligible for cleanup. (integer # value) -#running_deleted_instance_timeout=0 +# running_deleted_instance_timeout=0 # Automatically hard reboot an instance if it has been stuck # in a rebooting state longer than N seconds. Set to 0 to # disable. (integer value) -#reboot_timeout=0 +# reboot_timeout=0 # Amount of time in seconds an instance can be in BUILD before # going into ERROR status.Set to 0 to disable. (integer value) -#instance_build_timeout=0 +# instance_build_timeout=0 # Automatically unrescue an instance after N seconds. Set to 0 # to disable. (integer value) -#rescue_timeout=0 +# rescue_timeout=0 # Automatically confirm resizes after N seconds. Set to 0 to # disable. (integer value) -#resize_confirm_window=0 +# resize_confirm_window=0 # @@ -770,15 +775,15 @@ nova.param('use_ipv6', type='boolean') # # Amount of disk in MB to reserve for the host (integer value) -#reserved_host_disk_mb=0 +# reserved_host_disk_mb=0 # Amount of memory in MB to reserve for the host (integer # value) -#reserved_host_memory_mb=512 +# reserved_host_memory_mb=512 # Class that will manage stats for the local compute host # (string value) -#compute_stats_class=nova.compute.stats.Stats +# compute_stats_class=nova.compute.stats.Stats # @@ -786,7 +791,7 @@ nova.param('use_ipv6', type='boolean') # # the topic compute nodes listen on (string value) -#compute_topic=compute +# compute_topic=compute # @@ -796,7 +801,7 @@ nova.param('use_ipv6', type='boolean') # Number of times to retry live-migration before failing. If # == -1, try until out of hosts. If == 0, only try once, no # retries. (integer value) -#migrate_max_retries=-1 +# migrate_max_retries=-1 # @@ -804,13 +809,13 @@ nova.param('use_ipv6', type='boolean') # # Driver to use for the console proxy (string value) -#console_driver=nova.console.xvp.XVPConsoleProxy +# console_driver=nova.console.xvp.XVPConsoleProxy # Stub calls to compute worker for tests (boolean value) -#stub_compute=false +# stub_compute=false # Publicly visible name for this console host (string value) -#console_public_hostname=nova +# console_public_hostname=nova # @@ -818,7 +823,7 @@ nova.param('use_ipv6', type='boolean') # # the topic console proxy nodes listen on (string value) -#console_topic=console +# console_topic=console # @@ -826,11 +831,11 @@ nova.param('use_ipv6', type='boolean') # # port for VMware VMRC connections (integer value) -#console_vmrc_port=443 +# console_vmrc_port=443 # number of retries for retrieving VMRC information (integer # value) -#console_vmrc_error_retries=10 +# console_vmrc_error_retries=10 # @@ -838,19 +843,19 @@ nova.param('use_ipv6', type='boolean') # # XVP conf template (string value) -#console_xvp_conf_template=$pybasedir/nova/console/xvp.conf.template +# console_xvp_conf_template=$pybasedir/nova/console/xvp.conf.template # generated XVP conf file (string value) -#console_xvp_conf=/etc/xvp.conf +# console_xvp_conf=/etc/xvp.conf # XVP master process pid file (string value) -#console_xvp_pid=/var/run/xvp.pid +# console_xvp_pid=/var/run/xvp.pid # XVP log file (string value) -#console_xvp_log=/var/log/xvp.log +# console_xvp_log=/var/log/xvp.log # port for XVP to multiplex VNC connections on (integer value) -#console_xvp_multiplex_port=5900 +# console_xvp_multiplex_port=5900 # @@ -858,7 +863,7 @@ nova.param('use_ipv6', type='boolean') # # the topic console auth proxy nodes listen on (string value) -#consoleauth_topic=consoleauth +# consoleauth_topic=consoleauth # @@ -866,10 +871,10 @@ nova.param('use_ipv6', type='boolean') # # How many seconds before deleting tokens (integer value) -#console_token_ttl=600 +# console_token_ttl=600 # Manager for console auth (string value) -#consoleauth_manager=nova.consoleauth.manager.ConsoleAuthManager +# consoleauth_manager=nova.consoleauth.manager.ConsoleAuthManager # @@ -878,15 +883,15 @@ nova.param('use_ipv6', type='boolean') # Services to be added to the available pool on create # (boolean value) -#enable_new_services=true +# enable_new_services=true # Template string to be used to generate instance names # (string value) -#instance_name_template=instance-%08x +# instance_name_template=instance-%08x # Template string to be used to generate snapshot names # (string value) -#snapshot_name_template=snapshot-%s +# snapshot_name_template=snapshot-%s # @@ -894,7 +899,7 @@ nova.param('use_ipv6', type='boolean') # # driver to use for database access (string value) -#db_driver=nova.db +# db_driver=nova.db # @@ -904,7 +909,7 @@ nova.param('use_ipv6', type='boolean') # When set, compute API will consider duplicate hostnames # invalid within the specified scope, regardless of case. # Should be empty, "project" or "global". (string value) -#osapi_compute_unique_server_name_scope= +# osapi_compute_unique_server_name_scope= # @@ -912,32 +917,32 @@ nova.param('use_ipv6', type='boolean') # # default glance hostname or ip (string value) -#glance_host=$my_ip +# glance_host=$my_ip # default glance port (integer value) -#glance_port=9292 +# glance_port=9292 # Default protocol to use when connecting to glance. Set to # https for SSL. (string value) -#glance_protocol=http +# glance_protocol=http # A list of the glance api servers available to nova. Prefix # with https:// for ssl-based glance api servers. # ([hostname|ip]:port) (list value) -#glance_api_servers=$glance_host:$glance_port +# glance_api_servers=$glance_host:$glance_port # Allow to perform insecure SSL (https) requests to glance # (boolean value) -#glance_api_insecure=false +# glance_api_insecure=false # Number retries when downloading an image from glance # (integer value) -#glance_num_retries=0 +# glance_num_retries=0 # A list of url scheme that can be downloaded directly via the # direct_url. Currently supported schemes: [file]. (list # value) -#allowed_direct_url_schemes= +# allowed_direct_url_schemes= # @@ -946,27 +951,27 @@ nova.param('use_ipv6', type='boolean') # parent dir for tempdir used for image decryption (string # value) -#image_decryption_dir=/tmp +# image_decryption_dir=/tmp # hostname or ip for OpenStack to use when accessing the s3 # api (string value) -#s3_host=$my_ip +# s3_host=$my_ip # port used when accessing the s3 api (integer value) -#s3_port=3333 +# s3_port=3333 # access key to use for s3 server for images (string value) -#s3_access_key=notchecked +# s3_access_key=notchecked # secret key to use for s3 server for images (string value) -#s3_secret_key=notchecked +# s3_secret_key=notchecked # whether to use ssl when talking to s3 (boolean value) -#s3_use_ssl=false +# s3_use_ssl=false # whether to affix the tenant id to the access key when # downloading from s3 (boolean value) -#s3_affix_tenant=false +# s3_affix_tenant=false # @@ -974,7 +979,7 @@ nova.param('use_ipv6', type='boolean') # # Backend to use for IPv6 generation (string value) -#ipv6_backend=rfc2462 +# ipv6_backend=rfc2462 # @@ -983,7 +988,7 @@ nova.param('use_ipv6', type='boolean') # The full class name of the network API class to use (string # value) -#network_api_class=nova.network.api.API +# network_api_class=nova.network.api.API # @@ -991,7 +996,7 @@ nova.param('use_ipv6', type='boolean') # # Driver to use for network creation (string value) -#network_driver=nova.network.linux_net +# network_driver=nova.network.linux_net # @@ -999,22 +1004,22 @@ nova.param('use_ipv6', type='boolean') # # Default pool for floating ips (string value) -#default_floating_pool=nova +# default_floating_pool=nova # Autoassigning floating ip to VM (boolean value) -#auto_assign_floating_ip=false +# auto_assign_floating_ip=false # full class name for the DNS Manager for floating IPs (string # value) -#floating_ip_dns_manager=nova.network.noop_dns_driver.NoopDNSDriver +# floating_ip_dns_manager=nova.network.noop_dns_driver.NoopDNSDriver # full class name for the DNS Manager for instance IPs (string # value) -#instance_dns_manager=nova.network.noop_dns_driver.NoopDNSDriver +# instance_dns_manager=nova.network.noop_dns_driver.NoopDNSDriver # full class name for the DNS Zone for instance IPs (string # value) -#instance_dns_domain= +# instance_dns_domain= # @@ -1023,39 +1028,39 @@ nova.param('use_ipv6', type='boolean') # URL for ldap server which will store dns entries (string # value) -#ldap_dns_url=ldap://ldap.example.com:389 +# ldap_dns_url=ldap://ldap.example.com:389 # user for ldap DNS (string value) -#ldap_dns_user=uid=admin,ou=people,dc=example,dc=org +# ldap_dns_user=uid=admin,ou=people,dc=example,dc=org # password for ldap DNS (string value) -#ldap_dns_password=password +# ldap_dns_password=password # Hostmaster for ldap dns driver Statement of Authority # (string value) -#ldap_dns_soa_hostmaster=hostmaster@example.org +# ldap_dns_soa_hostmaster=hostmaster@example.org # DNS Servers for ldap dns driver (multi valued) -#ldap_dns_servers=dns.example.org +# ldap_dns_servers=dns.example.org # Base DN for DNS entries in ldap (string value) -#ldap_dns_base_dn=ou=hosts,dc=example,dc=org +# ldap_dns_base_dn=ou=hosts,dc=example,dc=org # Refresh interval (in seconds) for ldap dns driver Statement # of Authority (string value) -#ldap_dns_soa_refresh=1800 +# ldap_dns_soa_refresh=1800 # Retry interval (in seconds) for ldap dns driver Statement of # Authority (string value) -#ldap_dns_soa_retry=3600 +# ldap_dns_soa_retry=3600 # Expiry interval (in seconds) for ldap dns driver Statement # of Authority (string value) -#ldap_dns_soa_expiry=86400 +# ldap_dns_soa_expiry=86400 # Minimum interval (in seconds) for ldap dns driver Statement # of Authority (string value) -#ldap_dns_soa_minimum=7200 +# ldap_dns_soa_minimum=7200 # @@ -1063,85 +1068,85 @@ nova.param('use_ipv6', type='boolean') # # location of flagfiles for dhcpbridge (multi valued) -#dhcpbridge_flagfile=/etc/nova/nova-dhcpbridge.conf +# dhcpbridge_flagfile=/etc/nova/nova-dhcpbridge.conf # Location to keep network config files (string value) -#networks_path=$state_path/networks +# networks_path=$state_path/networks # Interface for public IP addresses (string value) -#public_interface=eth0 +# public_interface=eth0 # MTU setting for vlan (string value) -#network_device_mtu= +# network_device_mtu= # location of nova-dhcpbridge (string value) -#dhcpbridge=$bindir/nova-dhcpbridge +# dhcpbridge=$bindir/nova-dhcpbridge # Public IP of network host (string value) -#routing_source_ip=$my_ip +# routing_source_ip=$my_ip # Lifetime of a DHCP lease in seconds (integer value) -#dhcp_lease_time=120 +# dhcp_lease_time=120 # if set, uses specific dns server for dnsmasq. Canbe # specified multiple times. (multi valued) -#dns_server= +# dns_server= # if set, uses the dns1 and dns2 from the network ref.as dns # servers. (boolean value) -#use_network_dns_servers=false +# use_network_dns_servers=false # A list of dmz range that should be accepted (list value) -#dmz_cidr= +# dmz_cidr= # Traffic to this range will always be snatted to the fallback # ip, even if it would normally be bridged out of the node. # Can be specified multiple times. (multi valued) -#force_snat_range= +# force_snat_range= # Override the default dnsmasq settings with this file (string # value) -#dnsmasq_config_file= +# dnsmasq_config_file= # Driver used to create ethernet devices. (string value) -#linuxnet_interface_driver=nova.network.linux_net.LinuxBridgeInterfaceDriver +# linuxnet_interface_driver=nova.network.linux_net.LinuxBridgeInterfaceDriver # Name of Open vSwitch bridge used with linuxnet (string # value) -#linuxnet_ovs_integration_bridge=br-int +# linuxnet_ovs_integration_bridge=br-int # send gratuitous ARPs for HA setup (boolean value) -#send_arp_for_ha=false +# send_arp_for_ha=false # send this many gratuitous ARPs for HA setup (integer value) -#send_arp_for_ha_count=3 +# send_arp_for_ha_count=3 # Use single default gateway. Only first nic of vm will get # default gateway from dhcp server (boolean value) -#use_single_default_gateway=false +# use_single_default_gateway=false # An interface that bridges can forward to. If this is set to # all then all traffic will be forwarded. Can be specified # multiple times. (multi valued) -#forward_bridge_interface=all +# forward_bridge_interface=all # the ip for the metadata api server (string value) -#metadata_host=$my_ip +# metadata_host=$my_ip # the port for the metadata api port (integer value) -#metadata_port=8775 +# metadata_port=8775 # Regular expression to match iptables rule that shouldalways # be on the top. (string value) -#iptables_top_regex= +# iptables_top_regex= # Regular expression to match iptables rule that shouldalways # be on the bottom. (string value) -#iptables_bottom_regex= +# iptables_bottom_regex= # The table that iptables to jump to when a packet is to be # dropped. (string value) -#iptables_drop_action=DROP +# iptables_drop_action=DROP # @@ -1149,94 +1154,94 @@ nova.param('use_ipv6', type='boolean') # # Bridge for simple network instances (string value) -#flat_network_bridge= +# flat_network_bridge= # Dns for simple network (string value) -#flat_network_dns=8.8.4.4 +# flat_network_dns=8.8.4.4 # Whether to attempt to inject network setup into guest # (boolean value) -#flat_injected=false +# flat_injected=false # FlatDhcp will bridge into this interface if set (string # value) -#flat_interface= +# flat_interface= # First VLAN for private networks (integer value) -#vlan_start=100 +# vlan_start=100 # vlans will bridge into this interface if set (string value) -#vlan_interface= +# vlan_interface= # Number of networks to support (integer value) -#num_networks=1 +# num_networks=1 # Public IP for the cloudpipe VPN servers (string value) -#vpn_ip=$my_ip +# vpn_ip=$my_ip # First Vpn port for private networks (integer value) -#vpn_start=1000 +# vpn_start=1000 # Number of addresses in each private subnet (integer value) -#network_size=256 +# network_size=256 # Fixed IPv6 address block (string value) -#fixed_range_v6=fd00::/48 +# fixed_range_v6=fd00::/48 # Default IPv4 gateway (string value) -#gateway= +# gateway= # Default IPv6 gateway (string value) -#gateway_v6= +# gateway_v6= # Number of addresses reserved for vpn clients (integer value) -#cnt_vpn_clients=0 +# cnt_vpn_clients=0 # Seconds after which a deallocated ip is disassociated # (integer value) -#fixed_ip_disassociate_timeout=600 +# fixed_ip_disassociate_timeout=600 # Number of attempts to create unique mac address (integer # value) -#create_unique_mac_address_attempts=5 +# create_unique_mac_address_attempts=5 # If passed, use fake network devices and addresses (boolean # value) -#fake_network=false +# fake_network=false # If True, skip using the queue and make local calls (boolean # value) -#fake_call=false +# fake_call=false # If True, unused gateway devices (VLAN and bridge) are # deleted in VLAN network mode with multi hosted networks # (boolean value) -#teardown_unused_network_gateway=false +# teardown_unused_network_gateway=false # If True, send a dhcp release on instance termination # (boolean value) -#force_dhcp_release=true +# force_dhcp_release=true # If True in multi_host mode, all compute hosts share the same # dhcp address. The same IP address used for DHCP will be # added on each nova-network node which is only visible to the # vms on the same host. (boolean value) -#share_dhcp_address=false +# share_dhcp_address=false # If True, when a DNS entry must be updated, it sends a fanout # cast to all network hosts to update their DNS entries in # multi host mode (boolean value) -#update_dns_entries=false +# update_dns_entries=false # Number of seconds to wait between runs of updates to DNS # entries. (integer value) -#dns_update_periodic_interval=-1 +# dns_update_periodic_interval=-1 # domain to use for building the hostnames (string value) -#dhcp_domain=novalocal +# dhcp_domain=novalocal # Indicates underlying L3 management library (string value) -#l3_lib=nova.network.l3.LinuxNetL3 +# l3_lib=nova.network.l3.LinuxNetL3 # @@ -1244,53 +1249,53 @@ nova.param('use_ipv6', type='boolean') # # URL for connecting to neutron (string value) -#neutron_url=http://127.0.0.1:9696 +# neutron_url=http://127.0.0.1:9696 # timeout value for connecting to neutron in seconds (integer # value) -#neutron_url_timeout=30 +# neutron_url_timeout=30 # username for connecting to neutron in admin context (string # value) -#neutron_admin_username= +# neutron_admin_username= # password for connecting to neutron in admin context (string # value) -#neutron_admin_password= +# neutron_admin_password= # tenant name for connecting to neutron in admin context # (string value) -#neutron_admin_tenant_name= +# neutron_admin_tenant_name= # region name for connecting to neutron in admin context # (string value) -#neutron_region_name= +# neutron_region_name= # auth url for connecting to neutron in admin context (string # value) -#neutron_admin_auth_url=http://localhost:5000/v2.0 +# neutron_admin_auth_url=http://localhost:5000/v2.0 # if set, ignore any SSL validation issues (boolean value) -#neutron_api_insecure=false +# neutron_api_insecure=false # auth strategy for connecting to neutron in admin context # (string value) -#neutron_auth_strategy=keystone +# neutron_auth_strategy=keystone # Name of Integration Bridge used by Open vSwitch (string # value) -#neutron_ovs_bridge=br-int +# neutron_ovs_bridge=br-int # Number of seconds before querying neutron for extensions # (integer value) -#neutron_extension_sync_interval=600 +# neutron_extension_sync_interval=600 # Location of ca certicates file to use for neutronclient # requests. (string value) -#neutron_ca_certificates_file= +# neutron_ca_certificates_file= # Use per-port DHCP options with Neutron (boolean value) -#dhcp_options_enabled=false +# dhcp_options_enabled=false # @@ -1298,12 +1303,12 @@ nova.param('use_ipv6', type='boolean') # # the topic network nodes listen on (string value) -#network_topic=network +# network_topic=network # Default value for multi_host in networks. Also, if set, some # rpc network calls will be sent directly to host. (boolean # value) -#multi_host=false +# multi_host=false # @@ -1311,7 +1316,7 @@ nova.param('use_ipv6', type='boolean') # # The full class name of the security API class (string value) -#security_group_api=nova +# security_group_api=nova # @@ -1319,13 +1324,13 @@ nova.param('use_ipv6', type='boolean') # # path to s3 buckets (string value) -#buckets_path=$state_path/buckets +# buckets_path=$state_path/buckets # IP address for S3 API to listen (string value) -#s3_listen=0.0.0.0 +# s3_listen=0.0.0.0 # port for s3 api to listen (integer value) -#s3_listen_port=3333 +# s3_listen_port=3333 # @@ -1333,10 +1338,10 @@ nova.param('use_ipv6', type='boolean') # # the filename to use with sqlite (string value) -#sqlite_db=nova.sqlite +# sqlite_db=nova.sqlite # If true, use synchronous mode for sqlite (boolean value) -#sqlite_synchronous=true +# sqlite_synchronous=true # @@ -1351,7 +1356,7 @@ nova.param('use_ipv6', type='boolean') # unused port number within the specified range of port # numbers. The chosen port is displayed in the service's log # file. (string value) -#backdoor_port= +# backdoor_port= # @@ -1359,10 +1364,10 @@ nova.param('use_ipv6', type='boolean') # # Whether to disable inter-process locks (boolean value) -#disable_process_locking=false +# disable_process_locking=false # Directory to use for lock files. (string value) -#lock_path= +# lock_path= # @@ -1371,41 +1376,53 @@ nova.param('use_ipv6', type='boolean') # Print debugging output (set logging level to DEBUG instead # of default WARNING level). (boolean value) -#debug=false +# debug=false # Print more verbose output (set logging level to INFO instead # of default WARNING level). (boolean value) -#verbose=false -nova.param('verbose', type='boolean', default=False, description='Print more verbose output (set logging level to INFO instead of default WARNING level)') +# verbose=false +nova.param( + 'verbose', + type='boolean', + default=False, + description='Print more verbose output (set logging level to INFO instead of default WARNING level)') # Log output to standard error (boolean value) -#use_stderr=true -nova.param('use_stderr', type='boolean', default=True, description='Log output to standard error') +# use_stderr=true +nova.param( + 'use_stderr', + type='boolean', + default=True, + description='Log output to standard error') # format string to use for log messages with context (string # value) -#logging_context_format_string=%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user)s %(tenant)s] %(instance)s%(message)s +# logging_context_format_string=%(asctime)s.%(msecs)03d %(process)d +# %(levelname)s %(name)s [%(request_id)s %(user)s %(tenant)s] +# %(instance)s%(message)s # format string to use for log messages without context # (string value) -#logging_default_format_string=%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s +# logging_default_format_string=%(asctime)s.%(msecs)03d %(process)d +# %(levelname)s %(name)s [-] %(instance)s%(message)s # data to append to log format when level is DEBUG (string # value) -#logging_debug_format_suffix=%(funcName)s %(pathname)s:%(lineno)d +# logging_debug_format_suffix=%(funcName)s %(pathname)s:%(lineno)d # prefix each line of exception output with this format # (string value) -#logging_exception_prefix=%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s +# logging_exception_prefix=%(asctime)s.%(msecs)03d %(process)d TRACE +# %(name)s %(instance)s # list of logger=LEVEL pairs (list value) -#default_log_levels=amqplib=WARN,sqlalchemy=WARN,boto=WARN,suds=INFO,keystone=INFO,eventlet.wsgi.server=WARN +# default_log_levels=amqplib=WARN,sqlalchemy=WARN,boto=WARN,suds=INFO,keystone=INFO,eventlet.wsgi.server=WARN # publish error events (boolean value) -#publish_errors=false +# publish_errors=false # make deprecations fatal (boolean value) -#fatal_deprecations=false +# fatal_deprecations=false # If an instance is passed with the log message, format it # like this (string value) @@ -1420,32 +1437,32 @@ nova.param('use_stderr', type='boolean', default=True, description='Log output t # specified. Please see the Python logging module # documentation for details on logging configuration files. # (string value) -#log_config= +# log_config= # DEPRECATED. A logging.Formatter log message format string # which may use any of the available logging.LogRecord # attributes. This option is deprecated. Please use # logging_context_format_string and # logging_default_format_string instead. (string value) -#log_format= +# log_format= # Format string for %%(asctime)s in log records. Default: # %(default)s (string value) -#log_date_format=%Y-%m-%d %H:%M:%S +# log_date_format=%Y-%m-%d %H:%M:%S # (Optional) Name of log file to output to. If no default is # set, logging will go to stdout. (string value) -#log_file= +# log_file= # (Optional) The base directory used for relative --log-file # paths (string value) -#log_dir= +# log_dir= # Use syslog for logging. (boolean value) -#use_syslog=false +# use_syslog=false # syslog facility to receive log lines (string value) -#syslog_log_facility=LOG_USER +# syslog_log_facility=LOG_USER # @@ -1453,7 +1470,7 @@ nova.param('use_stderr', type='boolean', default=True, description='Log output t # # Memcached servers or None for in process cache. (list value) -#memcached_servers= +# memcached_servers= # @@ -1462,15 +1479,15 @@ nova.param('use_stderr', type='boolean', default=True, description='Log output t # Driver or drivers to handle sending notifications (multi # valued) -#notification_driver= +# notification_driver= # Default notification level for outgoing notifications # (string value) -#default_notification_level=INFO +# default_notification_level=INFO # Default publisher_id for outgoing notifications (string # value) -#default_publisher_id= +# default_publisher_id= # @@ -1478,7 +1495,7 @@ nova.param('use_stderr', type='boolean', default=True, description='Log output t # # AMQP topic used for OpenStack notifications (list value) -#notification_topics=notifications +# notification_topics=notifications # @@ -1487,7 +1504,7 @@ nova.param('use_stderr', type='boolean', default=True, description='Log output t # Some periodic tasks can be run in a separate process. Should # we run them here? (boolean value) -#run_external_periodic_tasks=true +# run_external_periodic_tasks=true # @@ -1496,32 +1513,32 @@ nova.param('use_stderr', type='boolean', default=True, description='Log output t # The messaging module to use, defaults to kombu. (string # value) -#rpc_backend=nova.openstack.common.rpc.impl_kombu +# rpc_backend=nova.openstack.common.rpc.impl_kombu # Size of RPC thread pool (integer value) -#rpc_thread_pool_size=64 +# rpc_thread_pool_size=64 # Size of RPC connection pool (integer value) -#rpc_conn_pool_size=30 +# rpc_conn_pool_size=30 # Seconds to wait for a response from call or multicall # (integer value) -#rpc_response_timeout=60 +# rpc_response_timeout=60 # Seconds to wait before a cast expires (TTL). Only supported # by impl_zmq. (integer value) -#rpc_cast_timeout=30 +# rpc_cast_timeout=30 # Modules of exceptions that are permitted to be recreatedupon # receiving exception data from an rpc call. (list value) -#allowed_rpc_exception_modules=nova.exception,cinder.exception,exceptions +# allowed_rpc_exception_modules=nova.exception,cinder.exception,exceptions # If passed, use a fake RabbitMQ provider (boolean value) -#fake_rabbit=false +# fake_rabbit=false # AMQP exchange to connect to if using RabbitMQ or Qpid # (string value) -#control_exchange=openstack +# control_exchange=openstack # @@ -1529,10 +1546,10 @@ nova.param('use_stderr', type='boolean', default=True, description='Log output t # # Use durable queues in amqp. (boolean value) -#amqp_durable_queues=false +# amqp_durable_queues=false # Auto-delete queues in amqp. (boolean value) -#amqp_auto_delete=false +# amqp_auto_delete=false nova.param('amqp_auto_delete', type='boolean') @@ -1543,66 +1560,66 @@ nova.param('amqp_auto_delete', type='boolean') # SSL version to use (valid only if SSL enabled). valid values # are TLSv1, SSLv23 and SSLv3. SSLv2 may be available on some # distributions (string value) -#kombu_ssl_version= +# kombu_ssl_version= # SSL key file (valid only if SSL enabled) (string value) -#kombu_ssl_keyfile= +# kombu_ssl_keyfile= # SSL cert file (valid only if SSL enabled) (string value) -#kombu_ssl_certfile= +# kombu_ssl_certfile= # SSL certification authority file (valid only if SSL enabled) # (string value) -#kombu_ssl_ca_certs= +# kombu_ssl_ca_certs= # The RabbitMQ broker address where a single node is used # (string value) -#rabbit_host=localhost +# rabbit_host=localhost # The RabbitMQ broker port where a single node is used # (integer value) -#rabbit_port=5672 +# rabbit_port=5672 nova.param('rabbit_host', type='host') nova.param('rabbit_port', type='port') # RabbitMQ HA cluster host:port pairs (list value) -#rabbit_hosts=$rabbit_host:$rabbit_port +# rabbit_hosts=$rabbit_host:$rabbit_port # connect over SSL for RabbitMQ (boolean value) -#rabbit_use_ssl=false +# rabbit_use_ssl=false nova.param('rabbit_use_ssl', type='boolean', default=False) # the RabbitMQ userid (string value) -#rabbit_userid=guest +# rabbit_userid=guest nova.param('rabbit_userid', type='string', default='guest') # the RabbitMQ password (string value) -#rabbit_password=guest +# rabbit_password=guest nova.param('rabbit_password', type='string', default='guest') # the RabbitMQ virtual host (string value) -#rabbit_virtual_host=/ +# rabbit_virtual_host=/ nova.param('rabbit_virtual_host', type='string', default='/') # how frequently to retry connecting with RabbitMQ (integer # value) -#rabbit_retry_interval=1 +# rabbit_retry_interval=1 nova.param('rabbit_retry_interval', type='integer', default=1) # how long to backoff for between retries when connecting to # RabbitMQ (integer value) -#rabbit_retry_backoff=2 +# rabbit_retry_backoff=2 # maximum retries with trying to connect to RabbitMQ (the # default of 0 implies an infinite retry count) (integer # value) -#rabbit_max_retries=0 +# rabbit_max_retries=0 # use H/A queues in RabbitMQ (x-ha-policy: all).You need to # wipe RabbitMQ database when changing this option. (boolean # value) -#rabbit_ha_queues=false +# rabbit_ha_queues=false # @@ -1610,33 +1627,33 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # # Qpid broker hostname (string value) -#qpid_hostname=localhost +# qpid_hostname=localhost # Qpid broker port (integer value) -#qpid_port=5672 +# qpid_port=5672 # Qpid HA cluster host:port pairs (list value) -#qpid_hosts=$qpid_hostname:$qpid_port +# qpid_hosts=$qpid_hostname:$qpid_port # Username for qpid connection (string value) -#qpid_username= +# qpid_username= # Password for qpid connection (string value) -#qpid_password= +# qpid_password= # Space separated list of SASL mechanisms to use for auth # (string value) -#qpid_sasl_mechanisms= +# qpid_sasl_mechanisms= # Seconds between connection keepalive heartbeats (integer # value) -#qpid_heartbeat=60 +# qpid_heartbeat=60 # Transport to use, either 'tcp' or 'ssl' (string value) -#qpid_protocol=tcp +# qpid_protocol=tcp # Disable Nagle algorithm (boolean value) -#qpid_tcp_nodelay=true +# qpid_tcp_nodelay=true # The qpid topology version to use. Version 1 is what was # originally used by impl_qpid. Version 2 includes some @@ -1644,7 +1661,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # to work. Users should update to version 2 when they are # able to take everything down, as it requires a clean break. # (integer value) -#qpid_topology_version=1 +# qpid_topology_version=1 # @@ -1654,28 +1671,28 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # ZeroMQ bind address. Should be a wildcard (*), an ethernet # interface, or IP. The "host" option should point or resolve # to this address. (string value) -#rpc_zmq_bind_address=* +# rpc_zmq_bind_address=* # MatchMaker driver (string value) -#rpc_zmq_matchmaker=nova.openstack.common.rpc.matchmaker.MatchMakerLocalhost +# rpc_zmq_matchmaker=nova.openstack.common.rpc.matchmaker.MatchMakerLocalhost # ZeroMQ receiver listening port (integer value) -#rpc_zmq_port=9501 +# rpc_zmq_port=9501 # Number of ZeroMQ contexts, defaults to 1 (integer value) -#rpc_zmq_contexts=1 +# rpc_zmq_contexts=1 # Maximum number of ingress messages to locally buffer per # topic. Default is unlimited. (integer value) -#rpc_zmq_topic_backlog= +# rpc_zmq_topic_backlog= # Directory for holding IPC sockets (string value) -#rpc_zmq_ipc_dir=/var/run/openstack +# rpc_zmq_ipc_dir=/var/run/openstack # Name of this node. Must be a valid hostname, FQDN, or IP # address. Must match "host" option, if running Nova. (string # value) -#rpc_zmq_host=nova +# rpc_zmq_host=nova # @@ -1683,10 +1700,10 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # # Heartbeat frequency (integer value) -#matchmaker_heartbeat_freq=300 +# matchmaker_heartbeat_freq=300 # Heartbeat time-to-live. (integer value) -#matchmaker_heartbeat_ttl=600 +# matchmaker_heartbeat_ttl=600 # @@ -1700,7 +1717,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # "QuicAssist", "product_id": "0443", "vendor_id": "8086", # "device_type": "ACCEL" } defines an alias for the Intel # QuickAssist card. (multi valued) (multi valued) -#pci_alias= +# pci_alias= # @@ -1710,7 +1727,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # White list of PCI devices available to VMs. For example: # pci_passthrough_whitelist = [{"vendor_id": "8086", # "product_id": "0443"}] (multi valued) -#pci_passthrough_whitelist= +# pci_passthrough_whitelist= # @@ -1718,11 +1735,11 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # # The scheduler host manager class to use (string value) -#scheduler_host_manager=nova.scheduler.host_manager.HostManager +# scheduler_host_manager=nova.scheduler.host_manager.HostManager # Maximum number of attempts to schedule an instance (integer # value) -#scheduler_max_attempts=3 +# scheduler_max_attempts=3 # @@ -1735,7 +1752,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # the first host returned by the weighing functions. This # value must be at least 1. Any value less than 1 will be # ignored, and 1 will be used instead (integer value) -#scheduler_host_subset_size=1 +# scheduler_host_subset_size=1 # @@ -1747,7 +1764,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # for CoreFilter. For AggregateCoreFilter, it will fall back # to this configuration value if no per-aggregate setting # found. (floating point value) -#cpu_allocation_ratio=16.0 +# cpu_allocation_ratio=16.0 # @@ -1756,7 +1773,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # virtual disk to physical disk allocation ratio (floating # point value) -#disk_allocation_ratio=1.0 +# disk_allocation_ratio=1.0 # @@ -1765,7 +1782,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # Ignore hosts that have too many # builds/resizes/snaps/migrations (integer value) -#max_io_ops_per_host=8 +# max_io_ops_per_host=8 # @@ -1773,14 +1790,14 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # # Images to run on isolated host (list value) -#isolated_images= +# isolated_images= # Host reserved for specific images (list value) -#isolated_hosts= +# isolated_hosts= # Whether to force isolated hosts to run only isolated images # (boolean value) -#restrict_isolated_hosts_to_isolated_images=true +# restrict_isolated_hosts_to_isolated_images=true # @@ -1788,7 +1805,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # # Ignore hosts that have too many instances (integer value) -#max_instances_per_host=50 +# max_instances_per_host=50 # @@ -1800,7 +1817,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # for RamFilter. For AggregateRamFilter, it will fall back to # this configuration value if no per-aggregate setting found. # (floating point value) -#ram_allocation_ratio=1.5 +# ram_allocation_ratio=1.5 # @@ -1811,15 +1828,15 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # specified more than once. An entry of # "nova.scheduler.filters.standard_filters" maps to all # filters included with nova. (multi valued) -#scheduler_available_filters=nova.scheduler.filters.all_filters +# scheduler_available_filters=nova.scheduler.filters.all_filters # Which filter class names to use for filtering hosts when not # specified in the request. (list value) -#scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter +# scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter # Which weight class names to use for weighing hosts (list # value) -#scheduler_weight_classes=nova.scheduler.weights.all_weighers +# scheduler_weight_classes=nova.scheduler.weights.all_weighers # @@ -1827,7 +1844,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # # Default driver to use for the scheduler (string value) -#scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler +# scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler # @@ -1835,7 +1852,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # # the topic scheduler nodes listen on (string value) -#scheduler_topic=scheduler +# scheduler_topic=scheduler # @@ -1844,7 +1861,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # Absolute path to scheduler configuration JSON file. (string # value) -#scheduler_json_config_location= +# scheduler_json_config_location= # @@ -1853,7 +1870,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # Multiplier used for weighing ram. Negative numbers mean to # stack vs spread. (floating point value) -#ram_weight_multiplier=1.0 +# ram_weight_multiplier=1.0 # @@ -1862,7 +1879,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # The driver for servicegroup service (valid options are: db, # zk, mc) (string value) -#servicegroup_driver=db +# servicegroup_driver=db # @@ -1871,19 +1888,19 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # Config drive format. One of iso9660 (default) or vfat # (string value) -#config_drive_format=iso9660 +# config_drive_format=iso9660 # Where to put temporary files associated with config drive # creation (string value) -#config_drive_tempdir= +# config_drive_tempdir= # Set to force injection to take place on a config drive (if # set, valid options are: always) (string value) -#force_config_drive= +# force_config_drive= # Name and optionally path of the tool used for ISO image # creation (string value) -#mkisofs_cmd=genisoimage +# mkisofs_cmd=genisoimage # @@ -1891,20 +1908,20 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # # Template file for injected network (string value) -#injected_network_template=$pybasedir/nova/virt/interfaces.template +# injected_network_template=$pybasedir/nova/virt/interfaces.template # mkfs commands for ephemeral device. The format is # = (multi valued) -#virt_mkfs=default=mkfs.ext3 -L %(fs_label)s -F %(target)s -#virt_mkfs=linux=mkfs.ext3 -L %(fs_label)s -F %(target)s -#virt_mkfs=windows=mkfs.ntfs --force --fast --label %(fs_label)s %(target)s +# virt_mkfs=default=mkfs.ext3 -L %(fs_label)s -F %(target)s +# virt_mkfs=linux=mkfs.ext3 -L %(fs_label)s -F %(target)s +# virt_mkfs=windows=mkfs.ntfs --force --fast --label %(fs_label)s %(target)s # Attempt to resize the filesystem by accessing the image over # a block device. This is done by the host and may not be # necessary if the image contains a recent version of cloud- # init. Possible mechanisms require the nbd driver (for qcow # and raw), or loop (for raw). (boolean value) -#resize_fs_using_block_device=true +# resize_fs_using_block_device=true # @@ -1912,7 +1929,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # # time to wait for a NBD device coming up (integer value) -#timeout_nbd=10 +# timeout_nbd=10 # @@ -1921,7 +1938,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # Default TCP port to find the docker-registry container # (integer value) -#docker_registry_default_port=5042 +# docker_registry_default_port=5042 # @@ -1933,19 +1950,19 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # fake.FakeDriver, baremetal.BareMetalDriver, # vmwareapi.VMwareESXDriver, vmwareapi.VMwareVCDriver (string # value) -#compute_driver= +# compute_driver= # The default format an ephemeral_volume will be formatted # with on creation. (string value) -#default_ephemeral_format= +# default_ephemeral_format= # VM image preallocation mode: "none" => no storage # provisioning is done up front, "space" => storage is fully # allocated at instance start (string value) -#preallocate_images=none +# preallocate_images=none # Whether to use cow images (boolean value) -#use_cow_images=true +# use_cow_images=true # @@ -1954,11 +1971,11 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # Firewall driver (defaults to hypervisor specific iptables # driver) (string value) -#firewall_driver= +# firewall_driver= # Whether to allow network traffic from same network (boolean # value) -#allow_same_net_traffic=true +# allow_same_net_traffic=true # @@ -1966,7 +1983,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # # Force backing images to raw format (boolean value) -#force_raw_images=true +# force_raw_images=true # @@ -1974,41 +1991,41 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # # Rescue ami image (string value) -#rescue_image_id= +# rescue_image_id= # Rescue aki image (string value) -#rescue_kernel_id= +# rescue_kernel_id= # Rescue ari image (string value) -#rescue_ramdisk_id= +# rescue_ramdisk_id= # Libvirt domain type (valid options are: kvm, lxc, qemu, uml, # xen) (string value) -#libvirt_type=kvm +# libvirt_type=kvm # Override the default libvirt URI (which is dependent on # libvirt_type) (string value) -#libvirt_uri= +# libvirt_uri= # Inject the admin password at boot time, without an agent. # (boolean value) -#libvirt_inject_password=false +# libvirt_inject_password=false # Inject the ssh public key at boot time (boolean value) -#libvirt_inject_key=true +# libvirt_inject_key=true # The partition to inject to : -2 => disable, -1 => inspect # (libguestfs only), 0 => not partitioned, >0 => partition # number (integer value) -#libvirt_inject_partition=1 +# libvirt_inject_partition=1 # Sync virtual and real mouse cursors in Windows VMs (boolean # value) -#use_usb_tablet=true +# use_usb_tablet=true # Migration target URI (any included "%s" is replaced with the # migration target hostname) (string value) -#live_migration_uri=qemu+tcp://%s/system +# live_migration_uri=qemu+tcp://%s/system # Migration flags to be set for live migration (string value) #live_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_PEER2PEER @@ -2018,32 +2035,32 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # Maximum bandwidth to be used during migration, in Mbps # (integer value) -#live_migration_bandwidth=0 +# live_migration_bandwidth=0 # Snapshot image format (valid options are : raw, qcow2, vmdk, # vdi). Defaults to same as source image (string value) -#snapshot_image_format= +# snapshot_image_format= # The libvirt VIF driver to configure the VIFs. (string value) -#libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver +# libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver # Libvirt handlers for remote volumes. (list value) -#libvirt_volume_drivers=iscsi=nova.virt.libvirt.volume.LibvirtISCSIVolumeDriver,iser=nova.virt.libvirt.volume.LibvirtISERVolumeDriver,local=nova.virt.libvirt.volume.LibvirtVolumeDriver,fake=nova.virt.libvirt.volume.LibvirtFakeVolumeDriver,rbd=nova.virt.libvirt.volume.LibvirtNetVolumeDriver,sheepdog=nova.virt.libvirt.volume.LibvirtNetVolumeDriver,nfs=nova.virt.libvirt.volume.LibvirtNFSVolumeDriver,aoe=nova.virt.libvirt.volume.LibvirtAOEVolumeDriver,glusterfs=nova.virt.libvirt.volume.LibvirtGlusterfsVolumeDriver,fibre_channel=nova.virt.libvirt.volume.LibvirtFibreChannelVolumeDriver,scality=nova.virt.libvirt.volume.LibvirtScalityVolumeDriver +# libvirt_volume_drivers=iscsi=nova.virt.libvirt.volume.LibvirtISCSIVolumeDriver,iser=nova.virt.libvirt.volume.LibvirtISERVolumeDriver,local=nova.virt.libvirt.volume.LibvirtVolumeDriver,fake=nova.virt.libvirt.volume.LibvirtFakeVolumeDriver,rbd=nova.virt.libvirt.volume.LibvirtNetVolumeDriver,sheepdog=nova.virt.libvirt.volume.LibvirtNetVolumeDriver,nfs=nova.virt.libvirt.volume.LibvirtNFSVolumeDriver,aoe=nova.virt.libvirt.volume.LibvirtAOEVolumeDriver,glusterfs=nova.virt.libvirt.volume.LibvirtGlusterfsVolumeDriver,fibre_channel=nova.virt.libvirt.volume.LibvirtFibreChannelVolumeDriver,scality=nova.virt.libvirt.volume.LibvirtScalityVolumeDriver # Override the default disk prefix for the devices attached to # a server, which is dependent on libvirt_type. (valid options # are: sd, xvd, uvd, vd) (string value) -#libvirt_disk_prefix= +# libvirt_disk_prefix= # Number of seconds to wait for instance to shut down after # soft reboot request is made. We fall back to hard reboot if # instance does not shutdown within this window. (integer # value) -#libvirt_wait_soft_reboot_seconds=120 +# libvirt_wait_soft_reboot_seconds=120 # Use a separated OS thread pool to realize non-blocking # libvirt calls (boolean value) -#libvirt_nonblocking=true +# libvirt_nonblocking=true # Set to "host-model" to clone the host CPU feature flags; to # "host-passthrough" to use the host CPU model exactly; to @@ -2051,28 +2068,28 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # CPU model. If libvirt_type="kvm|qemu", it will default to # "host-model", otherwise it will default to "none" (string # value) -#libvirt_cpu_mode= +# libvirt_cpu_mode= # Set to a named libvirt CPU model (see names listed in # /usr/share/libvirt/cpu_map.xml). Only has effect if # libvirt_cpu_mode="custom" and libvirt_type="kvm|qemu" # (string value) -#libvirt_cpu_model= +# libvirt_cpu_model= # Location where libvirt driver will store snapshots before # uploading them to image service (string value) -#libvirt_snapshots_directory=$instances_path/snapshots +# libvirt_snapshots_directory=$instances_path/snapshots # Location where the Xen hvmloader is kept (string value) -#xen_hvmloader_path=/usr/lib/xen/boot/hvmloader +# xen_hvmloader_path=/usr/lib/xen/boot/hvmloader # Specific cachemodes to use for different disk types e.g: # ["file=directsync","block=none"] (list value) -#disk_cachemodes= +# disk_cachemodes= # Which pcpus can be used by vcpus of instance e.g: # "4-12,^8,15" (string value) -#vcpu_pin_set= +# vcpu_pin_set= # @@ -2083,26 +2100,26 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # lvm,rbd, default. If default is specified, then # use_cow_images flag is used instead of this one. (string # value) -#libvirt_images_type=default +# libvirt_images_type=default # LVM Volume Group that is used for VM images, when you # specify libvirt_images_type=lvm. (string value) -#libvirt_images_volume_group= +# libvirt_images_volume_group= # Create sparse logical volumes (with virtualsize) if this # flag is set to True. (boolean value) -#libvirt_sparse_logical_volumes=false +# libvirt_sparse_logical_volumes=false # The amount of storage (in megabytes) to allocate for LVM # snapshot copy-on-write blocks. (integer value) -#libvirt_lvm_snapshot_size=1000 +# libvirt_lvm_snapshot_size=1000 # the RADOS pool in which rbd volumes are stored (string # value) -#libvirt_images_rbd_pool=rbd +# libvirt_images_rbd_pool=rbd # path to the ceph configuration file to use (string value) -#libvirt_images_rbd_ceph_conf= +# libvirt_images_rbd_ceph_conf= # @@ -2112,34 +2129,34 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # Where cached images are stored under $instances_path.This is # NOT the full path - just a folder name.For per-compute-host # cached images, set to _base_$my_ip (string value) -#base_dir_name=_base +# base_dir_name=_base # Allows image information files to be stored in non-standard # locations (string value) -#image_info_filename_pattern=$instances_path/$base_dir_name/%(image)s.info +# image_info_filename_pattern=$instances_path/$base_dir_name/%(image)s.info # Should unused base images be removed? (boolean value) -#remove_unused_base_images=true +# remove_unused_base_images=true # Should unused kernel images be removed? This is only safe to # enable if all compute nodes have been updated to support # this option. This will enabled by default in future. # (boolean value) -#remove_unused_kernels=false +# remove_unused_kernels=false # Unused resized base images younger than this will not be # removed (integer value) -#remove_unused_resized_minimum_age_seconds=3600 +# remove_unused_resized_minimum_age_seconds=3600 # Unused unresized base images younger than this will not be # removed (integer value) -#remove_unused_original_minimum_age_seconds=86400 +# remove_unused_original_minimum_age_seconds=86400 # Write a checksum for files in _base to disk (boolean value) -#checksum_base_images=false +# checksum_base_images=false # How frequently to checksum base images (integer value) -#checksum_interval_seconds=3600 +# checksum_interval_seconds=3600 # @@ -2148,7 +2165,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # Compress snapshot images when possible. This currently # applies exclusively to qcow2 images (boolean value) -#libvirt_snapshot_compression=false +# libvirt_snapshot_compression=false # @@ -2157,11 +2174,11 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # Name of Integration Bridge used by Open vSwitch (string # value) -#libvirt_ovs_bridge=br-int +# libvirt_ovs_bridge=br-int # Use virtio for bridge interfaces with KVM/QEMU (boolean # value) -#libvirt_use_virtio_for_bridges=true +# libvirt_use_virtio_for_bridges=true # @@ -2170,52 +2187,52 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # number of times to rescan iSCSI target to find volume # (integer value) -#num_iscsi_scan_tries=3 +# num_iscsi_scan_tries=3 # number of times to rescan iSER target to find volume # (integer value) -#num_iser_scan_tries=3 +# num_iser_scan_tries=3 # the RADOS client name for accessing rbd volumes (string # value) -#rbd_user= +# rbd_user= # the libvirt uuid of the secret for the rbd_uservolumes # (string value) -#rbd_secret_uuid= +# rbd_secret_uuid= # Dir where the nfs volume is mounted on the compute node # (string value) -#nfs_mount_point_base=$state_path/mnt +# nfs_mount_point_base=$state_path/mnt # Mount options passed to the nfs client. See section of the # nfs man page for details (string value) -#nfs_mount_options= +# nfs_mount_options= # number of times to rediscover AoE target to find volume # (integer value) -#num_aoe_discover_tries=3 +# num_aoe_discover_tries=3 # Dir where the glusterfs volume is mounted on the compute # node (string value) -#glusterfs_mount_point_base=$state_path/mnt +# glusterfs_mount_point_base=$state_path/mnt # use multipath connection of the iSCSI volume (boolean value) -#libvirt_iscsi_use_multipath=false +# libvirt_iscsi_use_multipath=false # use multipath connection of the iSER volume (boolean value) -#libvirt_iser_use_multipath=false +# libvirt_iser_use_multipath=false # Path or URL to Scality SOFS configuration file (string # value) -#scality_sofs_config= +# scality_sofs_config= # Base dir where Scality SOFS shall be mounted (string value) -#scality_sofs_mount_point=$state_path/scality +# scality_sofs_mount_point=$state_path/scality # Protocols listed here will be accessed directly from QEMU. # Currently supported protocols: [gluster] (list value) -#qemu_allowed_storage_drivers= +# qemu_allowed_storage_drivers= # @@ -2223,25 +2240,25 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # # PowerVM manager type (ivm, hmc) (string value) -#powervm_mgr_type=ivm +# powervm_mgr_type=ivm # PowerVM manager host or ip (string value) -#powervm_mgr= +# powervm_mgr= # PowerVM manager user name (string value) -#powervm_mgr_user= +# powervm_mgr_user= # PowerVM manager user password (string value) -#powervm_mgr_passwd= +# powervm_mgr_passwd= # PowerVM image remote path where images will be moved. Make # sure this path can fit your biggest image in glance (string # value) -#powervm_img_remote_path=/home/padmin +# powervm_img_remote_path=/home/padmin # Local directory to download glance images to. Make sure this # path can fit your biggest image in glance (string value) -#powervm_img_local_path=/tmp +# powervm_img_local_path=/tmp # @@ -2249,26 +2266,26 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # # number of seconds to wait for agent reply (integer value) -#agent_timeout=30 +# agent_timeout=30 # number of seconds to wait for agent to be fully operational # (integer value) -#agent_version_timeout=300 +# agent_version_timeout=300 # number of seconds to wait for agent reply to resetnetwork # request (integer value) -#agent_resetnetwork_timeout=60 +# agent_resetnetwork_timeout=60 # Specifies the path in which the xenapi guest agent should be # located. If the agent is present, network configuration is # not injected into the image. Used if # compute_driver=xenapi.XenAPIDriver and flat_injected=True # (string value) -#xenapi_agent_path=usr/sbin/xe-update-networking +# xenapi_agent_path=usr/sbin/xe-update-networking # Disables the use of the XenAPI agent in any image regardless # of what image properties are present. (boolean value) -#xenapi_disable_agent=false +# xenapi_disable_agent=false # Determines if the xenapi agent should be used when the image # used does not contain a hint to declare if the agent is @@ -2276,7 +2293,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # "xenapi_use_agent" that has the value "true" or "false". # Note that waiting for the agent when it is not present will # significantly increase server boot times. (boolean value) -#xenapi_use_agent_default=false +# xenapi_use_agent_default=false # @@ -2287,56 +2304,56 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # special value of unix://local can be used to connect to the # local unix socket. Required if # compute_driver=xenapi.XenAPIDriver (string value) -#xenapi_connection_url= +# xenapi_connection_url= # Username for connection to XenServer/Xen Cloud Platform. # Used only if compute_driver=xenapi.XenAPIDriver (string # value) -#xenapi_connection_username=root +# xenapi_connection_username=root # Password for connection to XenServer/Xen Cloud Platform. # Used only if compute_driver=xenapi.XenAPIDriver (string # value) -#xenapi_connection_password= +# xenapi_connection_password= # Maximum number of concurrent XenAPI connections. Used only # if compute_driver=xenapi.XenAPIDriver (integer value) -#xenapi_connection_concurrent=5 +# xenapi_connection_concurrent=5 # The interval used for polling of coalescing vhds. Used only # if compute_driver=xenapi.XenAPIDriver (floating point value) -#xenapi_vhd_coalesce_poll_interval=5.0 +# xenapi_vhd_coalesce_poll_interval=5.0 # Ensure compute service is running on host XenAPI connects # to. (boolean value) -#xenapi_check_host=true +# xenapi_check_host=true # Max number of times to poll for VHD to coalesce. Used only # if compute_driver=xenapi.XenAPIDriver (integer value) -#xenapi_vhd_coalesce_max_attempts=5 +# xenapi_vhd_coalesce_max_attempts=5 # Base path to the storage repository (string value) -#xenapi_sr_base_path=/var/run/sr-mount +# xenapi_sr_base_path=/var/run/sr-mount # iSCSI Target Host (string value) -#target_host= +# target_host= # iSCSI Target Port, 3260 Default (string value) -#target_port=3260 +# target_port=3260 # IQN Prefix (string value) -#iqn_prefix=iqn.2010-10.org.openstack +# iqn_prefix=iqn.2010-10.org.openstack # Used to enable the remapping of VBD dev (Works around an # issue in Ubuntu Maverick) (boolean value) -#xenapi_remap_vbd_dev=false +# xenapi_remap_vbd_dev=false # Specify prefix to remap VBD dev to (ex. /dev/xvdb -> # /dev/sdb) (string value) -#xenapi_remap_vbd_dev_prefix=sd +# xenapi_remap_vbd_dev_prefix=sd # Timeout in seconds for XenAPI login. (integer value) -#xenapi_login_timeout=10 +# xenapi_login_timeout=10 # @@ -2344,33 +2361,33 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # # Base URL for torrent files. (string value) -#xenapi_torrent_base_url= +# xenapi_torrent_base_url= # Probability that peer will become a seeder. (1.0 = 100%) # (floating point value) -#xenapi_torrent_seed_chance=1.0 +# xenapi_torrent_seed_chance=1.0 # Number of seconds after downloading an image via BitTorrent # that it should be seeded for other peers. (integer value) -#xenapi_torrent_seed_duration=3600 +# xenapi_torrent_seed_duration=3600 # Cached torrent files not accessed within this number of # seconds can be reaped (integer value) -#xenapi_torrent_max_last_accessed=86400 +# xenapi_torrent_max_last_accessed=86400 # Beginning of port range to listen on (integer value) -#xenapi_torrent_listen_port_start=6881 +# xenapi_torrent_listen_port_start=6881 # End of port range to listen on (integer value) -#xenapi_torrent_listen_port_end=6891 +# xenapi_torrent_listen_port_end=6891 # Number of seconds a download can remain at the same progress # percentage w/o being considered a stall (integer value) -#xenapi_torrent_download_stall_cutoff=600 +# xenapi_torrent_download_stall_cutoff=600 # Maximum number of seeder processes to run concurrently # within a given dom0. (-1 = no limit) (integer value) -#xenapi_torrent_max_seeder_processes_per_host=1 +# xenapi_torrent_max_seeder_processes_per_host=1 # @@ -2378,7 +2395,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # # To use for hosts with different CPUs (boolean value) -#use_join_force=true +# use_join_force=true # @@ -2387,7 +2404,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # Name of Integration Bridge used by Open vSwitch (string # value) -#xenapi_ovs_integration_bridge=xapi1 +# xenapi_ovs_integration_bridge=xapi1 # @@ -2398,23 +2415,23 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # `some` will only cache images that have the image_property # `cache_in_nova=True`, and `none` turns off caching entirely # (string value) -#cache_images=all +# cache_images=all # Compression level for images, e.g., 9 for gzip -9. Range is # 1-9, 9 being most compressed but most CPU intensive on dom0. # (integer value) -#xenapi_image_compression_level= +# xenapi_image_compression_level= # Default OS type (string value) -#default_os_type=linux +# default_os_type=linux # Time to wait for a block device to be created (integer # value) -#block_device_creation_timeout=10 +# block_device_creation_timeout=10 # Maximum size in bytes of kernel or ramdisk images (integer # value) -#max_kernel_ramdisk_size=16777216 +# max_kernel_ramdisk_size=16777216 # Filter for finding the SR to be used to install guest # instances on. To use the Local Storage in default @@ -2424,30 +2441,30 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # config:my_favorite_sr=true. On the other hand, to fall back # on the Default SR, as displayed by XenCenter, set this flag # to: default-sr:true (string value) -#sr_matching_filter=default-sr:true +# sr_matching_filter=default-sr:true # Whether to use sparse_copy for copying data on a resize down # (False will use standard dd). This speeds up resizes down # considerably since large runs of zeros won't have to be # rsynced (boolean value) -#xenapi_sparse_copy=true +# xenapi_sparse_copy=true # Maximum number of retries to unplug VBD (integer value) -#xenapi_num_vbd_unplug_retries=10 +# xenapi_num_vbd_unplug_retries=10 # Whether or not to download images via Bit Torrent # (all|some|none). (string value) -#xenapi_torrent_images=none +# xenapi_torrent_images=none # Name of network to use for booting iPXE ISOs (string value) -#xenapi_ipxe_network_name= +# xenapi_ipxe_network_name= # URL to the iPXE boot menu (string value) -#xenapi_ipxe_boot_menu_url= +# xenapi_ipxe_boot_menu_url= # Name and optionally path of the tool used for ISO image # creation (string value) -#xenapi_ipxe_mkisofs_cmd=mkisofs +# xenapi_ipxe_mkisofs_cmd=mkisofs # @@ -2456,15 +2473,15 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # number of seconds to wait for instance to go to running # state (integer value) -#xenapi_running_timeout=60 +# xenapi_running_timeout=60 # The XenAPI VIF driver using XenServer Network APIs. (string # value) -#xenapi_vif_driver=nova.virt.xenapi.vif.XenAPIBridgeDriver +# xenapi_vif_driver=nova.virt.xenapi.vif.XenAPIBridgeDriver # Dom0 plugin driver used to handle image uploads. (string # value) -#xenapi_image_upload_handler=nova.virt.xenapi.image.glance.GlanceStore +# xenapi_image_upload_handler=nova.virt.xenapi.image.glance.GlanceStore # @@ -2473,25 +2490,25 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # location of vnc console proxy, in the form # "http://127.0.0.1:6080/vnc_auto.html" (string value) -#novncproxy_base_url=http://127.0.0.1:6080/vnc_auto.html +# novncproxy_base_url=http://127.0.0.1:6080/vnc_auto.html # location of nova xvp vnc console proxy, in the form # "http://127.0.0.1:6081/console" (string value) -#xvpvncproxy_base_url=http://127.0.0.1:6081/console +# xvpvncproxy_base_url=http://127.0.0.1:6081/console # IP address on which instance vncservers should listen # (string value) -#vncserver_listen=127.0.0.1 +# vncserver_listen=127.0.0.1 # the address to which proxy clients (like nova-xvpvncproxy) # should connect (string value) -#vncserver_proxyclient_address=127.0.0.1 +# vncserver_proxyclient_address=127.0.0.1 # enable vnc related features (boolean value) -#vnc_enabled=true +# vnc_enabled=true # keymap for vnc (string value) -#vnc_keymap=en-us +# vnc_keymap=en-us # @@ -2499,10 +2516,10 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # # Port that the XCP VNC proxy should bind to (integer value) -#xvpvncproxy_port=6081 +# xvpvncproxy_port=6081 # Address that the XCP VNC proxy should bind to (string value) -#xvpvncproxy_host=0.0.0.0 +# xvpvncproxy_host=0.0.0.0 # @@ -2511,7 +2528,7 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # The full class name of the volume API class to use (string # value) -#volume_api_class=nova.volume.cinder.API +# volume_api_class=nova.volume.cinder.API # @@ -2521,31 +2538,31 @@ nova.param('rabbit_retry_interval', type='integer', default=1) # Info to match when looking for cinder in the service # catalog. Format is : separated values of the form: # :: (string value) -#cinder_catalog_info=volume:cinder:publicURL +# cinder_catalog_info=volume:cinder:publicURL # Override service catalog lookup with template for cinder # endpoint e.g. http://localhost:8776/v1/%(project_id)s # (string value) -#cinder_endpoint_template= +# cinder_endpoint_template= # region name of this node (string value) -#os_region_name= +# os_region_name= # Location of ca certicates file to use for cinder client # requests. (string value) -#cinder_ca_certificates_file= +# cinder_ca_certificates_file= # Number of cinderclient retries on failed http calls (integer # value) -#cinder_http_retries=3 +# cinder_http_retries=3 # Allow to perform insecure SSL requests to cinder (boolean # value) -#cinder_api_insecure=false +# cinder_api_insecure=false # Allow attach between instance and volume in different # availability zones. (boolean value) -#cinder_cross_az_attach=true +# cinder_cross_az_attach=true nova.section('hyperv') @@ -2559,7 +2576,7 @@ nova.section('hyperv') # files to the target host. If left blank, an administrative # share will be used, looking for the same "instances_path" # used locally (string value) -#instances_path_share= +# instances_path_share= # @@ -2567,10 +2584,10 @@ nova.section('hyperv') # # Force V1 WMI utility classes (boolean value) -#force_hyperv_utils_v1=false +# force_hyperv_utils_v1=false # Force V1 volume utility class (boolean value) -#force_volumeutils_v1=false +# force_volumeutils_v1=false # @@ -2579,7 +2596,7 @@ nova.section('hyperv') # External virtual switch Name, if not provided, the first # external virtual switch is used (string value) -#vswitch_name= +# vswitch_name= # @@ -2588,25 +2605,25 @@ nova.section('hyperv') # Required for live migration among hosts with different CPU # features (boolean value) -#limit_cpu_features=false +# limit_cpu_features=false # Sets the admin password in the config drive image (boolean # value) -#config_drive_inject_password=false +# config_drive_inject_password=false # qemu-img is used to convert between different image types # (string value) -#qemu_img_cmd=qemu-img.exe +# qemu_img_cmd=qemu-img.exe # Attaches the Config Drive image as a cdrom drive instead of # a disk drive (boolean value) -#config_drive_cdrom=false +# config_drive_cdrom=false # Enables metrics collections for an instance by using # Hyper-V's metric APIs. Collected data can by retrieved by # other apps and services, e.g.: Ceilometer. Requires Hyper-V # / Windows Server 2012 and above (boolean value) -#enable_instance_metrics_collection=false +# enable_instance_metrics_collection=false # Enables dynamic memory allocation (ballooning) when set to a # value greater than 1. The value expresses the ratio between @@ -2614,7 +2631,7 @@ nova.section('hyperv') # amount. For example a ratio of 2.0 for an instance with # 1024MB of RAM implies 512MB of RAM allocated at startup # (floating point value) -#dynamic_memory_ratio=1.0 +# dynamic_memory_ratio=1.0 # @@ -2623,11 +2640,11 @@ nova.section('hyperv') # The number of times to retry to attach a volume (integer # value) -#volume_attach_retry_count=10 +# volume_attach_retry_count=10 # Interval between volume attachment attempts, in seconds # (integer value) -#volume_attach_retry_interval=5 +# volume_attach_retry_interval=5 nova.section('zookeeper') @@ -2638,18 +2655,18 @@ nova.section('zookeeper') # The ZooKeeper addresses for servicegroup service in the # format of host1:port,host2:port,host3:port (string value) -#address= +# address= # recv_timeout parameter for the zk session (integer value) -#recv_timeout=4000 +# recv_timeout=4000 # The prefix used in ZooKeeper to store ephemeral nodes # (string value) -#sg_prefix=/servicegroups +# sg_prefix=/servicegroups # Number of seconds to wait until retrying to join the session # (integer value) -#sg_retry_interval=5 +# sg_retry_interval=5 nova.section('osapi_v3') @@ -2659,16 +2676,16 @@ nova.section('osapi_v3') # # Whether the V3 API is enabled or not (boolean value) -#enabled=false +# enabled=false # A list of v3 API extensions to never load. Specify the # extension aliases here. (list value) -#extensions_blacklist= +# extensions_blacklist= # If the list is not empty then a v3 API extension will only # be loaded if it exists in this list. Specify the extension # aliases here. (list value) -#extensions_whitelist= +# extensions_whitelist= nova.section('conductor') @@ -2678,19 +2695,19 @@ nova.section('conductor') # # Perform nova-conductor operations locally (boolean value) -#use_local=false +# use_local=false nova.param('use_local', type='boolean', default=False) # the topic conductor nodes listen on (string value) -#topic=conductor +# topic=conductor nova.param('topic', type='string', default='conductor') # full class name for the Manager for conductor (string value) -#manager=nova.conductor.manager.ConductorManager +# manager=nova.conductor.manager.ConductorManager # Number of workers for OpenStack Conductor service (integer # value) -#workers= +# workers= nova.section('keymgr') @@ -2701,7 +2718,7 @@ nova.section('keymgr') # The full class name of the key manager API class (string # value) -#api_class=nova.keymgr.conf_key_mgr.ConfKeyManager +# api_class=nova.keymgr.conf_key_mgr.ConfKeyManager # @@ -2710,7 +2727,7 @@ nova.section('keymgr') # Fixed key returned by key manager, specified in hex (string # value) -#fixed_key= +# fixed_key= nova.section('cells') @@ -2720,15 +2737,15 @@ nova.section('cells') # # Cells communication driver to use (string value) -#driver=nova.cells.rpc_driver.CellsRPCDriver +# driver=nova.cells.rpc_driver.CellsRPCDriver # Number of seconds after an instance was updated or deleted # to continue to update cells (integer value) -#instance_updated_at_threshold=3600 +# instance_updated_at_threshold=3600 # Number of instances to update per periodic task run (integer # value) -#instance_update_num_instances=1 +# instance_update_num_instances=1 # @@ -2736,10 +2753,10 @@ nova.section('cells') # # Maximum number of hops for cells routing. (integer value) -#max_hop_count=10 +# max_hop_count=10 # Cells scheduler to use (string value) -#scheduler=nova.cells.scheduler.CellsScheduler +# scheduler=nova.cells.scheduler.CellsScheduler # @@ -2747,39 +2764,39 @@ nova.section('cells') # # Enable cell functionality (boolean value) -#enable=false +# enable=false # the topic cells nodes listen on (string value) -#topic=cells +# topic=cells # Manager for cells (string value) -#manager=nova.cells.manager.CellsManager +# manager=nova.cells.manager.CellsManager # name of this cell (string value) -#name=nova +# name=nova # Key/Multi-value list with the capabilities of the cell (list # value) -#capabilities=hypervisor=xenserver;kvm,os=linux;windows +# capabilities=hypervisor=xenserver;kvm,os=linux;windows # Seconds to wait for response from a call to a cell. (integer # value) -#call_timeout=60 +# call_timeout=60 # Percentage of cell capacity to hold in reserve. Affects both # memory and disk utilization (floating point value) -#reserve_percent=10.0 +# reserve_percent=10.0 # Type of cell: api or compute (string value) -#cell_type= +# cell_type= # Number of seconds after which a lack of capability and # capacity updates signals the child cell is to be treated as # a mute. (integer value) -#mute_child_interval=300 +# mute_child_interval=300 # Seconds between bandwidth updates for cells. (integer value) -#bandwidth_update_interval=600 +# bandwidth_update_interval=600 # @@ -2789,7 +2806,7 @@ nova.section('cells') # Base queue name to use when communicating between cells. # Various topics by message type will be appended to this. # (string value) -#rpc_driver_queue_base=cells.intercell +# rpc_driver_queue_base=cells.intercell # @@ -2799,20 +2816,20 @@ nova.section('cells') # Filter classes the cells scheduler should use. An entry of # "nova.cells.filters.all_filters"maps to all cells filters # included with nova. (list value) -#scheduler_filter_classes=nova.cells.filters.all_filters +# scheduler_filter_classes=nova.cells.filters.all_filters # Weigher classes the cells scheduler should use. An entry of # "nova.cells.weights.all_weighers"maps to all cell weighers # included with nova. (list value) -#scheduler_weight_classes=nova.cells.weights.all_weighers +# scheduler_weight_classes=nova.cells.weights.all_weighers # How many retries when no cells are available. (integer # value) -#scheduler_retries=10 +# scheduler_retries=10 # How often to retry in seconds when no cells are available. # (integer value) -#scheduler_retry_delay=2 +# scheduler_retry_delay=2 # @@ -2821,12 +2838,12 @@ nova.section('cells') # Seconds between getting fresh cell info from db. (integer # value) -#db_check_interval=60 +# db_check_interval=60 # Configuration file from which to read cells configuration. # If given, overrides reading cells from the database. (string # value) -#cells_config= +# cells_config= # @@ -2835,11 +2852,11 @@ nova.section('cells') # Multiplier used to weigh mute children. (The value should # be negative.) (floating point value) -#mute_weight_multiplier=-10.0 +# mute_weight_multiplier=-10.0 # Weight value assigned to mute children. (The value should # be positive.) (floating point value) -#mute_weight_value=1000.0 +# mute_weight_value=1000.0 # @@ -2848,7 +2865,7 @@ nova.section('cells') # Multiplier used for weighing ram. Negative numbers mean to # stack vs spread. (floating point value) -#ram_weight_multiplier=10.0 +# ram_weight_multiplier=10.0 nova.section('database') @@ -2858,11 +2875,11 @@ nova.section('database') # # The backend to use for db (string value) -#backend=sqlalchemy +# backend=sqlalchemy # Enable the experimental use of thread pooling for all DB API # calls (boolean value) -#use_tpool=false +# use_tpool=false # @@ -2871,47 +2888,47 @@ nova.section('database') # The SQLAlchemy connection string used to connect to the # database (string value) -#connection=sqlite:////nova/openstack/common/db/$sqlite_db +# connection=sqlite:////nova/openstack/common/db/$sqlite_db # The SQLAlchemy connection string used to connect to the # slave database (string value) -#slave_connection= +# slave_connection= # timeout before idle sql connections are reaped (integer # value) -#idle_timeout=3600 +# idle_timeout=3600 # Minimum number of SQL connections to keep open in a pool # (integer value) -#min_pool_size=1 +# min_pool_size=1 # Maximum number of SQL connections to keep open in a pool # (integer value) -#max_pool_size= +# max_pool_size= # maximum db connection retries during startup. (setting -1 # implies an infinite retry count) (integer value) -#max_retries=10 +# max_retries=10 # interval between retries of opening a sql connection # (integer value) -#retry_interval=10 +# retry_interval=10 # If set, use this value for max_overflow with sqlalchemy # (integer value) -#max_overflow= +# max_overflow= # Verbosity of SQL debugging information. 0=None, # 100=Everything (integer value) -#connection_debug=0 +# connection_debug=0 # Add python stack traces to SQL as comment strings (boolean # value) -#connection_trace=false +# connection_trace=false # If set, use this value for pool_timeout with sqlalchemy # (integer value) -#pool_timeout= +# pool_timeout= nova.section('image_file_url') @@ -2923,7 +2940,7 @@ nova.section('image_file_url') # A list of filesystems that will be configured in this file # under the sections image_file_url: (list # value) -#filesystems= +# filesystems= nova.section('baremetal') @@ -2933,7 +2950,7 @@ nova.section('baremetal') # # The backend to use for bare-metal database (string value) -#db_backend=sqlalchemy +# db_backend=sqlalchemy # @@ -2942,7 +2959,7 @@ nova.section('baremetal') # The SQLAlchemy connection string used to connect to the # bare-metal database (string value) -#sql_connection=sqlite:///$state_path/baremetal_$sqlite_db +# sql_connection=sqlite:///$state_path/baremetal_$sqlite_db # @@ -2951,31 +2968,31 @@ nova.section('baremetal') # Whether baremetal compute injects password or not (boolean # value) -#inject_password=true +# inject_password=true # Template file for injected network (string value) -#injected_network_template=$pybasedir/nova/virt/baremetal/interfaces.template +# injected_network_template=$pybasedir/nova/virt/baremetal/interfaces.template # Baremetal VIF driver. (string value) -#vif_driver=nova.virt.baremetal.vif_driver.BareMetalVIFDriver +# vif_driver=nova.virt.baremetal.vif_driver.BareMetalVIFDriver # Baremetal volume driver. (string value) -#volume_driver=nova.virt.baremetal.volume_driver.LibvirtVolumeDriver +# volume_driver=nova.virt.baremetal.volume_driver.LibvirtVolumeDriver # a list of additional capabilities corresponding to # instance_type_extra_specs for this compute host to # advertise. Valid entries are name=value, pairs For example, # "key1:val1, key2:val2" (list value) -#instance_type_extra_specs= +# instance_type_extra_specs= # Baremetal driver back-end (pxe or tilera) (string value) -#driver=nova.virt.baremetal.pxe.PXE +# driver=nova.virt.baremetal.pxe.PXE # Baremetal power management method (string value) -#power_manager=nova.virt.baremetal.ipmi.IPMI +# power_manager=nova.virt.baremetal.ipmi.IPMI # Baremetal compute node's tftp root path (string value) -#tftp_root=/tftpboot +# tftp_root=/tftpboot # @@ -2983,18 +3000,18 @@ nova.section('baremetal') # # path to baremetal terminal program (string value) -#terminal=shellinaboxd +# terminal=shellinaboxd # path to baremetal terminal SSL cert(PEM) (string value) -#terminal_cert_dir= +# terminal_cert_dir= # path to directory stores pidfiles of baremetal_terminal # (string value) -#terminal_pid_dir=$state_path/baremetal/console +# terminal_pid_dir=$state_path/baremetal/console # maximal number of retries for IPMI operations (integer # value) -#ipmi_power_retry=5 +# ipmi_power_retry=5 # @@ -3003,33 +3020,33 @@ nova.section('baremetal') # Default kernel image ID used in deployment phase (string # value) -#deploy_kernel= +# deploy_kernel= # Default ramdisk image ID used in deployment phase (string # value) -#deploy_ramdisk= +# deploy_ramdisk= # Template file for injected network config (string value) -#net_config_template=$pybasedir/nova/virt/baremetal/net-dhcp.ubuntu.template +# net_config_template=$pybasedir/nova/virt/baremetal/net-dhcp.ubuntu.template # additional append parameters for baremetal PXE boot (string # value) -#pxe_append_params= +# pxe_append_params= # Template file for PXE configuration (string value) -#pxe_config_template=$pybasedir/nova/virt/baremetal/pxe_config.template +# pxe_config_template=$pybasedir/nova/virt/baremetal/pxe_config.template # Timeout for PXE deployments. Default: 0 (unlimited) (integer # value) -#pxe_deploy_timeout=0 +# pxe_deploy_timeout=0 # If set, pass the network configuration details to the # initramfs via cmdline. (boolean value) -#pxe_network_config=false +# pxe_network_config=false # This gets passed to Neutron as the bootfile dhcp parameter # when the dhcp_options_enabled is set. (string value) -#pxe_bootfile_name=pxelinux.0 +# pxe_bootfile_name=pxelinux.0 # @@ -3037,23 +3054,23 @@ nova.section('baremetal') # # ip address of tilera pdu (string value) -#tile_pdu_ip=10.0.100.1 +# tile_pdu_ip=10.0.100.1 # management script for tilera pdu (string value) -#tile_pdu_mgr=/tftpboot/pdu_mgr +# tile_pdu_mgr=/tftpboot/pdu_mgr # power status of tilera PDU is OFF (integer value) -#tile_pdu_off=2 +# tile_pdu_off=2 # power status of tilera PDU is ON (integer value) -#tile_pdu_on=1 +# tile_pdu_on=1 # power status of tilera PDU (integer value) -#tile_pdu_status=9 +# tile_pdu_status=9 # wait time in seconds until check the result after tilera # power operations (integer value) -#tile_power_wait=9 +# tile_power_wait=9 # @@ -3061,23 +3078,23 @@ nova.section('baremetal') # # ip or name to virtual power host (string value) -#virtual_power_ssh_host= +# virtual_power_ssh_host= # Port to use for ssh to virtual power host (integer value) -#virtual_power_ssh_port=22 +# virtual_power_ssh_port=22 # base command to use for virtual power(vbox,virsh) (string # value) -#virtual_power_type=virsh +# virtual_power_type=virsh # user to execute virtual power commands as (string value) -#virtual_power_host_user= +# virtual_power_host_user= # password for virtual power host_user (string value) -#virtual_power_host_pass= +# virtual_power_host_pass= # ssh key for virtual power host_user (string value) -#virtual_power_host_key= +# virtual_power_host_key= # @@ -3087,11 +3104,11 @@ nova.section('baremetal') # Do not set this out of dev/test environments. If a node does # not have a fixed PXE IP address, volumes are exported with # globally opened ACL (boolean value) -#use_unsafe_iscsi=false +# use_unsafe_iscsi=false # iSCSI IQN prefix used in baremetal volume connections. # (string value) -#iscsi_iqn_prefix=iqn.2010-10.org.openstack.baremetal +# iscsi_iqn_prefix=iqn.2010-10.org.openstack.baremetal nova.section('rpc_notifier2') @@ -3101,7 +3118,7 @@ nova.section('rpc_notifier2') # # AMQP topic(s) used for OpenStack notifications (list value) -#topics=notifications +# topics=notifications nova.param('topics', type='stringlist', default='notifications') @@ -3112,13 +3129,13 @@ nova.section('matchmaker_redis') # # Host to locate redis (string value) -#host=127.0.0.1 +# host=127.0.0.1 # Use this port to connect to redis host. (integer value) -#port=6379 +# port=6379 # Password for Redis server. (optional) (string value) -#password= +# password= nova.section('ssl') @@ -3129,15 +3146,15 @@ nova.section('ssl') # CA certificate file to use to verify connecting clients # (string value) -#ca_file= +# ca_file= # Certificate file to use when starting the server securely # (string value) -#cert_file= +# cert_file= # Private key file to use when starting the server securely # (string value) -#key_file= +# key_file= nova.section('trusted_computing') @@ -3147,23 +3164,23 @@ nova.section('trusted_computing') # # attestation server http (string value) -#attestation_server= +# attestation_server= # attestation server Cert file for Identity verification # (string value) -#attestation_server_ca_file= +# attestation_server_ca_file= # attestation server port (string value) -#attestation_port=8443 +# attestation_port=8443 # attestation web API URL (string value) -#attestation_api_url=/OpenAttestationWebServices/V1.0 +# attestation_api_url=/OpenAttestationWebServices/V1.0 # attestation authorization blob - must change (string value) -#attestation_auth_blob= +# attestation_auth_blob= # Attestation status cache valid period length (integer value) -#attestation_auth_timeout=60 +# attestation_auth_timeout=60 nova.section('upgrade_levels') @@ -3174,7 +3191,7 @@ nova.section('upgrade_levels') # Set a version cap for messages sent to the base api in any # service (string value) -#baseapi= +# baseapi= # @@ -3183,7 +3200,7 @@ nova.section('upgrade_levels') # Set a version cap for messages sent between cells services # (string value) -#intercell= +# intercell= # @@ -3192,7 +3209,7 @@ nova.section('upgrade_levels') # Set a version cap for messages sent to local cells services # (string value) -#cells= +# cells= # @@ -3201,7 +3218,7 @@ nova.section('upgrade_levels') # Set a version cap for messages sent to cert services (string # value) -#cert= +# cert= # @@ -3210,7 +3227,7 @@ nova.section('upgrade_levels') # Set a version cap for messages sent to compute services # (string value) -#compute= +# compute= # @@ -3219,7 +3236,7 @@ nova.section('upgrade_levels') # Set a version cap for messages sent to conductor services # (string value) -#conductor= +# conductor= # @@ -3228,7 +3245,7 @@ nova.section('upgrade_levels') # Set a version cap for messages sent to console services # (string value) -#console= +# console= # @@ -3237,7 +3254,7 @@ nova.section('upgrade_levels') # Set a version cap for messages sent to consoleauth services # (string value) -#consoleauth= +# consoleauth= # @@ -3246,7 +3263,7 @@ nova.section('upgrade_levels') # Set a version cap for messages sent to network services # (string value) -#network= +# network= # @@ -3255,7 +3272,7 @@ nova.section('upgrade_levels') # Set a version cap for messages sent to scheduler services # (string value) -#scheduler= +# scheduler= nova.section('matchmaker_ring') @@ -3265,7 +3282,7 @@ nova.section('matchmaker_ring') # # Matchmaker ring file (JSON) (string value) -#ringfile=/etc/oslo/matchmaker_ring.json +# ringfile=/etc/oslo/matchmaker_ring.json nova.section('vmware') @@ -3277,48 +3294,48 @@ nova.section('vmware') # URL for connection to VMware ESX/VC host. Required if # compute_driver is vmwareapi.VMwareESXDriver or # vmwareapi.VMwareVCDriver. (string value) -#host_ip= +# host_ip= # Username for connection to VMware ESX/VC host. Used only if # compute_driver is vmwareapi.VMwareESXDriver or # vmwareapi.VMwareVCDriver. (string value) -#host_username= +# host_username= # Password for connection to VMware ESX/VC host. Used only if # compute_driver is vmwareapi.VMwareESXDriver or # vmwareapi.VMwareVCDriver. (string value) -#host_password= +# host_password= # Name of a VMware Cluster ComputeResource. Used only if # compute_driver is vmwareapi.VMwareVCDriver. (multi valued) -#cluster_name= +# cluster_name= # Regex to match the name of a datastore. Used only if # compute_driver is vmwareapi.VMwareVCDriver. (string value) -#datastore_regex= +# datastore_regex= # The interval used for polling of remote tasks. Used only if # compute_driver is vmwareapi.VMwareESXDriver or # vmwareapi.VMwareVCDriver. (floating point value) -#task_poll_interval=5.0 +# task_poll_interval=5.0 # The number of times we retry on failures, e.g., socket # error, etc. Used only if compute_driver is # vmwareapi.VMwareESXDriver or vmwareapi.VMwareVCDriver. # (integer value) -#api_retry_count=10 +# api_retry_count=10 # VNC starting port (integer value) -#vnc_port=5900 +# vnc_port=5900 # Total number of VNC ports (integer value) -#vnc_port_total=10000 +# vnc_port_total=10000 # VNC password (string value) -#vnc_password= +# vnc_password= # Whether to use linked clone (boolean value) -#use_linked_clone=true +# use_linked_clone=true # @@ -3327,7 +3344,7 @@ nova.section('vmware') # Physical ethernet adapter name for vlan networking (string # value) -#vlan_interface=vmnic0 +# vlan_interface=vmnic0 # @@ -3337,7 +3354,7 @@ nova.section('vmware') # Optional VIM Service WSDL Location e.g # http:///vimService.wsdl. Optional over-ride to # default location for bug work-arounds (string value) -#wsdl_location= +# wsdl_location= # @@ -3351,7 +3368,7 @@ nova.section('vmware') # limit the count to something less than the configured value. # Any remaining objects may be retrieved with additional # requests. (integer value) -#maximum_objects=100 +# maximum_objects=100 # @@ -3359,7 +3376,7 @@ nova.section('vmware') # # Name of Integration Bridge (string value) -#integration_bridge=br-int +# integration_bridge=br-int nova.section('spice') @@ -3370,24 +3387,23 @@ nova.section('spice') # location of spice html5 console proxy, in the form # "http://127.0.0.1:6082/spice_auto.html" (string value) -#html5proxy_base_url=http://127.0.0.1:6082/spice_auto.html +# html5proxy_base_url=http://127.0.0.1:6082/spice_auto.html # IP address on which instance spice server should listen # (string value) -#server_listen=127.0.0.1 +# server_listen=127.0.0.1 # the address to which proxy clients (like nova- # spicehtml5proxy) should connect (string value) -#server_proxyclient_address=127.0.0.1 +# server_proxyclient_address=127.0.0.1 # enable spice related features (boolean value) -#enabled=false +# enabled=false # enable spice guest agent support (boolean value) -#agent_enabled=true +# agent_enabled=true # keymap for spice (string value) -#keymap=en-us +# keymap=en-us nova.commit() - diff --git a/ostack_validator/schemas/nova/v2013_1_3.py b/ostack_validator/schemas/nova/v2013_1_3.py index 8e3e07c..56f598a 100644 --- a/ostack_validator/schemas/nova/v2013_1_3.py +++ b/ostack_validator/schemas/nova/v2013_1_3.py @@ -6,1363 +6,4003 @@ nova.version('2013.1.3') nova.section('DEFAULT') -nova.param('internal_service_availability_zone', type='string', default='internal', description="availability_zone to show internal services under") +nova.param( + 'internal_service_availability_zone', + type='string', + default='internal', + description="availability_zone to show internal services under") -nova.param('default_availability_zone', type='string', default='nova', description="default compute node availability_zone") +nova.param( + 'default_availability_zone', + type='string', + default='nova', + description="default compute node availability_zone") -nova.param('ca_file', type='string', default='cacert.pem', description="Filename of root CA") +nova.param( + 'ca_file', + type='string', + default='cacert.pem', + description="Filename of root CA") -nova.param('key_file', type='string', default='private/cakey.pem', description="Filename of private key") +nova.param( + 'key_file', + type='string', + default='private/cakey.pem', + description="Filename of private key") -nova.param('crl_file', type='string', default='crl.pem', description="Filename of root Certificate Revocation List") +nova.param( + 'crl_file', + type='string', + default='crl.pem', + description="Filename of root Certificate Revocation List") -nova.param('keys_path', type='string', default='$state_path/keys', description="Where we keep our keys") +nova.param( + 'keys_path', + type='string', + default='$state_path/keys', + description="Where we keep our keys") -nova.param('ca_path', type='string', default='$state_path/CA', description="Where we keep our root CA") +nova.param( + 'ca_path', + type='string', + default='$state_path/CA', + description="Where we keep our root CA") -nova.param('use_project_ca', type='boolean', default=False, description="Should we use a CA for each project?") +nova.param( + 'use_project_ca', + type='boolean', + default=False, + description="Should we use a CA for each project?") -nova.param('user_cert_subject', type='string', default='/CUS/STCalifornia/OOpenStack/OUNovaDev/CN%.16s-%.16s-%s', description="Subject for certificate for users, %s for project, user, timestamp") +nova.param( + 'user_cert_subject', + type='string', + default='/CUS/STCalifornia/OOpenStack/OUNovaDev/CN%.16s-%.16s-%s', + description="Subject for certificate for users, %s for project, user, timestamp") -nova.param('project_cert_subject', type='string', default='/CUS/STCalifornia/OOpenStack/OUNovaDev/CNproject-ca-%.16s-%s', description="Subject for certificate for projects, %s for project, timestamp") +nova.param( + 'project_cert_subject', + type='string', + default='/CUS/STCalifornia/OOpenStack/OUNovaDev/CNproject-ca-%.16s-%s', + description="Subject for certificate for projects, %s for project, timestamp") -nova.param('fatal_exception_format_errors', type='boolean', default=False, description="make exception message format errors fatal") +nova.param( + 'fatal_exception_format_errors', + type='boolean', + default=False, + description="make exception message format errors fatal") -nova.param('my_ip', type='string', default='10.0.0.1', description="ip address of this host") +nova.param( + 'my_ip', + type='string', + default='10.0.0.1', + description="ip address of this host") -nova.param('host', type='string', default='nova', description="Name of this node. This can be an opaque identifier. It is not necessarily a hostname, FQDN, or IP address. However, the node name must be valid within an AMQP key, and if using ZeroMQ, a valid hostname, FQDN, or IP address") +nova.param( + 'host', + type='string', + default='nova', + description="Name of this node. This can be an opaque identifier. It is not necessarily a hostname, FQDN, or IP address. However, the node name must be valid within an AMQP key, and if using ZeroMQ, a valid hostname, FQDN, or IP address") nova.param('use_ipv6', type='boolean', default=False, description="use ipv6") -nova.param('notify_on_state_change', type='string', default=None, description="If set, send compute.instance.update notifications on instance state changes. Valid values are None for no notifications, 'vm_state' for notifications on VM state changes, or 'vm_and_task_state' for notifications on VM and task state changes.") - -nova.param('notify_api_faults', type='boolean', default=False, description="If set, send api.fault notifications on caught exceptions in the API service.") - -nova.param('pybasedir', type='string', default='/usr/lib/python/site-packages', description="Directory where the nova python module is installed") - -nova.param('bindir', type='string', default='/usr/local/bin', description="Directory where nova binaries are installed") - -nova.param('state_path', type='string', default='$pybasedir', description="Top-level directory for maintaining nova's state") - -nova.param('policy_file', type='string', default='policy.json', description="JSON file representing policy") - -nova.param('policy_default_rule', type='string', default='default', description="Rule checked when requested rule is not found") - -nova.param('quota_instances', type='integer', default=10, description="number of instances allowed per project") - -nova.param('quota_cores', type='integer', default=20, description="number of instance cores allowed per project") - -nova.param('quota_ram', type='integer', default=51200, description="megabytes of instance ram allowed per project") - -nova.param('quota_floating_ips', type='integer', default=10, description="number of floating ips allowed per project") - -nova.param('quota_fixed_ips', type='integer', default=-1, description="number of fixed ips allowed per project") - -nova.param('quota_metadata_items', type='integer', default=128, description="number of metadata items allowed per instance") - -nova.param('quota_injected_files', type='integer', default=5, description="number of injected files allowed") - -nova.param('quota_injected_file_content_bytes', type='integer', default=10240, description="number of bytes allowed per injected file") - -nova.param('quota_injected_file_path_bytes', type='integer', default=255, description="number of bytes allowed per injected file path") - -nova.param('quota_security_groups', type='integer', default=10, description="number of security groups per project") - -nova.param('quota_security_group_rules', type='integer', default=20, description="number of security rules per security group") - -nova.param('quota_key_pairs', type='integer', default=100, description="number of key pairs per user") - -nova.param('reservation_expire', type='integer', default=86400, description="number of seconds until a reservation expires") - -nova.param('until_refresh', type='integer', default=0, description="count of reservations until usage is refreshed") - -nova.param('max_age', type='integer', default=0, description="number of seconds between subsequent usage refreshes") - -nova.param('quota_driver', type='string', default='nova.quota.DbQuotaDriver', description="default driver to use for quota checks") - -nova.param('report_interval', type='integer', default=10, description="seconds between nodes reporting state to datastore") - -nova.param('periodic_enable', type='boolean', default=True, description="enable periodic tasks") - -nova.param('periodic_fuzzy_delay', type='integer', default=60, description="range of seconds to randomly delay when starting the periodic task scheduler to reduce stampeding.") - -nova.param('enabled_apis', type='list', default='ec2,osapi_compute,metadata', description="a list of APIs to enable by default") - -nova.param('enabled_ssl_apis', type='list', default='', description="a list of APIs with enabled SSL") - -nova.param('ec2_listen', type='string', default='0.0.0.0', description="IP address for EC2 API to listen") - -nova.param('ec2_listen_port', type='integer', default=8773, description="port for ec2 api to listen") - -nova.param('ec2_workers', type='integer', default=None, description="Number of workers for EC2 API service") - -nova.param('osapi_compute_listen', type='string', default='0.0.0.0', description="IP address for OpenStack API to listen") - -nova.param('osapi_compute_listen_port', type='integer', default=8774, description="list port for osapi compute") - -nova.param('osapi_compute_workers', type='integer', default=None, description="Number of workers for OpenStack API service") - -nova.param('metadata_manager', type='string', default='nova.api.manager.MetadataManager', description="OpenStack metadata service manager") - -nova.param('metadata_listen', type='string', default='0.0.0.0', description="IP address for metadata api to listen") - -nova.param('metadata_listen_port', type='integer', default=8775, description="port for metadata api to listen") - -nova.param('metadata_workers', type='integer', default=None, description="Number of workers for metadata service") - -nova.param('compute_manager', type='string', default='nova.compute.manager.ComputeManager', description="full class name for the Manager for compute") - -nova.param('console_manager', type='string', default='nova.console.manager.ConsoleProxyManager', description="full class name for the Manager for console proxy") - -nova.param('cert_manager', type='string', default='nova.cert.manager.CertManager', description="full class name for the Manager for cert") - -nova.param('network_manager', type='string', default='nova.network.manager.VlanManager', description="full class name for the Manager for network") - -nova.param('scheduler_manager', type='string', default='nova.scheduler.manager.SchedulerManager', description="full class name for the Manager for scheduler") - -nova.param('service_down_time', type='integer', default=60, description="maximum time since last check-in for up service") - -nova.param('sqlite_clean_db', type='string', default='clean.sqlite', description="File name of clean sqlite db") - -nova.param('monkey_patch', type='boolean', default=False, description="Whether to log monkey patching") - -nova.param('monkey_patch_modules', type='list', default='nova.api.ec2.cloud:nova.notifications.notify_decorator,nova.compute.api:nova.notifications.notify_decorator', description="List of modules/decorators to monkey patch") - -nova.param('password_length', type='integer', default=12, description="Length of generated instance admin passwords") - -nova.param('instance_usage_audit_period', type='string', default='month', description="time period to generate instance usages for. Time period must be hour, day, month or year") - -nova.param('rootwrap_config', type='string', default='/etc/nova/rootwrap.conf', description="Path to the rootwrap configuration file to use for running commands as root") - -nova.param('tempdir', type='string', default=None, description="Explicitly specify the temporary working directory") - -nova.param('api_paste_config', type='string', default='api-paste.ini', description="File name for the paste.deploy config for nova-api") - -nova.param('wsgi_log_format', type='string', default='%(client_ip)s "%(request_line)s" status: %(status_code)s len: %(body_length)s time: %(wall_seconds).7f', description="A python format string that is used as the template to generate log lines. The following values can be formatted into it: client_ip, date_time, request_line, status_code, body_length, wall_seconds.") - -nova.param('ssl_ca_file', type='string', default=None, description="CA certificate file to use to verify connecting clients") - -nova.param('ssl_cert_file', type='string', default=None, description="SSL certificate of API server") - -nova.param('ssl_key_file', type='string', default=None, description="SSL private key of API server") - -nova.param('tcp_keepidle', type='integer', default=600, description="Sets the value of TCP_KEEPIDLE in seconds for each server socket. Not supported on OS X.") - -nova.param('api_rate_limit', type='boolean', default=False, description="whether to use per-user rate limiting for the api.") - -nova.param('auth_strategy', type='string', default='noauth', description="The strategy to use for auth: noauth or keystone.") - -nova.param('use_forwarded_for', type='boolean', default=False, description="Treat X-Forwarded-For as the canonical remote address. Only enable this if you have a sanitizing proxy.") - -nova.param('lockout_attempts', type='integer', default=5, description="Number of failed auths before lockout.") - -nova.param('lockout_minutes', type='integer', default=15, description="Number of minutes to lockout if triggered.") - -nova.param('lockout_window', type='integer', default=15, description="Number of minutes for lockout window.") - -nova.param('keystone_ec2_url', type='string', default='http://localhost:5000/v2.0/ec2tokens', description="URL to get token from ec2 request.") - -nova.param('ec2_private_dns_show_ip', type='boolean', default=False, description="Return the IP address as private dns hostname in describe instances") - -nova.param('ec2_strict_validation', type='boolean', default=True, description="Validate security group names according to EC2 specification") - -nova.param('ec2_timestamp_expiry', type='integer', default=300, description="Time in seconds before ec2 timestamp expires") - -nova.param('ec2_host', type='string', default='$my_ip', description="the ip of the ec2 api server") - -nova.param('ec2_dmz_host', type='string', default='$my_ip', description="the internal ip of the ec2 api server") - -nova.param('ec2_port', type='integer', default=8773, description="the port of the ec2 api server") - -nova.param('ec2_scheme', type='string', default='http', description="the protocol to use when connecting to the ec2 api server") - -nova.param('ec2_path', type='string', default='/services/Cloud', description="the path prefix used to call the ec2 api server") - -nova.param('region_list', type='list', default='', description="list of region=fqdn pairs separated by commas") - -nova.param('config_drive_skip_versions', type='string', default='1.0 2007-01-19 2007-03-01 2007-08-29 2007-10-10 2007-12-15 2008-02-01 2008-09-01', description="List of metadata versions to skip placing into the config drive") - -nova.param('vendordata_driver', type='string', default='nova.api.metadata.vendordata_json.JsonFileVendorData', description="Driver to use for vendor data") - -nova.param('service_neutron_metadata_proxy', type='boolean', default=False, description="Set flag to indicate Neutron will proxy metadata requests and resolve instance ids.") - -nova.param('neutron_metadata_proxy_shared_secret', type='string', default='', description="Shared secret to validate proxies Neutron metadata requests") - -nova.param('vendordata_jsonfile_path', type='string', default=None, description="File to load json formated vendor data from") - -nova.param('osapi_max_limit', type='integer', default=1000, description="the maximum number of items returned in a single response from a collection resource") - -nova.param('osapi_compute_link_prefix', type='string', default=None, description="Base URL that will be presented to users in links to the OpenStack Compute API") - -nova.param('osapi_glance_link_prefix', type='string', default=None, description="Base URL that will be presented to users in links to glance resources") - -nova.param('allow_instance_snapshots', type='boolean', default=True, description="Permit instance snapshot operations.") - -nova.param('osapi_compute_ext_list', type='list', default='', description="Specify list of extensions to load when using osapi_compute_extension option with nova.api.openstack.compute.contrib.select_extensions") - -nova.param('fping_path', type='string', default='/usr/sbin/fping', description="Full path to fping.") - -nova.param('enable_network_quota', type='boolean', default=False, description="Enables or disables quota checking for tenant networks") - -nova.param('use_neutron_default_nets', type='string', default='False', description="Control for checking for default networks") - -nova.param('neutron_default_tenant_id', type='string', default='default', description="Default tenant id when creating neutron networks") - -nova.param('osapi_compute_extension', type='multi', default='nova.api.openstack.compute.contrib.standard_extensions', description="osapi compute extension to load") - -nova.param('osapi_hide_server_address_states', type='list', default='building', description="List of instance states that should hide network info") - -nova.param('enable_instance_password', type='boolean', default=True, description="Allows use of instance password during server creation") - -nova.param('osapi_max_request_body_size', type='integer', default=114688, description="the maximum body size per each osapi request(bytes)") - -nova.param('compute_api_class', type='string', default='nova.compute.api.API', description="The full class name of the compute API class to use") - -nova.param('cert_topic', type='string', default='cert', description="the topic cert nodes listen on") - -nova.param('vpn_image_id', type='string', default='0', description="image id used when starting up a cloudpipe vpn server") - -nova.param('vpn_flavor', type='string', default='m1.tiny', description="Flavor for vpn instances") - -nova.param('boot_script_template', type='string', default='$pybasedir/nova/cloudpipe/bootscript.template', description="Template for cloudpipe instance boot script") - -nova.param('dmz_net', type='string', default='10.0.0.0', description="Network to push into openvpn config") - -nova.param('dmz_mask', type='string', default='255.255.255.0', description="Netmask to push into openvpn config") - -nova.param('vpn_key_suffix', type='string', default='-vpn', description="Suffix to add to project name for vpn key and secgroups") - -nova.param('record', type='boolean', default=False, description="Record sessions to FILE.[session_number]") - -nova.param('daemon', type='boolean', default=False, description="Become a daemon") - -nova.param('ssl_only', type='boolean', default=False, description="Disallow non-encrypted connections") - -nova.param('source_is_ipv6', type='boolean', default=False, description="Source is ipv6") - -nova.param('cert', type='string', default='self.pem', description="SSL certificate file") +nova.param( + 'notify_on_state_change', + type='string', + default=None, + description="If set, send compute.instance.update notifications on instance state changes. Valid values are None for no notifications, 'vm_state' for notifications on VM state changes, or 'vm_and_task_state' for notifications on VM and task state changes.") + +nova.param( + 'notify_api_faults', + type='boolean', + default=False, + description="If set, send api.fault notifications on caught exceptions in the API service.") + +nova.param( + 'pybasedir', + type='string', + default='/usr/lib/python/site-packages', + description="Directory where the nova python module is installed") + +nova.param( + 'bindir', + type='string', + default='/usr/local/bin', + description="Directory where nova binaries are installed") + +nova.param( + 'state_path', + type='string', + default='$pybasedir', + description="Top-level directory for maintaining nova's state") + +nova.param( + 'policy_file', + type='string', + default='policy.json', + description="JSON file representing policy") + +nova.param( + 'policy_default_rule', + type='string', + default='default', + description="Rule checked when requested rule is not found") + +nova.param( + 'quota_instances', + type='integer', + default=10, + description="number of instances allowed per project") + +nova.param( + 'quota_cores', + type='integer', + default=20, + description="number of instance cores allowed per project") + +nova.param( + 'quota_ram', + type='integer', + default=51200, + description="megabytes of instance ram allowed per project") + +nova.param( + 'quota_floating_ips', + type='integer', + default=10, + description="number of floating ips allowed per project") + +nova.param( + 'quota_fixed_ips', + type='integer', + default=-1, + description="number of fixed ips allowed per project") + +nova.param( + 'quota_metadata_items', + type='integer', + default=128, + description="number of metadata items allowed per instance") + +nova.param( + 'quota_injected_files', + type='integer', + default=5, + description="number of injected files allowed") + +nova.param( + 'quota_injected_file_content_bytes', + type='integer', + default=10240, + description="number of bytes allowed per injected file") + +nova.param( + 'quota_injected_file_path_bytes', + type='integer', + default=255, + description="number of bytes allowed per injected file path") + +nova.param( + 'quota_security_groups', + type='integer', + default=10, + description="number of security groups per project") + +nova.param( + 'quota_security_group_rules', + type='integer', + default=20, + description="number of security rules per security group") + +nova.param( + 'quota_key_pairs', + type='integer', + default=100, + description="number of key pairs per user") + +nova.param( + 'reservation_expire', + type='integer', + default=86400, + description="number of seconds until a reservation expires") + +nova.param( + 'until_refresh', + type='integer', + default=0, + description="count of reservations until usage is refreshed") + +nova.param( + 'max_age', + type='integer', + default=0, + description="number of seconds between subsequent usage refreshes") + +nova.param( + 'quota_driver', + type='string', + default='nova.quota.DbQuotaDriver', + description="default driver to use for quota checks") + +nova.param( + 'report_interval', + type='integer', + default=10, + description="seconds between nodes reporting state to datastore") + +nova.param( + 'periodic_enable', + type='boolean', + default=True, + description="enable periodic tasks") + +nova.param( + 'periodic_fuzzy_delay', + type='integer', + default=60, + description="range of seconds to randomly delay when starting the periodic task scheduler to reduce stampeding.") + +nova.param( + 'enabled_apis', + type='list', + default='ec2,osapi_compute,metadata', + description="a list of APIs to enable by default") + +nova.param( + 'enabled_ssl_apis', + type='list', + default='', + description="a list of APIs with enabled SSL") + +nova.param( + 'ec2_listen', + type='string', + default='0.0.0.0', + description="IP address for EC2 API to listen") + +nova.param( + 'ec2_listen_port', + type='integer', + default=8773, + description="port for ec2 api to listen") + +nova.param( + 'ec2_workers', + type='integer', + default=None, + description="Number of workers for EC2 API service") + +nova.param( + 'osapi_compute_listen', + type='string', + default='0.0.0.0', + description="IP address for OpenStack API to listen") + +nova.param( + 'osapi_compute_listen_port', + type='integer', + default=8774, + description="list port for osapi compute") + +nova.param( + 'osapi_compute_workers', + type='integer', + default=None, + description="Number of workers for OpenStack API service") + +nova.param( + 'metadata_manager', + type='string', + default='nova.api.manager.MetadataManager', + description="OpenStack metadata service manager") + +nova.param( + 'metadata_listen', + type='string', + default='0.0.0.0', + description="IP address for metadata api to listen") + +nova.param( + 'metadata_listen_port', + type='integer', + default=8775, + description="port for metadata api to listen") + +nova.param( + 'metadata_workers', + type='integer', + default=None, + description="Number of workers for metadata service") + +nova.param( + 'compute_manager', + type='string', + default='nova.compute.manager.ComputeManager', + description="full class name for the Manager for compute") + +nova.param( + 'console_manager', + type='string', + default='nova.console.manager.ConsoleProxyManager', + description="full class name for the Manager for console proxy") + +nova.param( + 'cert_manager', + type='string', + default='nova.cert.manager.CertManager', + description="full class name for the Manager for cert") + +nova.param( + 'network_manager', + type='string', + default='nova.network.manager.VlanManager', + description="full class name for the Manager for network") + +nova.param( + 'scheduler_manager', + type='string', + default='nova.scheduler.manager.SchedulerManager', + description="full class name for the Manager for scheduler") + +nova.param( + 'service_down_time', + type='integer', + default=60, + description="maximum time since last check-in for up service") + +nova.param( + 'sqlite_clean_db', + type='string', + default='clean.sqlite', + description="File name of clean sqlite db") + +nova.param( + 'monkey_patch', + type='boolean', + default=False, + description="Whether to log monkey patching") + +nova.param( + 'monkey_patch_modules', + type='list', + default='nova.api.ec2.cloud:nova.notifications.notify_decorator,nova.compute.api:nova.notifications.notify_decorator', + description="List of modules/decorators to monkey patch") + +nova.param( + 'password_length', + type='integer', + default=12, + description="Length of generated instance admin passwords") + +nova.param( + 'instance_usage_audit_period', + type='string', + default='month', + description="time period to generate instance usages for. Time period must be hour, day, month or year") + +nova.param( + 'rootwrap_config', + type='string', + default='/etc/nova/rootwrap.conf', + description="Path to the rootwrap configuration file to use for running commands as root") + +nova.param( + 'tempdir', + type='string', + default=None, + description="Explicitly specify the temporary working directory") + +nova.param( + 'api_paste_config', + type='string', + default='api-paste.ini', + description="File name for the paste.deploy config for nova-api") + +nova.param( + 'wsgi_log_format', + type='string', + default='%(client_ip)s "%(request_line)s" status: %(status_code)s len: %(body_length)s time: %(wall_seconds).7f', + description="A python format string that is used as the template to generate log lines. The following values can be formatted into it: client_ip, date_time, request_line, status_code, body_length, wall_seconds.") + +nova.param( + 'ssl_ca_file', + type='string', + default=None, + description="CA certificate file to use to verify connecting clients") + +nova.param( + 'ssl_cert_file', + type='string', + default=None, + description="SSL certificate of API server") + +nova.param( + 'ssl_key_file', + type='string', + default=None, + description="SSL private key of API server") + +nova.param( + 'tcp_keepidle', + type='integer', + default=600, + description="Sets the value of TCP_KEEPIDLE in seconds for each server socket. Not supported on OS X.") + +nova.param( + 'api_rate_limit', + type='boolean', + default=False, + description="whether to use per-user rate limiting for the api.") + +nova.param( + 'auth_strategy', + type='string', + default='noauth', + description="The strategy to use for auth: noauth or keystone.") + +nova.param( + 'use_forwarded_for', + type='boolean', + default=False, + description="Treat X-Forwarded-For as the canonical remote address. Only enable this if you have a sanitizing proxy.") + +nova.param( + 'lockout_attempts', + type='integer', + default=5, + description="Number of failed auths before lockout.") + +nova.param( + 'lockout_minutes', + type='integer', + default=15, + description="Number of minutes to lockout if triggered.") + +nova.param( + 'lockout_window', + type='integer', + default=15, + description="Number of minutes for lockout window.") + +nova.param( + 'keystone_ec2_url', + type='string', + default='http://localhost:5000/v2.0/ec2tokens', + description="URL to get token from ec2 request.") + +nova.param( + 'ec2_private_dns_show_ip', + type='boolean', + default=False, + description="Return the IP address as private dns hostname in describe instances") + +nova.param( + 'ec2_strict_validation', + type='boolean', + default=True, + description="Validate security group names according to EC2 specification") + +nova.param( + 'ec2_timestamp_expiry', + type='integer', + default=300, + description="Time in seconds before ec2 timestamp expires") + +nova.param( + 'ec2_host', + type='string', + default='$my_ip', + description="the ip of the ec2 api server") + +nova.param( + 'ec2_dmz_host', + type='string', + default='$my_ip', + description="the internal ip of the ec2 api server") + +nova.param( + 'ec2_port', + type='integer', + default=8773, + description="the port of the ec2 api server") + +nova.param( + 'ec2_scheme', + type='string', + default='http', + description="the protocol to use when connecting to the ec2 api server") + +nova.param( + 'ec2_path', + type='string', + default='/services/Cloud', + description="the path prefix used to call the ec2 api server") + +nova.param( + 'region_list', + type='list', + default='', + description="list of region=fqdn pairs separated by commas") + +nova.param( + 'config_drive_skip_versions', + type='string', + default='1.0 2007-01-19 2007-03-01 2007-08-29 2007-10-10 2007-12-15 2008-02-01 2008-09-01', + description="List of metadata versions to skip placing into the config drive") + +nova.param( + 'vendordata_driver', + type='string', + default='nova.api.metadata.vendordata_json.JsonFileVendorData', + description="Driver to use for vendor data") + +nova.param( + 'service_neutron_metadata_proxy', + type='boolean', + default=False, + description="Set flag to indicate Neutron will proxy metadata requests and resolve instance ids.") + +nova.param( + 'neutron_metadata_proxy_shared_secret', + type='string', + default='', + description="Shared secret to validate proxies Neutron metadata requests") + +nova.param( + 'vendordata_jsonfile_path', + type='string', + default=None, + description="File to load json formated vendor data from") + +nova.param( + 'osapi_max_limit', + type='integer', + default=1000, + description="the maximum number of items returned in a single response from a collection resource") + +nova.param( + 'osapi_compute_link_prefix', + type='string', + default=None, + description="Base URL that will be presented to users in links to the OpenStack Compute API") + +nova.param( + 'osapi_glance_link_prefix', + type='string', + default=None, + description="Base URL that will be presented to users in links to glance resources") + +nova.param( + 'allow_instance_snapshots', + type='boolean', + default=True, + description="Permit instance snapshot operations.") + +nova.param( + 'osapi_compute_ext_list', + type='list', + default='', + description="Specify list of extensions to load when using osapi_compute_extension option with nova.api.openstack.compute.contrib.select_extensions") + +nova.param( + 'fping_path', + type='string', + default='/usr/sbin/fping', + description="Full path to fping.") + +nova.param( + 'enable_network_quota', + type='boolean', + default=False, + description="Enables or disables quota checking for tenant networks") + +nova.param( + 'use_neutron_default_nets', + type='string', + default='False', + description="Control for checking for default networks") + +nova.param( + 'neutron_default_tenant_id', + type='string', + default='default', + description="Default tenant id when creating neutron networks") + +nova.param( + 'osapi_compute_extension', + type='multi', + default='nova.api.openstack.compute.contrib.standard_extensions', + description="osapi compute extension to load") + +nova.param( + 'osapi_hide_server_address_states', + type='list', + default='building', + description="List of instance states that should hide network info") + +nova.param( + 'enable_instance_password', + type='boolean', + default=True, + description="Allows use of instance password during server creation") + +nova.param( + 'osapi_max_request_body_size', + type='integer', + default=114688, + description="the maximum body size per each osapi request(bytes)") + +nova.param( + 'compute_api_class', + type='string', + default='nova.compute.api.API', + description="The full class name of the compute API class to use") + +nova.param( + 'cert_topic', + type='string', + default='cert', + description="the topic cert nodes listen on") + +nova.param( + 'vpn_image_id', + type='string', + default='0', + description="image id used when starting up a cloudpipe vpn server") + +nova.param( + 'vpn_flavor', + type='string', + default='m1.tiny', + description="Flavor for vpn instances") + +nova.param( + 'boot_script_template', + type='string', + default='$pybasedir/nova/cloudpipe/bootscript.template', + description="Template for cloudpipe instance boot script") + +nova.param( + 'dmz_net', + type='string', + default='10.0.0.0', + description="Network to push into openvpn config") + +nova.param( + 'dmz_mask', + type='string', + default='255.255.255.0', + description="Netmask to push into openvpn config") + +nova.param( + 'vpn_key_suffix', + type='string', + default='-vpn', + description="Suffix to add to project name for vpn key and secgroups") + +nova.param( + 'record', + type='boolean', + default=False, + description="Record sessions to FILE.[session_number]") + +nova.param( + 'daemon', + type='boolean', + default=False, + description="Become a daemon") + +nova.param( + 'ssl_only', + type='boolean', + default=False, + description="Disallow non-encrypted connections") + +nova.param( + 'source_is_ipv6', + type='boolean', + default=False, + description="Source is ipv6") + +nova.param( + 'cert', + type='string', + default='self.pem', + description="SSL certificate file") nova.param('key', type='string', default=None, description="SSL key file") -nova.param('web', type='string', default='/usr/share/spice-html5', description="Run webserver on same port. Serve files from DIR.") - -nova.param('novncproxy_host', type='string', default='0.0.0.0', description="Host on which to listen for incoming requests") - -nova.param('novncproxy_port', type='integer', default=6080, description="Port on which to listen for incoming requests") - -nova.param('spicehtml5proxy_host', type='string', default='0.0.0.0', description="Host on which to listen for incoming requests") - -nova.param('spicehtml5proxy_port', type='integer', default=6082, description="Port on which to listen for incoming requests") - -nova.param('allow_resize_to_same_host', type='boolean', default=False, description="Allow destination machine to match source for resize. Useful when testing in single-host environments.") - -nova.param('allow_migrate_to_same_host', type='boolean', default=False, description="Allow migrate machine to the same host. Useful when testing in single-host environments.") - -nova.param('default_schedule_zone', type='string', default=None, description="availability zone to use when user doesn't specify one") - -nova.param('non_inheritable_image_properties', type='list', default='cache_in_nova,bittorrent', description="These are image properties which a snapshot should not inherit from an instance") - -nova.param('null_kernel', type='string', default='nokernel', description="kernel image that indicates not to use a kernel, but to use a raw disk image instead") - -nova.param('multi_instance_display_name_template', type='string', default='%(name)s-%(uuid)s', description="When creating multiple instances with a single request using the os-multiple-create API extension, this template will be used to build the display name for each instance. The benefit is that the instances end up with different hostnames. To restore legacy behavior of every instance having the same name, set this option to '%(name)s'. Valid keys for the template are: name, uuid, count.") - -nova.param('max_local_block_devices', type='integer', default=3, description="Maximum number of devices that will result in a local image being created on the hypervisor node. Setting this to 0 means nova will allow only boot from volume. A negative number means unlimited.") - -nova.param('default_flavor', type='string', default='m1.small', description="default flavor to use for the EC2 API only. The Nova API does not support a default flavor.") - -nova.param('console_host', type='string', default='nova', description="Console proxy host to use to connect to instances on this host.") - -nova.param('default_access_ip_network_name', type='string', default=None, description="Name of network to use to set access ips for instances") - -nova.param('defer_iptables_apply', type='boolean', default=False, description="Whether to batch up the application of IPTables rules during a host restart and apply all at the end of the init phase") - -nova.param('instances_path', type='string', default='$state_path/instances', description="where instances are stored on disk") - -nova.param('instance_usage_audit', type='boolean', default=False, description="Generate periodic compute.instance.exists notifications") - -nova.param('live_migration_retry_count', type='integer', default=30, description="Number of 1 second retries needed in live_migration") - -nova.param('resume_guests_state_on_host_boot', type='boolean', default=False, description="Whether to start guests that were running before the host rebooted") - -nova.param('network_allocate_retries', type='integer', default=0, description="Number of times to retry network allocation on failures") - -nova.param('maximum_instance_delete_attempts', type='integer', default=5, description="The number of times to attempt to reap an instances files.") - -nova.param('bandwidth_poll_interval', type='integer', default=600, description="interval to pull bandwidth usage info") - -nova.param('sync_power_state_interval', type='integer', default=600, description="interval to sync power states between the database and the hypervisor") - -nova.param('heal_instance_info_cache_interval', type='integer', default=60, description="Number of seconds between instance info_cache self healing updates") - -nova.param('host_state_interval', type='integer', default=120, description="Interval in seconds for querying the host status") - -nova.param('image_cache_manager_interval', type='integer', default=2400, description="Number of seconds to wait between runs of the image cache manager") - -nova.param('reclaim_instance_interval', type='integer', default=0, description="Interval in seconds for reclaiming deleted instances") - -nova.param('volume_usage_poll_interval', type='integer', default=0, description="Interval in seconds for gathering volume usages") - -nova.param('shelved_poll_interval', type='integer', default=3600, description="Interval in seconds for polling shelved instances to offload") - -nova.param('shelved_offload_time', type='integer', default=0, description="Time in seconds before a shelved instance is eligible for removing from a host. -1 never offload, 0 offload when shelved") - -nova.param('instance_delete_interval', type='integer', default=300, description="Interval in seconds for retrying failed instance file deletes") - -nova.param('running_deleted_instance_action', type='string', default='log', description="Action to take if a running deleted instance is detected.Valid options are 'noop', 'log' and 'reap'. Set to 'noop' to disable.") - -nova.param('running_deleted_instance_poll_interval', type='integer', default=1800, description="Number of seconds to wait between runs of the cleanup task.") - -nova.param('running_deleted_instance_timeout', type='integer', default=0, description="Number of seconds after being deleted when a running instance should be considered eligible for cleanup.") - -nova.param('reboot_timeout', type='integer', default=0, description="Automatically hard reboot an instance if it has been stuck in a rebooting state longer than N seconds. Set to 0 to disable.") - -nova.param('instance_build_timeout', type='integer', default=0, description="Amount of time in seconds an instance can be in BUILD before going into ERROR status.Set to 0 to disable.") - -nova.param('rescue_timeout', type='integer', default=0, description="Automatically unrescue an instance after N seconds. Set to 0 to disable.") - -nova.param('resize_confirm_window', type='integer', default=0, description="Automatically confirm resizes after N seconds. Set to 0 to disable.") - -nova.param('reserved_host_disk_mb', type='integer', default=0, description="Amount of disk in MB to reserve for the host") - -nova.param('reserved_host_memory_mb', type='integer', default=512, description="Amount of memory in MB to reserve for the host") - -nova.param('compute_stats_class', type='string', default='nova.compute.stats.Stats', description="Class that will manage stats for the local compute host") - -nova.param('compute_topic', type='string', default='compute', description="the topic compute nodes listen on") - -nova.param('migrate_max_retries', type='integer', default=-1, description="Number of times to retry live-migration before failing. If == -1, try until out of hosts. If == 0, only try once, no retries.") - -nova.param('console_driver', type='string', default='nova.console.xvp.XVPConsoleProxy', description="Driver to use for the console proxy") - -nova.param('stub_compute', type='boolean', default=False, description="Stub calls to compute worker for tests") - -nova.param('console_public_hostname', type='string', default='nova', description="Publicly visible name for this console host") - -nova.param('console_topic', type='string', default='console', description="the topic console proxy nodes listen on") - -nova.param('console_vmrc_port', type='integer', default=443, description="port for VMware VMRC connections") - -nova.param('console_vmrc_error_retries', type='integer', default=10, description="number of retries for retrieving VMRC information") - -nova.param('console_xvp_conf_template', type='string', default='$pybasedir/nova/console/xvp.conf.template', description="XVP conf template") - -nova.param('console_xvp_conf', type='string', default='/etc/xvp.conf', description="generated XVP conf file") - -nova.param('console_xvp_pid', type='string', default='/var/run/xvp.pid', description="XVP master process pid file") - -nova.param('console_xvp_log', type='string', default='/var/log/xvp.log', description="XVP log file") - -nova.param('console_xvp_multiplex_port', type='integer', default=5900, description="port for XVP to multiplex VNC connections on") - -nova.param('consoleauth_topic', type='string', default='consoleauth', description="the topic console auth proxy nodes listen on") - -nova.param('console_token_ttl', type='integer', default=600, description="How many seconds before deleting tokens") - -nova.param('consoleauth_manager', type='string', default='nova.consoleauth.manager.ConsoleAuthManager', description="Manager for console auth") - -nova.param('enable_new_services', type='boolean', default=True, description="Services to be added to the available pool on create") - -nova.param('instance_name_template', type='string', default='instance-%08x', description="Template string to be used to generate instance names") - -nova.param('snapshot_name_template', type='string', default='snapshot-%s', description="Template string to be used to generate snapshot names") - -nova.param('db_driver', type='string', default='nova.db', description="driver to use for database access") - -nova.param('osapi_compute_unique_server_name_scope', type='string', default='', description="When set, compute API will consider duplicate hostnames invalid within the specified scope, regardless of case. Should be empty, 'project' or 'global'.") - -nova.param('glance_host', type='string', default='$my_ip', description="default glance hostname or ip") - -nova.param('glance_port', type='integer', default=9292, description="default glance port") - -nova.param('glance_protocol', type='string', default='http', description="Default protocol to use when connecting to glance. Set to https for SSL.") - -nova.param('glance_api_servers', type='list', default='$glance_host:$glance_port', description="A list of the glance api servers available to nova. Prefix with https:// for ssl-based glance api servers.") - -nova.param('glance_api_insecure', type='boolean', default=False, description="Allow to perform insecure SSL") - -nova.param('glance_num_retries', type='integer', default=0, description="Number retries when downloading an image from glance") - -nova.param('allowed_direct_url_schemes', type='list', default='', description="A list of url scheme that can be downloaded directly via the direct_url. Currently supported schemes: [file].") - -nova.param('image_decryption_dir', type='string', default='/tmp', description="parent dir for tempdir used for image decryption") - -nova.param('s3_host', type='string', default='$my_ip', description="hostname or ip for OpenStack to use when accessing the s3 api") - -nova.param('s3_port', type='integer', default=3333, description="port used when accessing the s3 api") - -nova.param('s3_access_key', type='string', default='notchecked', description="access key to use for s3 server for images") - -nova.param('s3_secret_key', type='string', default='notchecked', description="secret key to use for s3 server for images") - -nova.param('s3_use_ssl', type='boolean', default=False, description="whether to use ssl when talking to s3") - -nova.param('s3_affix_tenant', type='boolean', default=False, description="whether to affix the tenant id to the access key when downloading from s3") - -nova.param('ipv6_backend', type='string', default='rfc2462', description="Backend to use for IPv6 generation") - -nova.param('network_api_class', type='string', default='nova.network.api.API', description="The full class name of the network API class to use") - -nova.param('network_driver', type='string', default='nova.network.linux_net', description="Driver to use for network creation") - -nova.param('default_floating_pool', type='string', default='nova', description="Default pool for floating ips") - -nova.param('auto_assign_floating_ip', type='boolean', default=False, description="Autoassigning floating ip to VM") - -nova.param('floating_ip_dns_manager', type='string', default='nova.network.noop_dns_driver.NoopDNSDriver', description="full class name for the DNS Manager for floating IPs") - -nova.param('instance_dns_manager', type='string', default='nova.network.noop_dns_driver.NoopDNSDriver', description="full class name for the DNS Manager for instance IPs") - -nova.param('instance_dns_domain', type='string', default='', description="full class name for the DNS Zone for instance IPs") - -nova.param('ldap_dns_url', type='string', default='ldap://ldap.example.com:389', description="URL for ldap server which will store dns entries") - -nova.param('ldap_dns_user', type='string', default='uidadmin,oupeople,dcexample,dcorg', description="user for ldap DNS") - -nova.param('ldap_dns_password', type='string', default='password', description="password for ldap DNS") - -nova.param('ldap_dns_soa_hostmaster', type='string', default='hostmaster@example.org', description="Hostmaster for ldap dns driver Statement of Authority") - -nova.param('ldap_dns_servers', type='multi', default='dns.example.org', description="DNS Servers for ldap dns driver") - -nova.param('ldap_dns_base_dn', type='string', default='ouhosts,dcexample,dcorg', description="Base DN for DNS entries in ldap") - -nova.param('ldap_dns_soa_refresh', type='string', default='1800', description="Refresh interval") - -nova.param('ldap_dns_soa_retry', type='string', default='3600', description="Retry interval") - -nova.param('ldap_dns_soa_expiry', type='string', default='86400', description="Expiry interval") - -nova.param('ldap_dns_soa_minimum', type='string', default='7200', description="Minimum interval") - -nova.param('dhcpbridge_flagfile', type='multi', default='/etc/nova/nova-dhcpbridge.conf', description="location of flagfiles for dhcpbridge") - -nova.param('networks_path', type='string', default='$state_path/networks', description="Location to keep network config files") - -nova.param('public_interface', type='string', default='eth0', description="Interface for public IP addresses") - -nova.param('network_device_mtu', type='string', default=None, description="MTU setting for vlan") - -nova.param('dhcpbridge', type='string', default='$bindir/nova-dhcpbridge', description="location of nova-dhcpbridge") - -nova.param('routing_source_ip', type='string', default='$my_ip', description="Public IP of network host") - -nova.param('dhcp_lease_time', type='integer', default=120, description="Lifetime of a DHCP lease in seconds") - -nova.param('dns_server', type='multi', default='', description="if set, uses specific dns server for dnsmasq. Canbe specified multiple times.") - -nova.param('use_network_dns_servers', type='boolean', default=False, description="if set, uses the dns1 and dns2 from the network ref.as dns servers.") - -nova.param('dmz_cidr', type='list', default='', description="A list of dmz range that should be accepted") - -nova.param('force_snat_range', type='multi', default='', description="Traffic to this range will always be snatted to the fallback ip, even if it would normally be bridged out of the node. Can be specified multiple times.") - -nova.param('dnsmasq_config_file', type='string', default='', description="Override the default dnsmasq settings with this file") - -nova.param('linuxnet_interface_driver', type='string', default='nova.network.linux_net.LinuxBridgeInterfaceDriver', description="Driver used to create ethernet devices.") - -nova.param('linuxnet_ovs_integration_bridge', type='string', default='br-int', description="Name of Open vSwitch bridge used with linuxnet") - -nova.param('send_arp_for_ha', type='boolean', default=False, description="send gratuitous ARPs for HA setup") - -nova.param('send_arp_for_ha_count', type='integer', default=3, description="send this many gratuitous ARPs for HA setup") - -nova.param('use_single_default_gateway', type='boolean', default=False, description="Use single default gateway. Only first nic of vm will get default gateway from dhcp server") - -nova.param('forward_bridge_interface', type='multi', default='all', description="An interface that bridges can forward to. If this is set to all then all traffic will be forwarded. Can be specified multiple times.") - -nova.param('metadata_host', type='string', default='$my_ip', description="the ip for the metadata api server") - -nova.param('metadata_port', type='integer', default=8775, description="the port for the metadata api port") - -nova.param('iptables_top_regex', type='string', default='', description="Regular expression to match iptables rule that should always be on the top.") - -nova.param('iptables_bottom_regex', type='string', default='', description="Regular expression to match iptables rule that should always be on the bottom.") - -nova.param('iptables_drop_action', type='string', default='DROP', description="The table that iptables to jump to when a packet is to be dropped.") - -nova.param('flat_network_bridge', type='string', default=None, description="Bridge for simple network instances") - -nova.param('flat_network_dns', type='string', default='8.8.4.4', description="Dns for simple network") - -nova.param('flat_injected', type='boolean', default=False, description="Whether to attempt to inject network setup into guest") - -nova.param('flat_interface', type='string', default=None, description="FlatDhcp will bridge into this interface if set") - -nova.param('vlan_start', type='integer', default=100, description="First VLAN for private networks") - -nova.param('vlan_interface', type='string', default=None, description="vlans will bridge into this interface if set") - -nova.param('num_networks', type='integer', default=1, description="Number of networks to support") - -nova.param('vpn_ip', type='string', default='$my_ip', description="Public IP for the cloudpipe VPN servers") - -nova.param('vpn_start', type='integer', default=1000, description="First Vpn port for private networks") - -nova.param('network_size', type='integer', default=256, description="Number of addresses in each private subnet") - -nova.param('fixed_range_v6', type='string', default='fd00::/48', description="Fixed IPv6 address block") - -nova.param('gateway', type='string', default=None, description="Default IPv4 gateway") - -nova.param('gateway_v6', type='string', default=None, description="Default IPv6 gateway") - -nova.param('cnt_vpn_clients', type='integer', default=0, description="Number of addresses reserved for vpn clients") - -nova.param('fixed_ip_disassociate_timeout', type='integer', default=600, description="Seconds after which a deallocated ip is disassociated") - -nova.param('create_unique_mac_address_attempts', type='integer', default=5, description="Number of attempts to create unique mac address") - -nova.param('fake_network', type='boolean', default=False, description="If passed, use fake network devices and addresses") - -nova.param('fake_call', type='boolean', default=False, description="If True, skip using the queue and make local calls") - -nova.param('teardown_unused_network_gateway', type='boolean', default=False, description="If True, unused gateway devices") - -nova.param('force_dhcp_release', type='boolean', default=True, description="If True, send a dhcp release on instance termination") - -nova.param('share_dhcp_address', type='boolean', default=False, description="If True in multi_host mode, all compute hosts share the same dhcp address. The same IP address used for DHCP will be added on each nova-network node which is only visible to the vms on the same host.") - -nova.param('update_dns_entries', type='boolean', default=False, description="If True, when a DNS entry must be updated, it sends a fanout cast to all network hosts to update their DNS entries in multi host mode") - -nova.param('dns_update_periodic_interval', type='integer', default=-1, description="Number of seconds to wait between runs of updates to DNS entries.") - -nova.param('dhcp_domain', type='string', default='novalocal', description="domain to use for building the hostnames") - -nova.param('l3_lib', type='string', default='nova.network.l3.LinuxNetL3', description="Indicates underlying L3 management library") - -nova.param('neutron_url', type='string', default='http://127.0.0.1:9696', description="URL for connecting to neutron") - -nova.param('neutron_url_timeout', type='integer', default=30, description="timeout value for connecting to neutron in seconds") - -nova.param('neutron_admin_username', type='string', default=None, description="username for connecting to neutron in admin context") - -nova.param('neutron_admin_password', type='string', default=None, description="password for connecting to neutron in admin context") - -nova.param('neutron_admin_tenant_name', type='string', default=None, description="tenant name for connecting to neutron in admin context") - -nova.param('neutron_region_name', type='string', default=None, description="region name for connecting to neutron in admin context") - -nova.param('neutron_admin_auth_url', type='string', default='http://localhost:5000/v2.0', description="auth url for connecting to neutron in admin context") - -nova.param('neutron_api_insecure', type='boolean', default=False, description="if set, ignore any SSL validation issues") - -nova.param('neutron_auth_strategy', type='string', default='keystone', description="auth strategy for connecting to neutron in admin context") - -nova.param('neutron_ovs_bridge', type='string', default='br-int', description="Name of Integration Bridge used by Open vSwitch") - -nova.param('neutron_extension_sync_interval', type='integer', default=600, description="Number of seconds before querying neutron for extensions") - -nova.param('neutron_ca_certificates_file', type='string', default=None, description="Location of ca certicates file to use for neutronclient requests.") - -nova.param('dhcp_options_enabled', type='boolean', default=False, description="Use per-port DHCP options with Neutron") - -nova.param('network_topic', type='string', default='network', description="the topic network nodes listen on") - -nova.param('multi_host', type='boolean', default=False, description="Default value for multi_host in networks. Also, if set, some rpc network calls will be sent directly to host.") - -nova.param('security_group_api', type='string', default='nova', description="The full class name of the security API class") - -nova.param('buckets_path', type='string', default='$state_path/buckets', description="path to s3 buckets") - -nova.param('s3_listen', type='string', default='0.0.0.0', description="IP address for S3 API to listen") - -nova.param('s3_listen_port', type='integer', default=3333, description="port for s3 api to listen") - -nova.param('sqlite_db', type='string', default='nova.sqlite', description="the filename to use with sqlite") - -nova.param('sqlite_synchronous', type='boolean', default=True, description="If true, use synchronous mode for sqlite") - -nova.param('backdoor_port', type='string', default=None, description="Enable eventlet backdoor. Acceptable values are 0, and :, where 0 results in listening on a random tcp port number, results in listening on the specified port number and not enabling backdoorif it is in use and : results in listening on the smallest unused port number within the specified range of port numbers. The chosen port is displayed in the service's log file.") - -nova.param('disable_process_locking', type='boolean', default=False, description="Whether to disable inter-process locks") - -nova.param('lock_path', type='string', default=None, description="Directory to use for lock files.") - -nova.param('debug', type='boolean', default=False, description="Print debugging output") - -nova.param('verbose', type='boolean', default=False, description="Print more verbose output") - -nova.param('use_stderr', type='boolean', default=True, description="Log output to standard error") - -nova.param('logging_context_format_string', type='string', default='%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user)s %(tenant)s] %(instance)s%(message)s', description="format string to use for log messages with context") - -nova.param('logging_default_format_string', type='string', default='%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s', description="format string to use for log messages without context") - -nova.param('logging_debug_format_suffix', type='string', default='%(funcName)s %(pathname)s:%(lineno)d', description="data to append to log format when level is DEBUG") - -nova.param('logging_exception_prefix', type='string', default='%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s', description="prefix each line of exception output with this format") - -nova.param('default_log_levels', type='list', default='amqplibWARN,sqlalchemyWARN,botoWARN,sudsINFO,keystoneINFO,eventlet.wsgi.serverWARN', description="list of logger=LEVEL pairs") - -nova.param('publish_errors', type='boolean', default=False, description="publish error events") - -nova.param('fatal_deprecations', type='boolean', default=False, description="make deprecations fatal") - -nova.param('instance_format', type='string', default='"[instance: %(uuid)s] "', description="If an instance is passed with the log message, format it like this") - -nova.param('instance_uuid_format', type='string', default='"[instance: %(uuid)s] "', description="If an instance UUID is passed with the log message, format it like this") - -nova.param('log_config', type='string', default=None, description="If this option is specified, the logging configuration file specified is used and overrides any other logging options specified. Please see the Python logging module documentation for details on logging configuration files.") - -nova.param('log_format', type='string', default=None, description="DEPRECATED. A logging.Formatter log message format string which may use any of the available logging.LogRecord attributes. This option is deprecated. Please use logging_context_format_string and logging_default_format_string instead.") - -nova.param('log_date_format', type='string', default='%Y-%m-%d %H:%M:%S', description="Format string for %%(asctime)s in log records. Default: %(default)s") - -nova.param('log_file', type='string', default=None, description="(Optional) Name of log file to output to. If no default is set, logging will go to stdout.") - -nova.param('log_dir', type='string', default=None, description="(Optional) The base directory used for relative --log-file paths") - -nova.param('use_syslog', type='boolean', default=False, description="Use syslog for logging.") - -nova.param('syslog_log_facility', type='string', default='LOG_USER', description="syslog facility to receive log lines") - -nova.param('memcached_servers', type='list', default=None, description="Memcached servers or None for in process cache.") - -nova.param('notification_driver', type='multi', default='', description="Driver or drivers to handle sending notifications") - -nova.param('default_notification_level', type='string', default='INFO', description="Default notification level for outgoing notifications") - -nova.param('default_publisher_id', type='string', default=None, description="Default publisher_id for outgoing notifications") - -nova.param('notification_topics', type='list', default='notifications', description="AMQP topic used for OpenStack notifications") - -nova.param('run_external_periodic_tasks', type='boolean', default=True, description="Some periodic tasks can be run in a separate process. Should we run them here?") - -nova.param('rpc_backend', type='string', default='nova.openstack.common.rpc.impl_kombu', description="The messaging module to use, defaults to kombu.") - -nova.param('rpc_thread_pool_size', type='integer', default=64, description="Size of RPC thread pool") - -nova.param('rpc_conn_pool_size', type='integer', default=30, description="Size of RPC connection pool") - -nova.param('rpc_response_timeout', type='integer', default=60, description="Seconds to wait for a response from call or multicall") - -nova.param('rpc_cast_timeout', type='integer', default=30, description="Seconds to wait before a cast expires") - -nova.param('allowed_rpc_exception_modules', type='list', default='nova.exception,cinder.exception,exceptions', description="Modules of exceptions that are permitted to be recreatedupon receiving exception data from an rpc call.") - -nova.param('fake_rabbit', type='boolean', default=False, description="If passed, use a fake RabbitMQ provider") - -nova.param('control_exchange', type='string', default='openstack', description="AMQP exchange to connect to if using RabbitMQ or Qpid") - -nova.param('amqp_durable_queues', type='boolean', default=False, description="Use durable queues in amqp.") - -nova.param('amqp_auto_delete', type='boolean', default=False, description="Auto-delete queues in amqp.") - -nova.param('kombu_ssl_version', type='string', default='', description="SSL version to use") - -nova.param('kombu_ssl_keyfile', type='string', default='', description="SSL key file") - -nova.param('kombu_ssl_certfile', type='string', default='', description="SSL cert file") - -nova.param('kombu_ssl_ca_certs', type='string', default='', description="SSL certification authority file") - -nova.param('rabbit_host', type='string', default='localhost', description="The RabbitMQ broker address where a single node is used") - -nova.param('rabbit_port', type='integer', default=5672, description="The RabbitMQ broker port where a single node is used") - -nova.param('rabbit_hosts', type='list', default='$rabbit_host:$rabbit_port', description="RabbitMQ HA cluster host:port pairs") - -nova.param('rabbit_use_ssl', type='boolean', default=False, description="connect over SSL for RabbitMQ") - -nova.param('rabbit_userid', type='string', default='guest', description="the RabbitMQ userid") - -nova.param('rabbit_password', type='string', default='guest', description="the RabbitMQ password") - -nova.param('rabbit_virtual_host', type='string', default='/', description="the RabbitMQ virtual host") - -nova.param('rabbit_retry_interval', type='integer', default=1, description="how frequently to retry connecting with RabbitMQ") - -nova.param('rabbit_retry_backoff', type='integer', default=2, description="how long to backoff for between retries when connecting to RabbitMQ") - -nova.param('rabbit_max_retries', type='integer', default=0, description="maximum retries with trying to connect to RabbitMQ") - -nova.param('rabbit_ha_queues', type='boolean', default=False, description="use H/A queues in RabbitMQ") - -nova.param('qpid_hostname', type='string', default='localhost', description="Qpid broker hostname") - -nova.param('qpid_port', type='integer', default=5672, description="Qpid broker port") - -nova.param('qpid_hosts', type='list', default='$qpid_hostname:$qpid_port', description="Qpid HA cluster host:port pairs") - -nova.param('qpid_username', type='string', default='', description="Username for qpid connection") - -nova.param('qpid_password', type='string', default='', description="Password for qpid connection") - -nova.param('qpid_sasl_mechanisms', type='string', default='', description="Space separated list of SASL mechanisms to use for auth") - -nova.param('qpid_heartbeat', type='integer', default=60, description="Seconds between connection keepalive heartbeats") - -nova.param('qpid_protocol', type='string', default='tcp', description="Transport to use, either 'tcp' or 'ssl'") - -nova.param('qpid_tcp_nodelay', type='boolean', default=True, description="Disable Nagle algorithm") - -nova.param('qpid_topology_version', type='integer', default=1, description="The qpid topology version to use. Version 1 is what was originally used by impl_qpid. Version 2 includes some backwards-incompatible changes that allow broker federation to work. Users should update to version 2 when they are able to take everything down, as it requires a clean break.") - -nova.param('rpc_zmq_bind_address', type='string', default='*', description="ZeroMQ bind address. Should be a wildcard") - -nova.param('rpc_zmq_matchmaker', type='string', default='nova.openstack.common.rpc.matchmaker.MatchMakerLocalhost', description="MatchMaker driver") - -nova.param('rpc_zmq_port', type='integer', default=9501, description="ZeroMQ receiver listening port") - -nova.param('rpc_zmq_contexts', type='integer', default=1, description="Number of ZeroMQ contexts, defaults to 1") - -nova.param('rpc_zmq_topic_backlog', type='integer', default=None, description="Maximum number of ingress messages to locally buffer per topic. Default is unlimited.") - -nova.param('rpc_zmq_ipc_dir', type='string', default='/var/run/openstack', description="Directory for holding IPC sockets") - -nova.param('rpc_zmq_host', type='string', default='nova', description="Name of this node. Must be a valid hostname, FQDN, or IP address. Must match 'host' option, if running Nova.") - -nova.param('matchmaker_heartbeat_freq', type='integer', default=300, description="Heartbeat frequency") - -nova.param('matchmaker_heartbeat_ttl', type='integer', default=600, description="Heartbeat time-to-live.") - -nova.param('pci_alias', type='multi', default='', description="An alias for a PCI passthrough device requirement. This allows users to specify the alias in the extra_spec for a flavor, without needing to repeat all the PCI property requirements. For example: pci_alias = { 'name': 'QuicAssist', 'product_id': '0443', 'vendor_id': '8086', 'device_type': 'ACCEL' } defines an alias for the Intel QuickAssist card.") - -nova.param('pci_passthrough_whitelist', type='multi', default='', description="White list of PCI devices available to VMs. For example: pci_passthrough_whitelist = [{'vendor_id': '8086', 'product_id': '0443'}]") - -nova.param('scheduler_host_manager', type='string', default='nova.scheduler.host_manager.HostManager', description="The scheduler host manager class to use") - -nova.param('scheduler_max_attempts', type='integer', default=3, description="Maximum number of attempts to schedule an instance") - -nova.param('scheduler_host_subset_size', type='integer', default=1, description="New instances will be scheduled on a host chosen randomly from a subset of the N best hosts. This property defines the subset size that a host is chosen from. A value of 1 chooses the first host returned by the weighing functions. This value must be at least 1. Any value less than 1 will be ignored, and 1 will be used instead") - -nova.param('cpu_allocation_ratio', type='floating point', default='16.0', description="Virtual CPU to physical CPU allocation ratio which affects all CPU filters. This configuration specifies a global ratio for CoreFilter. For AggregateCoreFilter, it will fall back to this configuration value if no per-aggregate setting found.") - -nova.param('disk_allocation_ratio', type='floating point', default='1.0', description="virtual disk to physical disk allocation ratio") - -nova.param('max_io_ops_per_host', type='integer', default=8, description="Ignore hosts that have too many builds/resizes/snaps/migrations") - -nova.param('isolated_images', type='list', default='', description="Images to run on isolated host") - -nova.param('isolated_hosts', type='list', default='', description="Host reserved for specific images") - -nova.param('restrict_isolated_hosts_to_isolated_images', type='boolean', default=True, description="Whether to force isolated hosts to run only isolated images") - -nova.param('max_instances_per_host', type='integer', default=50, description="Ignore hosts that have too many instances") - -nova.param('ram_allocation_ratio', type='floating point', default='1.5', description="Virtual ram to physical ram allocation ratio which affects all ram filters. This configuration specifies a global ratio for RamFilter. For AggregateRamFilter, it will fall back to this configuration value if no per-aggregate setting found.") - -nova.param('scheduler_available_filters', type='multi', default='nova.scheduler.filters.all_filters', description="Filter classes available to the scheduler which may be specified more than once. An entry of 'nova.scheduler.filters.standard_filters' maps to all filters included with nova.") - -nova.param('scheduler_default_filters', type='list', default='RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter', description="Which filter class names to use for filtering hosts when not specified in the request.") - -nova.param('scheduler_weight_classes', type='list', default='nova.scheduler.weights.all_weighers', description="Which weight class names to use for weighing hosts") - -nova.param('scheduler_driver', type='string', default='nova.scheduler.filter_scheduler.FilterScheduler', description="Default driver to use for the scheduler") - -nova.param('scheduler_topic', type='string', default='scheduler', description="the topic scheduler nodes listen on") - -nova.param('scheduler_json_config_location', type='string', default='', description="Absolute path to scheduler configuration JSON file.") - -nova.param('ram_weight_multiplier', type='floating point', default='1.0', description="Multiplier used for weighing ram. Negative numbers mean to stack vs spread.") - -nova.param('servicegroup_driver', type='string', default='db', description="The driver for servicegroup service") - -nova.param('config_drive_format', type='string', default='iso9660', description="Config drive format. One of iso9660") - -nova.param('config_drive_tempdir', type='string', default=None, description="Where to put temporary files associated with config drive creation") - -nova.param('force_config_drive', type='string', default=None, description="Set to force injection to take place on a config drive") - -nova.param('mkisofs_cmd', type='string', default='genisoimage', description="Name and optionally path of the tool used for ISO image creation") - -nova.param('injected_network_template', type='string', default='$pybasedir/nova/virt/interfaces.template', description="Template file for injected network") - -nova.param('virt_mkfs', type='multi', default='defaultmkfs.ext3 -L %(fs_label)s -F %(target)s', description="mkfs commands for ephemeral device. The format is =") - -nova.param('virt_mkfs', type='string', default='linuxmkfs.ext3 -L %(fs_label)s -F %(target)s', description="") - -nova.param('virt_mkfs', type='string', default='windowsmkfs.ntfs --force --fast --label %(fs_label)s %(target)s', description="") - -nova.param('resize_fs_using_block_device', type='boolean', default=True, description="Attempt to resize the filesystem by accessing the image over a block device. This is done by the host and may not be necessary if the image contains a recent version of cloud- init. Possible mechanisms require the nbd driver") - -nova.param('timeout_nbd', type='integer', default=10, description="time to wait for a NBD device coming up") - -nova.param('docker_registry_default_port', type='integer', default=5042, description="Default TCP port to find the docker-registry container") - -nova.param('compute_driver', type='string', default=None, description="Driver to use for controlling virtualization. Options include: libvirt.LibvirtDriver, xenapi.XenAPIDriver, fake.FakeDriver, baremetal.BareMetalDriver, vmwareapi.VMwareESXDriver, vmwareapi.VMwareVCDriver") - -nova.param('default_ephemeral_format', type='string', default=None, description="The default format an ephemeral_volume will be formatted with on creation.") - -nova.param('preallocate_images', type='string', default='none', description="VM image preallocation mode: 'none' => no storage provisioning is done up front, 'space' => storage is fully allocated at instance start") - -nova.param('use_cow_images', type='boolean', default=True, description="Whether to use cow images") - -nova.param('firewall_driver', type='string', default=None, description="Firewall driver") - -nova.param('allow_same_net_traffic', type='boolean', default=True, description="Whether to allow network traffic from same network") - -nova.param('force_raw_images', type='boolean', default=True, description="Force backing images to raw format") - -nova.param('rescue_image_id', type='string', default=None, description="Rescue ami image") - -nova.param('rescue_kernel_id', type='string', default=None, description="Rescue aki image") - -nova.param('rescue_ramdisk_id', type='string', default=None, description="Rescue ari image") - -nova.param('libvirt_type', type='string', default='kvm', description="Libvirt domain type") - -nova.param('libvirt_uri', type='string', default='', description="Override the default libvirt URI") - -nova.param('libvirt_inject_password', type='boolean', default=False, description="Inject the admin password at boot time, without an agent.") - -nova.param('libvirt_inject_key', type='boolean', default=True, description="Inject the ssh public key at boot time") - -nova.param('libvirt_inject_partition', type='integer', default=1, description="The partition to inject to : -2 => disable, -1 => inspect") - -nova.param('use_usb_tablet', type='boolean', default=True, description="Sync virtual and real mouse cursors in Windows VMs") - -nova.param('live_migration_uri', type='string', default='qemu+tcp://%s/system', description="Migration target URI") - -nova.param('live_migration_flag', type='string', default='VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_PEER2PEER', description="Migration flags to be set for live migration") - -nova.param('block_migration_flag', type='string', default='VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_PEER2PEER, VIR_MIGRATE_NON_SHARED_INC', description="Migration flags to be set for block migration") - -nova.param('live_migration_bandwidth', type='integer', default=0, description="Maximum bandwidth to be used during migration, in Mbps") - -nova.param('snapshot_image_format', type='string', default=None, description="Snapshot image format") - -nova.param('libvirt_vif_driver', type='string', default='nova.virt.libvirt.vif.LibvirtGenericVIFDriver', description="The libvirt VIF driver to configure the VIFs.") - -nova.param('libvirt_volume_drivers', type='list', default='iscsinova.virt.libvirt.volume.LibvirtISCSIVolumeDriver,isernova.virt.libvirt.volume.LibvirtISERVolumeDriver,localnova.virt.libvirt.volume.LibvirtVolumeDriver,fakenova.virt.libvirt.volume.LibvirtFakeVolumeDriver,rbdnova.virt.libvirt.volume.LibvirtNetVolumeDriver,sheepdognova.virt.libvirt.volume.LibvirtNetVolumeDriver,nfsnova.virt.libvirt.volume.LibvirtNFSVolumeDriver,aoenova.virt.libvirt.volume.LibvirtAOEVolumeDriver,glusterfsnova.virt.libvirt.volume.LibvirtGlusterfsVolumeDriver,fibre_channelnova.virt.libvirt.volume.LibvirtFibreChannelVolumeDriver,scalitynova.virt.libvirt.volume.LibvirtScalityVolumeDriver', description="Libvirt handlers for remote volumes.") - -nova.param('libvirt_disk_prefix', type='string', default=None, description="Override the default disk prefix for the devices attached to a server, which is dependent on libvirt_type.") - -nova.param('libvirt_wait_soft_reboot_seconds', type='integer', default=120, description="Number of seconds to wait for instance to shut down after soft reboot request is made. We fall back to hard reboot if instance does not shutdown within this window.") - -nova.param('libvirt_nonblocking', type='boolean', default=True, description="Use a separated OS thread pool to realize non-blocking libvirt calls") - -nova.param('libvirt_cpu_mode', type='string', default=None, description="Set to 'host-model' to clone the host CPU feature flags; to 'host-passthrough' to use the host CPU model exactly; to 'custom' to use a named CPU model; to 'none' to not set any CPU model. If libvirt_type='kvm|qemu', it will default to 'host-model', otherwise it will default to 'none'") - -nova.param('libvirt_cpu_model', type='string', default=None, description="Set to a named libvirt CPU model") - -nova.param('libvirt_snapshots_directory', type='string', default='$instances_path/snapshots', description="Location where libvirt driver will store snapshots before uploading them to image service") - -nova.param('xen_hvmloader_path', type='string', default='/usr/lib/xen/boot/hvmloader', description="Location where the Xen hvmloader is kept") - -nova.param('disk_cachemodes', type='list', default='', description="Specific cachemodes to use for different disk types e.g: ['file=directsync','block=none']") - -nova.param('vcpu_pin_set', type='string', default=None, description="Which pcpus can be used by vcpus of instance e.g: '4-12,^8,15'") - -nova.param('libvirt_images_type', type='string', default='default', description="VM Images format. Acceptable values are: raw, qcow2, lvm,rbd, default. If default is specified, then use_cow_images flag is used instead of this one.") - -nova.param('libvirt_images_volume_group', type='string', default=None, description="LVM Volume Group that is used for VM images, when you specify libvirt_images_type=lvm.") - -nova.param('libvirt_sparse_logical_volumes', type='boolean', default=False, description="Create sparse logical volumes") - -nova.param('libvirt_lvm_snapshot_size', type='integer', default=1000, description="The amount of storage") - -nova.param('libvirt_images_rbd_pool', type='string', default='rbd', description="the RADOS pool in which rbd volumes are stored") - -nova.param('libvirt_images_rbd_ceph_conf', type='string', default='', description="path to the ceph configuration file to use") - -nova.param('base_dir_name', type='string', default='_base', description="Where cached images are stored under $instances_path.This is NOT the full path - just a folder name.For per-compute-host cached images, set to _base_$my_ip") - -nova.param('image_info_filename_pattern', type='string', default='$instances_path/$base_dir_name/%(image)s.info', description="Allows image information files to be stored in non-standard locations") - -nova.param('remove_unused_base_images', type='boolean', default=True, description="Should unused base images be removed?") - -nova.param('remove_unused_kernels', type='boolean', default=False, description="Should unused kernel images be removed? This is only safe to enable if all compute nodes have been updated to support this option. This will enabled by default in future.") - -nova.param('remove_unused_resized_minimum_age_seconds', type='integer', default=3600, description="Unused resized base images younger than this will not be removed") - -nova.param('remove_unused_original_minimum_age_seconds', type='integer', default=86400, description="Unused unresized base images younger than this will not be removed") - -nova.param('checksum_base_images', type='boolean', default=False, description="Write a checksum for files in _base to disk") - -nova.param('checksum_interval_seconds', type='integer', default=3600, description="How frequently to checksum base images") - -nova.param('libvirt_snapshot_compression', type='boolean', default=False, description="Compress snapshot images when possible. This currently applies exclusively to qcow2 images") - -nova.param('libvirt_ovs_bridge', type='string', default='br-int', description="Name of Integration Bridge used by Open vSwitch") - -nova.param('libvirt_use_virtio_for_bridges', type='boolean', default=True, description="Use virtio for bridge interfaces with KVM/QEMU") - -nova.param('num_iscsi_scan_tries', type='integer', default=3, description="number of times to rescan iSCSI target to find volume") - -nova.param('num_iser_scan_tries', type='integer', default=3, description="number of times to rescan iSER target to find volume") - -nova.param('rbd_user', type='string', default=None, description="the RADOS client name for accessing rbd volumes") - -nova.param('rbd_secret_uuid', type='string', default=None, description="the libvirt uuid of the secret for the rbd_uservolumes") - -nova.param('nfs_mount_point_base', type='string', default='$state_path/mnt', description="Dir where the nfs volume is mounted on the compute node") - -nova.param('nfs_mount_options', type='string', default=None, description="Mount options passed to the nfs client. See section of the nfs man page for details") - -nova.param('num_aoe_discover_tries', type='integer', default=3, description="number of times to rediscover AoE target to find volume") - -nova.param('glusterfs_mount_point_base', type='string', default='$state_path/mnt', description="Dir where the glusterfs volume is mounted on the compute node") - -nova.param('libvirt_iscsi_use_multipath', type='boolean', default=False, description="use multipath connection of the iSCSI volume") - -nova.param('libvirt_iser_use_multipath', type='boolean', default=False, description="use multipath connection of the iSER volume") - -nova.param('scality_sofs_config', type='string', default=None, description="Path or URL to Scality SOFS configuration file") - -nova.param('scality_sofs_mount_point', type='string', default='$state_path/scality', description="Base dir where Scality SOFS shall be mounted") - -nova.param('qemu_allowed_storage_drivers', type='list', default='', description="Protocols listed here will be accessed directly from QEMU. Currently supported protocols: [gluster]") - -nova.param('powervm_mgr_type', type='string', default='ivm', description="PowerVM manager type") - -nova.param('powervm_mgr', type='string', default=None, description="PowerVM manager host or ip") - -nova.param('powervm_mgr_user', type='string', default=None, description="PowerVM manager user name") - -nova.param('powervm_mgr_passwd', type='string', default=None, description="PowerVM manager user password") - -nova.param('powervm_img_remote_path', type='string', default='/home/padmin', description="PowerVM image remote path where images will be moved. Make sure this path can fit your biggest image in glance") - -nova.param('powervm_img_local_path', type='string', default='/tmp', description="Local directory to download glance images to. Make sure this path can fit your biggest image in glance") - -nova.param('agent_timeout', type='integer', default=30, description="number of seconds to wait for agent reply") - -nova.param('agent_version_timeout', type='integer', default=300, description="number of seconds to wait for agent to be fully operational") - -nova.param('agent_resetnetwork_timeout', type='integer', default=60, description="number of seconds to wait for agent reply to resetnetwork request") - -nova.param('xenapi_agent_path', type='string', default='usr/sbin/xe-update-networking', description="Specifies the path in which the xenapi guest agent should be located. If the agent is present, network configuration is not injected into the image. Used if compute_driver=xenapi.XenAPIDriver and flat_injected=True") - -nova.param('xenapi_disable_agent', type='boolean', default=False, description="Disables the use of the XenAPI agent in any image regardless of what image properties are present. ") - -nova.param('xenapi_use_agent_default', type='boolean', default=False, description="Determines if the xenapi agent should be used when the image used does not contain a hint to declare if the agent is present or not. The hint is a glance property 'xenapi_use_agent' that has the value 'true' or 'false'. Note that waiting for the agent when it is not present will significantly increase server boot times.") - -nova.param('xenapi_connection_url', type='string', default=None, description="URL for connection to XenServer/Xen Cloud Platform. A special value of unix://local can be used to connect to the local unix socket. Required if compute_driver=xenapi.XenAPIDriver") - -nova.param('xenapi_connection_username', type='string', default='root', description="Username for connection to XenServer/Xen Cloud Platform. Used only if compute_driver=xenapi.XenAPIDriver") - -nova.param('xenapi_connection_password', type='string', default=None, description="Password for connection to XenServer/Xen Cloud Platform. Used only if compute_driver=xenapi.XenAPIDriver") - -nova.param('xenapi_connection_concurrent', type='integer', default=5, description="Maximum number of concurrent XenAPI connections. Used only if compute_driver=xenapi.XenAPIDriver") - -nova.param('xenapi_vhd_coalesce_poll_interval', type='floating point', default='5.0', description="The interval used for polling of coalescing vhds. Used only if compute_driver=xenapi.XenAPIDriver") - -nova.param('xenapi_check_host', type='boolean', default=True, description="Ensure compute service is running on host XenAPI connects to.") - -nova.param('xenapi_vhd_coalesce_max_attempts', type='integer', default=5, description="Max number of times to poll for VHD to coalesce. Used only if compute_driver=xenapi.XenAPIDriver") - -nova.param('xenapi_sr_base_path', type='string', default='/var/run/sr-mount', description="Base path to the storage repository") - -nova.param('target_host', type='string', default=None, description="iSCSI Target Host") - -nova.param('target_port', type='string', default='3260', description="iSCSI Target Port, 3260 Default") - -nova.param('iqn_prefix', type='string', default='iqn.2010-10.org.openstack', description="IQN Prefix") - -nova.param('xenapi_remap_vbd_dev', type='boolean', default=False, description="Used to enable the remapping of VBD dev") - -nova.param('xenapi_remap_vbd_dev_prefix', type='string', default='sd', description="Specify prefix to remap VBD dev to") - -nova.param('xenapi_login_timeout', type='integer', default=10, description="Timeout in seconds for XenAPI login.") - -nova.param('xenapi_torrent_base_url', type='string', default=None, description="Base URL for torrent files.") - -nova.param('xenapi_torrent_seed_chance', type='floating point', default='1.0', description="Probability that peer will become a seeder.") - -nova.param('xenapi_torrent_seed_duration', type='integer', default=3600, description="Number of seconds after downloading an image via BitTorrent that it should be seeded for other peers.") - -nova.param('xenapi_torrent_max_last_accessed', type='integer', default=86400, description="Cached torrent files not accessed within this number of seconds can be reaped") - -nova.param('xenapi_torrent_listen_port_start', type='integer', default=6881, description="Beginning of port range to listen on") - -nova.param('xenapi_torrent_listen_port_end', type='integer', default=6891, description="End of port range to listen on") - -nova.param('xenapi_torrent_download_stall_cutoff', type='integer', default=600, description="Number of seconds a download can remain at the same progress percentage w/o being considered a stall") - -nova.param('xenapi_torrent_max_seeder_processes_per_host', type='integer', default=1, description="Maximum number of seeder processes to run concurrently within a given dom0.") - -nova.param('use_join_force', type='boolean', default=True, description="To use for hosts with different CPUs") - -nova.param('xenapi_ovs_integration_bridge', type='string', default='xapi1', description="Name of Integration Bridge used by Open vSwitch") - -nova.param('cache_images', type='string', default='all', description="Cache glance images locally. `all` will cache all images, `some` will only cache images that have the image_property `cache_in_nova=True`, and `none` turns off caching entirely") - -nova.param('xenapi_image_compression_level', type='integer', default=None, description="Compression level for images, e.g., 9 for gzip -9. Range is 1-9, 9 being most compressed but most CPU intensive on dom0.") - -nova.param('default_os_type', type='string', default='linux', description="Default OS type") - -nova.param('block_device_creation_timeout', type='integer', default=10, description="Time to wait for a block device to be created") - -nova.param('max_kernel_ramdisk_size', type='integer', default=16777216, description="Maximum size in bytes of kernel or ramdisk images") - -nova.param('sr_matching_filter', type='string', default='default-sr:true', description="Filter for finding the SR to be used to install guest instances on. To use the Local Storage in default XenServer/XCP installations set this flag to other-config :i18n-key=local-storage. To select an SR with a different matching criteria, you could set it to other- config:my_favorite_sr=true. On the other hand, to fall back on the Default SR, as displayed by XenCenter, set this flag to: default-sr:true") - -nova.param('xenapi_sparse_copy', type='boolean', default=True, description="Whether to use sparse_copy for copying data on a resize down") - -nova.param('xenapi_num_vbd_unplug_retries', type='integer', default=10, description="Maximum number of retries to unplug VBD") - -nova.param('xenapi_torrent_images', type='string', default='none', description="Whether or not to download images via Bit Torrent") - -nova.param('xenapi_ipxe_network_name', type='string', default=None, description="Name of network to use for booting iPXE ISOs") - -nova.param('xenapi_ipxe_boot_menu_url', type='string', default=None, description="URL to the iPXE boot menu") - -nova.param('xenapi_ipxe_mkisofs_cmd', type='string', default='mkisofs', description="Name and optionally path of the tool used for ISO image creation") - -nova.param('xenapi_running_timeout', type='integer', default=60, description="number of seconds to wait for instance to go to running state") - -nova.param('xenapi_vif_driver', type='string', default='nova.virt.xenapi.vif.XenAPIBridgeDriver', description="The XenAPI VIF driver using XenServer Network APIs.") - -nova.param('xenapi_image_upload_handler', type='string', default='nova.virt.xenapi.image.glance.GlanceStore', description="Dom0 plugin driver used to handle image uploads.") - -nova.param('novncproxy_base_url', type='string', default='http://127.0.0.1:6080/vnc_auto.html', description="location of vnc console proxy, in the form 'http://127.0.0.1:6080/vnc_auto.html'") - -nova.param('xvpvncproxy_base_url', type='string', default='http://127.0.0.1:6081/console', description="location of nova xvp vnc console proxy, in the form 'http://127.0.0.1:6081/console'") - -nova.param('vncserver_listen', type='string', default='127.0.0.1', description="IP address on which instance vncservers should listen") - -nova.param('vncserver_proxyclient_address', type='string', default='127.0.0.1', description="the address to which proxy clients") - -nova.param('vnc_enabled', type='boolean', default=True, description="enable vnc related features") - -nova.param('vnc_keymap', type='string', default='en-us', description="keymap for vnc") - -nova.param('xvpvncproxy_port', type='integer', default=6081, description="Port that the XCP VNC proxy should bind to") - -nova.param('xvpvncproxy_host', type='string', default='0.0.0.0', description="Address that the XCP VNC proxy should bind to") - -nova.param('volume_api_class', type='string', default='nova.volume.cinder.API', description="The full class name of the volume API class to use") - -nova.param('cinder_catalog_info', type='string', default='volume:cinder:publicURL', description="Info to match when looking for cinder in the service catalog. Format is : separated values of the form: ::") - -nova.param('cinder_endpoint_template', type='string', default=None, description="Override service catalog lookup with template for cinder endpoint e.g. http://localhost:8776/v1/%(project_id)s") - -nova.param('os_region_name', type='string', default=None, description="region name of this node") - -nova.param('cinder_ca_certificates_file', type='string', default=None, description="Location of ca certicates file to use for cinder client requests.") - -nova.param('cinder_http_retries', type='integer', default=3, description="Number of cinderclient retries on failed http calls") - -nova.param('cinder_api_insecure', type='boolean', default=False, description="Allow to perform insecure SSL requests to cinder") - -nova.param('cinder_cross_az_attach', type='boolean', default=True, description="Allow attach between instance and volume in different availability zones.") - -nova.param('sql_connection', type='string', default='sqlite:////nova/openstack/common/db/$sqlite_db', description="The SQLAlchemy connection string used to connect to the database", deprecation_message='Deprecated in favor of "[database]connection" parameter') +nova.param( + 'web', + type='string', + default='/usr/share/spice-html5', + description="Run webserver on same port. Serve files from DIR.") + +nova.param( + 'novncproxy_host', + type='string', + default='0.0.0.0', + description="Host on which to listen for incoming requests") + +nova.param( + 'novncproxy_port', + type='integer', + default=6080, + description="Port on which to listen for incoming requests") + +nova.param( + 'spicehtml5proxy_host', + type='string', + default='0.0.0.0', + description="Host on which to listen for incoming requests") + +nova.param( + 'spicehtml5proxy_port', + type='integer', + default=6082, + description="Port on which to listen for incoming requests") + +nova.param( + 'allow_resize_to_same_host', + type='boolean', + default=False, + description="Allow destination machine to match source for resize. Useful when testing in single-host environments.") + +nova.param( + 'allow_migrate_to_same_host', + type='boolean', + default=False, + description="Allow migrate machine to the same host. Useful when testing in single-host environments.") + +nova.param( + 'default_schedule_zone', + type='string', + default=None, + description="availability zone to use when user doesn't specify one") + +nova.param( + 'non_inheritable_image_properties', + type='list', + default='cache_in_nova,bittorrent', + description="These are image properties which a snapshot should not inherit from an instance") + +nova.param( + 'null_kernel', + type='string', + default='nokernel', + description="kernel image that indicates not to use a kernel, but to use a raw disk image instead") + +nova.param( + 'multi_instance_display_name_template', + type='string', + default='%(name)s-%(uuid)s', + description="When creating multiple instances with a single request using the os-multiple-create API extension, this template will be used to build the display name for each instance. The benefit is that the instances end up with different hostnames. To restore legacy behavior of every instance having the same name, set this option to '%(name)s'. Valid keys for the template are: name, uuid, count.") + +nova.param( + 'max_local_block_devices', + type='integer', + default=3, + description="Maximum number of devices that will result in a local image being created on the hypervisor node. Setting this to 0 means nova will allow only boot from volume. A negative number means unlimited.") + +nova.param( + 'default_flavor', + type='string', + default='m1.small', + description="default flavor to use for the EC2 API only. The Nova API does not support a default flavor.") + +nova.param( + 'console_host', + type='string', + default='nova', + description="Console proxy host to use to connect to instances on this host.") + +nova.param( + 'default_access_ip_network_name', + type='string', + default=None, + description="Name of network to use to set access ips for instances") + +nova.param( + 'defer_iptables_apply', + type='boolean', + default=False, + description="Whether to batch up the application of IPTables rules during a host restart and apply all at the end of the init phase") + +nova.param( + 'instances_path', + type='string', + default='$state_path/instances', + description="where instances are stored on disk") + +nova.param( + 'instance_usage_audit', + type='boolean', + default=False, + description="Generate periodic compute.instance.exists notifications") + +nova.param( + 'live_migration_retry_count', + type='integer', + default=30, + description="Number of 1 second retries needed in live_migration") + +nova.param( + 'resume_guests_state_on_host_boot', + type='boolean', + default=False, + description="Whether to start guests that were running before the host rebooted") + +nova.param( + 'network_allocate_retries', + type='integer', + default=0, + description="Number of times to retry network allocation on failures") + +nova.param( + 'maximum_instance_delete_attempts', + type='integer', + default=5, + description="The number of times to attempt to reap an instances files.") + +nova.param( + 'bandwidth_poll_interval', + type='integer', + default=600, + description="interval to pull bandwidth usage info") + +nova.param( + 'sync_power_state_interval', + type='integer', + default=600, + description="interval to sync power states between the database and the hypervisor") + +nova.param( + 'heal_instance_info_cache_interval', + type='integer', + default=60, + description="Number of seconds between instance info_cache self healing updates") + +nova.param( + 'host_state_interval', + type='integer', + default=120, + description="Interval in seconds for querying the host status") + +nova.param( + 'image_cache_manager_interval', + type='integer', + default=2400, + description="Number of seconds to wait between runs of the image cache manager") + +nova.param( + 'reclaim_instance_interval', + type='integer', + default=0, + description="Interval in seconds for reclaiming deleted instances") + +nova.param( + 'volume_usage_poll_interval', + type='integer', + default=0, + description="Interval in seconds for gathering volume usages") + +nova.param( + 'shelved_poll_interval', + type='integer', + default=3600, + description="Interval in seconds for polling shelved instances to offload") + +nova.param( + 'shelved_offload_time', + type='integer', + default=0, + description="Time in seconds before a shelved instance is eligible for removing from a host. -1 never offload, 0 offload when shelved") + +nova.param( + 'instance_delete_interval', + type='integer', + default=300, + description="Interval in seconds for retrying failed instance file deletes") + +nova.param( + 'running_deleted_instance_action', + type='string', + default='log', + description="Action to take if a running deleted instance is detected.Valid options are 'noop', 'log' and 'reap'. Set to 'noop' to disable.") + +nova.param( + 'running_deleted_instance_poll_interval', + type='integer', + default=1800, + description="Number of seconds to wait between runs of the cleanup task.") + +nova.param( + 'running_deleted_instance_timeout', + type='integer', + default=0, + description="Number of seconds after being deleted when a running instance should be considered eligible for cleanup.") + +nova.param( + 'reboot_timeout', + type='integer', + default=0, + description="Automatically hard reboot an instance if it has been stuck in a rebooting state longer than N seconds. Set to 0 to disable.") + +nova.param( + 'instance_build_timeout', + type='integer', + default=0, + description="Amount of time in seconds an instance can be in BUILD before going into ERROR status.Set to 0 to disable.") + +nova.param( + 'rescue_timeout', + type='integer', + default=0, + description="Automatically unrescue an instance after N seconds. Set to 0 to disable.") + +nova.param( + 'resize_confirm_window', + type='integer', + default=0, + description="Automatically confirm resizes after N seconds. Set to 0 to disable.") + +nova.param( + 'reserved_host_disk_mb', + type='integer', + default=0, + description="Amount of disk in MB to reserve for the host") + +nova.param( + 'reserved_host_memory_mb', + type='integer', + default=512, + description="Amount of memory in MB to reserve for the host") + +nova.param( + 'compute_stats_class', + type='string', + default='nova.compute.stats.Stats', + description="Class that will manage stats for the local compute host") + +nova.param( + 'compute_topic', + type='string', + default='compute', + description="the topic compute nodes listen on") + +nova.param( + 'migrate_max_retries', + type='integer', + default=-1, + description="Number of times to retry live-migration before failing. If == -1, try until out of hosts. If == 0, only try once, no retries.") + +nova.param( + 'console_driver', + type='string', + default='nova.console.xvp.XVPConsoleProxy', + description="Driver to use for the console proxy") + +nova.param( + 'stub_compute', + type='boolean', + default=False, + description="Stub calls to compute worker for tests") + +nova.param( + 'console_public_hostname', + type='string', + default='nova', + description="Publicly visible name for this console host") + +nova.param( + 'console_topic', + type='string', + default='console', + description="the topic console proxy nodes listen on") + +nova.param( + 'console_vmrc_port', + type='integer', + default=443, + description="port for VMware VMRC connections") + +nova.param( + 'console_vmrc_error_retries', + type='integer', + default=10, + description="number of retries for retrieving VMRC information") + +nova.param( + 'console_xvp_conf_template', + type='string', + default='$pybasedir/nova/console/xvp.conf.template', + description="XVP conf template") + +nova.param( + 'console_xvp_conf', + type='string', + default='/etc/xvp.conf', + description="generated XVP conf file") + +nova.param( + 'console_xvp_pid', + type='string', + default='/var/run/xvp.pid', + description="XVP master process pid file") + +nova.param( + 'console_xvp_log', + type='string', + default='/var/log/xvp.log', + description="XVP log file") + +nova.param( + 'console_xvp_multiplex_port', + type='integer', + default=5900, + description="port for XVP to multiplex VNC connections on") + +nova.param( + 'consoleauth_topic', + type='string', + default='consoleauth', + description="the topic console auth proxy nodes listen on") + +nova.param( + 'console_token_ttl', + type='integer', + default=600, + description="How many seconds before deleting tokens") + +nova.param( + 'consoleauth_manager', + type='string', + default='nova.consoleauth.manager.ConsoleAuthManager', + description="Manager for console auth") + +nova.param( + 'enable_new_services', + type='boolean', + default=True, + description="Services to be added to the available pool on create") + +nova.param( + 'instance_name_template', + type='string', + default='instance-%08x', + description="Template string to be used to generate instance names") + +nova.param( + 'snapshot_name_template', + type='string', + default='snapshot-%s', + description="Template string to be used to generate snapshot names") + +nova.param( + 'db_driver', + type='string', + default='nova.db', + description="driver to use for database access") + +nova.param( + 'osapi_compute_unique_server_name_scope', + type='string', + default='', + description="When set, compute API will consider duplicate hostnames invalid within the specified scope, regardless of case. Should be empty, 'project' or 'global'.") + +nova.param( + 'glance_host', + type='string', + default='$my_ip', + description="default glance hostname or ip") + +nova.param( + 'glance_port', + type='integer', + default=9292, + description="default glance port") + +nova.param( + 'glance_protocol', + type='string', + default='http', + description="Default protocol to use when connecting to glance. Set to https for SSL.") + +nova.param( + 'glance_api_servers', + type='list', + default='$glance_host:$glance_port', + description="A list of the glance api servers available to nova. Prefix with https:// for ssl-based glance api servers.") + +nova.param( + 'glance_api_insecure', + type='boolean', + default=False, + description="Allow to perform insecure SSL") + +nova.param( + 'glance_num_retries', + type='integer', + default=0, + description="Number retries when downloading an image from glance") + +nova.param( + 'allowed_direct_url_schemes', + type='list', + default='', + description="A list of url scheme that can be downloaded directly via the direct_url. Currently supported schemes: [file].") + +nova.param( + 'image_decryption_dir', + type='string', + default='/tmp', + description="parent dir for tempdir used for image decryption") + +nova.param( + 's3_host', + type='string', + default='$my_ip', + description="hostname or ip for OpenStack to use when accessing the s3 api") + +nova.param( + 's3_port', + type='integer', + default=3333, + description="port used when accessing the s3 api") + +nova.param( + 's3_access_key', + type='string', + default='notchecked', + description="access key to use for s3 server for images") + +nova.param( + 's3_secret_key', + type='string', + default='notchecked', + description="secret key to use for s3 server for images") + +nova.param( + 's3_use_ssl', + type='boolean', + default=False, + description="whether to use ssl when talking to s3") + +nova.param( + 's3_affix_tenant', + type='boolean', + default=False, + description="whether to affix the tenant id to the access key when downloading from s3") + +nova.param( + 'ipv6_backend', + type='string', + default='rfc2462', + description="Backend to use for IPv6 generation") + +nova.param( + 'network_api_class', + type='string', + default='nova.network.api.API', + description="The full class name of the network API class to use") + +nova.param( + 'network_driver', + type='string', + default='nova.network.linux_net', + description="Driver to use for network creation") + +nova.param( + 'default_floating_pool', + type='string', + default='nova', + description="Default pool for floating ips") + +nova.param( + 'auto_assign_floating_ip', + type='boolean', + default=False, + description="Autoassigning floating ip to VM") + +nova.param( + 'floating_ip_dns_manager', + type='string', + default='nova.network.noop_dns_driver.NoopDNSDriver', + description="full class name for the DNS Manager for floating IPs") + +nova.param( + 'instance_dns_manager', + type='string', + default='nova.network.noop_dns_driver.NoopDNSDriver', + description="full class name for the DNS Manager for instance IPs") + +nova.param( + 'instance_dns_domain', + type='string', + default='', + description="full class name for the DNS Zone for instance IPs") + +nova.param( + 'ldap_dns_url', + type='string', + default='ldap://ldap.example.com:389', + description="URL for ldap server which will store dns entries") + +nova.param( + 'ldap_dns_user', + type='string', + default='uidadmin,oupeople,dcexample,dcorg', + description="user for ldap DNS") + +nova.param( + 'ldap_dns_password', + type='string', + default='password', + description="password for ldap DNS") + +nova.param( + 'ldap_dns_soa_hostmaster', + type='string', + default='hostmaster@example.org', + description="Hostmaster for ldap dns driver Statement of Authority") + +nova.param( + 'ldap_dns_servers', + type='multi', + default='dns.example.org', + description="DNS Servers for ldap dns driver") + +nova.param( + 'ldap_dns_base_dn', + type='string', + default='ouhosts,dcexample,dcorg', + description="Base DN for DNS entries in ldap") + +nova.param( + 'ldap_dns_soa_refresh', + type='string', + default='1800', + description="Refresh interval") + +nova.param( + 'ldap_dns_soa_retry', + type='string', + default='3600', + description="Retry interval") + +nova.param( + 'ldap_dns_soa_expiry', + type='string', + default='86400', + description="Expiry interval") + +nova.param( + 'ldap_dns_soa_minimum', + type='string', + default='7200', + description="Minimum interval") + +nova.param( + 'dhcpbridge_flagfile', + type='multi', + default='/etc/nova/nova-dhcpbridge.conf', + description="location of flagfiles for dhcpbridge") + +nova.param( + 'networks_path', + type='string', + default='$state_path/networks', + description="Location to keep network config files") + +nova.param( + 'public_interface', + type='string', + default='eth0', + description="Interface for public IP addresses") + +nova.param( + 'network_device_mtu', + type='string', + default=None, + description="MTU setting for vlan") + +nova.param( + 'dhcpbridge', + type='string', + default='$bindir/nova-dhcpbridge', + description="location of nova-dhcpbridge") + +nova.param( + 'routing_source_ip', + type='string', + default='$my_ip', + description="Public IP of network host") + +nova.param( + 'dhcp_lease_time', + type='integer', + default=120, + description="Lifetime of a DHCP lease in seconds") + +nova.param( + 'dns_server', + type='multi', + default='', + description="if set, uses specific dns server for dnsmasq. Canbe specified multiple times.") + +nova.param( + 'use_network_dns_servers', + type='boolean', + default=False, + description="if set, uses the dns1 and dns2 from the network ref.as dns servers.") + +nova.param( + 'dmz_cidr', + type='list', + default='', + description="A list of dmz range that should be accepted") + +nova.param( + 'force_snat_range', + type='multi', + default='', + description="Traffic to this range will always be snatted to the fallback ip, even if it would normally be bridged out of the node. Can be specified multiple times.") + +nova.param( + 'dnsmasq_config_file', + type='string', + default='', + description="Override the default dnsmasq settings with this file") + +nova.param( + 'linuxnet_interface_driver', + type='string', + default='nova.network.linux_net.LinuxBridgeInterfaceDriver', + description="Driver used to create ethernet devices.") + +nova.param( + 'linuxnet_ovs_integration_bridge', + type='string', + default='br-int', + description="Name of Open vSwitch bridge used with linuxnet") + +nova.param( + 'send_arp_for_ha', + type='boolean', + default=False, + description="send gratuitous ARPs for HA setup") + +nova.param( + 'send_arp_for_ha_count', + type='integer', + default=3, + description="send this many gratuitous ARPs for HA setup") + +nova.param( + 'use_single_default_gateway', + type='boolean', + default=False, + description="Use single default gateway. Only first nic of vm will get default gateway from dhcp server") + +nova.param( + 'forward_bridge_interface', + type='multi', + default='all', + description="An interface that bridges can forward to. If this is set to all then all traffic will be forwarded. Can be specified multiple times.") + +nova.param( + 'metadata_host', + type='string', + default='$my_ip', + description="the ip for the metadata api server") + +nova.param( + 'metadata_port', + type='integer', + default=8775, + description="the port for the metadata api port") + +nova.param( + 'iptables_top_regex', + type='string', + default='', + description="Regular expression to match iptables rule that should always be on the top.") + +nova.param( + 'iptables_bottom_regex', + type='string', + default='', + description="Regular expression to match iptables rule that should always be on the bottom.") + +nova.param( + 'iptables_drop_action', + type='string', + default='DROP', + description="The table that iptables to jump to when a packet is to be dropped.") + +nova.param( + 'flat_network_bridge', + type='string', + default=None, + description="Bridge for simple network instances") + +nova.param( + 'flat_network_dns', + type='string', + default='8.8.4.4', + description="Dns for simple network") + +nova.param( + 'flat_injected', + type='boolean', + default=False, + description="Whether to attempt to inject network setup into guest") + +nova.param( + 'flat_interface', + type='string', + default=None, + description="FlatDhcp will bridge into this interface if set") + +nova.param( + 'vlan_start', + type='integer', + default=100, + description="First VLAN for private networks") + +nova.param( + 'vlan_interface', + type='string', + default=None, + description="vlans will bridge into this interface if set") + +nova.param( + 'num_networks', + type='integer', + default=1, + description="Number of networks to support") + +nova.param( + 'vpn_ip', + type='string', + default='$my_ip', + description="Public IP for the cloudpipe VPN servers") + +nova.param( + 'vpn_start', + type='integer', + default=1000, + description="First Vpn port for private networks") + +nova.param( + 'network_size', + type='integer', + default=256, + description="Number of addresses in each private subnet") + +nova.param( + 'fixed_range_v6', + type='string', + default='fd00::/48', + description="Fixed IPv6 address block") + +nova.param( + 'gateway', + type='string', + default=None, + description="Default IPv4 gateway") + +nova.param( + 'gateway_v6', + type='string', + default=None, + description="Default IPv6 gateway") + +nova.param( + 'cnt_vpn_clients', + type='integer', + default=0, + description="Number of addresses reserved for vpn clients") + +nova.param( + 'fixed_ip_disassociate_timeout', + type='integer', + default=600, + description="Seconds after which a deallocated ip is disassociated") + +nova.param( + 'create_unique_mac_address_attempts', + type='integer', + default=5, + description="Number of attempts to create unique mac address") + +nova.param( + 'fake_network', + type='boolean', + default=False, + description="If passed, use fake network devices and addresses") + +nova.param( + 'fake_call', + type='boolean', + default=False, + description="If True, skip using the queue and make local calls") + +nova.param( + 'teardown_unused_network_gateway', + type='boolean', + default=False, + description="If True, unused gateway devices") + +nova.param( + 'force_dhcp_release', + type='boolean', + default=True, + description="If True, send a dhcp release on instance termination") + +nova.param( + 'share_dhcp_address', + type='boolean', + default=False, + description="If True in multi_host mode, all compute hosts share the same dhcp address. The same IP address used for DHCP will be added on each nova-network node which is only visible to the vms on the same host.") + +nova.param( + 'update_dns_entries', + type='boolean', + default=False, + description="If True, when a DNS entry must be updated, it sends a fanout cast to all network hosts to update their DNS entries in multi host mode") + +nova.param( + 'dns_update_periodic_interval', + type='integer', + default=-1, + description="Number of seconds to wait between runs of updates to DNS entries.") + +nova.param( + 'dhcp_domain', + type='string', + default='novalocal', + description="domain to use for building the hostnames") + +nova.param( + 'l3_lib', + type='string', + default='nova.network.l3.LinuxNetL3', + description="Indicates underlying L3 management library") + +nova.param( + 'neutron_url', + type='string', + default='http://127.0.0.1:9696', + description="URL for connecting to neutron") + +nova.param( + 'neutron_url_timeout', + type='integer', + default=30, + description="timeout value for connecting to neutron in seconds") + +nova.param( + 'neutron_admin_username', + type='string', + default=None, + description="username for connecting to neutron in admin context") + +nova.param( + 'neutron_admin_password', + type='string', + default=None, + description="password for connecting to neutron in admin context") + +nova.param( + 'neutron_admin_tenant_name', + type='string', + default=None, + description="tenant name for connecting to neutron in admin context") + +nova.param( + 'neutron_region_name', + type='string', + default=None, + description="region name for connecting to neutron in admin context") + +nova.param( + 'neutron_admin_auth_url', + type='string', + default='http://localhost:5000/v2.0', + description="auth url for connecting to neutron in admin context") + +nova.param( + 'neutron_api_insecure', + type='boolean', + default=False, + description="if set, ignore any SSL validation issues") + +nova.param( + 'neutron_auth_strategy', + type='string', + default='keystone', + description="auth strategy for connecting to neutron in admin context") + +nova.param( + 'neutron_ovs_bridge', + type='string', + default='br-int', + description="Name of Integration Bridge used by Open vSwitch") + +nova.param( + 'neutron_extension_sync_interval', + type='integer', + default=600, + description="Number of seconds before querying neutron for extensions") + +nova.param( + 'neutron_ca_certificates_file', + type='string', + default=None, + description="Location of ca certicates file to use for neutronclient requests.") + +nova.param( + 'dhcp_options_enabled', + type='boolean', + default=False, + description="Use per-port DHCP options with Neutron") + +nova.param( + 'network_topic', + type='string', + default='network', + description="the topic network nodes listen on") + +nova.param( + 'multi_host', + type='boolean', + default=False, + description="Default value for multi_host in networks. Also, if set, some rpc network calls will be sent directly to host.") + +nova.param( + 'security_group_api', + type='string', + default='nova', + description="The full class name of the security API class") + +nova.param( + 'buckets_path', + type='string', + default='$state_path/buckets', + description="path to s3 buckets") + +nova.param( + 's3_listen', + type='string', + default='0.0.0.0', + description="IP address for S3 API to listen") + +nova.param( + 's3_listen_port', + type='integer', + default=3333, + description="port for s3 api to listen") + +nova.param( + 'sqlite_db', + type='string', + default='nova.sqlite', + description="the filename to use with sqlite") + +nova.param( + 'sqlite_synchronous', + type='boolean', + default=True, + description="If true, use synchronous mode for sqlite") + +nova.param( + 'backdoor_port', + type='string', + default=None, + description="Enable eventlet backdoor. Acceptable values are 0, and :, where 0 results in listening on a random tcp port number, results in listening on the specified port number and not enabling backdoorif it is in use and : results in listening on the smallest unused port number within the specified range of port numbers. The chosen port is displayed in the service's log file.") + +nova.param( + 'disable_process_locking', + type='boolean', + default=False, + description="Whether to disable inter-process locks") + +nova.param( + 'lock_path', + type='string', + default=None, + description="Directory to use for lock files.") + +nova.param( + 'debug', + type='boolean', + default=False, + description="Print debugging output") + +nova.param( + 'verbose', + type='boolean', + default=False, + description="Print more verbose output") + +nova.param( + 'use_stderr', + type='boolean', + default=True, + description="Log output to standard error") + +nova.param( + 'logging_context_format_string', + type='string', + default='%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user)s %(tenant)s] %(instance)s%(message)s', + description="format string to use for log messages with context") + +nova.param( + 'logging_default_format_string', + type='string', + default='%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s', + description="format string to use for log messages without context") + +nova.param( + 'logging_debug_format_suffix', + type='string', + default='%(funcName)s %(pathname)s:%(lineno)d', + description="data to append to log format when level is DEBUG") + +nova.param( + 'logging_exception_prefix', + type='string', + default='%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s', + description="prefix each line of exception output with this format") + +nova.param( + 'default_log_levels', + type='list', + default='amqplibWARN,sqlalchemyWARN,botoWARN,sudsINFO,keystoneINFO,eventlet.wsgi.serverWARN', + description="list of logger=LEVEL pairs") + +nova.param( + 'publish_errors', + type='boolean', + default=False, + description="publish error events") + +nova.param( + 'fatal_deprecations', + type='boolean', + default=False, + description="make deprecations fatal") + +nova.param( + 'instance_format', + type='string', + default='"[instance: %(uuid)s] "', + description="If an instance is passed with the log message, format it like this") + +nova.param( + 'instance_uuid_format', + type='string', + default='"[instance: %(uuid)s] "', + description="If an instance UUID is passed with the log message, format it like this") + +nova.param( + 'log_config', + type='string', + default=None, + description="If this option is specified, the logging configuration file specified is used and overrides any other logging options specified. Please see the Python logging module documentation for details on logging configuration files.") + +nova.param( + 'log_format', + type='string', + default=None, + description="DEPRECATED. A logging.Formatter log message format string which may use any of the available logging.LogRecord attributes. This option is deprecated. Please use logging_context_format_string and logging_default_format_string instead.") + +nova.param( + 'log_date_format', + type='string', + default='%Y-%m-%d %H:%M:%S', + description="Format string for %%(asctime)s in log records. Default: %(default)s") + +nova.param( + 'log_file', + type='string', + default=None, + description="(Optional) Name of log file to output to. If no default is set, logging will go to stdout.") + +nova.param( + 'log_dir', + type='string', + default=None, + description="(Optional) The base directory used for relative --log-file paths") + +nova.param( + 'use_syslog', + type='boolean', + default=False, + description="Use syslog for logging.") + +nova.param( + 'syslog_log_facility', + type='string', + default='LOG_USER', + description="syslog facility to receive log lines") + +nova.param( + 'memcached_servers', + type='list', + default=None, + description="Memcached servers or None for in process cache.") + +nova.param( + 'notification_driver', + type='multi', + default='', + description="Driver or drivers to handle sending notifications") + +nova.param( + 'default_notification_level', + type='string', + default='INFO', + description="Default notification level for outgoing notifications") + +nova.param( + 'default_publisher_id', + type='string', + default=None, + description="Default publisher_id for outgoing notifications") + +nova.param( + 'notification_topics', + type='list', + default='notifications', + description="AMQP topic used for OpenStack notifications") + +nova.param( + 'run_external_periodic_tasks', + type='boolean', + default=True, + description="Some periodic tasks can be run in a separate process. Should we run them here?") + +nova.param( + 'rpc_backend', + type='string', + default='nova.openstack.common.rpc.impl_kombu', + description="The messaging module to use, defaults to kombu.") + +nova.param( + 'rpc_thread_pool_size', + type='integer', + default=64, + description="Size of RPC thread pool") + +nova.param( + 'rpc_conn_pool_size', + type='integer', + default=30, + description="Size of RPC connection pool") + +nova.param( + 'rpc_response_timeout', + type='integer', + default=60, + description="Seconds to wait for a response from call or multicall") + +nova.param( + 'rpc_cast_timeout', + type='integer', + default=30, + description="Seconds to wait before a cast expires") + +nova.param( + 'allowed_rpc_exception_modules', + type='list', + default='nova.exception,cinder.exception,exceptions', + description="Modules of exceptions that are permitted to be recreatedupon receiving exception data from an rpc call.") + +nova.param( + 'fake_rabbit', + type='boolean', + default=False, + description="If passed, use a fake RabbitMQ provider") + +nova.param( + 'control_exchange', + type='string', + default='openstack', + description="AMQP exchange to connect to if using RabbitMQ or Qpid") + +nova.param( + 'amqp_durable_queues', + type='boolean', + default=False, + description="Use durable queues in amqp.") + +nova.param( + 'amqp_auto_delete', + type='boolean', + default=False, + description="Auto-delete queues in amqp.") + +nova.param( + 'kombu_ssl_version', + type='string', + default='', + description="SSL version to use") + +nova.param( + 'kombu_ssl_keyfile', + type='string', + default='', + description="SSL key file") + +nova.param( + 'kombu_ssl_certfile', + type='string', + default='', + description="SSL cert file") + +nova.param( + 'kombu_ssl_ca_certs', + type='string', + default='', + description="SSL certification authority file") + +nova.param( + 'rabbit_host', + type='string', + default='localhost', + description="The RabbitMQ broker address where a single node is used") + +nova.param( + 'rabbit_port', + type='integer', + default=5672, + description="The RabbitMQ broker port where a single node is used") + +nova.param( + 'rabbit_hosts', + type='list', + default='$rabbit_host:$rabbit_port', + description="RabbitMQ HA cluster host:port pairs") + +nova.param( + 'rabbit_use_ssl', + type='boolean', + default=False, + description="connect over SSL for RabbitMQ") + +nova.param( + 'rabbit_userid', + type='string', + default='guest', + description="the RabbitMQ userid") + +nova.param( + 'rabbit_password', + type='string', + default='guest', + description="the RabbitMQ password") + +nova.param( + 'rabbit_virtual_host', + type='string', + default='/', + description="the RabbitMQ virtual host") + +nova.param( + 'rabbit_retry_interval', + type='integer', + default=1, + description="how frequently to retry connecting with RabbitMQ") + +nova.param( + 'rabbit_retry_backoff', + type='integer', + default=2, + description="how long to backoff for between retries when connecting to RabbitMQ") + +nova.param( + 'rabbit_max_retries', + type='integer', + default=0, + description="maximum retries with trying to connect to RabbitMQ") + +nova.param( + 'rabbit_ha_queues', + type='boolean', + default=False, + description="use H/A queues in RabbitMQ") + +nova.param( + 'qpid_hostname', + type='string', + default='localhost', + description="Qpid broker hostname") + +nova.param( + 'qpid_port', + type='integer', + default=5672, + description="Qpid broker port") + +nova.param( + 'qpid_hosts', + type='list', + default='$qpid_hostname:$qpid_port', + description="Qpid HA cluster host:port pairs") + +nova.param( + 'qpid_username', + type='string', + default='', + description="Username for qpid connection") + +nova.param( + 'qpid_password', + type='string', + default='', + description="Password for qpid connection") + +nova.param( + 'qpid_sasl_mechanisms', + type='string', + default='', + description="Space separated list of SASL mechanisms to use for auth") + +nova.param( + 'qpid_heartbeat', + type='integer', + default=60, + description="Seconds between connection keepalive heartbeats") + +nova.param( + 'qpid_protocol', + type='string', + default='tcp', + description="Transport to use, either 'tcp' or 'ssl'") + +nova.param( + 'qpid_tcp_nodelay', + type='boolean', + default=True, + description="Disable Nagle algorithm") + +nova.param( + 'qpid_topology_version', + type='integer', + default=1, + description="The qpid topology version to use. Version 1 is what was originally used by impl_qpid. Version 2 includes some backwards-incompatible changes that allow broker federation to work. Users should update to version 2 when they are able to take everything down, as it requires a clean break.") + +nova.param( + 'rpc_zmq_bind_address', + type='string', + default='*', + description="ZeroMQ bind address. Should be a wildcard") + +nova.param( + 'rpc_zmq_matchmaker', + type='string', + default='nova.openstack.common.rpc.matchmaker.MatchMakerLocalhost', + description="MatchMaker driver") + +nova.param( + 'rpc_zmq_port', + type='integer', + default=9501, + description="ZeroMQ receiver listening port") + +nova.param( + 'rpc_zmq_contexts', + type='integer', + default=1, + description="Number of ZeroMQ contexts, defaults to 1") + +nova.param( + 'rpc_zmq_topic_backlog', + type='integer', + default=None, + description="Maximum number of ingress messages to locally buffer per topic. Default is unlimited.") + +nova.param( + 'rpc_zmq_ipc_dir', + type='string', + default='/var/run/openstack', + description="Directory for holding IPC sockets") + +nova.param( + 'rpc_zmq_host', + type='string', + default='nova', + description="Name of this node. Must be a valid hostname, FQDN, or IP address. Must match 'host' option, if running Nova.") + +nova.param( + 'matchmaker_heartbeat_freq', + type='integer', + default=300, + description="Heartbeat frequency") + +nova.param( + 'matchmaker_heartbeat_ttl', + type='integer', + default=600, + description="Heartbeat time-to-live.") + +nova.param( + 'pci_alias', + type='multi', + default='', + description="An alias for a PCI passthrough device requirement. This allows users to specify the alias in the extra_spec for a flavor, without needing to repeat all the PCI property requirements. For example: pci_alias = { 'name': 'QuicAssist', 'product_id': '0443', 'vendor_id': '8086', 'device_type': 'ACCEL' } defines an alias for the Intel QuickAssist card.") + +nova.param( + 'pci_passthrough_whitelist', + type='multi', + default='', + description="White list of PCI devices available to VMs. For example: pci_passthrough_whitelist = [{'vendor_id': '8086', 'product_id': '0443'}]") + +nova.param( + 'scheduler_host_manager', + type='string', + default='nova.scheduler.host_manager.HostManager', + description="The scheduler host manager class to use") + +nova.param( + 'scheduler_max_attempts', + type='integer', + default=3, + description="Maximum number of attempts to schedule an instance") + +nova.param( + 'scheduler_host_subset_size', + type='integer', + default=1, + description="New instances will be scheduled on a host chosen randomly from a subset of the N best hosts. This property defines the subset size that a host is chosen from. A value of 1 chooses the first host returned by the weighing functions. This value must be at least 1. Any value less than 1 will be ignored, and 1 will be used instead") + +nova.param( + 'cpu_allocation_ratio', + type='floating point', + default='16.0', + description="Virtual CPU to physical CPU allocation ratio which affects all CPU filters. This configuration specifies a global ratio for CoreFilter. For AggregateCoreFilter, it will fall back to this configuration value if no per-aggregate setting found.") + +nova.param( + 'disk_allocation_ratio', + type='floating point', + default='1.0', + description="virtual disk to physical disk allocation ratio") + +nova.param( + 'max_io_ops_per_host', + type='integer', + default=8, + description="Ignore hosts that have too many builds/resizes/snaps/migrations") + +nova.param( + 'isolated_images', + type='list', + default='', + description="Images to run on isolated host") + +nova.param( + 'isolated_hosts', + type='list', + default='', + description="Host reserved for specific images") + +nova.param( + 'restrict_isolated_hosts_to_isolated_images', + type='boolean', + default=True, + description="Whether to force isolated hosts to run only isolated images") + +nova.param( + 'max_instances_per_host', + type='integer', + default=50, + description="Ignore hosts that have too many instances") + +nova.param( + 'ram_allocation_ratio', + type='floating point', + default='1.5', + description="Virtual ram to physical ram allocation ratio which affects all ram filters. This configuration specifies a global ratio for RamFilter. For AggregateRamFilter, it will fall back to this configuration value if no per-aggregate setting found.") + +nova.param( + 'scheduler_available_filters', + type='multi', + default='nova.scheduler.filters.all_filters', + description="Filter classes available to the scheduler which may be specified more than once. An entry of 'nova.scheduler.filters.standard_filters' maps to all filters included with nova.") + +nova.param( + 'scheduler_default_filters', + type='list', + default='RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter', + description="Which filter class names to use for filtering hosts when not specified in the request.") + +nova.param( + 'scheduler_weight_classes', + type='list', + default='nova.scheduler.weights.all_weighers', + description="Which weight class names to use for weighing hosts") + +nova.param( + 'scheduler_driver', + type='string', + default='nova.scheduler.filter_scheduler.FilterScheduler', + description="Default driver to use for the scheduler") + +nova.param( + 'scheduler_topic', + type='string', + default='scheduler', + description="the topic scheduler nodes listen on") + +nova.param( + 'scheduler_json_config_location', + type='string', + default='', + description="Absolute path to scheduler configuration JSON file.") + +nova.param( + 'ram_weight_multiplier', + type='floating point', + default='1.0', + description="Multiplier used for weighing ram. Negative numbers mean to stack vs spread.") + +nova.param( + 'servicegroup_driver', + type='string', + default='db', + description="The driver for servicegroup service") + +nova.param( + 'config_drive_format', + type='string', + default='iso9660', + description="Config drive format. One of iso9660") + +nova.param( + 'config_drive_tempdir', + type='string', + default=None, + description="Where to put temporary files associated with config drive creation") + +nova.param( + 'force_config_drive', + type='string', + default=None, + description="Set to force injection to take place on a config drive") + +nova.param( + 'mkisofs_cmd', + type='string', + default='genisoimage', + description="Name and optionally path of the tool used for ISO image creation") + +nova.param( + 'injected_network_template', + type='string', + default='$pybasedir/nova/virt/interfaces.template', + description="Template file for injected network") + +nova.param( + 'virt_mkfs', + type='multi', + default='defaultmkfs.ext3 -L %(fs_label)s -F %(target)s', + description="mkfs commands for ephemeral device. The format is =") + +nova.param( + 'virt_mkfs', + type='string', + default='linuxmkfs.ext3 -L %(fs_label)s -F %(target)s', + description="") + +nova.param( + 'virt_mkfs', + type='string', + default='windowsmkfs.ntfs --force --fast --label %(fs_label)s %(target)s', + description="") + +nova.param( + 'resize_fs_using_block_device', + type='boolean', + default=True, + description="Attempt to resize the filesystem by accessing the image over a block device. This is done by the host and may not be necessary if the image contains a recent version of cloud- init. Possible mechanisms require the nbd driver") + +nova.param( + 'timeout_nbd', + type='integer', + default=10, + description="time to wait for a NBD device coming up") + +nova.param( + 'docker_registry_default_port', + type='integer', + default=5042, + description="Default TCP port to find the docker-registry container") + +nova.param( + 'compute_driver', + type='string', + default=None, + description="Driver to use for controlling virtualization. Options include: libvirt.LibvirtDriver, xenapi.XenAPIDriver, fake.FakeDriver, baremetal.BareMetalDriver, vmwareapi.VMwareESXDriver, vmwareapi.VMwareVCDriver") + +nova.param( + 'default_ephemeral_format', + type='string', + default=None, + description="The default format an ephemeral_volume will be formatted with on creation.") + +nova.param( + 'preallocate_images', + type='string', + default='none', + description="VM image preallocation mode: 'none' => no storage provisioning is done up front, 'space' => storage is fully allocated at instance start") + +nova.param( + 'use_cow_images', + type='boolean', + default=True, + description="Whether to use cow images") + +nova.param( + 'firewall_driver', + type='string', + default=None, + description="Firewall driver") + +nova.param( + 'allow_same_net_traffic', + type='boolean', + default=True, + description="Whether to allow network traffic from same network") + +nova.param( + 'force_raw_images', + type='boolean', + default=True, + description="Force backing images to raw format") + +nova.param( + 'rescue_image_id', + type='string', + default=None, + description="Rescue ami image") + +nova.param( + 'rescue_kernel_id', + type='string', + default=None, + description="Rescue aki image") + +nova.param( + 'rescue_ramdisk_id', + type='string', + default=None, + description="Rescue ari image") + +nova.param( + 'libvirt_type', + type='string', + default='kvm', + description="Libvirt domain type") + +nova.param( + 'libvirt_uri', + type='string', + default='', + description="Override the default libvirt URI") + +nova.param( + 'libvirt_inject_password', + type='boolean', + default=False, + description="Inject the admin password at boot time, without an agent.") + +nova.param( + 'libvirt_inject_key', + type='boolean', + default=True, + description="Inject the ssh public key at boot time") + +nova.param( + 'libvirt_inject_partition', + type='integer', + default=1, + description="The partition to inject to : -2 => disable, -1 => inspect") + +nova.param( + 'use_usb_tablet', + type='boolean', + default=True, + description="Sync virtual and real mouse cursors in Windows VMs") + +nova.param( + 'live_migration_uri', + type='string', + default='qemu+tcp://%s/system', + description="Migration target URI") + +nova.param( + 'live_migration_flag', + type='string', + default='VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_PEER2PEER', + description="Migration flags to be set for live migration") + +nova.param( + 'block_migration_flag', + type='string', + default='VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_PEER2PEER, VIR_MIGRATE_NON_SHARED_INC', + description="Migration flags to be set for block migration") + +nova.param( + 'live_migration_bandwidth', + type='integer', + default=0, + description="Maximum bandwidth to be used during migration, in Mbps") + +nova.param( + 'snapshot_image_format', + type='string', + default=None, + description="Snapshot image format") + +nova.param( + 'libvirt_vif_driver', + type='string', + default='nova.virt.libvirt.vif.LibvirtGenericVIFDriver', + description="The libvirt VIF driver to configure the VIFs.") + +nova.param( + 'libvirt_volume_drivers', + type='list', + default='iscsinova.virt.libvirt.volume.LibvirtISCSIVolumeDriver,isernova.virt.libvirt.volume.LibvirtISERVolumeDriver,localnova.virt.libvirt.volume.LibvirtVolumeDriver,fakenova.virt.libvirt.volume.LibvirtFakeVolumeDriver,rbdnova.virt.libvirt.volume.LibvirtNetVolumeDriver,sheepdognova.virt.libvirt.volume.LibvirtNetVolumeDriver,nfsnova.virt.libvirt.volume.LibvirtNFSVolumeDriver,aoenova.virt.libvirt.volume.LibvirtAOEVolumeDriver,glusterfsnova.virt.libvirt.volume.LibvirtGlusterfsVolumeDriver,fibre_channelnova.virt.libvirt.volume.LibvirtFibreChannelVolumeDriver,scalitynova.virt.libvirt.volume.LibvirtScalityVolumeDriver', + description="Libvirt handlers for remote volumes.") + +nova.param( + 'libvirt_disk_prefix', + type='string', + default=None, + description="Override the default disk prefix for the devices attached to a server, which is dependent on libvirt_type.") + +nova.param( + 'libvirt_wait_soft_reboot_seconds', + type='integer', + default=120, + description="Number of seconds to wait for instance to shut down after soft reboot request is made. We fall back to hard reboot if instance does not shutdown within this window.") + +nova.param( + 'libvirt_nonblocking', + type='boolean', + default=True, + description="Use a separated OS thread pool to realize non-blocking libvirt calls") + +nova.param( + 'libvirt_cpu_mode', + type='string', + default=None, + description="Set to 'host-model' to clone the host CPU feature flags; to 'host-passthrough' to use the host CPU model exactly; to 'custom' to use a named CPU model; to 'none' to not set any CPU model. If libvirt_type='kvm|qemu', it will default to 'host-model', otherwise it will default to 'none'") + +nova.param( + 'libvirt_cpu_model', + type='string', + default=None, + description="Set to a named libvirt CPU model") + +nova.param( + 'libvirt_snapshots_directory', + type='string', + default='$instances_path/snapshots', + description="Location where libvirt driver will store snapshots before uploading them to image service") + +nova.param( + 'xen_hvmloader_path', + type='string', + default='/usr/lib/xen/boot/hvmloader', + description="Location where the Xen hvmloader is kept") + +nova.param( + 'disk_cachemodes', + type='list', + default='', + description="Specific cachemodes to use for different disk types e.g: ['file=directsync','block=none']") + +nova.param( + 'vcpu_pin_set', + type='string', + default=None, + description="Which pcpus can be used by vcpus of instance e.g: '4-12,^8,15'") + +nova.param( + 'libvirt_images_type', + type='string', + default='default', + description="VM Images format. Acceptable values are: raw, qcow2, lvm,rbd, default. If default is specified, then use_cow_images flag is used instead of this one.") + +nova.param( + 'libvirt_images_volume_group', + type='string', + default=None, + description="LVM Volume Group that is used for VM images, when you specify libvirt_images_type=lvm.") + +nova.param( + 'libvirt_sparse_logical_volumes', + type='boolean', + default=False, + description="Create sparse logical volumes") + +nova.param( + 'libvirt_lvm_snapshot_size', + type='integer', + default=1000, + description="The amount of storage") + +nova.param( + 'libvirt_images_rbd_pool', + type='string', + default='rbd', + description="the RADOS pool in which rbd volumes are stored") + +nova.param( + 'libvirt_images_rbd_ceph_conf', + type='string', + default='', + description="path to the ceph configuration file to use") + +nova.param( + 'base_dir_name', + type='string', + default='_base', + description="Where cached images are stored under $instances_path.This is NOT the full path - just a folder name.For per-compute-host cached images, set to _base_$my_ip") + +nova.param( + 'image_info_filename_pattern', + type='string', + default='$instances_path/$base_dir_name/%(image)s.info', + description="Allows image information files to be stored in non-standard locations") + +nova.param( + 'remove_unused_base_images', + type='boolean', + default=True, + description="Should unused base images be removed?") + +nova.param( + 'remove_unused_kernels', + type='boolean', + default=False, + description="Should unused kernel images be removed? This is only safe to enable if all compute nodes have been updated to support this option. This will enabled by default in future.") + +nova.param( + 'remove_unused_resized_minimum_age_seconds', + type='integer', + default=3600, + description="Unused resized base images younger than this will not be removed") + +nova.param( + 'remove_unused_original_minimum_age_seconds', + type='integer', + default=86400, + description="Unused unresized base images younger than this will not be removed") + +nova.param( + 'checksum_base_images', + type='boolean', + default=False, + description="Write a checksum for files in _base to disk") + +nova.param( + 'checksum_interval_seconds', + type='integer', + default=3600, + description="How frequently to checksum base images") + +nova.param( + 'libvirt_snapshot_compression', + type='boolean', + default=False, + description="Compress snapshot images when possible. This currently applies exclusively to qcow2 images") + +nova.param( + 'libvirt_ovs_bridge', + type='string', + default='br-int', + description="Name of Integration Bridge used by Open vSwitch") + +nova.param( + 'libvirt_use_virtio_for_bridges', + type='boolean', + default=True, + description="Use virtio for bridge interfaces with KVM/QEMU") + +nova.param( + 'num_iscsi_scan_tries', + type='integer', + default=3, + description="number of times to rescan iSCSI target to find volume") + +nova.param( + 'num_iser_scan_tries', + type='integer', + default=3, + description="number of times to rescan iSER target to find volume") + +nova.param( + 'rbd_user', + type='string', + default=None, + description="the RADOS client name for accessing rbd volumes") + +nova.param( + 'rbd_secret_uuid', + type='string', + default=None, + description="the libvirt uuid of the secret for the rbd_uservolumes") + +nova.param( + 'nfs_mount_point_base', + type='string', + default='$state_path/mnt', + description="Dir where the nfs volume is mounted on the compute node") + +nova.param( + 'nfs_mount_options', + type='string', + default=None, + description="Mount options passed to the nfs client. See section of the nfs man page for details") + +nova.param( + 'num_aoe_discover_tries', + type='integer', + default=3, + description="number of times to rediscover AoE target to find volume") + +nova.param( + 'glusterfs_mount_point_base', + type='string', + default='$state_path/mnt', + description="Dir where the glusterfs volume is mounted on the compute node") + +nova.param( + 'libvirt_iscsi_use_multipath', + type='boolean', + default=False, + description="use multipath connection of the iSCSI volume") + +nova.param( + 'libvirt_iser_use_multipath', + type='boolean', + default=False, + description="use multipath connection of the iSER volume") + +nova.param( + 'scality_sofs_config', + type='string', + default=None, + description="Path or URL to Scality SOFS configuration file") + +nova.param( + 'scality_sofs_mount_point', + type='string', + default='$state_path/scality', + description="Base dir where Scality SOFS shall be mounted") + +nova.param( + 'qemu_allowed_storage_drivers', + type='list', + default='', + description="Protocols listed here will be accessed directly from QEMU. Currently supported protocols: [gluster]") + +nova.param( + 'powervm_mgr_type', + type='string', + default='ivm', + description="PowerVM manager type") + +nova.param( + 'powervm_mgr', + type='string', + default=None, + description="PowerVM manager host or ip") + +nova.param( + 'powervm_mgr_user', + type='string', + default=None, + description="PowerVM manager user name") + +nova.param( + 'powervm_mgr_passwd', + type='string', + default=None, + description="PowerVM manager user password") + +nova.param( + 'powervm_img_remote_path', + type='string', + default='/home/padmin', + description="PowerVM image remote path where images will be moved. Make sure this path can fit your biggest image in glance") + +nova.param( + 'powervm_img_local_path', + type='string', + default='/tmp', + description="Local directory to download glance images to. Make sure this path can fit your biggest image in glance") + +nova.param( + 'agent_timeout', + type='integer', + default=30, + description="number of seconds to wait for agent reply") + +nova.param( + 'agent_version_timeout', + type='integer', + default=300, + description="number of seconds to wait for agent to be fully operational") + +nova.param( + 'agent_resetnetwork_timeout', + type='integer', + default=60, + description="number of seconds to wait for agent reply to resetnetwork request") + +nova.param( + 'xenapi_agent_path', + type='string', + default='usr/sbin/xe-update-networking', + description="Specifies the path in which the xenapi guest agent should be located. If the agent is present, network configuration is not injected into the image. Used if compute_driver=xenapi.XenAPIDriver and flat_injected=True") + +nova.param( + 'xenapi_disable_agent', + type='boolean', + default=False, + description="Disables the use of the XenAPI agent in any image regardless of what image properties are present. ") + +nova.param( + 'xenapi_use_agent_default', + type='boolean', + default=False, + description="Determines if the xenapi agent should be used when the image used does not contain a hint to declare if the agent is present or not. The hint is a glance property 'xenapi_use_agent' that has the value 'true' or 'false'. Note that waiting for the agent when it is not present will significantly increase server boot times.") + +nova.param( + 'xenapi_connection_url', + type='string', + default=None, + description="URL for connection to XenServer/Xen Cloud Platform. A special value of unix://local can be used to connect to the local unix socket. Required if compute_driver=xenapi.XenAPIDriver") + +nova.param( + 'xenapi_connection_username', + type='string', + default='root', + description="Username for connection to XenServer/Xen Cloud Platform. Used only if compute_driver=xenapi.XenAPIDriver") + +nova.param( + 'xenapi_connection_password', + type='string', + default=None, + description="Password for connection to XenServer/Xen Cloud Platform. Used only if compute_driver=xenapi.XenAPIDriver") + +nova.param( + 'xenapi_connection_concurrent', + type='integer', + default=5, + description="Maximum number of concurrent XenAPI connections. Used only if compute_driver=xenapi.XenAPIDriver") + +nova.param( + 'xenapi_vhd_coalesce_poll_interval', + type='floating point', + default='5.0', + description="The interval used for polling of coalescing vhds. Used only if compute_driver=xenapi.XenAPIDriver") + +nova.param( + 'xenapi_check_host', + type='boolean', + default=True, + description="Ensure compute service is running on host XenAPI connects to.") + +nova.param( + 'xenapi_vhd_coalesce_max_attempts', + type='integer', + default=5, + description="Max number of times to poll for VHD to coalesce. Used only if compute_driver=xenapi.XenAPIDriver") + +nova.param( + 'xenapi_sr_base_path', + type='string', + default='/var/run/sr-mount', + description="Base path to the storage repository") + +nova.param( + 'target_host', + type='string', + default=None, + description="iSCSI Target Host") + +nova.param( + 'target_port', + type='string', + default='3260', + description="iSCSI Target Port, 3260 Default") + +nova.param( + 'iqn_prefix', + type='string', + default='iqn.2010-10.org.openstack', + description="IQN Prefix") + +nova.param( + 'xenapi_remap_vbd_dev', + type='boolean', + default=False, + description="Used to enable the remapping of VBD dev") + +nova.param( + 'xenapi_remap_vbd_dev_prefix', + type='string', + default='sd', + description="Specify prefix to remap VBD dev to") + +nova.param( + 'xenapi_login_timeout', + type='integer', + default=10, + description="Timeout in seconds for XenAPI login.") + +nova.param( + 'xenapi_torrent_base_url', + type='string', + default=None, + description="Base URL for torrent files.") + +nova.param( + 'xenapi_torrent_seed_chance', + type='floating point', + default='1.0', + description="Probability that peer will become a seeder.") + +nova.param( + 'xenapi_torrent_seed_duration', + type='integer', + default=3600, + description="Number of seconds after downloading an image via BitTorrent that it should be seeded for other peers.") + +nova.param( + 'xenapi_torrent_max_last_accessed', + type='integer', + default=86400, + description="Cached torrent files not accessed within this number of seconds can be reaped") + +nova.param( + 'xenapi_torrent_listen_port_start', + type='integer', + default=6881, + description="Beginning of port range to listen on") + +nova.param( + 'xenapi_torrent_listen_port_end', + type='integer', + default=6891, + description="End of port range to listen on") + +nova.param( + 'xenapi_torrent_download_stall_cutoff', + type='integer', + default=600, + description="Number of seconds a download can remain at the same progress percentage w/o being considered a stall") + +nova.param( + 'xenapi_torrent_max_seeder_processes_per_host', + type='integer', + default=1, + description="Maximum number of seeder processes to run concurrently within a given dom0.") + +nova.param( + 'use_join_force', + type='boolean', + default=True, + description="To use for hosts with different CPUs") + +nova.param( + 'xenapi_ovs_integration_bridge', + type='string', + default='xapi1', + description="Name of Integration Bridge used by Open vSwitch") + +nova.param( + 'cache_images', + type='string', + default='all', + description="Cache glance images locally. `all` will cache all images, `some` will only cache images that have the image_property `cache_in_nova=True`, and `none` turns off caching entirely") + +nova.param( + 'xenapi_image_compression_level', + type='integer', + default=None, + description="Compression level for images, e.g., 9 for gzip -9. Range is 1-9, 9 being most compressed but most CPU intensive on dom0.") + +nova.param( + 'default_os_type', + type='string', + default='linux', + description="Default OS type") + +nova.param( + 'block_device_creation_timeout', + type='integer', + default=10, + description="Time to wait for a block device to be created") + +nova.param( + 'max_kernel_ramdisk_size', + type='integer', + default=16777216, + description="Maximum size in bytes of kernel or ramdisk images") + +nova.param( + 'sr_matching_filter', + type='string', + default='default-sr:true', + description="Filter for finding the SR to be used to install guest instances on. To use the Local Storage in default XenServer/XCP installations set this flag to other-config :i18n-key=local-storage. To select an SR with a different matching criteria, you could set it to other- config:my_favorite_sr=true. On the other hand, to fall back on the Default SR, as displayed by XenCenter, set this flag to: default-sr:true") + +nova.param( + 'xenapi_sparse_copy', + type='boolean', + default=True, + description="Whether to use sparse_copy for copying data on a resize down") + +nova.param( + 'xenapi_num_vbd_unplug_retries', + type='integer', + default=10, + description="Maximum number of retries to unplug VBD") + +nova.param( + 'xenapi_torrent_images', + type='string', + default='none', + description="Whether or not to download images via Bit Torrent") + +nova.param( + 'xenapi_ipxe_network_name', + type='string', + default=None, + description="Name of network to use for booting iPXE ISOs") + +nova.param( + 'xenapi_ipxe_boot_menu_url', + type='string', + default=None, + description="URL to the iPXE boot menu") + +nova.param( + 'xenapi_ipxe_mkisofs_cmd', + type='string', + default='mkisofs', + description="Name and optionally path of the tool used for ISO image creation") + +nova.param( + 'xenapi_running_timeout', + type='integer', + default=60, + description="number of seconds to wait for instance to go to running state") + +nova.param( + 'xenapi_vif_driver', + type='string', + default='nova.virt.xenapi.vif.XenAPIBridgeDriver', + description="The XenAPI VIF driver using XenServer Network APIs.") + +nova.param( + 'xenapi_image_upload_handler', + type='string', + default='nova.virt.xenapi.image.glance.GlanceStore', + description="Dom0 plugin driver used to handle image uploads.") + +nova.param( + 'novncproxy_base_url', + type='string', + default='http://127.0.0.1:6080/vnc_auto.html', + description="location of vnc console proxy, in the form 'http://127.0.0.1:6080/vnc_auto.html'") + +nova.param( + 'xvpvncproxy_base_url', + type='string', + default='http://127.0.0.1:6081/console', + description="location of nova xvp vnc console proxy, in the form 'http://127.0.0.1:6081/console'") + +nova.param( + 'vncserver_listen', + type='string', + default='127.0.0.1', + description="IP address on which instance vncservers should listen") + +nova.param( + 'vncserver_proxyclient_address', + type='string', + default='127.0.0.1', + description="the address to which proxy clients") + +nova.param( + 'vnc_enabled', + type='boolean', + default=True, + description="enable vnc related features") + +nova.param( + 'vnc_keymap', + type='string', + default='en-us', + description="keymap for vnc") + +nova.param( + 'xvpvncproxy_port', + type='integer', + default=6081, + description="Port that the XCP VNC proxy should bind to") + +nova.param( + 'xvpvncproxy_host', + type='string', + default='0.0.0.0', + description="Address that the XCP VNC proxy should bind to") + +nova.param( + 'volume_api_class', + type='string', + default='nova.volume.cinder.API', + description="The full class name of the volume API class to use") + +nova.param( + 'cinder_catalog_info', + type='string', + default='volume:cinder:publicURL', + description="Info to match when looking for cinder in the service catalog. Format is : separated values of the form: ::") + +nova.param( + 'cinder_endpoint_template', + type='string', + default=None, + description="Override service catalog lookup with template for cinder endpoint e.g. http://localhost:8776/v1/%(project_id)s") + +nova.param( + 'os_region_name', + type='string', + default=None, + description="region name of this node") + +nova.param( + 'cinder_ca_certificates_file', + type='string', + default=None, + description="Location of ca certicates file to use for cinder client requests.") + +nova.param( + 'cinder_http_retries', + type='integer', + default=3, + description="Number of cinderclient retries on failed http calls") + +nova.param( + 'cinder_api_insecure', + type='boolean', + default=False, + description="Allow to perform insecure SSL requests to cinder") + +nova.param( + 'cinder_cross_az_attach', + type='boolean', + default=True, + description="Allow attach between instance and volume in different availability zones.") + +nova.param( + 'sql_connection', + type='string', + default='sqlite:////nova/openstack/common/db/$sqlite_db', + description="The SQLAlchemy connection string used to connect to the database", + deprecation_message='Deprecated in favor of "[database]connection" parameter') nova.section('hyperv') -nova.param('instances_path_share', type='string', default='', description="The name of a Windows share name mapped to the 'instances_path' dir and used by the resize feature to copy files to the target host. If left blank, an administrative share will be used, looking for the same 'instances_path' used locally") +nova.param( + 'instances_path_share', + type='string', + default='', + description="The name of a Windows share name mapped to the 'instances_path' dir and used by the resize feature to copy files to the target host. If left blank, an administrative share will be used, looking for the same 'instances_path' used locally") -nova.param('force_hyperv_utils_v1', type='boolean', default=False, description="Force V1 WMI utility classes") +nova.param( + 'force_hyperv_utils_v1', + type='boolean', + default=False, + description="Force V1 WMI utility classes") -nova.param('force_volumeutils_v1', type='boolean', default=False, description="Force V1 volume utility class") +nova.param( + 'force_volumeutils_v1', + type='boolean', + default=False, + description="Force V1 volume utility class") -nova.param('vswitch_name', type='string', default=None, description="External virtual switch Name, if not provided, the first external virtual switch is used") +nova.param( + 'vswitch_name', + type='string', + default=None, + description="External virtual switch Name, if not provided, the first external virtual switch is used") -nova.param('limit_cpu_features', type='boolean', default=False, description="Required for live migration among hosts with different CPU features") +nova.param( + 'limit_cpu_features', + type='boolean', + default=False, + description="Required for live migration among hosts with different CPU features") -nova.param('config_drive_inject_password', type='boolean', default=False, description="Sets the admin password in the config drive image") +nova.param( + 'config_drive_inject_password', + type='boolean', + default=False, + description="Sets the admin password in the config drive image") -nova.param('qemu_img_cmd', type='string', default='qemu-img.exe', description="qemu-img is used to convert between different image types") +nova.param( + 'qemu_img_cmd', + type='string', + default='qemu-img.exe', + description="qemu-img is used to convert between different image types") -nova.param('config_drive_cdrom', type='boolean', default=False, description="Attaches the Config Drive image as a cdrom drive instead of a disk drive") +nova.param( + 'config_drive_cdrom', + type='boolean', + default=False, + description="Attaches the Config Drive image as a cdrom drive instead of a disk drive") -nova.param('enable_instance_metrics_collection', type='boolean', default=False, description="Enables metrics collections for an instance by using Hyper-V's metric APIs. Collected data can by retrieved by other apps and services, e.g.: Ceilometer. Requires Hyper-V / Windows Server 2012 and above") +nova.param( + 'enable_instance_metrics_collection', + type='boolean', + default=False, + description="Enables metrics collections for an instance by using Hyper-V's metric APIs. Collected data can by retrieved by other apps and services, e.g.: Ceilometer. Requires Hyper-V / Windows Server 2012 and above") -nova.param('dynamic_memory_ratio', type='floating point', default='1.0', description="Enables dynamic memory allocation") +nova.param( + 'dynamic_memory_ratio', + type='floating point', + default='1.0', + description="Enables dynamic memory allocation") -nova.param('volume_attach_retry_count', type='integer', default=10, description="The number of times to retry to attach a volume") +nova.param( + 'volume_attach_retry_count', + type='integer', + default=10, + description="The number of times to retry to attach a volume") -nova.param('volume_attach_retry_interval', type='integer', default=5, description="Interval between volume attachment attempts, in seconds") +nova.param( + 'volume_attach_retry_interval', + type='integer', + default=5, + description="Interval between volume attachment attempts, in seconds") nova.section('zookeeper') -nova.param('address', type='string', default=None, description="The ZooKeeper addresses for servicegroup service in the format of host1:port,host2:port,host3:port") +nova.param( + 'address', + type='string', + default=None, + description="The ZooKeeper addresses for servicegroup service in the format of host1:port,host2:port,host3:port") -nova.param('recv_timeout', type='integer', default=4000, description="recv_timeout parameter for the zk session") +nova.param( + 'recv_timeout', + type='integer', + default=4000, + description="recv_timeout parameter for the zk session") -nova.param('sg_prefix', type='string', default='/servicegroups', description="The prefix used in ZooKeeper to store ephemeral nodes") +nova.param( + 'sg_prefix', + type='string', + default='/servicegroups', + description="The prefix used in ZooKeeper to store ephemeral nodes") -nova.param('sg_retry_interval', type='integer', default=5, description="Number of seconds to wait until retrying to join the session") +nova.param( + 'sg_retry_interval', + type='integer', + default=5, + description="Number of seconds to wait until retrying to join the session") nova.section('osapi_v3') -nova.param('enabled', type='boolean', default=False, description="Whether the V3 API is enabled or not") +nova.param( + 'enabled', + type='boolean', + default=False, + description="Whether the V3 API is enabled or not") -nova.param('extensions_blacklist', type='list', default='', description="A list of v3 API extensions to never load. Specify the extension aliases here.") +nova.param( + 'extensions_blacklist', + type='list', + default='', + description="A list of v3 API extensions to never load. Specify the extension aliases here.") -nova.param('extensions_whitelist', type='list', default='', description="If the list is not empty then a v3 API extension will only be loaded if it exists in this list. Specify the extension aliases here.") +nova.param( + 'extensions_whitelist', + type='list', + default='', + description="If the list is not empty then a v3 API extension will only be loaded if it exists in this list. Specify the extension aliases here.") nova.section('conductor') -nova.param('use_local', type='boolean', default=False, description="Perform nova-conductor operations locally") +nova.param( + 'use_local', + type='boolean', + default=False, + description="Perform nova-conductor operations locally") -nova.param('topic', type='string', default='conductor', description="the topic conductor nodes listen on") +nova.param( + 'topic', + type='string', + default='conductor', + description="the topic conductor nodes listen on") -nova.param('manager', type='string', default='nova.conductor.manager.ConductorManager', description="full class name for the Manager for conductor") +nova.param( + 'manager', + type='string', + default='nova.conductor.manager.ConductorManager', + description="full class name for the Manager for conductor") -nova.param('workers', type='integer', default=None, description="Number of workers for OpenStack Conductor service") +nova.param( + 'workers', + type='integer', + default=None, + description="Number of workers for OpenStack Conductor service") nova.section('keymgr') -nova.param('api_class', type='string', default='nova.keymgr.conf_key_mgr.ConfKeyManager', description="The full class name of the key manager API class") +nova.param( + 'api_class', + type='string', + default='nova.keymgr.conf_key_mgr.ConfKeyManager', + description="The full class name of the key manager API class") -nova.param('fixed_key', type='string', default=None, description="Fixed key returned by key manager, specified in hex") +nova.param( + 'fixed_key', + type='string', + default=None, + description="Fixed key returned by key manager, specified in hex") nova.section('cells') -nova.param('driver', type='string', default='nova.cells.rpc_driver.CellsRPCDriver', description="Cells communication driver to use") +nova.param( + 'driver', + type='string', + default='nova.cells.rpc_driver.CellsRPCDriver', + description="Cells communication driver to use") -nova.param('instance_updated_at_threshold', type='integer', default=3600, description="Number of seconds after an instance was updated or deleted to continue to update cells") +nova.param( + 'instance_updated_at_threshold', + type='integer', + default=3600, + description="Number of seconds after an instance was updated or deleted to continue to update cells") -nova.param('instance_update_num_instances', type='integer', default=1, description="Number of instances to update per periodic task run") +nova.param( + 'instance_update_num_instances', + type='integer', + default=1, + description="Number of instances to update per periodic task run") -nova.param('max_hop_count', type='integer', default=10, description="Maximum number of hops for cells routing.") +nova.param( + 'max_hop_count', + type='integer', + default=10, + description="Maximum number of hops for cells routing.") -nova.param('scheduler', type='string', default='nova.cells.scheduler.CellsScheduler', description="Cells scheduler to use") +nova.param( + 'scheduler', + type='string', + default='nova.cells.scheduler.CellsScheduler', + description="Cells scheduler to use") -nova.param('enable', type='boolean', default=False, description="Enable cell functionality") +nova.param( + 'enable', + type='boolean', + default=False, + description="Enable cell functionality") -nova.param('topic', type='string', default='cells', description="the topic cells nodes listen on") +nova.param( + 'topic', + type='string', + default='cells', + description="the topic cells nodes listen on") -nova.param('manager', type='string', default='nova.cells.manager.CellsManager', description="Manager for cells") +nova.param( + 'manager', + type='string', + default='nova.cells.manager.CellsManager', + description="Manager for cells") -nova.param('name', type='string', default='nova', description="name of this cell") +nova.param( + 'name', + type='string', + default='nova', + description="name of this cell") -nova.param('capabilities', type='list', default='hypervisorxenserver;kvm,oslinux;windows', description="Key/Multi-value list with the capabilities of the cell") +nova.param( + 'capabilities', + type='list', + default='hypervisorxenserver;kvm,oslinux;windows', + description="Key/Multi-value list with the capabilities of the cell") -nova.param('call_timeout', type='integer', default=60, description="Seconds to wait for response from a call to a cell.") +nova.param( + 'call_timeout', + type='integer', + default=60, + description="Seconds to wait for response from a call to a cell.") -nova.param('reserve_percent', type='floating point', default='10.0', description="Percentage of cell capacity to hold in reserve. Affects both memory and disk utilization") +nova.param( + 'reserve_percent', + type='floating point', + default='10.0', + description="Percentage of cell capacity to hold in reserve. Affects both memory and disk utilization") -nova.param('cell_type', type='string', default=None, description="Type of cell: api or compute") +nova.param( + 'cell_type', + type='string', + default=None, + description="Type of cell: api or compute") -nova.param('mute_child_interval', type='integer', default=300, description="Number of seconds after which a lack of capability and capacity updates signals the child cell is to be treated as a mute.") +nova.param( + 'mute_child_interval', + type='integer', + default=300, + description="Number of seconds after which a lack of capability and capacity updates signals the child cell is to be treated as a mute.") -nova.param('bandwidth_update_interval', type='integer', default=600, description="Seconds between bandwidth updates for cells.") +nova.param( + 'bandwidth_update_interval', + type='integer', + default=600, + description="Seconds between bandwidth updates for cells.") -nova.param('rpc_driver_queue_base', type='string', default='cells.intercell', description="Base queue name to use when communicating between cells. Various topics by message type will be appended to this.") +nova.param( + 'rpc_driver_queue_base', + type='string', + default='cells.intercell', + description="Base queue name to use when communicating between cells. Various topics by message type will be appended to this.") -nova.param('scheduler_filter_classes', type='list', default='nova.cells.filters.all_filters', description="Filter classes the cells scheduler should use. An entry of 'nova.cells.filters.all_filters'maps to all cells filters included with nova.") +nova.param( + 'scheduler_filter_classes', + type='list', + default='nova.cells.filters.all_filters', + description="Filter classes the cells scheduler should use. An entry of 'nova.cells.filters.all_filters'maps to all cells filters included with nova.") -nova.param('scheduler_weight_classes', type='list', default='nova.cells.weights.all_weighers', description="Weigher classes the cells scheduler should use. An entry of 'nova.cells.weights.all_weighers'maps to all cell weighers included with nova.") +nova.param( + 'scheduler_weight_classes', + type='list', + default='nova.cells.weights.all_weighers', + description="Weigher classes the cells scheduler should use. An entry of 'nova.cells.weights.all_weighers'maps to all cell weighers included with nova.") -nova.param('scheduler_retries', type='integer', default=10, description="How many retries when no cells are available.") +nova.param( + 'scheduler_retries', + type='integer', + default=10, + description="How many retries when no cells are available.") -nova.param('scheduler_retry_delay', type='integer', default=2, description="How often to retry in seconds when no cells are available.") +nova.param( + 'scheduler_retry_delay', + type='integer', + default=2, + description="How often to retry in seconds when no cells are available.") -nova.param('db_check_interval', type='integer', default=60, description="Seconds between getting fresh cell info from db.") +nova.param( + 'db_check_interval', + type='integer', + default=60, + description="Seconds between getting fresh cell info from db.") -nova.param('cells_config', type='string', default=None, description="Configuration file from which to read cells configuration. If given, overrides reading cells from the database.") +nova.param( + 'cells_config', + type='string', + default=None, + description="Configuration file from which to read cells configuration. If given, overrides reading cells from the database.") -nova.param('mute_weight_multiplier', type='floating point', default='-10.0', description="Multiplier used to weigh mute children. ") +nova.param( + 'mute_weight_multiplier', + type='floating point', + default='-10.0', + description="Multiplier used to weigh mute children. ") -nova.param('mute_weight_value', type='floating point', default='1000.0', description="Weight value assigned to mute children. ") +nova.param( + 'mute_weight_value', + type='floating point', + default='1000.0', + description="Weight value assigned to mute children. ") -nova.param('ram_weight_multiplier', type='floating point', default='10.0', description="Multiplier used for weighing ram. Negative numbers mean to stack vs spread.") +nova.param( + 'ram_weight_multiplier', + type='floating point', + default='10.0', + description="Multiplier used for weighing ram. Negative numbers mean to stack vs spread.") nova.section('database') -nova.param('backend', type='string', default='sqlalchemy', description="The backend to use for db") +nova.param( + 'backend', + type='string', + default='sqlalchemy', + description="The backend to use for db") -nova.param('use_tpool', type='boolean', default=False, description="Enable the experimental use of thread pooling for all DB API calls") +nova.param( + 'use_tpool', + type='boolean', + default=False, + description="Enable the experimental use of thread pooling for all DB API calls") -nova.param('connection', type='string', default='sqlite:////nova/openstack/common/db/$sqlite_db', description="The SQLAlchemy connection string used to connect to the database") +nova.param( + 'connection', + type='string', + default='sqlite:////nova/openstack/common/db/$sqlite_db', + description="The SQLAlchemy connection string used to connect to the database") -nova.param('slave_connection', type='string', default='', description="The SQLAlchemy connection string used to connect to the slave database") +nova.param( + 'slave_connection', + type='string', + default='', + description="The SQLAlchemy connection string used to connect to the slave database") -nova.param('idle_timeout', type='integer', default=3600, description="timeout before idle sql connections are reaped") +nova.param( + 'idle_timeout', + type='integer', + default=3600, + description="timeout before idle sql connections are reaped") -nova.param('min_pool_size', type='integer', default=1, description="Minimum number of SQL connections to keep open in a pool") +nova.param( + 'min_pool_size', + type='integer', + default=1, + description="Minimum number of SQL connections to keep open in a pool") -nova.param('max_pool_size', type='integer', default=None, description="Maximum number of SQL connections to keep open in a pool") +nova.param( + 'max_pool_size', + type='integer', + default=None, + description="Maximum number of SQL connections to keep open in a pool") -nova.param('max_retries', type='integer', default=10, description="maximum db connection retries during startup.") +nova.param( + 'max_retries', + type='integer', + default=10, + description="maximum db connection retries during startup.") -nova.param('retry_interval', type='integer', default=10, description="interval between retries of opening a sql connection") +nova.param( + 'retry_interval', + type='integer', + default=10, + description="interval between retries of opening a sql connection") -nova.param('max_overflow', type='integer', default=None, description="If set, use this value for max_overflow with sqlalchemy") +nova.param( + 'max_overflow', + type='integer', + default=None, + description="If set, use this value for max_overflow with sqlalchemy") -nova.param('connection_debug', type='integer', default=0, description="Verbosity of SQL debugging information. 0=None, 100=Everything") +nova.param( + 'connection_debug', + type='integer', + default=0, + description="Verbosity of SQL debugging information. 0=None, 100=Everything") -nova.param('connection_trace', type='boolean', default=False, description="Add python stack traces to SQL as comment strings") +nova.param( + 'connection_trace', + type='boolean', + default=False, + description="Add python stack traces to SQL as comment strings") -nova.param('pool_timeout', type='integer', default=None, description="If set, use this value for pool_timeout with sqlalchemy") +nova.param( + 'pool_timeout', + type='integer', + default=None, + description="If set, use this value for pool_timeout with sqlalchemy") nova.section('image_file_url') -nova.param('filesystems', type='list', default='', description="A list of filesystems that will be configured in this file under the sections image_file_url:") +nova.param( + 'filesystems', + type='list', + default='', + description="A list of filesystems that will be configured in this file under the sections image_file_url:") nova.section('baremetal') -nova.param('db_backend', type='string', default='sqlalchemy', description="The backend to use for bare-metal database") +nova.param( + 'db_backend', + type='string', + default='sqlalchemy', + description="The backend to use for bare-metal database") -nova.param('sql_connection', type='string', default='sqlite:///$state_path/baremetal_$sqlite_db', description="The SQLAlchemy connection string used to connect to the bare-metal database") +nova.param( + 'sql_connection', + type='string', + default='sqlite:///$state_path/baremetal_$sqlite_db', + description="The SQLAlchemy connection string used to connect to the bare-metal database") -nova.param('inject_password', type='boolean', default=True, description="Whether baremetal compute injects password or not") +nova.param( + 'inject_password', + type='boolean', + default=True, + description="Whether baremetal compute injects password or not") -nova.param('injected_network_template', type='string', default='$pybasedir/nova/virt/baremetal/interfaces.template', description="Template file for injected network") +nova.param( + 'injected_network_template', + type='string', + default='$pybasedir/nova/virt/baremetal/interfaces.template', + description="Template file for injected network") -nova.param('vif_driver', type='string', default='nova.virt.baremetal.vif_driver.BareMetalVIFDriver', description="Baremetal VIF driver.") +nova.param( + 'vif_driver', + type='string', + default='nova.virt.baremetal.vif_driver.BareMetalVIFDriver', + description="Baremetal VIF driver.") -nova.param('volume_driver', type='string', default='nova.virt.baremetal.volume_driver.LibvirtVolumeDriver', description="Baremetal volume driver.") +nova.param( + 'volume_driver', + type='string', + default='nova.virt.baremetal.volume_driver.LibvirtVolumeDriver', + description="Baremetal volume driver.") -nova.param('instance_type_extra_specs', type='list', default='', description="a list of additional capabilities corresponding to instance_type_extra_specs for this compute host to advertise. Valid entries are name=value, pairs For example, 'key1:val1, key2:val2'") +nova.param( + 'instance_type_extra_specs', + type='list', + default='', + description="a list of additional capabilities corresponding to instance_type_extra_specs for this compute host to advertise. Valid entries are name=value, pairs For example, 'key1:val1, key2:val2'") -nova.param('driver', type='string', default='nova.virt.baremetal.pxe.PXE', description="Baremetal driver back-end") +nova.param( + 'driver', + type='string', + default='nova.virt.baremetal.pxe.PXE', + description="Baremetal driver back-end") -nova.param('power_manager', type='string', default='nova.virt.baremetal.ipmi.IPMI', description="Baremetal power management method") +nova.param( + 'power_manager', + type='string', + default='nova.virt.baremetal.ipmi.IPMI', + description="Baremetal power management method") -nova.param('tftp_root', type='string', default='/tftpboot', description="Baremetal compute node's tftp root path") +nova.param( + 'tftp_root', + type='string', + default='/tftpboot', + description="Baremetal compute node's tftp root path") -nova.param('terminal', type='string', default='shellinaboxd', description="path to baremetal terminal program") +nova.param( + 'terminal', + type='string', + default='shellinaboxd', + description="path to baremetal terminal program") -nova.param('terminal_cert_dir', type='string', default=None, description="path to baremetal terminal SSL cert(PEM)") +nova.param( + 'terminal_cert_dir', + type='string', + default=None, + description="path to baremetal terminal SSL cert(PEM)") -nova.param('terminal_pid_dir', type='string', default='$state_path/baremetal/console', description="path to directory stores pidfiles of baremetal_terminal") +nova.param( + 'terminal_pid_dir', + type='string', + default='$state_path/baremetal/console', + description="path to directory stores pidfiles of baremetal_terminal") -nova.param('ipmi_power_retry', type='integer', default=5, description="maximal number of retries for IPMI operations") +nova.param( + 'ipmi_power_retry', + type='integer', + default=5, + description="maximal number of retries for IPMI operations") -nova.param('deploy_kernel', type='string', default=None, description="Default kernel image ID used in deployment phase") +nova.param( + 'deploy_kernel', + type='string', + default=None, + description="Default kernel image ID used in deployment phase") -nova.param('deploy_ramdisk', type='string', default=None, description="Default ramdisk image ID used in deployment phase") +nova.param( + 'deploy_ramdisk', + type='string', + default=None, + description="Default ramdisk image ID used in deployment phase") -nova.param('net_config_template', type='string', default='$pybasedir/nova/virt/baremetal/net-dhcp.ubuntu.template', description="Template file for injected network config") +nova.param( + 'net_config_template', + type='string', + default='$pybasedir/nova/virt/baremetal/net-dhcp.ubuntu.template', + description="Template file for injected network config") -nova.param('pxe_append_params', type='string', default=None, description="additional append parameters for baremetal PXE boot") +nova.param( + 'pxe_append_params', + type='string', + default=None, + description="additional append parameters for baremetal PXE boot") -nova.param('pxe_config_template', type='string', default='$pybasedir/nova/virt/baremetal/pxe_config.template', description="Template file for PXE configuration") +nova.param( + 'pxe_config_template', + type='string', + default='$pybasedir/nova/virt/baremetal/pxe_config.template', + description="Template file for PXE configuration") -nova.param('pxe_deploy_timeout', type='integer', default=0, description="Timeout for PXE deployments. Default: 0") +nova.param( + 'pxe_deploy_timeout', + type='integer', + default=0, + description="Timeout for PXE deployments. Default: 0") -nova.param('pxe_network_config', type='boolean', default=False, description="If set, pass the network configuration details to the initramfs via cmdline.") +nova.param( + 'pxe_network_config', + type='boolean', + default=False, + description="If set, pass the network configuration details to the initramfs via cmdline.") -nova.param('pxe_bootfile_name', type='string', default='pxelinux.0', description="This gets passed to Neutron as the bootfile dhcp parameter when the dhcp_options_enabled is set.") +nova.param( + 'pxe_bootfile_name', + type='string', + default='pxelinux.0', + description="This gets passed to Neutron as the bootfile dhcp parameter when the dhcp_options_enabled is set.") -nova.param('tile_pdu_ip', type='string', default='10.0.100.1', description="ip address of tilera pdu") +nova.param( + 'tile_pdu_ip', + type='string', + default='10.0.100.1', + description="ip address of tilera pdu") -nova.param('tile_pdu_mgr', type='string', default='/tftpboot/pdu_mgr', description="management script for tilera pdu") +nova.param( + 'tile_pdu_mgr', + type='string', + default='/tftpboot/pdu_mgr', + description="management script for tilera pdu") -nova.param('tile_pdu_off', type='integer', default=2, description="power status of tilera PDU is OFF") +nova.param( + 'tile_pdu_off', + type='integer', + default=2, + description="power status of tilera PDU is OFF") -nova.param('tile_pdu_on', type='integer', default=1, description="power status of tilera PDU is ON") +nova.param( + 'tile_pdu_on', + type='integer', + default=1, + description="power status of tilera PDU is ON") -nova.param('tile_pdu_status', type='integer', default=9, description="power status of tilera PDU") +nova.param( + 'tile_pdu_status', + type='integer', + default=9, + description="power status of tilera PDU") -nova.param('tile_power_wait', type='integer', default=9, description="wait time in seconds until check the result after tilera power operations") +nova.param( + 'tile_power_wait', + type='integer', + default=9, + description="wait time in seconds until check the result after tilera power operations") -nova.param('virtual_power_ssh_host', type='string', default='', description="ip or name to virtual power host") +nova.param( + 'virtual_power_ssh_host', + type='string', + default='', + description="ip or name to virtual power host") -nova.param('virtual_power_ssh_port', type='integer', default=22, description="Port to use for ssh to virtual power host") +nova.param( + 'virtual_power_ssh_port', + type='integer', + default=22, + description="Port to use for ssh to virtual power host") -nova.param('virtual_power_type', type='string', default='virsh', description="base command to use for virtual power(vbox,virsh)") +nova.param( + 'virtual_power_type', + type='string', + default='virsh', + description="base command to use for virtual power(vbox,virsh)") -nova.param('virtual_power_host_user', type='string', default='', description="user to execute virtual power commands as") +nova.param( + 'virtual_power_host_user', + type='string', + default='', + description="user to execute virtual power commands as") -nova.param('virtual_power_host_pass', type='string', default='', description="password for virtual power host_user") +nova.param( + 'virtual_power_host_pass', + type='string', + default='', + description="password for virtual power host_user") -nova.param('virtual_power_host_key', type='string', default=None, description="ssh key for virtual power host_user") +nova.param( + 'virtual_power_host_key', + type='string', + default=None, + description="ssh key for virtual power host_user") -nova.param('use_unsafe_iscsi', type='boolean', default=False, description="Do not set this out of dev/test environments. If a node does not have a fixed PXE IP address, volumes are exported with globally opened ACL") +nova.param( + 'use_unsafe_iscsi', + type='boolean', + default=False, + description="Do not set this out of dev/test environments. If a node does not have a fixed PXE IP address, volumes are exported with globally opened ACL") -nova.param('iscsi_iqn_prefix', type='string', default='iqn.2010-10.org.openstack.baremetal', description="iSCSI IQN prefix used in baremetal volume connections.") +nova.param( + 'iscsi_iqn_prefix', + type='string', + default='iqn.2010-10.org.openstack.baremetal', + description="iSCSI IQN prefix used in baremetal volume connections.") nova.section('rpc_notifier2') -nova.param('topics', type='list', default='notifications', description="AMQP topic(s) used for OpenStack notifications") +nova.param( + 'topics', + type='list', + default='notifications', + description="AMQP topic(s) used for OpenStack notifications") nova.section('matchmaker_redis') -nova.param('host', type='string', default='127.0.0.1', description="Host to locate redis") +nova.param( + 'host', + type='string', + default='127.0.0.1', + description="Host to locate redis") -nova.param('port', type='integer', default=6379, description="Use this port to connect to redis host.") +nova.param( + 'port', + type='integer', + default=6379, + description="Use this port to connect to redis host.") -nova.param('password', type='string', default=None, description="Password for Redis server.") +nova.param( + 'password', + type='string', + default=None, + description="Password for Redis server.") nova.section('ssl') -nova.param('ca_file', type='string', default=None, description="CA certificate file to use to verify connecting clients") +nova.param( + 'ca_file', + type='string', + default=None, + description="CA certificate file to use to verify connecting clients") -nova.param('cert_file', type='string', default=None, description="Certificate file to use when starting the server securely") +nova.param( + 'cert_file', + type='string', + default=None, + description="Certificate file to use when starting the server securely") -nova.param('key_file', type='string', default=None, description="Private key file to use when starting the server securely") +nova.param( + 'key_file', + type='string', + default=None, + description="Private key file to use when starting the server securely") nova.section('trusted_computing') -nova.param('attestation_server', type='string', default=None, description="attestation server http") +nova.param( + 'attestation_server', + type='string', + default=None, + description="attestation server http") -nova.param('attestation_server_ca_file', type='string', default=None, description="attestation server Cert file for Identity verification") +nova.param( + 'attestation_server_ca_file', + type='string', + default=None, + description="attestation server Cert file for Identity verification") -nova.param('attestation_port', type='string', default='8443', description="attestation server port") +nova.param( + 'attestation_port', + type='string', + default='8443', + description="attestation server port") -nova.param('attestation_api_url', type='string', default='/OpenAttestationWebServices/V1.0', description="attestation web API URL") +nova.param( + 'attestation_api_url', + type='string', + default='/OpenAttestationWebServices/V1.0', + description="attestation web API URL") -nova.param('attestation_auth_blob', type='string', default=None, description="attestation authorization blob - must change") +nova.param( + 'attestation_auth_blob', + type='string', + default=None, + description="attestation authorization blob - must change") -nova.param('attestation_auth_timeout', type='integer', default=60, description="Attestation status cache valid period length") +nova.param( + 'attestation_auth_timeout', + type='integer', + default=60, + description="Attestation status cache valid period length") nova.section('upgrade_levels') -nova.param('baseapi', type='string', default=None, description="Set a version cap for messages sent to the base api in any service") +nova.param( + 'baseapi', + type='string', + default=None, + description="Set a version cap for messages sent to the base api in any service") -nova.param('intercell', type='string', default=None, description="Set a version cap for messages sent between cells services") +nova.param( + 'intercell', + type='string', + default=None, + description="Set a version cap for messages sent between cells services") -nova.param('cells', type='string', default=None, description="Set a version cap for messages sent to local cells services") +nova.param( + 'cells', + type='string', + default=None, + description="Set a version cap for messages sent to local cells services") -nova.param('cert', type='string', default=None, description="Set a version cap for messages sent to cert services") +nova.param( + 'cert', + type='string', + default=None, + description="Set a version cap for messages sent to cert services") -nova.param('compute', type='string', default=None, description="Set a version cap for messages sent to compute services") +nova.param( + 'compute', + type='string', + default=None, + description="Set a version cap for messages sent to compute services") -nova.param('conductor', type='string', default=None, description="Set a version cap for messages sent to conductor services") +nova.param( + 'conductor', + type='string', + default=None, + description="Set a version cap for messages sent to conductor services") -nova.param('console', type='string', default=None, description="Set a version cap for messages sent to console services") +nova.param( + 'console', + type='string', + default=None, + description="Set a version cap for messages sent to console services") -nova.param('consoleauth', type='string', default=None, description="Set a version cap for messages sent to consoleauth services") +nova.param( + 'consoleauth', + type='string', + default=None, + description="Set a version cap for messages sent to consoleauth services") -nova.param('network', type='string', default=None, description="Set a version cap for messages sent to network services") +nova.param( + 'network', + type='string', + default=None, + description="Set a version cap for messages sent to network services") -nova.param('scheduler', type='string', default=None, description="Set a version cap for messages sent to scheduler services") +nova.param( + 'scheduler', + type='string', + default=None, + description="Set a version cap for messages sent to scheduler services") nova.section('matchmaker_ring') -nova.param('ringfile', type='string', default='/etc/oslo/matchmaker_ring.json', description="Matchmaker ring file") +nova.param( + 'ringfile', + type='string', + default='/etc/oslo/matchmaker_ring.json', + description="Matchmaker ring file") nova.section('vmware') -nova.param('host_ip', type='string', default=None, description="URL for connection to VMware ESX/VC host. Required if compute_driver is vmwareapi.VMwareESXDriver or vmwareapi.VMwareVCDriver.") +nova.param( + 'host_ip', + type='string', + default=None, + description="URL for connection to VMware ESX/VC host. Required if compute_driver is vmwareapi.VMwareESXDriver or vmwareapi.VMwareVCDriver.") -nova.param('host_username', type='string', default=None, description="Username for connection to VMware ESX/VC host. Used only if compute_driver is vmwareapi.VMwareESXDriver or vmwareapi.VMwareVCDriver.") +nova.param( + 'host_username', + type='string', + default=None, + description="Username for connection to VMware ESX/VC host. Used only if compute_driver is vmwareapi.VMwareESXDriver or vmwareapi.VMwareVCDriver.") -nova.param('host_password', type='string', default=None, description="Password for connection to VMware ESX/VC host. Used only if compute_driver is vmwareapi.VMwareESXDriver or vmwareapi.VMwareVCDriver.") +nova.param( + 'host_password', + type='string', + default=None, + description="Password for connection to VMware ESX/VC host. Used only if compute_driver is vmwareapi.VMwareESXDriver or vmwareapi.VMwareVCDriver.") -nova.param('cluster_name', type='multi', default=None, description="Name of a VMware Cluster ComputeResource. Used only if compute_driver is vmwareapi.VMwareVCDriver.") +nova.param( + 'cluster_name', + type='multi', + default=None, + description="Name of a VMware Cluster ComputeResource. Used only if compute_driver is vmwareapi.VMwareVCDriver.") -nova.param('datastore_regex', type='string', default=None, description="Regex to match the name of a datastore. Used only if compute_driver is vmwareapi.VMwareVCDriver.") +nova.param( + 'datastore_regex', + type='string', + default=None, + description="Regex to match the name of a datastore. Used only if compute_driver is vmwareapi.VMwareVCDriver.") -nova.param('task_poll_interval', type='floating point', default='5.0', description="The interval used for polling of remote tasks. Used only if compute_driver is vmwareapi.VMwareESXDriver or vmwareapi.VMwareVCDriver.") +nova.param( + 'task_poll_interval', + type='floating point', + default='5.0', + description="The interval used for polling of remote tasks. Used only if compute_driver is vmwareapi.VMwareESXDriver or vmwareapi.VMwareVCDriver.") -nova.param('api_retry_count', type='integer', default=10, description="The number of times we retry on failures, e.g., socket error, etc. Used only if compute_driver is vmwareapi.VMwareESXDriver or vmwareapi.VMwareVCDriver.") +nova.param( + 'api_retry_count', + type='integer', + default=10, + description="The number of times we retry on failures, e.g., socket error, etc. Used only if compute_driver is vmwareapi.VMwareESXDriver or vmwareapi.VMwareVCDriver.") -nova.param('vnc_port', type='integer', default=5900, description="VNC starting port") +nova.param( + 'vnc_port', + type='integer', + default=5900, + description="VNC starting port") -nova.param('vnc_port_total', type='integer', default=10000, description="Total number of VNC ports") +nova.param( + 'vnc_port_total', + type='integer', + default=10000, + description="Total number of VNC ports") -nova.param('vnc_password', type='string', default=None, description="VNC password") +nova.param( + 'vnc_password', + type='string', + default=None, + description="VNC password") -nova.param('use_linked_clone', type='boolean', default=True, description="Whether to use linked clone") +nova.param( + 'use_linked_clone', + type='boolean', + default=True, + description="Whether to use linked clone") -nova.param('vlan_interface', type='string', default='vmnic0', description="Physical ethernet adapter name for vlan networking") +nova.param( + 'vlan_interface', + type='string', + default='vmnic0', + description="Physical ethernet adapter name for vlan networking") -nova.param('wsdl_location', type='string', default=None, description="Optional VIM Service WSDL Location e.g http:///vimService.wsdl. Optional over-ride to default location for bug work-arounds") +nova.param( + 'wsdl_location', + type='string', + default=None, + description="Optional VIM Service WSDL Location e.g http:///vimService.wsdl. Optional over-ride to default location for bug work-arounds") -nova.param('maximum_objects', type='integer', default=100, description="The maximum number of ObjectContent data objects that should be returned in a single result. A positive value will cause the operation to suspend the retrieval when the count of objects reaches the specified maximum. The server may still limit the count to something less than the configured value. Any remaining objects may be retrieved with additional requests.") +nova.param( + 'maximum_objects', + type='integer', + default=100, + description="The maximum number of ObjectContent data objects that should be returned in a single result. A positive value will cause the operation to suspend the retrieval when the count of objects reaches the specified maximum. The server may still limit the count to something less than the configured value. Any remaining objects may be retrieved with additional requests.") -nova.param('integration_bridge', type='string', default='br-int', description="Name of Integration Bridge") +nova.param( + 'integration_bridge', + type='string', + default='br-int', + description="Name of Integration Bridge") nova.section('spice') -nova.param('html5proxy_base_url', type='string', default='http://127.0.0.1:6082/spice_auto.html', description="location of spice html5 console proxy, in the form 'http://127.0.0.1:6082/spice_auto.html'") +nova.param( + 'html5proxy_base_url', + type='string', + default='http://127.0.0.1:6082/spice_auto.html', + description="location of spice html5 console proxy, in the form 'http://127.0.0.1:6082/spice_auto.html'") -nova.param('server_listen', type='string', default='127.0.0.1', description="IP address on which instance spice server should listen") +nova.param( + 'server_listen', + type='string', + default='127.0.0.1', + description="IP address on which instance spice server should listen") -nova.param('server_proxyclient_address', type='string', default='127.0.0.1', description="the address to which proxy clients") +nova.param( + 'server_proxyclient_address', + type='string', + default='127.0.0.1', + description="the address to which proxy clients") -nova.param('enabled', type='boolean', default=False, description="enable spice related features") +nova.param( + 'enabled', + type='boolean', + default=False, + description="enable spice related features") -nova.param('agent_enabled', type='boolean', default=True, description="enable spice guest agent support") +nova.param( + 'agent_enabled', + type='boolean', + default=True, + description="enable spice guest agent support") -nova.param('keymap', type='string', default='en-us', description="keymap for spice") +nova.param( + 'keymap', + type='string', + default='en-us', + description="keymap for spice") nova.commit() - diff --git a/ostack_validator/schemas/schema_generator.py b/ostack_validator/schemas/schema_generator.py index 15d09ab..873e847 100644 --- a/ostack_validator/schemas/schema_generator.py +++ b/ostack_validator/schemas/schema_generator.py @@ -4,6 +4,7 @@ import sys class SchemaParser(object): + def parse_args(self, argv): parser = argparse.ArgumentParser() parser.add_argument('--conf', dest='conf_file', default=None, @@ -79,4 +80,4 @@ class SchemaParser(object): if __name__ == '__main__': runner = SchemaParser() - runner.run(sys.argv) \ No newline at end of file + runner.run(sys.argv) diff --git a/ostack_validator/test_config_schema_registry.py b/ostack_validator/test_config_schema_registry.py index f61c919..2fb26b9 100644 --- a/ostack_validator/test_config_schema_registry.py +++ b/ostack_validator/test_config_schema_registry.py @@ -3,46 +3,57 @@ from ostack_validator.common import find import unittest + class ConfigSchemaRegistryTests(unittest.TestCase): - def test_sample(self): - nova = ConfigSchemaRegistry.register_schema(project='nova') - nova.version('1.0.0') - nova.section('DEFAULT') - nova.param(name='verbose', type='boolean') - nova.param(name='rabbit_host', type='address') + def test_sample(self): + nova = ConfigSchemaRegistry.register_schema(project='nova') - nova.version('1.1.0') - nova.section('DEFAULT') - nova.param(name='verbose', type='boolean', default=False) - nova.remove_param('rabbit_host') + nova.version('1.0.0') + nova.section('DEFAULT') + nova.param(name='verbose', type='boolean') + nova.param(name='rabbit_host', type='address') - nova.commit() + nova.version('1.1.0') + nova.section('DEFAULT') + nova.param(name='verbose', type='boolean', default=False) + nova.remove_param('rabbit_host') - schema10 = ConfigSchemaRegistry.get_schema(project='nova', version='1.0.0') + nova.commit() - self.assertEqual(Version('1.0.0'), schema10.version) - self.assertEqual('ini', schema10.format) + schema10 = ConfigSchemaRegistry.get_schema( + project='nova', version='1.0.0') - verbose_param = find(schema10.parameters, lambda p: p.name == 'verbose') - self.assertIsNotNone(verbose_param) - self.assertEqual('boolean', verbose_param.type) - self.assertEqual(None, verbose_param.default) + self.assertEqual(Version('1.0.0'), schema10.version) + self.assertEqual('ini', schema10.format) - rabbit_host_param = find(schema10.parameters, lambda p: p.name == 'rabbit_host') - self.assertIsNotNone(rabbit_host_param) - self.assertEqual('address', rabbit_host_param.type) + verbose_param = find( + schema10.parameters, + lambda p: p.name == 'verbose') + self.assertIsNotNone(verbose_param) + self.assertEqual('boolean', verbose_param.type) + self.assertEqual(None, verbose_param.default) - schema11 = ConfigSchemaRegistry.get_schema(project='nova', version='1.1.0') + rabbit_host_param = find( + schema10.parameters, + lambda p: p.name == 'rabbit_host') + self.assertIsNotNone(rabbit_host_param) + self.assertEqual('address', rabbit_host_param.type) - verbose_param11 = find(schema11.parameters, lambda p: p.name == 'verbose') - self.assertIsNotNone(verbose_param11) - self.assertEqual(False, verbose_param11.default) + schema11 = ConfigSchemaRegistry.get_schema( + project='nova', version='1.1.0') - rabbit_host_param11 = find(schema11.parameters, lambda p: p.name == 'rabbit_host') - self.assertIsNone(rabbit_host_param11) + verbose_param11 = find( + schema11.parameters, + lambda p: p.name == 'verbose') + self.assertIsNotNone(verbose_param11) + self.assertEqual(False, verbose_param11.default) + + rabbit_host_param11 = find( + schema11.parameters, + lambda p: p.name == 'rabbit_host') + self.assertIsNone(rabbit_host_param11) if __name__ == '__main__': - unittest.main() - + unittest.main() diff --git a/ostack_validator/test_configuration.py b/ostack_validator/test_configuration.py index 65e1df8..fd31ce6 100644 --- a/ostack_validator/test_configuration.py +++ b/ostack_validator/test_configuration.py @@ -2,204 +2,210 @@ import unittest from ostack_validator.config_model import Configuration + class ConfigurationTests(unittest.TestCase): - section = 'section1' - param = 'param1' - fullparam = '%s.%s' % (section, param) - value = 'foobar' - default_value = 'bar123' + section = 'section1' + param = 'param1' + fullparam = '%s.%s' % (section, param) + value = 'foobar' + default_value = 'bar123' - def test_empty(self): - c = Configuration() - self.assertIsNone(c.get('section1.param1')) - - def test_storage(self): - c = Configuration() - c.set(self.fullparam, self.value) + def test_empty(self): + c = Configuration() + self.assertIsNone(c.get('section1.param1')) - self.assertEqual(self.value, c.get(self.fullparam)) + def test_storage(self): + c = Configuration() + c.set(self.fullparam, self.value) - def test_parameter_names_containing_sections(self): - c = Configuration() - c.set(self.fullparam, self.value) + self.assertEqual(self.value, c.get(self.fullparam)) - self.assertEqual(self.value, c.get('%s.%s' % (self.section, self.param))) - - def test_parameter_with_default_section(self): - c = Configuration() - c.set(self.param, self.value) + def test_parameter_names_containing_sections(self): + c = Configuration() + c.set(self.fullparam, self.value) - self.assertEqual(self.value, c.get(self.param)) + self.assertEqual( + self.value, c.get('%s.%s' % + (self.section, self.param))) - def test_explicit_default_on_get(self): - c = Configuration() - override_value = '12345' + def test_parameter_with_default_section(self): + c = Configuration() + c.set(self.param, self.value) - self.assertEqual(override_value, c.get(self.fullparam, default=override_value)) + self.assertEqual(self.value, c.get(self.param)) - def test_default(self): - c = Configuration() - c.set_default(self.fullparam, self.default_value) + def test_explicit_default_on_get(self): + c = Configuration() + override_value = '12345' - self.assertEqual(self.default_value, c.get(self.fullparam)) + self.assertEqual( + override_value, + c.get(self.fullparam, + default=override_value)) - def test_normal_overrides_default(self): - c = Configuration() - c.set(self.fullparam, self.value) - c.set_default(self.fullparam, self.default_value) + def test_default(self): + c = Configuration() + c.set_default(self.fullparam, self.default_value) - self.assertEqual(self.value, c.get(self.fullparam)) + self.assertEqual(self.default_value, c.get(self.fullparam)) - def test_contains(self): - c = Configuration() - self.assertFalse(c.contains(self.fullparam)) + def test_normal_overrides_default(self): + c = Configuration() + c.set(self.fullparam, self.value) + c.set_default(self.fullparam, self.default_value) - def test_contains_default(self): - c = Configuration() - c.set_default(self.fullparam, self.default_value) + self.assertEqual(self.value, c.get(self.fullparam)) - self.assertTrue(c.contains(self.fullparam)) - self.assertFalse(c.contains(self.fullparam, ignoreDefault=True)) + def test_contains(self): + c = Configuration() + self.assertFalse(c.contains(self.fullparam)) - def test_contains_normal(self): - c = Configuration() - c.set(self.fullparam, self.value) + def test_contains_default(self): + c = Configuration() + c.set_default(self.fullparam, self.default_value) - self.assertTrue(c.contains(self.fullparam)) - self.assertTrue(c.contains(self.fullparam, ignoreDefault=True)) + self.assertTrue(c.contains(self.fullparam)) + self.assertFalse(c.contains(self.fullparam, ignoreDefault=True)) + def test_contains_normal(self): + c = Configuration() + c.set(self.fullparam, self.value) - def test_is_default_returns_false_if_param_missing(self): - c = Configuration() - self.assertFalse(c.is_default(self.fullparam)) + self.assertTrue(c.contains(self.fullparam)) + self.assertTrue(c.contains(self.fullparam, ignoreDefault=True)) - def test_is_default_returns_true_if_only_default_value_set(self): - c = Configuration() - c.set_default(self.fullparam, self.default_value) + def test_is_default_returns_false_if_param_missing(self): + c = Configuration() + self.assertFalse(c.is_default(self.fullparam)) - self.assertTrue(c.is_default(self.fullparam)) + def test_is_default_returns_true_if_only_default_value_set(self): + c = Configuration() + c.set_default(self.fullparam, self.default_value) - def test_is_default_returns_false_if_normal_value_set(self): - c = Configuration() - c.set(self.fullparam, self.value) + self.assertTrue(c.is_default(self.fullparam)) - self.assertFalse(c.is_default(self.fullparam)) + def test_is_default_returns_false_if_normal_value_set(self): + c = Configuration() + c.set(self.fullparam, self.value) - def test_is_default_returns_false_if_both_values_set(self): - c = Configuration() - c.set_default(self.fullparam, self.default_value) - c.set(self.fullparam, self.value) + self.assertFalse(c.is_default(self.fullparam)) - self.assertFalse(c.is_default(self.fullparam)) + def test_is_default_returns_false_if_both_values_set(self): + c = Configuration() + c.set_default(self.fullparam, self.default_value) + c.set(self.fullparam, self.value) - def test_subsection_set(self): - c = Configuration() - c.section(self.section).set(self.param, self.value) + self.assertFalse(c.is_default(self.fullparam)) - self.assertEqual(self.value, c.get(self.fullparam)) + def test_subsection_set(self): + c = Configuration() + c.section(self.section).set(self.param, self.value) - def test_keys(self): - c = Configuration() - c.set_default('section1.param1', '123') - c.set('section2.param1', '456') + self.assertEqual(self.value, c.get(self.fullparam)) - self.assertEqual(['section1', 'section2'], sorted(c.keys())) + def test_keys(self): + c = Configuration() + c.set_default('section1.param1', '123') + c.set('section2.param1', '456') - def test_subsection_keys(self): - c = Configuration() - c.set_default('%s.param1' % self.section, '123') - c.set('%s.param2' % self.section, '456') + self.assertEqual(['section1', 'section2'], sorted(c.keys())) - self.assertEqual(['param1', 'param2'], sorted(c.section(self.section).keys())) + def test_subsection_keys(self): + c = Configuration() + c.set_default('%s.param1' % self.section, '123') + c.set('%s.param2' % self.section, '456') - def test_subsection_items(self): - c = Configuration() - c.set('%s.param1' % self.section, 'value1') - c.set_default('%s.param2' % self.section, 'value2') + self.assertEqual( + ['param1', 'param2'], sorted(c.section(self.section).keys())) - self.assertEqual([('param1', 'value1'), ('param2', 'value2')], sorted(c.section(self.section).items())) + def test_subsection_items(self): + c = Configuration() + c.set('%s.param1' % self.section, 'value1') + c.set_default('%s.param2' % self.section, 'value2') - def test_subsection_get(self): - c = Configuration() + self.assertEqual( + [('param1', 'value1'), ('param2', 'value2')], sorted(c.section(self.section).items())) - c.set(self.fullparam, self.value) + def test_subsection_get(self): + c = Configuration() - cs = c.section(self.section) - self.assertEqual(self.value, cs.get(self.param)) + c.set(self.fullparam, self.value) - def test_getitem(self): - c = Configuration() - c.set(self.fullparam, self.value) + cs = c.section(self.section) + self.assertEqual(self.value, cs.get(self.param)) - self.assertEqual(self.value, c[self.fullparam]) + def test_getitem(self): + c = Configuration() + c.set(self.fullparam, self.value) - def test_subsection_getitem(self): - c = Configuration() - c.set(self.fullparam, self.value) + self.assertEqual(self.value, c[self.fullparam]) - cs = c.section(self.section) + def test_subsection_getitem(self): + c = Configuration() + c.set(self.fullparam, self.value) - self.assertEqual(self.value, cs[self.param]) + cs = c.section(self.section) - def test_setitem(self): - c = Configuration() + self.assertEqual(self.value, cs[self.param]) - c[self.fullparam] = self.value + def test_setitem(self): + c = Configuration() - self.assertEqual(self.value, c.get(self.fullparam)) + c[self.fullparam] = self.value - def test_subsection_setitem(self): - c = Configuration() + self.assertEqual(self.value, c.get(self.fullparam)) - cs = c.section(self.section) + def test_subsection_setitem(self): + c = Configuration() - cs[self.param] = self.value + cs = c.section(self.section) - self.assertEqual(self.value, c.get(self.fullparam)) + cs[self.param] = self.value - def test_contains(self): - c = Configuration() + self.assertEqual(self.value, c.get(self.fullparam)) - self.assertFalse(self.section in c) + def test_contains(self): + c = Configuration() - c.set(self.fullparam, self.value) - self.assertTrue(self.section in c) + self.assertFalse(self.section in c) - def test_subsection_contains(self): - c = Configuration() + c.set(self.fullparam, self.value) + self.assertTrue(self.section in c) - c.set('section1.param1', '123') - c.set_default('section2.param2', '234') + def test_subsection_contains(self): + c = Configuration() - self.assertTrue('param1' in c.section('section1')) - self.assertTrue('param2' in c.section('section2')) - self.assertFalse('param1' in c.section('section2')) - - def test_returns_section_object_even_if_section_doesnot_exist(self): - c = Configuration() - self.assertIsNotNone(c.section('foo')) + c.set('section1.param1', '123') + c.set_default('section2.param2', '234') - def test_template_substitution(self): - c = Configuration() - c.set('a', 'x') - c.set('b', '$a') - c.set('c', '$b') + self.assertTrue('param1' in c.section('section1')) + self.assertTrue('param2' in c.section('section2')) + self.assertFalse('param1' in c.section('section2')) - self.assertEqual('x', c.get('c')) + def test_returns_section_object_even_if_section_doesnot_exist(self): + c = Configuration() + self.assertIsNotNone(c.section('foo')) - def test_cycle_template_substitution_resolves_in_empty_string(self): - c = Configuration() - c.set('a', 'a$c') - c.set('b', 'b$a') - c.set('c', 'c$b') + def test_template_substitution(self): + c = Configuration() + c.set('a', 'x') + c.set('b', '$a') + c.set('c', '$b') - self.assertEqual('cba', c.get('c')) + self.assertEqual('x', c.get('c')) - def test_getting_raw_values(self): - c = Configuration() + def test_cycle_template_substitution_resolves_in_empty_string(self): + c = Configuration() + c.set('a', 'a$c') + c.set('b', 'b$a') + c.set('c', 'c$b') - c.set('a', '$b') - c.set('b', 'x') + self.assertEqual('cba', c.get('c')) - self.assertEqual('$b', c.get('a', raw=True)) + def test_getting_raw_values(self): + c = Configuration() + c.set('a', '$b') + c.set('b', 'x') + + self.assertEqual('$b', c.get('a', raw=True)) diff --git a/ostack_validator/test_mark.py b/ostack_validator/test_mark.py index f8638b2..1943666 100644 --- a/ostack_validator/test_mark.py +++ b/ostack_validator/test_mark.py @@ -2,20 +2,21 @@ from ostack_validator.common import Mark import unittest + class MarkTests(unittest.TestCase): - def test_creation(self): - m = Mark('nova.conf', 3, 5) - self.assertEqual('nova.conf', m.source) - self.assertEqual(3, m.line) - self.assertEqual(5, m.column) - def test_merge(self): - m1 = Mark('nova.conf', 3, 5) - m2 = Mark('unknown', 2, 7) + def test_creation(self): + m = Mark('nova.conf', 3, 5) + self.assertEqual('nova.conf', m.source) + self.assertEqual(3, m.line) + self.assertEqual(5, m.column) - m = m1.merge(m2) + def test_merge(self): + m1 = Mark('nova.conf', 3, 5) + m2 = Mark('unknown', 2, 7) - self.assertEqual(m1.source, m.source) - self.assertEqual(m1.line + m2.line, m.line) - self.assertEqual(m1.column + m2.column, m.column) + m = m1.merge(m2) + self.assertEqual(m1.source, m.source) + self.assertEqual(m1.line + m2.line, m.line) + self.assertEqual(m1.column + m2.column, m.column) diff --git a/ostack_validator/test_type_validators.py b/ostack_validator/test_type_validators.py index 1baadcc..de3f2eb 100644 --- a/ostack_validator/test_type_validators.py +++ b/ostack_validator/test_type_validators.py @@ -3,265 +3,276 @@ from ostack_validator.schema import TypeValidatorRegistry import unittest + class TypeValidatorTestHelper(object): - def setUp(self): - super(TypeValidatorTestHelper, self).setUp() - self.validator = TypeValidatorRegistry.get_validator(self.type_name) - def assertValid(self, value): - self.assertNotIsInstance(self.validator.validate(value), Issue) + def setUp(self): + super(TypeValidatorTestHelper, self).setUp() + self.validator = TypeValidatorRegistry.get_validator(self.type_name) + + def assertValid(self, value): + self.assertNotIsInstance(self.validator.validate(value), Issue) + + def assertInvalid(self, value): + self.assertIsInstance(self.validator.validate(value), Issue) - def assertInvalid(self, value): - self.assertIsInstance(self.validator.validate(value), Issue) class StringTypeValidatorTests(TypeValidatorTestHelper, unittest.TestCase): - type_name = 'string' + type_name = 'string' - def test_empty_string_passes(self): - self.assertValid('') + def test_empty_string_passes(self): + self.assertValid('') - def test_validation_always_passes(self): - self.assertValid('foo bar') + def test_validation_always_passes(self): + self.assertValid('foo bar') + + def test_should_return_same_string_if_valid(self): + s = 'foo bar' + self.assertEqual(s, self.validator.validate(s)) - def test_should_return_same_string_if_valid(self): - s = 'foo bar' - self.assertEqual(s, self.validator.validate(s)) class BooleanTypeValidatorTests(TypeValidatorTestHelper, unittest.TestCase): - type_name = 'boolean' + type_name = 'boolean' - def test_True(self): - v = self.validator.validate('True') - self.assertEqual(True, v) + def test_True(self): + v = self.validator.validate('True') + self.assertEqual(True, v) - def test_False(self): - v = self.validator.validate('False') - self.assertEqual(False, v) + def test_False(self): + v = self.validator.validate('False') + self.assertEqual(False, v) + + def test_other_values_produce_error(self): + self.assertInvalid('foo') - def test_other_values_produce_error(self): - self.assertInvalid('foo') class IntegerTypeValidatorTests(TypeValidatorTestHelper, unittest.TestCase): - type_name = 'integer' + type_name = 'integer' - def test_positive_values_are_valid(self): - self.assertValid('123') + def test_positive_values_are_valid(self): + self.assertValid('123') - def test_zero_is_valid(self): - self.assertValid('0') + def test_zero_is_valid(self): + self.assertValid('0') - def test_negative_values_are_valid(self): - self.assertValid('-123') + def test_negative_values_are_valid(self): + self.assertValid('-123') - def test_leading_whitespace_is_ignored(self): - self.assertValid(' 5') + def test_leading_whitespace_is_ignored(self): + self.assertValid(' 5') - def test_trailing_whitespace_is_ignored(self): - self.assertValid('7 ') + def test_trailing_whitespace_is_ignored(self): + self.assertValid('7 ') - def test_non_digits_are_invalid(self): - self.assertInvalid('12a45') + def test_non_digits_are_invalid(self): + self.assertInvalid('12a45') - def test_invalid_char_error_contains_proper_column_in_mark(self): - error = self.validator.validate('12a45') - self.assertIsInstance(error, MarkedIssue) - self.assertEqual(3, error.mark.column) + def test_invalid_char_error_contains_proper_column_in_mark(self): + error = self.validator.validate('12a45') + self.assertIsInstance(error, MarkedIssue) + self.assertEqual(3, error.mark.column) - def test_invalid_char_error_contains_proper_column_if_leading_whitespaces(self): - error = self.validator.validate(' 12a45') - self.assertIsInstance(error, MarkedIssue) - self.assertEqual(5, error.mark.column) + def test_invalid_char_error_contains_proper_column_if_leading_whitespaces( + self): + error = self.validator.validate(' 12a45') + self.assertIsInstance(error, MarkedIssue) + self.assertEqual(5, error.mark.column) + + def test_returns_integer_if_valid(self): + v = self.validator.validate('123') + self.assertEqual(123, v) - def test_returns_integer_if_valid(self): - v = self.validator.validate('123') - self.assertEqual(123, v) class HostAddressTypeValidatorTests(TypeValidatorTestHelper, unittest.TestCase): - type_name = 'host_address' + type_name = 'host_address' - def test_ipv4_address(self): - self.assertValid('127.0.0.1') + def test_ipv4_address(self): + self.assertValid('127.0.0.1') - def test_returns_address(self): - s = '10.0.0.1' - v = self.validator.validate(s) - self.assertEqual(s, v) + def test_returns_address(self): + s = '10.0.0.1' + v = self.validator.validate(s) + self.assertEqual(s, v) - def test_value_with_less_than_4_numbers_separated_by_dots(self): - self.assertInvalid('10.0.0') + def test_value_with_less_than_4_numbers_separated_by_dots(self): + self.assertInvalid('10.0.0') - def test_ipv4_like_string_with_numbers_greater_than_255(self): - self.assertInvalid('10.0.256.1') + def test_ipv4_like_string_with_numbers_greater_than_255(self): + self.assertInvalid('10.0.256.1') - def test_host_name(self): - self.assertValid('foo.bar.baz') + def test_host_name(self): + self.assertValid('foo.bar.baz') - def test_host_with_empty_parts(self): - self.assertInvalid('.foo.bar') - self.assertInvalid('foo..bar') - self.assertInvalid('foo.bar.') + def test_host_with_empty_parts(self): + self.assertInvalid('.foo.bar') + self.assertInvalid('foo..bar') + self.assertInvalid('foo.bar.') - def test_host_parts_with_invalid_chars(self): - self.assertInvalid('foo.ba r.baz') - self.assertInvalid('foo.x_y.bar') + def test_host_parts_with_invalid_chars(self): + self.assertInvalid('foo.ba r.baz') + self.assertInvalid('foo.x_y.bar') - def test_host_with_single_host_label(self): - self.assertValid('foo') + def test_host_with_single_host_label(self): + self.assertValid('foo') - def test_host_part_starting_with_non_letter(self): - self.assertInvalid('123foo') + def test_host_part_starting_with_non_letter(self): + self.assertInvalid('123foo') - def test_host_that_ends_with_a_hyphen(self): - self.assertInvalid('foo-') + def test_host_that_ends_with_a_hyphen(self): + self.assertInvalid('foo-') - def test_mark_should_point_to_incorrect_symbol(self): - e = self.validator.validate('') - self.assertEqual(0, e.mark.column) + def test_mark_should_point_to_incorrect_symbol(self): + e = self.validator.validate('') + self.assertEqual(0, e.mark.column) - e = self.validator.validate('123foo') - self.assertEqual(0, e.mark.column) + e = self.validator.validate('123foo') + self.assertEqual(0, e.mark.column) - e = self.validator.validate('foo-') - self.assertEqual(3, e.mark.column) + e = self.validator.validate('foo-') + self.assertEqual(3, e.mark.column) + + e = self.validator.validate('foo.bar.-baz') + self.assertEqual(8, e.mark.column) - e = self.validator.validate('foo.bar.-baz') - self.assertEqual(8, e.mark.column) class NetworkAddressTypeValidatorTests(TypeValidatorTestHelper, unittest.TestCase): - type_name = 'network_address' + type_name = 'network_address' - def test_ipv4_network(self): - self.assertValid('127.0.0.1/24') + def test_ipv4_network(self): + self.assertValid('127.0.0.1/24') - def test_returns_address(self): - s = '10.0.0.1/32' - v = self.validator.validate(s) - self.assertEqual(s, v) + def test_returns_address(self): + s = '10.0.0.1/32' + v = self.validator.validate(s) + self.assertEqual(s, v) - def test_value_with_less_than_4_numbers_separated_by_dots(self): - self.assertInvalid('10.0.0/24') + def test_value_with_less_than_4_numbers_separated_by_dots(self): + self.assertInvalid('10.0.0/24') - def test_ipv4_like_string_with_numbers_greater_than_255(self): - self.assertInvalid('10.0.256.1/24') + def test_ipv4_like_string_with_numbers_greater_than_255(self): + self.assertInvalid('10.0.256.1/24') - def test_no_prefix_length(self): - self.assertInvalid('10.0.0.0') - self.assertInvalid('10.0.0.0/') + def test_no_prefix_length(self): + self.assertInvalid('10.0.0.0') + self.assertInvalid('10.0.0.0/') - def test_non_integer_prefix_length(self): - self.assertInvalid('10.0.0.0/1a') + def test_non_integer_prefix_length(self): + self.assertInvalid('10.0.0.0/1a') + + def test_prefix_greater_than_32(self): + self.assertInvalid('10.0.0.0/33') - def test_prefix_greater_than_32(self): - self.assertInvalid('10.0.0.0/33') class PortTypeValidatorTests(TypeValidatorTestHelper, unittest.TestCase): - type_name = 'port' + type_name = 'port' - def test_empty(self): - self.assertInvalid('') + def test_empty(self): + self.assertInvalid('') - def test_positive_integer(self): - self.assertValid('123') + def test_positive_integer(self): + self.assertValid('123') - def test_zero_invalid(self): - self.assertInvalid('0') + def test_zero_invalid(self): + self.assertInvalid('0') - def test_negatives_are_invalid(self): - self.assertInvalid('-1') + def test_negatives_are_invalid(self): + self.assertInvalid('-1') - def test_values_greater_than_65535_are_invalid(self): - self.assertInvalid('65536') + def test_values_greater_than_65535_are_invalid(self): + self.assertInvalid('65536') - def test_low_boundary_is_valid(self): - self.assertValid('1') + def test_low_boundary_is_valid(self): + self.assertValid('1') - def test_high_boundary_is_valid(self): - self.assertValid('65535') + def test_high_boundary_is_valid(self): + self.assertValid('65535') - def test_non_digits_are_invalid(self): - self.assertInvalid('12a5') + def test_non_digits_are_invalid(self): + self.assertInvalid('12a5') - def test_leading_and_or_trailing_whitespace_is_ignored(self): - self.assertValid(' 123') - self.assertValid('456 ') - self.assertValid(' 123 ') + def test_leading_and_or_trailing_whitespace_is_ignored(self): + self.assertValid(' 123') + self.assertValid('456 ') + self.assertValid(' 123 ') + + def test_returns_integer_if_valid(self): + v = self.validator.validate('123') + self.assertEqual(123, v) - def test_returns_integer_if_valid(self): - v = self.validator.validate('123') - self.assertEqual(123, v) class HostAndPortTypeValidatorTests(TypeValidatorTestHelper, unittest.TestCase): - type_name = 'host_and_port' + type_name = 'host_and_port' - def test_ipv4_address(self): - self.assertValid('127.0.0.1:80') + def test_ipv4_address(self): + self.assertValid('127.0.0.1:80') - def test_returns_address(self): - s = '10.0.0.1:80' - v = self.validator.validate(s) - self.assertEqual(('10.0.0.1', 80), v) + def test_returns_address(self): + s = '10.0.0.1:80' + v = self.validator.validate(s) + self.assertEqual(('10.0.0.1', 80), v) - def test_value_with_less_than_4_numbers_separated_by_dots(self): - self.assertInvalid('10.0.0:1234') + def test_value_with_less_than_4_numbers_separated_by_dots(self): + self.assertInvalid('10.0.0:1234') - def test_ipv4_like_string_with_numbers_greater_than_255(self): - self.assertInvalid('10.0.256.1:1234') + def test_ipv4_like_string_with_numbers_greater_than_255(self): + self.assertInvalid('10.0.256.1:1234') - def test_no_port(self): - self.assertInvalid('10.0.0.1') - self.assertInvalid('10.0.0.1:') + def test_no_port(self): + self.assertInvalid('10.0.0.1') + self.assertInvalid('10.0.0.1:') - def test_port_is_not_an_integer(self): - self.assertInvalid('10.0.0.1:abc') + def test_port_is_not_an_integer(self): + self.assertInvalid('10.0.0.1:abc') + + def test_port_is_greater_than_65535(self): + self.assertInvalid('10.0.0.1:65536') - def test_port_is_greater_than_65535(self): - self.assertInvalid('10.0.0.1:65536') class StringListTypeValidatorTests(TypeValidatorTestHelper, unittest.TestCase): - type_name = 'string_list' + type_name = 'string_list' - def test_empty_value(self): - v = self.validator.validate('') - self.assertEqual([], v) + def test_empty_value(self): + v = self.validator.validate('') + self.assertEqual([], v) - def test_single_value(self): - v = self.validator.validate(' foo bar ') + def test_single_value(self): + v = self.validator.validate(' foo bar ') - self.assertIsInstance(v, list) - self.assertEqual('foo bar', v[0]) - self.assertEqual(1, len(v)) + self.assertIsInstance(v, list) + self.assertEqual('foo bar', v[0]) + self.assertEqual(1, len(v)) - def test_list_of_values(self): - v = self.validator.validate(' foo bar, baz ') + def test_list_of_values(self): + v = self.validator.validate(' foo bar, baz ') + + self.assertIsInstance(v, list) + self.assertEqual('foo bar', v[0]) + self.assertEqual('baz', v[1]) + self.assertEqual(2, len(v)) - self.assertIsInstance(v, list) - self.assertEqual('foo bar', v[0]) - self.assertEqual('baz', v[1]) - self.assertEqual(2, len(v)) class StringDictTypeValidatorTests(TypeValidatorTestHelper, unittest.TestCase): - type_name = 'string_dict' + type_name = 'string_dict' - def test_empty_value(self): - v = self.validator.validate('') - self.assertEqual({}, v) + def test_empty_value(self): + v = self.validator.validate('') + self.assertEqual({}, v) - def test_single_value(self): - v = self.validator.validate(' foo: bar ') + def test_single_value(self): + v = self.validator.validate(' foo: bar ') - self.assertIsInstance(v, dict) - self.assertEqual('bar', v['foo']) - self.assertEqual(1, len(v)) + self.assertIsInstance(v, dict) + self.assertEqual('bar', v['foo']) + self.assertEqual(1, len(v)) - def test_list_of_values(self): - v = self.validator.validate(' foo: bar, baz: 123 ') + def test_list_of_values(self): + v = self.validator.validate(' foo: bar, baz: 123 ') - self.assertIsInstance(v, dict) - self.assertEqual('bar', v['foo']) - self.assertEqual('123', v['baz']) - self.assertEqual(2, len(v)) + self.assertIsInstance(v, dict) + self.assertEqual('bar', v['foo']) + self.assertEqual('123', v['baz']) + self.assertEqual(2, len(v)) if __name__ == '__main__': - unittest.main() - + unittest.main() diff --git a/ostack_validator/test_version.py b/ostack_validator/test_version.py index 4183d8a..aa0c599 100644 --- a/ostack_validator/test_version.py +++ b/ostack_validator/test_version.py @@ -2,62 +2,62 @@ from ostack_validator.schema import Version import unittest + class VersionTests(unittest.TestCase): - def test_creation_from_components(self): - v = Version(1, 3, 7) - self.assertEqual(1, v.major) - self.assertEqual(3, v.minor) - self.assertEqual(7, v.maintenance) + def test_creation_from_components(self): + v = Version(1, 3, 7) + self.assertEqual(1, v.major) + self.assertEqual(3, v.minor) + self.assertEqual(7, v.maintenance) - def test_creation_from_string(self): - v = Version('1.2.12') - self.assertEqual(1, v.major) - self.assertEqual(2, v.minor) - self.assertEqual(12, v.maintenance) + def test_creation_from_string(self): + v = Version('1.2.12') + self.assertEqual(1, v.major) + self.assertEqual(2, v.minor) + self.assertEqual(12, v.maintenance) - def test_creation_from_string_with_less_parts(self): - v = Version('1.2') - self.assertEqual(1, v.major) - self.assertEqual(2, v.minor) - self.assertEqual(0, v.maintenance) + def test_creation_from_string_with_less_parts(self): + v = Version('1.2') + self.assertEqual(1, v.major) + self.assertEqual(2, v.minor) + self.assertEqual(0, v.maintenance) - v = Version('12') - self.assertEqual(12, v.major) - self.assertEqual(0, v.minor) - self.assertEqual(0, v.maintenance) + v = Version('12') + self.assertEqual(12, v.major) + self.assertEqual(0, v.minor) + self.assertEqual(0, v.maintenance) - def test_creation_from_other_version(self): - v = Version('1.2.3') - v2 = Version(v) - self.assertEqual(1, v2.major) - self.assertEqual(2, v2.minor) - self.assertEqual(3, v2.maintenance) + def test_creation_from_other_version(self): + v = Version('1.2.3') + v2 = Version(v) + self.assertEqual(1, v2.major) + self.assertEqual(2, v2.minor) + self.assertEqual(3, v2.maintenance) - def test_equility(self): - v1 = Version('1.2.3') - v2 = Version(1, 2, 3) - v3 = Version(1, 2, 4) + def test_equility(self): + v1 = Version('1.2.3') + v2 = Version(1, 2, 3) + v3 = Version(1, 2, 4) - self.assertTrue(v1 == v2) - self.assertFalse(v1 == v3) + self.assertTrue(v1 == v2) + self.assertFalse(v1 == v3) - def test_non_equility(self): - v1 = Version('1.2.3') - v2 = Version(1, 2, 3) - v3 = Version(1, 2, 4) + def test_non_equility(self): + v1 = Version('1.2.3') + v2 = Version(1, 2, 3) + v3 = Version(1, 2, 4) - self.assertFalse(v1 != v2) - self.assertTrue(v1 != v3) + self.assertFalse(v1 != v2) + self.assertTrue(v1 != v3) - def test_comparision(self): - v1 = Version('1.2.3') - v2 = Version(1, 1, 5) + def test_comparision(self): + v1 = Version('1.2.3') + v2 = Version(1, 1, 5) - self.assertTrue(v1 > v2) - self.assertFalse(v1 < v2) + self.assertTrue(v1 > v2) + self.assertFalse(v1 < v2) if __name__ == '__main__': - unittest.main() - + unittest.main() diff --git a/ostack_validator/utils.py b/ostack_validator/utils.py index 8e439d5..99a6ebe 100644 --- a/ostack_validator/utils.py +++ b/ostack_validator/utils.py @@ -1,29 +1,34 @@ import collections import functools -class memoized(object): - '''Decorator. Caches a function's return value each time it is called. - If called later with the same arguments, the cached value is returned - (not reevaluated). - ''' - def __init__(self, func): - self.func = func - self.cache = {} - def __call__(self, *args): - if not isinstance(args, collections.Hashable): - # uncacheable. a list, for instance. - # better to not cache than blow up. - return self.func(*args) - if args in self.cache: - return self.cache[args] - else: - value = self.func(*args) - self.cache[args] = value - return value - def __repr__(self): - '''Return the function's docstring.''' - return self.func.__doc__ - def __get__(self, obj, objtype): - '''Support instance methods.''' - return functools.partial(self.__call__, obj) +class memoized(object): + + '''Decorator. Caches a function's return value each time it is called. + If called later with the same arguments, the cached value is returned + (not reevaluated). + ''' + + def __init__(self, func): + self.func = func + self.cache = {} + + def __call__(self, *args): + if not isinstance(args, collections.Hashable): + # uncacheable. a list, for instance. + # better to not cache than blow up. + return self.func(*args) + if args in self.cache: + return self.cache[args] + else: + value = self.func(*args) + self.cache[args] = value + return value + + def __repr__(self): + '''Return the function's docstring.''' + return self.func.__doc__ + + def __get__(self, obj, objtype): + '''Support instance methods.''' + return functools.partial(self.__call__, obj) diff --git a/ostack_validator/webui.py b/ostack_validator/webui.py index 372bf90..bb4da80 100644 --- a/ostack_validator/webui.py +++ b/ostack_validator/webui.py @@ -14,67 +14,91 @@ app = Flask(__name__) Bootstrap(app) app.debug = True app.config.update( - WTF_CSRF_SECRET_KEY = 'foo bar baz' + WTF_CSRF_SECRET_KEY='foo bar baz' ) app.secret_key = 'A0Zr98j/3fooN]LWX/,?RT' class ValidationLaunchForm(Form): - nodes = StringField('Nodes', validators=[DataRequired()]) - username = StringField('Username', default='root', validators=[DataRequired()]) - private_key = TextAreaField('Private Key', validators=[DataRequired()]) + nodes = StringField('Nodes', validators=[DataRequired()]) + username = StringField( + 'Username', + default='root', + validators=[DataRequired()]) + private_key = TextAreaField('Private Key', validators=[DataRequired()]) - launch = SubmitField('Launch validation') + launch = SubmitField('Launch validation') @app.template_filter() def to_label(s): - if s in [Issue.FATAL, Issue.ERROR]: - return 'label-danger' - elif s == Issue.WARNING: - return 'label-warning' - else: - return 'label-info' + if s in [Issue.FATAL, Issue.ERROR]: + return 'label-danger' + elif s == Issue.WARNING: + return 'label-warning' + else: + return 'label-info' + @app.route('/') def index(): - return redirect('/validation') + return redirect('/validation') + @app.route('/validation', methods=['GET', 'POST']) def launch_validation(): - form = ValidationLaunchForm() - if form.validate_on_submit(): - request = InspectionRequest(form.nodes.data.split(' '), form.username.data, private_key=form.private_key.data) + form = ValidationLaunchForm() + if form.validate_on_submit(): + request = InspectionRequest( + form.nodes.data.split( + ' '), + form.username.data, + private_key=form.private_key.data) - job = ostack_inspect_task.delay(request) + job = ostack_inspect_task.delay(request) + + return redirect('/validation/%s' % job.id) + else: + return render_template('validation_form.html', form=form) - return redirect('/validation/%s' % job.id) - else: - return render_template('validation_form.html', form=form) @app.route('/validation/') def job(id): - job = celery.AsyncResult(id) - if job.ready(): - r = job.result.request + job = celery.AsyncResult(id) + if job.ready(): + r = job.result.request - form = ValidationLaunchForm() - form.nodes.data = ' '.join(r.nodes) - form.username.data = r.username - form.private_key.data = r.private_key + form = ValidationLaunchForm() + form.nodes.data = ' '.join(r.nodes) + form.username.data = r.username + form.private_key.data = r.private_key - openstack = job.result.value + openstack = job.result.value - if isinstance(openstack, Openstack): - issue_source_f = lambda i: i.mark.source if isinstance(i, MarkedIssue) else None - source_groupped_issues = groupby(sorted(openstack.issues, key=issue_source_f), key=issue_source_f) + if isinstance(openstack, Openstack): + issue_source_f = lambda i: i.mark.source if isinstance( + i, MarkedIssue) else None + source_groupped_issues = groupby( + sorted(openstack.issues, + key=issue_source_f), + key=issue_source_f) - return render_template('validation_result.html', form=form, openstack=openstack, grouped_issues=source_groupped_issues) + return ( + render_template( + 'validation_result.html', + form=form, + openstack=openstack, + grouped_issues=source_groupped_issues) + ) + else: + return ( + render_template( + 'validation_error.html', + form=form, + message=openstack) + ) else: - return render_template('validation_error.html', form=form, message=openstack) - else: - return render_template('validation_state.html', state=job.state) + return render_template('validation_state.html', state=job.state) if __name__ == '__main__': app.run(host='0.0.0.0', debug=True) -