improve the name of the variable in basic_consolidation.py

Bug #1541615 reported by Jean-Emile DARTOIS
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
watcher
Fix Released
Low
Steve Wilkerson

Bug Description

Good variable names are:

a) short / easy to type,

b) easy to remember,

c) understandable / communicative.

For example :
replace : s = sorted(score, reverse=True, key=lambda x: (x[1]))
by
sorted_score = sorted(score, reverse=True, key=lambda x: (x[1]))

    def calculate_m(self, v, current_model, node_to_release, s):
        m = 0
by
    def calculate_m(self, sorted_vms, current_model, node_to_release,
                    sorted_score):
        number_of_migration = 0

summary: - improving the name of the variable
+ improving the name of the variable in basic_consolidation
Changed in watcher:
importance: Undecided → Critical
importance: Critical → Low
milestone: none → mitaka-3
summary: - improving the name of the variable in basic_consolidation
+ improve the name of the variable in basic_consolidation.py
description: updated
tags: added: low-hanging-fruit
Changed in watcher:
assignee: nobody → Steve Wilkerson (sw5822)
Changed in watcher:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to watcher (master)

Reviewed: https://review.openstack.org/276221
Committed: https://git.openstack.org/cgit/openstack/watcher/commit/?id=37dd713ed55ca89ffe886b934269e756e6c28f93
Submitter: Jenkins
Branch: master

commit 37dd713ed55ca89ffe886b934269e756e6c28f93
Author: Steve Wilkerson <email address hidden>
Date: Thu Feb 4 07:23:23 2016 -0600

    Improve variable names in strategy implementations

    Renamed many of the variables and method parameters
    in the strategy implementations to make the names
    more meaningful. Also changed the abstract method
    signature in base.py to reflect these changes.

    Closes-Bug: #1541615

    Change-Id: Ibeba6c6ef6d5b70482930f387b05d5d650812355

Changed in watcher:
status: In Progress → Fix Released
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.