From a13739fa0e55e7c79a3ce099c24e164dada00aef Mon Sep 17 00:00:00 2001 From: Salvatore Orlando Date: Mon, 20 Sep 2021 05:53:08 -0700 Subject: [PATCH] [API replay] QoS rules do not have an id Fix log statements for raporting elapsed time in API replay for QoS rules. Change-Id: I6bdedf0e89c66927e40ef0d15f1f04631547fa1b --- vmware_nsx/api_replay/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vmware_nsx/api_replay/client.py b/vmware_nsx/api_replay/client.py index 67845d6533..a78da76bb1 100644 --- a/vmware_nsx/api_replay/client.py +++ b/vmware_nsx/api_replay/client.py @@ -340,7 +340,8 @@ class ApiReplayClient(utils.PrepareObjectForMigration): {'rule': rule_type, 'pol': pol_id}) if rule: LOG.info("created QoS policy %s rule %s", pol_id, rule) - self._log_elapsed(start, "Migrate QoS rule %s" % rule['id']) + self._log_elapsed( + start, "Migrate QoS rule for policy %s" % pol_id) except Exception as e: self.add_error("Failed to create QoS rule %(rule)s for policy " "%(pol)s: %(e)s" % {'rule': body, 'pol': pol_id,