From nobody Thu Dec 26 14:57:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of ovirt.org designates 66.187.230.42 as permitted sender) client-ip=66.187.230.42; envelope-from=kimchi-devel-bounces@ovirt.org; helo=lists.ovirt.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of ovirt.org designates 66.187.230.42 as permitted sender) smtp.mailfrom=kimchi-devel-bounces@ovirt.org; Return-Path: Received: from lists.ovirt.org (lists.phx.ovirt.org [66.187.230.42]) by mx.zohomail.com with SMTPS id 1493232094801743.2525748472721; Wed, 26 Apr 2017 11:41:34 -0700 (PDT) Received: from lists.phx.ovirt.org (localhost [127.0.0.1]) by lists.ovirt.org (Postfix) with ESMTP id C80BB82052F; Wed, 26 Apr 2017 18:41:32 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lists.ovirt.org (Postfix) with ESMTPS id E3E5282051F for ; Wed, 26 Apr 2017 18:41:18 +0000 (UTC) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v3QIct5r010330 for ; Wed, 26 Apr 2017 14:41:18 -0400 Received: from e24smtp03.br.ibm.com (e24smtp03.br.ibm.com [32.104.18.24]) by mx0b-001b2d01.pphosted.com with ESMTP id 2a2q99y0ug-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 26 Apr 2017 14:41:17 -0400 Received: from localhost by e24smtp03.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 26 Apr 2017 15:41:16 -0300 Received: from d24relay04.br.ibm.com (9.18.232.146) by e24smtp03.br.ibm.com (10.172.0.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 26 Apr 2017 15:41:13 -0300 Received: from d24av02.br.ibm.com (d24av02.br.ibm.com [9.8.31.93]) by d24relay04.br.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v3QIf7mU50397204 for ; Wed, 26 Apr 2017 15:41:12 -0300 Received: from d24av02.br.ibm.com (localhost [127.0.0.1]) by d24av02.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v3QIeq5Q000618 for ; Wed, 26 Apr 2017 15:40:52 -0300 Received: from alinefm-TP440.ibmmodules.com ([9.85.172.56]) by d24av02.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v3QIemaB000501 for ; Wed, 26 Apr 2017 15:40:51 -0300 X-Original-To: kimchi-devel@ovirt.org From: Aline Manera To: Kimchi Devel Date: Wed, 26 Apr 2017 15:40:37 -0300 X-Mailer: git-send-email 2.9.3 X-TM-AS-MML: disable x-cbid: 17042618-0024-0000-0000-0000016D853E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17042618-0025-0000-0000-00001634B4CC Message-Id: <20170426184037.7867-1-alinefm@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-04-26_13:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1704260313 Subject: [Kimchi-devel] [PATCH] [Kimchi] Add server arch from /host API instead of relying on Ginger Base X-BeenThere: kimchi-devel@ovirt.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: kimchi-devel-bounces@ovirt.org Errors-To: kimchi-devel-bounces@ovirt.org X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" That is one more change related to remove Ginger Base dependency from Kimchi. Signed-off-by: Aline Manera Reviewed-by: Daniel Barboza --- control/host.py | 6 +++++- ui/js/src/kimchi.api.js | 6 +++--- ui/js/src/kimchi.main.js | 6 +++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/control/host.py b/control/host.py index b1204fe..7872895 100644 --- a/control/host.py +++ b/control/host.py @@ -17,6 +17,8 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130= 1 USA =20 +import platform + from wok.control.base import Collection from wok.control.base import Resource, SimpleCollection from wok.control.utils import UrlSubNode @@ -25,6 +27,8 @@ from wok.exception import NotFoundError from wok.plugins.kimchi.control.cpuinfo import CPUInfo from wok.plugins.kimchi.utils import is_s390x =20 +ARCH =3D platform.machine() + =20 @UrlSubNode('host', True) class Host(Resource): @@ -39,7 +43,7 @@ class Host(Resource): =20 @property def data(self): - return {} + return {'arch': ARCH} =20 =20 class VolumeGroups(Collection): diff --git a/ui/js/src/kimchi.api.js b/ui/js/src/kimchi.api.js index 1cb89c0..618d68b 100644 --- a/ui/js/src/kimchi.api.js +++ b/ui/js/src/kimchi.api.js @@ -1,7 +1,7 @@ /* * Project Kimchi * - * Copyright IBM Corp, 2013-2016 + * Copyright IBM Corp, 2013-2017 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1314,9 +1314,9 @@ var kimchi =3D { * Get the host information. */ =20 - kimchi.getHostDetails =3D function(suc, err) { + kimchi.serverConfig =3D function(suc, err) { wok.requestJSON({ - url: 'plugins/gingerbase/host', + url: 'plugins/kimchi/host', type: 'GET', resend: true, contentType: 'application/json', diff --git a/ui/js/src/kimchi.main.js b/ui/js/src/kimchi.main.js index f3078ec..47531ae 100644 --- a/ui/js/src/kimchi.main.js +++ b/ui/js/src/kimchi.main.js @@ -1,7 +1,7 @@ /* * Project Kimchi * - * Copyright IBM Corp, 2013-2016 + * Copyright IBM Corp, 2013-2017 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,8 +34,8 @@ kimchi.getCapabilities(function(result) { }); =20 kimchi.hostarch =3D undefined; -kimchi.getHostDetails(function(result) { - kimchi.hostarch =3D result["architecture"]; +kimchi.serverConfig(function(result) { + kimchi.hostarch =3D result["arch"]; }); =20 $(function(){ --=20 2.9.3 _______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel