Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp19171ybt; Tue, 30 Jun 2020 13:56:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8fmtFy20HxVoXBzVjXNdz6/ygh8iIp2U0L/iV9zgct5a7GyUgG2YIWU6xJ2R96TD4ny29 X-Received: by 2002:a17:906:3952:: with SMTP id g18mr21079261eje.68.1593550118305; Tue, 30 Jun 2020 13:48:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593550118; cv=none; d=google.com; s=arc-20160816; b=AKchQE73FYxaSpJcHFVRegn584i2sgpbuG6MNT/tPIf1qcSW0PGUNkjUuDAmR5pDAm GKDRvmBrKDlnUjM8IUf92owEbe1f30Xd65KrHWEfQzolv/Z9Tm86SWTYskUlV+sjzIoJ tP5Xw+u+5KjfU+bkiMPUN6uhZwN8RYk1YbZYGaOzgF8r8jLd+fzdiHKYgVH9+CBU6ZvT sSxeD53md0OnX5wp6meUYqtQnCRqdpXX4PhYwwqGVzqiGBFwkTkqW09gzBmhIduPFx5N c1a1qN/iqrPZTtVAHm+ULr3JV+PhKfsdNBDS6LFDgiv2cB4mODnpPP36p4UqX9xLBH2O rkgA== 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=ehI1qR94H9Ljnh4nUWj8kbquiDfhgAMUP5T/hE2+vtTWlmJd6J1+BdTRFQLchzXHn+ Ivu85RJJIMxoNooQbvvVDCC4GZ58MHqQXHKQ7+6ofc4ZgfJs7ZBZJdcXrhTcsIHaSERd 1G6+QqaLd/8iZIL2/dl+ZvdUDgUv5/G8VbblhiXmAuXxL8RcdSEz3wRN/U/SaKQA23O/ y7dyxw+W1kP+pBD0pvWZZM79JnQex1S67/8hpb7elwhGO7li2D74pCqO8hPZE7sQ7Rgx 2xVqp4ALpRogm07nxGXgy/N/ufQJROaagGTQUYnrLgY8cT5VbI+hHqULYxYk8ZAX9CWx wSBQ== 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 dg2si2405502edb.326.2020.06.30.13.48.13; Tue, 30 Jun 2020 13:48: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 S1726485AbgF3S4X (ORCPT + 99 others); Tue, 30 Jun 2020 14:56:23 -0400 Received: from mga05.intel.com ([192.55.52.43]:57136 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726207AbgF3S4X (ORCPT ); Tue, 30 Jun 2020 14:56:23 -0400 IronPort-SDR: 6n+nDLIJXPhryc5ADHUtC6B5Ywy7rmeYMkZ1NsSkWpN7XQcz3es4JTAFz6YNR3Dy6+IPlXoLyy hvM+PjClPPFg== X-IronPort-AV: E=McAfee;i="6000,8403,9668"; a="231222959" X-IronPort-AV: E=Sophos;i="5.75,298,1589266800"; d="scan'208";a="231222959" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2020 11:56:22 -0700 IronPort-SDR: q/I2bh4OLnBPF6jWSkOSnVJ/QPB/P6ZdRd94CXkvYchHp1Zd5cd+FEuCHOp+Y6fccMMIS1Qy5A rW/VcnMFvvmg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,298,1589266800"; d="scan'208";a="355864262" Received: from mlindstr-mobl1.amr.corp.intel.com (HELO ingas-nuc1.sea.intel.com) ([10.254.108.27]) by orsmga001.jf.intel.com with ESMTP; 30 Jun 2020 11:56:22 -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 v2 4/4] test/test-mesh: Add options to "Models" property Date: Tue, 30 Jun 2020 11:56:17 -0700 Message-Id: <20200630185617.14755-5-inga.stotland@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200630185617.14755-1-inga.stotland@intel.com> References: <20200630185617.14755-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