Create connector aliases to the new connectors refactor

In I020e75ca8cd8bec2ad1b38f3ade5cc1f63a4fee5 the os-brick connectors
were refactored under the assumption that any connectors were generated
with InitiatorConnector.factory()

Create interim aliases for the connectors at the old module path, this
enables a smooth transition from 1.5.0 to 1.6.X.

These aliases can be removed the next time we bump the major number

Change-Id: I555051f9b646098947facc3e11f35e36fec1a5c0
Related-Bug: 1618697
(cherry picked from commit ee0e9d166e)
This commit is contained in:
Tony Breeds 2016-08-31 17:13:00 +10:00 committed by Sean McGinnis
parent 0e2a40f746
commit 49a89c8757
1 changed files with 8 additions and 0 deletions

View File

@ -163,6 +163,14 @@ _connector_mapping_windows = {
}
# Create aliases to the old names until 2.0.0
# TODO(smcginnis) Remove this lookup once unit test code is updated to
# point to the correct location
for item in connector_list:
_name = item.split('.')[-1]
globals()[_name] = importutils.import_class(item)
@utils.trace
def get_connector_properties(root_helper, my_ip, multipath, enforce_multipath,
host=None, execute=None):