From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.80]) by mx.groups.io with SMTP id smtpd.web11.109520.1683557534786352280 for ; Mon, 08 May 2023 07:52:14 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@nvidia.com header.s=selector2 header.b=SCT3NCzr; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: nvidia.com, ip: 40.107.243.80, mailfrom: nicklew@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VmRjPdpSQigoM/8jTdgn2zbVGUXoFRNzkR+Io7hNVHIJw+wTDwNme0m5Uk/ATuz9fUhOaO4UVg3//VL+z/xqUyBcMDspJ6FxbWLClDFW9X6Puw0UaRUmA5tY5ZcrVHgHgWlYVHDW/4yjjsoOAMtE78ACtceMen4oM+tFtMJnkwnS4gh/KOaXR3+7oms1Q/YnP4yw540pZc/mzjH6h/o3dXlcWNdnZ+B+yhO+GO7A+9cqqq6EqpzVKJMRmzP2NP0wv2/tC1zYyro8TE+d4UkRsR1C/xoajJgIxSDGUtbKIX63PpqwOeSaO5cCfQ+eKXyJtrNqtw0t9n38BpYuZfEZxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ffbNCRrIz6iDMJr1Sald1xzx1plFOFY36NyPikj/Qfo=; b=lX/pna+w9OeIfRMLxIZ6/ayh4Bdn1IDtKWpkmQZGRKBtB7bnfGmDT3OB18Kdq8Oyj2O5mEHbqYRufv8MgpreJ7VmWQPsAmRjseRK7B91jDjJelkLM1p/q0rNWu6WuyDeosKGVMllLDocVfa+jHi4sHww/DWK2FlHH1SueSC6vChQotksvmi4ZfiOAPwhrA75sAGa8Yua1BoJdy7qkkxB9kwdxRt4K6mVaneKyxOqH6dxDYoFO0OEsNnkWt1PXNZigLwkP7Stn3Fp7s1P7+Z9/ScsDVdden08fvOa9JI/dIy8sPd9FCw/RxANshYpxABEX01AltvGhfxAqP5kswF6NQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ffbNCRrIz6iDMJr1Sald1xzx1plFOFY36NyPikj/Qfo=; b=SCT3NCzrUme9rsF3HA3Vse/0ukjOz0oLLW7A+M/RzbvthojiYmkSythEhAdj9F5jmQUrgDuCnwTYbHzWL02D6a2zacUICeUZP/v6UA4XZKIaAG6/hUFmGgAQPQa7YrQ/N8fHkVhUv9J2H+NeSAO3Tyjz8MKIebcUmOJd+/TZ+YRoRa/06ts/8myxRNzNdvf+sNzrna4v++mHHl6rJrtBPNzYWdDSa8+wKiEtmxHxVxF2liWX7ZWjG0iL/N80EzEtJVxIoD0WSovlDDghhwNeK+YF4ly6+H7VJw2D5F1H5WX8hR8XMk4w9BiIKMRam9hqhKMk1VnUS3GdX7FMw25/pA== Received: from CYXPR03CA0024.namprd03.prod.outlook.com (2603:10b6:930:d0::6) by SA1PR12MB6749.namprd12.prod.outlook.com (2603:10b6:806:255::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.32; Mon, 8 May 2023 14:52:12 +0000 Received: from CY4PEPF0000C96F.namprd02.prod.outlook.com (2603:10b6:930:d0:cafe::f) by CYXPR03CA0024.outlook.office365.com (2603:10b6:930:d0::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.32 via Frontend Transport; Mon, 8 May 2023 14:52:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CY4PEPF0000C96F.mail.protection.outlook.com (10.167.242.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.18 via Frontend Transport; Mon, 8 May 2023 14:52:12 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 8 May 2023 07:52:03 -0700 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 8 May 2023 07:52:02 -0700 Received: from NV-CL38DL3.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Mon, 8 May 2023 07:52:01 -0700 From: "Nickle Wang" To: CC: Abner Chang , Igor Kulchytskyy Subject: [edk2-redfish-client][PATCH 5/6] Tool/Redfish-Profile-Simulator: Add missing module Date: Mon, 8 May 2023 22:52:02 +0800 Message-ID: <20230508145202.16945-1-nicklew@nvidia.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Return-Path: nicklew@nvidia.com X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000C96F:EE_|SA1PR12MB6749:EE_ X-MS-Office365-Filtering-Correlation-Id: 8720e9bd-4508-46bb-f956-08db4fd3ce83 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JawI3dbNVbcCTLB11hIErY/zJZ+AD0sEFR5hi/FmvrjMQTWSIcisPchuXIoyVfD0WDBo01Y2WzQlUU3oZPwhQq2Kp1fSB4tSqGCbBJuF5HuKY0ED00wo/tqlfrduRWfY94qlJ/MYihXQ5updEUsiclWbfS1gcLJ38ZW+6RhVXjScKXJsUJBe8+z+augn2amSSYmk+XHDKuyGYbY25qA5rJYxYWLXeC6DMrfDnkLAXGsUxZ+2ac+Dzc7VVLmMj9F7DUKRTl/JYEDGL2hc5Ie0Lt4hLHrh1mi0KIB0pS7rL7/wVuHk7AJ1Bji3B20POAEYEqmnEbeVXlWClOxRRhu+eH6hqPcPA8GLiCbDhhWiWVleOvYfiuWbPqJKXmrZTYiQmNfGgPPAGVZ0OUBIz5k3YrmhVlOgCSB307xx7qoMYShqHL6HvUULD6ftfg/LwqqkWdDwltmaikUaozmw768ji7i3MnGFC8JVcrvp6WJlmWCDrE6rhSv5LQc9rFlMAfBJY3WdkBcRodTP6qW1zlcSyMAj44G7DmLCQb3DXwtFLZZHa7OZ3HVhLEU25orFLAJdTNxwO3cmRWpD0/L7UTb4nyjrjpU/mrA19n/BDFplc+3qhv+umuMKf3KmA2pKCY2hn4KVdCm4m1/shK4yuaDxkfymQbUiRvYc0lWLVkvhaNXXFoOYxkh1nRhk5rIZQHSRkxzu+6cdcbN1g6SsF4FpeA== X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(396003)(376002)(346002)(136003)(39860400002)(451199021)(36840700001)(40470700004)(46966006)(26005)(1076003)(83380400001)(336012)(40480700001)(426003)(36860700001)(36756003)(2616005)(7636003)(86362001)(82310400005)(82740400003)(356005)(186003)(40460700003)(7696005)(47076005)(19627235002)(54906003)(2906002)(8936002)(8676002)(316002)(41300700001)(478600001)(70586007)(6916009)(4326008)(70206006)(5660300002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 May 2023 14:52:12.3413 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8720e9bd-4508-46bb-f956-08db4fd3ce83 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000C96F.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6749 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain Add missing module import for conditional, RfCollection, RfResource, RfResourceRaw, hashlib and OrderedDict Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy --- Tools/Redfish-Profile-Simulator/v1sim/redfishURIs.py | 5 ++++- Tools/Redfish-Profile-Simulator/v1sim/resource.py | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Tools/Redfish-Profile-Simulator/v1sim/redfishURIs.py b/Tools/R= edfish-Profile-Simulator/v1sim/redfishURIs.py index 35d3794c..53a44849 100644 --- a/Tools/Redfish-Profile-Simulator/v1sim/redfishURIs.py +++ b/Tools/Redfish-Profile-Simulator/v1sim/redfishURIs.py @@ -1,7 +1,7 @@ # # Copyright Notice: # Copyright (c) 2019, Intel Corporation. All rights reserved.
-# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
+# (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP
# SPDX-License-Identifier: BSD-2-Clause-Patent # # Copyright Notice: @@ -16,6 +16,9 @@ from flask import request =20 from .flask_redfish_auth import RfHTTPBasicOrTokenAuth =20 +from redfishProfileSimulator import conditional +from v1sim.resource import RfCollection, RfResource, RfResourceRaw + from werkzeug.serving import WSGIRequestHandler =20 def rfApi_SimpleServer(root, versions, host=3D"127.0.0.1", port=3D5000, ce= rt=3D"", key=3D""): diff --git a/Tools/Redfish-Profile-Simulator/v1sim/resource.py b/Tools/Redf= ish-Profile-Simulator/v1sim/resource.py index 0c7a8382..f6bd15cf 100644 --- a/Tools/Redfish-Profile-Simulator/v1sim/resource.py +++ b/Tools/Redfish-Profile-Simulator/v1sim/resource.py @@ -15,6 +15,8 @@ import os import sys =20 import flask +import hashlib +from collections import OrderedDict =20 if sys.version_info >=3D (3, 5): from typing import Type --=20 2.17.1