Merge "Min value of max_memory is been added"

This commit is contained in:
Jenkins 2017-07-04 11:33:03 +00:00 committed by Gerrit Code Review
commit efdcc182a5
3 changed files with 10 additions and 1 deletions

View File

@ -31,7 +31,7 @@ ALL_DPM_OPTS = [
cfg.IntOpt('max_processors', help="""
Maximum number of shared physical IFL processors on the target CPC that can
be used for this OpenStack hypervisor host"""),
cfg.IntOpt('max_memory', help="""
cfg.IntOpt('max_memory', min=512, help="""
Maximum amount of memory (in MiB) on the target CPC that can be used for
this OpenStack hypervisor host"""),
cfg.IntOpt('max_instances', default=-1, min=-1, help="""

View File

@ -30,3 +30,7 @@ class TestConfigParameters(TestCase):
def test_min_value(self):
self.assertRaises(ValueError, self.CONF.set_override, "max_instances",
-2, group="dpm")
def test_max_memory_min_value(self):
self.assertRaises(ValueError, self.CONF.set_override, "max_memory",
500, group="dpm")

View File

@ -0,0 +1,5 @@
---
upgrade:
- Minimum value of 512 has been set for the configuration
option ``max_memory``.This is the minimum memory needed
by the host to launch an instance.