HP 3PAR modules do not follow coding guidelines

Bug #1411370 reported by Richard Hagarty
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Richard Hagarty

Bug Description

Found multiple instances in test_hp3par and hp_3par_common which violate coding/style guidelines -

1) Use "," instead of "%" when adding variables to log messages. This allows logging to skip creating the formatted message when it won't be displayed due to the current log level.

2) Using "\" to continue lines should be avoided.

Tags: drivers hp
Changed in cinder:
assignee: nobody → Richard Hagarty (richard-hagarty)
summary: - HP 3PAR tests do not follow coding guidelines
+ HP 3PAR modules do not follow coding guidelines
description: updated
Mike Perez (thingee)
tags: added: drivers hp
Changed in cinder:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/149373

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/149373
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=13eb0cfba3c2971ef39baa010d43707aa5226fd0
Submitter: Jenkins
Branch: master

commit 13eb0cfba3c2971ef39baa010d43707aa5226fd0
Author: Rich Hagarty <email address hidden>
Date: Fri Jan 16 13:11:28 2015 -0800

    HP 3PAR modules do not follow coding guidelines

    Should use "," instead of "%" in logging messages, and
    the use of "\" to continue lines should be avoided.

    Change-Id: I23d53d66fda47981ed8f20b618b2ced8ef6e0682
    Closes-Bug: #1411370

Changed in cinder:
status: In Progress → Fix Committed
Mike Perez (thingee)
Changed in cinder:
milestone: none → kilo-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/149799
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=1bab7b69a81c33e09d730cdf35f9e2ad4b97046a
Submitter: Jenkins
Branch: master

commit 1bab7b69a81c33e09d730cdf35f9e2ad4b97046a
Author: Rich Hagarty <email address hidden>
Date: Fri Jan 23 17:44:53 2015 -0800

    HP 3PAR modules have bad log messages

    Some log messages are incorrectly formatted. Specifically, those
    messages that take multiple variables. In this case, each variable
    needs to be assigned a unique placeholder.

    This defect was recently introduced when all log messages where
    updated to use "," instead of "%" (see
    Change-Id: I23d53d66fda47981ed8f20b618b2ced8ef6e0682),
    which allowed translations to be ignored if not required by current
    log levels.

    Change-Id: Ic3439ba24c61579457dee206064bed2465ae4b6b
    Closes-Bug: #1411370

Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-2 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.