Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3360787ybt; Tue, 30 Jun 2020 00:20:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxyRRnVAK9gwNvFxxXLTtiOnvsAMZsNlIEu9TXlQ0U90StrPiAuPq+M6/owssVeGg1Y6LY X-Received: by 2002:a17:906:1986:: with SMTP id g6mr4760893ejd.404.1593501638287; Tue, 30 Jun 2020 00:20:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593501638; cv=none; d=google.com; s=arc-20160816; b=aLIebt1tiz8ofKWF9LkPhhJb5o+tIFobMfiUd6hOUZ97lEj7VJhjYBNUoq191WqlYI JKtBJ9rMHd8+gFWiax8L8Xm31TajeqFRHWA6BdbYJeHn8wlojMAfOIr9qkNPXagqVi1b IQrNLhHr3/9/uZql1xoOJRCE5kuGpmau0ap5m4tyaV/tsHbo7LsxlFRsHoZCPHIgMvH4 sgIMeGBpSERRx4nKvkpM7D5xF+Jg4dNhmyPxrBhxDfWO+V4CLxk2HW2ersnRuWw9mF1S UPifX87pSvJ8bKfikMCvDWMWs/cwo7/hHuDeUJmpfFFH8EvPUVzqQx35UgP7Hw8tQ6LZ MWSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=dVXKR1KyC5j/7dgT03DrdHxRWQp9BpiOxWnOURdti4M=; b=cAUI5+SlxpyFAfLXGD4BGRDuARqlP+ogwv4sWfVJB5N43qFOCh6QTz0Xnlg++giJNu 2Dyp+ejdKMjCZac8lGXZezbbKKUOINFTxG6zEJQ04vNknrv9LM/rzTbm0W7HWlNV/5wN +NABS63uS4ewow6EegtIJTzEpHounC/z+Eg7cp5YXci9Ac6Daw/UeuWydGnBpuu6ovkm UCNB07ayvDYlxmffOaS+e6NiW+jKkJ/nh2T/xABwddeMoZiyTMMeCjqI+V7V6i79UMxp C55nAndFXzmuO8tfDYsaDByrmocv9+9UW9ZopNPtXEphw/EetqkeWtsCaJBzDEsakcX3 c31g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m1si1235369edr.207.2020.06.30.00.20.07; Tue, 30 Jun 2020 00:20:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730793AbgF3HTm (ORCPT + 99 others); Tue, 30 Jun 2020 03:19:42 -0400 Received: from mga18.intel.com ([134.134.136.126]:22973 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730795AbgF3HTl (ORCPT ); Tue, 30 Jun 2020 03:19:41 -0400 IronPort-SDR: jkwkBSdPtAQf7W47bWDfcOKW3bupA0o+n3hWrMlmrafVSnris+tA0fcCtGyxkO3up80FPITXs9 /XU/k+brExwQ== X-IronPort-AV: E=McAfee;i="6000,8403,9666"; a="133613603" X-IronPort-AV: E=Sophos;i="5.75,296,1589266800"; d="scan'208";a="133613603" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2020 00:19:40 -0700 IronPort-SDR: yOVwbGdb52nBWtXzMgGjKCrLR15CIqjU7M5ZWxWAn8RwmKYHh8IISWmNovVOk2iO+OFw06KYka CMObFf0kervg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,296,1589266800"; d="scan'208";a="355698485" Received: from sdkini-mobl1.amr.corp.intel.com (HELO ingas-nuc1.sea.intel.com) ([10.254.110.226]) by orsmga001.jf.intel.com with ESMTP; 30 Jun 2020 00:19:40 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, michal.lowas-rzechonek@silvair.com, Inga Stotland Subject: [PATCH BlueZ 4/4] test/test-mesh: Add options to "Models" property Date: Tue, 30 Jun 2020 00:19:36 -0700 Message-Id: <20200630071936.40437-5-inga.stotland@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200630071936.40437-1-inga.stotland@intel.com> References: <20200630071936.40437-1-inga.stotland@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This adds options dictionary to "Models" property to stay in sync with mesh-api changes. --- test/test-mesh | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/test/test-mesh b/test/test-mesh index 7c8a25482..5da0278d6 100755 --- a/test/test-mesh +++ b/test/test-mesh @@ -430,32 +430,35 @@ class Element(dbus.service.Object): dbus.service.Object.__init__(self, bus, self.path) def _get_sig_models(self): - ids = [] + mods = [] for model in self.models: + opts = [] id = model.get_id() vendor = model.get_vendor() if vendor == VENDOR_ID_NONE: - ids.append(id) - return ids + mod = (id, opts) + mods.append(mod) + return mods def _get_v_models(self): - ids = [] + mods = [] for model in self.models: + opts = [] id = model.get_id() v = model.get_vendor() if v != VENDOR_ID_NONE: - vendor_id = (v, id) - ids.append(vendor_id) - return ids + mod = (v, id, opts) + mods.append(mod) + return mods def get_properties(self): vendor_models = self._get_v_models() sig_models = self._get_sig_models() props = {'Index' : dbus.Byte(self.index)} - props['Models'] = dbus.Array(sig_models, signature='q') + props['Models'] = dbus.Array(sig_models, signature='(qa{sv})') props['VendorModels'] = dbus.Array(vendor_models, - signature='(qq)') + signature='(qqa{sv})') #print(props) return { MESH_ELEMENT_IFACE: props } -- 2.26.2