summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2017-03-09 13:58:53 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2017-03-10 09:25:02 +0800
commit5b6162af4d93530339e92e09ee6df9608e93abd5 (patch)
treeb2c203f47128d978e26abba3f2ed10193342db23
parent9353b8d27df7ca56d00a62eb6a2d0eb8c01f64a0 (diff)
reduce instance's memory size
when using snaps to test small OpenStack env(devstack or all-in-one), testcase will fail due to not enough memory for a vm. As a basic test using cirros, only allocating ip and test the connectivity is needed, 128M should be enough. the error msg is: File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 80, in request raise exceptions.from_response(resp, body, url, method) ClientException: Unknown Error (HTTP 504) Change-Id: Ibfb27018ffd25292bcf80f69e8cb205b2c9c334b Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
-rw-r--r--snaps/openstack/tests/create_instance_tests.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/snaps/openstack/tests/create_instance_tests.py b/snaps/openstack/tests/create_instance_tests.py
index b0792ac..20eb338 100644
--- a/snaps/openstack/tests/create_instance_tests.py
+++ b/snaps/openstack/tests/create_instance_tests.py
@@ -290,7 +290,7 @@ class SimpleHealthCheck(OSIntegrationTestCase):
# Create Flavor
self.flavor_creator = OpenStackFlavor(
self.admin_os_creds,
- FlavorSettings(name=guid + '-flavor-name', ram=1024, disk=10, vcpus=1, metadata=self.flavor_metadata))
+ FlavorSettings(name=guid + '-flavor-name', ram=128, disk=10, vcpus=1, metadata=self.flavor_metadata))
self.flavor_creator.create()
except Exception as e:
self.tearDown()
@@ -422,7 +422,7 @@ class CreateInstanceSimpleTests(OSIntegrationTestCase):
# Create Flavor
self.flavor_creator = OpenStackFlavor(
self.admin_os_creds,
- FlavorSettings(name=guid + '-flavor-name', ram=2048, disk=10, vcpus=2, metadata=self.flavor_metadata))
+ FlavorSettings(name=guid + '-flavor-name', ram=128, disk=10, vcpus=2, metadata=self.flavor_metadata))
self.flavor_creator.create()
# Create Network
@@ -564,7 +564,7 @@ class CreateInstanceSingleNetworkTests(OSIntegrationTestCase):
# Create Flavor
self.flavor_creator = OpenStackFlavor(
self.admin_os_creds,
- FlavorSettings(name=guid + '-flavor-name', ram=2048, disk=10, vcpus=2, metadata=self.flavor_metadata))
+ FlavorSettings(name=guid + '-flavor-name', ram=128, disk=10, vcpus=2, metadata=self.flavor_metadata))
self.flavor_creator.create()
self.keypair_creator = OpenStackKeypair(
@@ -853,7 +853,7 @@ class CreateInstancePortManipulationTests(OSIntegrationTestCase):
# Create Flavor
self.flavor_creator = OpenStackFlavor(
self.admin_os_creds,
- FlavorSettings(name=guid + '-flavor-name', ram=2048, disk=10, vcpus=2, metadata=self.flavor_metadata))
+ FlavorSettings(name=guid + '-flavor-name', ram=128, disk=10, vcpus=2, metadata=self.flavor_metadata))
self.flavor_creator.create()
except Exception as e:
self.tearDown()
@@ -1262,7 +1262,7 @@ class CreateInstancePubPrivNetTests(OSIntegrationTestCase):
# Create Flavor
self.flavor_creator = OpenStackFlavor(
self.admin_os_creds,
- FlavorSettings(name=self.guid + '-flavor-name', ram=2048, disk=10, vcpus=2,
+ FlavorSettings(name=self.guid + '-flavor-name', ram=512, disk=10, vcpus=2,
metadata=self.flavor_metadata))
self.flavor_creator.create()
@@ -1441,7 +1441,7 @@ class InstanceSecurityGroupTests(OSIntegrationTestCase):
# Create Flavor
self.flavor_creator = OpenStackFlavor(
self.admin_os_creds,
- FlavorSettings(name=self.guid + '-flavor-name', ram=2048, disk=10, vcpus=2,
+ FlavorSettings(name=self.guid + '-flavor-name', ram=128, disk=10, vcpus=2,
metadata=self.flavor_metadata))
self.flavor_creator.create()
@@ -1733,7 +1733,7 @@ class CreateInstanceFromThreePartImage(OSIntegrationTestCase):
# Create Flavor
self.flavor_creator = OpenStackFlavor(
self.admin_os_creds,
- FlavorSettings(name=guid + '-flavor-name', ram=2048, disk=10, vcpus=2, metadata=self.flavor_metadata))
+ FlavorSettings(name=guid + '-flavor-name', ram=128, disk=10, vcpus=2, metadata=self.flavor_metadata))
self.flavor_creator.create()
# Create Network