From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by dpdk.org (Postfix) with ESMTP id 22A1B1150 for ; Fri, 18 Jan 2019 13:55:29 +0100 (CET) Received: by mail-wm1-f45.google.com with SMTP id m1so4412719wml.2 for ; Fri, 18 Jan 2019 04:55:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mHihMHkJHoSYa2y3+eloovRGpYKpWBbsaV60BJyEWw0=; b=z0ZCLKopjnwx9wSBSdLvRU9EUFKTuBNprZNCgZihyNTpXnUnw0h11gSOTUDDf3H6RE LySTYcOZT8k98qZn/70XmIaHftkwAK60v49mThjO+Ku/0xOWFVrOURAic++libqmYJxl G025z0WcSwmjh9uwd5KOambiw93WUkOmdIqQlBazwh9tQa8QWmsEBDo4bFnpccmBDe5C cEMfmcXaSsqGS9eti0F3gxHJlYCvAaumeObeVYkqi4Uz79sKIxB3NbWjl061etmkKRiE 2q4HKl8GpA52B2sWIDbXe8Xzz0Z+9pGSYwItj7PV9rtPJcmQ8+tzIRA/HMIRJRZsgS+1 K3Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mHihMHkJHoSYa2y3+eloovRGpYKpWBbsaV60BJyEWw0=; b=gS94qNSZMtmrexPKs4GXwxkhI+xZCufL8blX8RRi1yLO2N+qF29OuF7N0AoCdRN1Fv qosUaDh08A0PxgxJyOF8Amr4rb0Lxh5liGjpiSMSE4K9XyG3e/Use2sM8nolYng+Cioj YaUWDzbct9AGdoShk+BlvEt1uoBNW+c5YW+if9r4DkHzVrzxFRjDfOPJfSrE0XjWlelR gqTA63oCw15Z51q9NhZ8rf3qKlFJifiTGmTLpDd4XYuQOTquEsuWfDyEiYqZRoEh2nxp VGbDYYU0/Lfr7lE0BNUII46j5IYVmmcwjVCH6OR5HcU3/xfvVIzYAIm+9WB+BkRGvJvA pTlA== X-Gm-Message-State: AJcUukepetmGd3mHmU6Xg2+2+Pvf8R96PhVBFVwg0v+nitYtMczxPv3A 0gG38hTGIhmo5ydyMg+r082bgRmzL1I= X-Google-Smtp-Source: ALg8bN7l5Bzrfj6eyOMFzoVklQVEYVHeMA8sOADe4Vt/fMl1SVeWqdbvtXEqxoxB2duuq3Ptt0acVA== X-Received: by 2002:a1c:2d44:: with SMTP id t65mr310788wmt.0.1547816128394; Fri, 18 Jan 2019 04:55:28 -0800 (PST) Received: from localhost.localdomain (bzq-109-66-107-204.red.bezeqint.net. [109.66.107.204]) by smtp.gmail.com with ESMTPSA id y185sm25936843wmg.34.2019.01.18.04.55.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Jan 2019 04:55:27 -0800 (PST) From: Rami Rosen To: dts@dpdk.org Cc: Rami Rosen Date: Fri, 18 Jan 2019 14:55:21 +0200 Message-Id: <20190118125521.9195-1-ramirose@gmail.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dts] [PATCH] framework/virt_resource: fix typos X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 12:55:29 -0000 Signed-off-by: Rami Rosen --- framework/virt_resource.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/framework/virt_resource.py b/framework/virt_resource.py index 1b37d4c..f1cbe65 100644 --- a/framework/virt_resource.py +++ b/framework/virt_resource.py @@ -156,17 +156,17 @@ class VirtResource(object): @parallel_lock() def alloc_cpu(self, vm='', number=-1, socket=-1, corelist=None): """ - There're two options for request cpu resouce for vm. + There're two options for request cpu resource for vm. If number is not -1, just allocate cpu from not used cores. If list is not None, will allocate cpu after checked. """ cores = [] if vm == '': - print "Alloc cpu request vitual machine name!!!" + print "Alloc cpu request virtual machine name!!!" return cores - # if vm has been alloacted cores, just return them + # if vm has been allocated cores, just return them if self.__vm_has_resource(vm, 'cores'): return self.allocated_info[vm]['cores'] @@ -197,8 +197,8 @@ class VirtResource(object): def __vm_has_resource(self, vm, resource=''): if vm == '': - self.dut.logger.info("VM name cannt be NULL!!!") - raise Exception("VM name cannt be NULL!!!") + self.dut.logger.info("VM name can't be NULL!!!") + raise Exception("VM name can't be NULL!!!") if vm not in self.allocated_info: self.dut.logger.info( "There is no resource allocated to VM [%s]." % vm) @@ -398,7 +398,7 @@ class VirtResource(object): port -= 5900 self.allocated_info[vm]['displayport'] = port - # do not scan port from the begining + # do not scan port from the beginning if QuickScan: if port_type == 'connect': INIT_FREE_PORT = port @@ -437,7 +437,7 @@ class VirtResource(object): def get_cpu_on_vm(self, vm=''): """ - Return core list on specifid VM. + Return core list on specified VM. """ if vm in self.allocated_info: if "cores" in self.allocated_info[vm]: @@ -445,7 +445,7 @@ class VirtResource(object): def get_vfs_on_vm(self, vm=''): """ - Return vf device list on specifid VM. + Return vf device list on specified VM. """ if vm in self.allocated_info: if 'vfs' in self.allocated_info[vm]: @@ -453,7 +453,7 @@ class VirtResource(object): def get_pfs_on_vm(self, vm=''): """ - Return pf device list on specifid VM. + Return pf device list on specified VM. """ if vm in self.allocated_info: if 'ports' in self.allocated_info[vm]: @@ -524,7 +524,7 @@ if __name__ == "__main__": print virt_pool.alloc_cpu(vm="test3", number=2) print "Alloc port for VM-test1" print virt_pool.alloc_port(vm='test1') - print "Alloc information after allcated" + print "Alloc information after allocated" print virt_pool.allocated_info print "Get cores on VM-test1" -- 2.19.2