import time
+import os
from emuvim.test.base import SimpleTestTopology
from emuvim.dcemulator.resourcemodel import BaseResourceModel, ResourceFlavor
from emuvim.dcemulator.resourcemodel.upb.simple import UpbSimpleCloudDcRM
Start a real container and check if limitations are really passed down to Dockernet.
:return:
"""
+ # ATTENTION: This test should only be executed if emu runs not inside a Docker container,
+ # because it manipulates cgroups.
+ if os.environ.get("SON_EMU_IN_DOCKER") is not None:
+ return
# create network
self.createNet(nswitches=0, ndatacenter=1, nhosts=2, ndockers=0)
# setup links
# check if there is a real limitation set for containers cgroup
# deactivated for now, seems not to work in docker-in-docker setup used in CI
- #self.assertEqual(float(tc1.cpu_quota)/tc1.cpu_period, 0.005)
+ self.assertEqual(float(tc1.cpu_quota)/tc1.cpu_period, 0.005)
# check if free was called during stopCompute
self.dc[0].stopCompute("tc1")