"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "manila/tests/share/drivers/dell_emc/plugins/vmax/test_connection.py" between
manila-8.1.3.tar.gz and manila-8.1.4.tar.gz

About: OpenStack Manila provides “Shared Filesystems as a service”.
The "Stein" series (maintained release).

test_connection.py  (manila-8.1.3):test_connection.py  (manila-8.1.4)
skipping to change at line 24 skipping to change at line 24
# under the License. # under the License.
import copy import copy
import ddt import ddt
import mock import mock
from oslo_log import log from oslo_log import log
from manila import exception from manila import exception
from manila.share.drivers.dell_emc.common.enas import connector from manila.share.drivers.dell_emc.common.enas import connector
from manila.share.drivers.dell_emc.common.enas import utils as enas_utils
from manila.share.drivers.dell_emc.plugins.vnx import connection from manila.share.drivers.dell_emc.plugins.vnx import connection
from manila.share.drivers.dell_emc.plugins.vnx import object_manager from manila.share.drivers.dell_emc.plugins.vnx import object_manager
from manila import test from manila import test
from manila.tests import fake_share from manila.tests import fake_share
from manila.tests.share.drivers.dell_emc.common.enas import fakes from manila.tests.share.drivers.dell_emc.common.enas import fakes
from manila.tests.share.drivers.dell_emc.common.enas import utils from manila.tests.share.drivers.dell_emc.common.enas import utils
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)
@ddt.ddt @ddt.ddt
skipping to change at line 2214 skipping to change at line 2215
self.connection.update_share_stats(fakes.STATS) self.connection.update_share_stats(fakes.STATS)
expected_calls = [ expected_calls = [
mock.call(self.mover.req_get_ref()), mock.call(self.mover.req_get_ref()),
mock.call(self.pool.req_get()), mock.call(self.pool.req_get()),
] ]
xml_req_mock.assert_has_calls(expected_calls) xml_req_mock.assert_has_calls(expected_calls)
for pool in fakes.STATS['pools']: for pool in fakes.STATS['pools']:
if pool['pool_name'] == fakes.FakeData.pool_name: if pool['pool_name'] == fakes.FakeData.pool_name:
self.assertEqual(fakes.FakeData.pool_total_size, self.assertEqual(
pool['total_capacity_gb']) enas_utils.mb_to_gb(fakes.FakeData.pool_total_size),
pool['total_capacity_gb'])
free_size = (fakes.FakeData.pool_total_size - free_size = (fakes.FakeData.pool_total_size -
fakes.FakeData.pool_used_size) fakes.FakeData.pool_used_size)
self.assertEqual(free_size, pool['free_capacity_gb']) self.assertEqual(enas_utils.mb_to_gb(free_size),
pool['free_capacity_gb'])
def test_update_share_stats_without_matched_config_pools(self): def test_update_share_stats_without_matched_config_pools(self):
self.connection.pools = set('fake_pool') self.connection.pools = set('fake_pool')
hook = utils.RequestSideEffect() hook = utils.RequestSideEffect()
hook.append(self.mover.resp_get_ref_succeed()) hook.append(self.mover.resp_get_ref_succeed())
hook.append(self.pool.resp_get_succeed()) hook.append(self.pool.resp_get_succeed())
xml_req_mock = utils.EMCMock(side_effect=hook) xml_req_mock = utils.EMCMock(side_effect=hook)
self.connection.manager.connectors['XML'].request = xml_req_mock self.connection.manager.connectors['XML'].request = xml_req_mock
 End of changes. 3 change blocks. 
3 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)