From c51766729860ac8be818e7942a690839714f3a18 Mon Sep 17 00:00:00 2001
From: Tina Tang <tina.tang@emc.com>
Date: Wed, 23 Nov 2016 13:35:49 +0800
Subject: [PATCH] Change network allocation of Unity driver to 1

One IP port is enough for share server created on Unity system.
This patch change the IP allocation in Unity driver from 2 to 1.

Change-Id: I3e8ea3f5fe1d3e713239d5c0fb19733abc97f5bd
Closes-Bug: 1648328
---
 manila/share/drivers/dell_emc/plugins/unity/connection.py       | 2 +-
 .../share/drivers/dell_emc/plugins/unity/test_connection.py     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/manila/share/drivers/dell_emc/plugins/unity/connection.py b/manila/share/drivers/dell_emc/plugins/unity/connection.py
index bfe7d058fd..1dfabb806f 100644
--- a/manila/share/drivers/dell_emc/plugins/unity/connection.py
+++ b/manila/share/drivers/dell_emc/plugins/unity/connection.py
@@ -45,7 +45,7 @@ SUPPORTED_NETWORK_TYPES = (None, 'flat', 'vlan')
 class UnityStorageConnection(driver.StorageConnection):
     """Implements Unity specific functionality for EMC Manila driver."""
 
-    IP_ALLOCATIONS = 2
+    IP_ALLOCATIONS = 1
 
     @emc_utils.log_enter_exit
     def __init__(self, *args, **kwargs):
diff --git a/manila/tests/share/drivers/dell_emc/plugins/unity/test_connection.py b/manila/tests/share/drivers/dell_emc/plugins/unity/test_connection.py
index 943d400a26..ebfcfc9ab9 100644
--- a/manila/tests/share/drivers/dell_emc/plugins/unity/test_connection.py
+++ b/manila/tests/share/drivers/dell_emc/plugins/unity/test_connection.py
@@ -597,7 +597,7 @@ class TestConnection(test.TestCase):
 
     @res_mock.patch_connection
     def test_get_network_allocations_number(self, connection):
-        self.assertEqual(2, connection.get_network_allocations_number())
+        self.assertEqual(1, connection.get_network_allocations_number())
 
     @res_mock.patch_connection
     def test_get_proto_enum(self, connection):