From: peusterm Date: Mon, 18 Apr 2016 15:49:31 +0000 (+0200) Subject: Fixed merge problems. X-Git-Tag: v3.1~140^2~2^2~1 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=5bf618946050229146f7eb086dcc67365f1d47be;p=osm%2Fvim-emu.git Fixed merge problems. --- diff --git a/src/emuvim/dcemulator/resourcemodel/upb/simple.py b/src/emuvim/dcemulator/resourcemodel/upb/simple.py index 425d959..1610b6a 100644 --- a/src/emuvim/dcemulator/resourcemodel/upb/simple.py +++ b/src/emuvim/dcemulator/resourcemodel/upb/simple.py @@ -35,6 +35,8 @@ class UpbSimpleCloudDcRM(BaseResourceModel): self.dc_alloc_mu = 0 self.deactivate_cpu_limit = deactivate_cpu_limit self.deactivate_mem_limit = deactivate_mem_limit + self.single_cu = 0 + self.single_mu = 0 super(self.__class__, self).__init__() def allocate(self, d): @@ -127,7 +129,7 @@ class UpbSimpleCloudDcRM(BaseResourceModel): # get cpu time fraction for entire emulation e_cpu = self.registrar.e_cpu # calculate cpu time fraction of a single compute unit - single_cu = float(e_cpu) / sum([rm.dc_max_cu for rm in list(self.registrar.resource_models)]) + self.single_cu = float(e_cpu) / sum([rm.dc_max_cu for rm in list(self.registrar.resource_models)]) # calculate cpu time fraction for container with given flavor cpu_time_percentage = self.single_cu * number_cu # calculate input values for CFS scheduler bandwidth limitation @@ -164,7 +166,7 @@ class UpbSimpleCloudDcRM(BaseResourceModel): # get memory amount for entire emulation e_mem = self.registrar.e_mem # calculate amount of memory for a single mu - single_mu = float(e_mem) / sum([rm.dc_max_mu for rm in list(self.registrar.resource_models)]) + self.single_mu = float(e_mem) / sum([rm.dc_max_mu for rm in list(self.registrar.resource_models)]) # calculate mem for given flavor mem_limit = self.single_mu * number_mu mem_limit = self._calculate_mem_limit_value(mem_limit)