'Test setup
Setup should retrieve values from xcli
and set the IQN and Portal'

@mock.patch('cinder.volume.drivers.ibm.ibm_storage.xiv_proxy.client.XCLIClient')
@mock.patch('cinder.volume.drivers.ibm.ibm_storage.xiv_proxy.storage.get_online_iscsi_ports', mock.MagicMock(return_value=['WTF32']))
@mock.patch('cinder.volume.drivers.ibm.ibm_storage.xiv_proxy.socket.getfqdn', new=mock.MagicMock(return_value='test_hostname'))
def test_setup_should_set_iqn_and_portal(self, mock_xcli):

    p = self.proxy(self.default_storage_info, mock.MagicMock(), test_mock.cinder.exception)
    cmd = mock_xcli.connect_multiendpoint_ssl.return_value.cmd
    item = cmd.config_get.return_value.as_dict.return_value.__getitem__
    item.return_value.value = 'BLA'
    p.setup({})
    self.assertEqual('BLA', p.meta.get('ibm_storage_iqn'))
    self.assertEqual('WTF32:3260', p.meta.get('ibm_storage_portal'))
