@mock.patch('six.moves.builtins.open')
@mock.patch('paramiko.SSHClient')
def test_closed_reopened_ssh_connections(self, mock_sshclient, mock_open):
- mock_sshclient.return_value = eval('FakeSSHClient')()
+ mock_sshclient.return_value = FakeSSHClient()
sshpool = ssh_utils.SSHPool("127.0.0.1", 22, 10,
"test",
password="test",
# License for the specific language governing permissions and limitations
# under the License.
+import ast
import inspect
import os.path
self.conn = self._get_ecom_connection()
if isinstance(loc, six.string_types):
- name = eval(loc)
+ name = ast.literal_eval(loc)
keys = name['keybindings']
systemName = keys['SystemName']
version = None
try:
if isinstance(loc, six.string_types):
- name = eval(loc)
+ name = ast.literal_eval(loc)
version = name['version']
except KeyError:
pass
# License for the specific language governing permissions and limitations
# under the License.
+import ast
+
from oslo_log import log as logging
import six
data = {'driver_volume_type': 'fibre_channel',
'data': {}}
loc = volume['provider_location']
- name = eval(loc)
+ name = ast.literal_eval(loc)
storage_system = name['keybindings']['SystemName']
LOG.debug("Start FC detach process for volume: %(volume)s.",
{'volume': volume['name']})
"""
Cinder Volume driver for Fujitsu ETERNUS DX S3 series.
"""
+import ast
import base64
import hashlib
import six
volumename = self._create_volume_name(volume['id'])
try:
- location = eval(volume['provider_location'])
+ location = ast.literal_eval(volume['provider_location'])
classname = location['classname']
bindings = location['keybindings']