54 Commits

Author SHA1 Message Date
Jenkins
2f5fcf8f38 Merge "Add volume driver for Tegile IntelliFlash array" 2015-12-29 23:40:02 +00:00
Abhilash Divakaran
951a757ec0 Add volume driver for Tegile IntelliFlash array
The Tegile driver will support the iSCSI and FC protocols and it will
include the minimum set of features.
[Supported Protocol]
 - iSCSI, FC

[Supported Feature]
 - Volume Create/Delete
 - Volume Attach/Detach
 - Snapshot Create/Delete
 - Create Volume from Snapshot
 - Get Volume Stats
 - Copy Image to Volume,
 - Copy Volume to Image
 - Clone Volume
 - Extend Volume

Tegile has setup a CI. It will report as "Tegile Storage CI".

DocImpact
Implements: blueprint tegile-volume-driver
Change-Id: Ia0e6c320964f3955d6c7d4dcff4a0241a3960495
2015-12-28 11:36:37 -08:00
Takeshi Nishikawa
b2a1b91071 Rebrand HP XP driver to now be HPE
This patch refactors the HP XP driver to be HPE XP.
This is being done because the company responsible for
this driver is now Hewlett Packard Enterprise (HPE).
The driver is now located in the cinder/volume/drivers/hpe folder.

DocImpact
Implements: blueprint rebrand-hp-xp-driver
Change-Id: Ia16d39b9fec299662c97c236215a4e1aec44171a
2015-12-24 21:52:26 +09:00
Jenkins
e1ae777bdc Merge "Port zonemanager to Python 3" 2015-12-21 20:17:20 +00:00
Jenkins
6275557076 Merge "Python 3: fix a lot of tests" 2015-12-09 18:06:39 +00:00
Jenkins
ddad6a1a49 Merge "Volume driver for Coho Data storage solutions" 2015-12-09 02:40:50 +00:00
Cyril Roelandt
75c04831bc Python 3: fix a lot of tests
As of this commit, the following tests should now be working with Python 3:

- cinder.tests.unit.api.contrib.test_cgsnapshots
- cinder.tests.unit.api.contrib.test_scheduler_hints
- cinder.tests.unit.api.contrib.test_snapshot_actions
- cinder.tests.unit.api.contrib.test_snapshot_manage
- cinder.tests.unit.api.contrib.test_snapshot_unmanage
- cinder.tests.unit.api.contrib.test_volume_encryption_metadata
- cinder.tests.unit.api.contrib.test_volume_host_attribute
- cinder.tests.unit.api.contrib.test_volume_manage
- cinder.tests.unit.api.contrib.test_volume_migration_status_attribute
- cinder.tests.unit.api.contrib.test_volume_tenant_attribute
- cinder.tests.unit.api.contrib.test_volume_unmanage
- cinder.tests.unit.api.v2.test_volumes

Most changes in this patch:
- make sure that Request.body is set to bytes;
- replace jsonutils.dumps with jsonutils.dump_as_bytes;
- replace json.loads with oslo_serialization.jsonutils.loads;
- replace dict.iteritems with dict.items.

Partial-Implements: blueprint cinder-python3
Change-Id: Icbb96ff84b7012b58f7296eea4fbcd620e081614
2015-12-07 15:34:20 +01:00
Bardia Keyoumarsi
f7e9c240dc Volume driver for Coho Data storage solutions
This patch introduces Coho Data volume driver along with unit tests.

Implements: blueprint coho-cinder-driver

DocImpact
Documentation for setting up the Coho driver and enabling it
in Cinder will be provided in a separate patch.

Change-Id: I06a66d10add9132d0f3afca054d68094ddfb4da0
Signed-off-by: Bardia Keyoumarsi <bardia.keyoumarsi@cohodata.com>
2015-12-06 21:31:33 -08:00
Jenkins
65a6c40b6e Merge "Nexenta Edge iSCSI backend driver" 2015-11-26 17:01:35 +00:00
mikhail
ee352dcf03 Nexenta Edge iSCSI backend driver
Nexenta Edge project supports iSCSI block level storage.
This patch implements a driver for Nexenta Edge iSCSI backend.

DocImpact
Implements: blueprint nexentaedge-iscsi-volume-driver
Change-Id: I82c215ba85e9d49723e792d88d86553b3a75d3ac
2015-11-25 17:37:37 -06:00
Nicolas Trangez
49b05a999c Revert "Add Scality SRB driver"
The Scality SRB kernel-driver is being re-designed to optimize for
specific workloads, which are (initially) not compatible with VM-style
block device access. Not to confuse users, we believe it's advisable to
remove the Cinder SRB driver in the meantime.

This reverts commit a23f17f8cebe5e1e57f675aedf6272257257d1b7.

Some references to the SRB driver and test modules added in later
commits are removed as well.

Conflicts:
        cinder/tests/unit/test_srb.py
        cinder/volume/drivers/srb.py
        etc/cinder/rootwrap.d/volume.filters

See: 2f9e4163f42ae5246fd997b9f35e16d3d97be54f
See: 3fda737f53824170bd59eb6e8ce2e991c89c3c1d

Change-Id: Ic9d79b09363ef904932128f63371ba01a15c5d31
2015-11-25 16:24:07 +01:00
Jenkins
40939aea76 Merge "Port xio driver to Python 3" 2015-11-25 13:41:27 +00:00
Victor Stinner
b2050e4a08 Port zonemanager to Python 3
* Replace xrange() with six.moves.range()
* Replace filter() with list-comprehension to get a list on Python 3.
* get_formatted_wwn(): join byte strings with b':' instead of ':'
* ZoneManager: don't pass arguments to object.__new__()
* tests-py3.txt: add zonemanager tests

Partial-Implements: blueprint cinder-python3
Change-Id: Ia3fcd816c5afd7a08b8769fbc9d2839b70c8c3fb
2015-11-24 21:00:09 +01:00
Victor Stinner
52f62c31f7 Port key manager to Python 3
* Replace text.decode('hex') with binascii.unhexlify(text)
* test_barbican: base64 string is a bytes string
* tests-py3.txt: add keymgr tests

Partial-Implements: blueprint cinder-python3
Change-Id: Icc19fa354603857b259458b858e27c5bdd600360
2015-11-24 20:58:32 +01:00
Victor Stinner
ad821f2864 Port IBM storewize_svc driver to Python 3
Change default preferred node in
StorwizeSVCDriver.initialize_connection(). For fiber channel without
multipath, pick the first node from the list of sorted nodes, to have
a determinist preferred node. The list of nodes is created indirectly
using list(set(nodes)) which doesn't have a determinist order. On
Python 3, the hash function is randomized, and so list(set()) has an
unknown order.

A similar change was done for volume throttling in the change
Icf7141f772397c7ac08f0f1e21ad74cb86a06351 to port the code
to Python 3.

Other changes:

* Use assertSetEqual() in test_storwize_svc to compare
  initiator_target_map, because conn_wwpns has a random order on
  Python 3.
* StorwizeSVCDriver._check_volume_copy_ops(): replace dict.items()
  with list(dict.items()) to iterate on items. On Python 3,
  dict.items() now returns a view instead of a copy. The loop
  modifies the dictionary and a dict must not be modified while
  iterating on it, we really need a copy of items.
* StorwizeHelpers: replace a/b with a//b to use integer division on
  Python 3.
* tests-py3.txt: add cinder.tests.unit.test_storwize_svc

Partial-Implements: blueprint cinder-python3
Change-Id: I534a85928816d6cce921545e1820311aedd1b884
2015-11-24 12:15:24 +01:00
Jenkins
00800f2f86 Merge "Port EMC VMAX to Python 3" 2015-11-23 14:07:04 +00:00
Jenkins
0747a64b6b Merge "Port EMC VNX CLI to Python 3" 2015-11-23 14:02:45 +00:00
Jenkins
6e872f2758 Merge "Refactor HP LeftHand driver to now be HPE" 2015-11-18 22:54:21 +00:00
Anthony Lee
091d4cc3fa Refactor HP LeftHand driver to now be HPE
This patch refactors the HP LeftHand driver to be
HPE LeftHand.

This is being done because the company responsible for
this driver is now Hewlett Packard Enterprise (HPE).

The driver is now located in the cinder/volume/drivers/hpe
folder.

DocImpact
Implements: blueprint rebrand-hp-lefthand-driver
Change-Id: I42eb5b3a51d547e45338a4964f31e0aca2ce43d8
2015-11-17 13:38:07 -08:00
Victor Stinner
3e002b57c3 Port HP 3PAR driver to Python 3
* Use oslo_serialization.base64.encode_as_text() to get Unicode on
  Python 3.
* Replace sys.maxint with sys.maxsize, sys.maxint was removed in
  Python 3.
* test_hpe3par: use list(set()) to get FCWWNs is the right order. On
  Python 3, the hash function is randomized by default.
* test_hpe3par: fix client getWsApiVersion() to return a valid
  version. Before, the comparison between mock.Mock and int raised a
  TypeError.
* hpe_3par_common: set version to 3.0.2
* hpe_3par_iscsi: set version to 3.0.1
* tox.ini: add test_hpe3par to Python 3.4

Partial-Implements: blueprint cinder-python3
Change-Id: I2bed171c0db93b8ea83127a69a63c3bb2317b10b
2015-11-16 09:58:21 +01:00
Victor Stinner
8e527c806b Port xio driver to Python 3
* Replace base64.encodestring() with
  oslo_serialization.base64.encode_as_text() to get Unicode
  on Python 3.
* Replace string.upper(text) with text.upper()
* Replace string.replace(text, a, b) with text.replace(a, b)
* tox.ini: add test_xio to Python 3.4

Partial-Implements: blueprint cinder-python3
Change-Id: I75a5dee2fd1f8cf45dbf416b0353736a43efd8e8
2015-11-13 16:38:20 +01:00
Jenkins
037dc38ef9 Merge "Port zfssa driver to Python 3" 2015-11-13 12:36:10 +00:00
Victor Stinner
3a5cf11156 Port EMC VMAX to Python 3
* Fix EMCVMAXMasking._get_storage_group_from_masking_view_instance():
  replace "if groups[0] > 0:" with "if len(groups):"
* tests-py3.txt: add cinder.tests.unit.test_emc_vmax

Partial-Implements: blueprint cinder-python3
Change-Id: I0f6be3cc0873efe683d39c4c70e19d0d0b79beb8
2015-11-13 10:23:15 +01:00
Victor Stinner
b12fb487b4 Port EMC VNX CLI to Python 3
CreateConsistencyGroupTask, WaitMigrationsCompleteTask: sort the lun
identifier keys to have a determinist order. On Python 3, the hash
function is randomized, so set() order is undefined and changes at
each run.

Other changes:

* Replace map() with list-comprehension to get a list on Python 3.
* Replace assertTrue(str.find(pattern) > 0) with
  assertIn(pattern, str) to not fail if pattern is at the beginning
  on the string. On Python 3, the hash function is randomized and so
  parts of the provider_location are in a random order, it can be at
  the beginning.
* tests-py3.txt: add cinder.tests.unit.test_emc_vnxdirect

Partial-Implements: blueprint cinder-python3
Change-Id: I114029c1c9862583e64781379001870a682ea42d
2015-11-13 10:22:14 +01:00
Jenkins
3debb44d6b Merge "py3: Fix error handling in prophetstor driver" 2015-11-13 03:06:03 +00:00
Jenkins
536bc42564 Merge "Port vzstorage to Python 3" 2015-11-13 00:51:13 +00:00
Victor Stinner
2ff3f0be12 py3: Fix error handling in prophetstor driver
* Port prophetstor driver to Python 3
* Replace "except exception as e:" with "except Exception as e:"
  to handle "Fexvisor failed to join the volume ..." and "Fexvisor
  failed to remove the volume ..." errors. Here, lower case
  "exception" is the cinder.exception module, not an exception class.
  On Python 3, "except" requires exception classes.
* tests-py3.txt: add cinder.tests.unit.test_prophetstor_dpl

Partial-Implements: blueprint cinder-python3
Change-Id: I0447b62cc0afe5a10ecbc888dfb6608b69f977d2
2015-11-12 23:54:28 +00:00
Jenkins
54db043ae9 Merge "Port cinder.utils.monkey_patch() to Python 3" 2015-11-09 04:19:42 +00:00
Jenkins
b04e6e9abc Merge "Port cinder.hacking to Python 3" 2015-11-09 00:22:40 +00:00
Victor Stinner
e3ff1c3c69 Port zfssa driver to Python 3
* Replace base64.encodestring() with
  oslo_serialization.base64.encode_as_text() to accept Unicode as
  input (encoded to UTF-8). On Python 3, the function decodes base64
  from ASCII to get Unicode.
* tests-py3.txt: add cinder.tests.unit.test_zfssa

Partial-Implements: blueprint cinder-python3
Change-Id: I29a1a752d4cad5796fba1f21fe88238cb4414717
2015-11-08 22:14:38 +01:00
Victor Stinner
2c49f5ddfc Port vzstorage to Python 3
* vzstorage: replace a/b with a//b to use integer division on
  Python 3.
* fix os.path.exists mock: only override return for path /fake
  (shares config)
* tests-py3.txt: add cinder.tests.unit.test_vzstorage

Note: remove also spaces in parameters in two functions calls to
respect the PEP 8.

Partial-Implements: blueprint cinder-python3
Change-Id: I7cee7009d8bc87cd0294e90cb2967f4560276994
2015-11-08 22:07:57 +01:00
Victor Stinner
ee14adec87 Port cinder.utils.monkey_patch() to Python 3
On Python 3, unbound methods are regular functions: use pass
inspect.isfunction to inspect.getmembers().

tox.ini: add test_utils to Python 3.4.

Partial-Implements: blueprint cinder-python3
Change-Id: I4fe9936792a43aff301010780e86244bdf2d05de
2015-11-08 21:40:17 +01:00
Jenkins
a06236e6c1 Merge "Port vmware datastore to Python 3" 2015-11-07 05:35:22 +00:00
Victor Stinner
5a87c0726b Port vmware datastore to Python 3
* _filter_datastores(): replace filter() with list comprehension
  to get a list on Python 3.
* tox.ini: add test_vmware_datastore to Python 3.4.

Partial-Implements: blueprint cinder-python3
Change-Id: Ide4e4adf012e155b99b528ddde937df1a48a079b
2015-11-06 17:30:44 +01:00
Victor Stinner
9eea3951c7 Port cinder.hacking to Python 3
Fix the N325 check on Python 3: the AST changed between Python 2 and
Python 3 for try/except.

tox.ini: Add cinder.tests.unit.test_hacking to Python 3.4.

Partial-Implements: blueprint cinder-python3
Change-Id: I7c7d1c5e52f525ade14b13ecf2dec1681997da22
2015-11-05 17:36:32 +01:00
Victor Stinner
6533655c84 Port test_tintri to Python 3
* Set configuration.nfs_oversub_ratio, otherwise tests
  fail with TypeError on comparison between mock.Mock and int.
* tox.ini: add test_tintri to Python 3.4.

Change-Id: Ie2b5215795481bdfb11116876d83ef777a10c224
Partial-Implements: blueprint cinder-python3
2015-11-05 17:20:41 +01:00
Victor Stinner
34b0ea07c4 Port API admin action tests to Python 3
* Replace ast.literal_eval(response.body) with response.json
* Use oslo_serialization.jsonutils.dump_as_bytes() to encode the
  response to JSON as bytes for the HTTP body.
* tests-py3.txt: add cinder.tests.unit.api.contrib.test_admin_actions

Partial-Implements: blueprint cinder-python3
Change-Id: Ib30c701b9dbbcc774dfc5f19a7174ab318006206
2015-10-14 22:17:26 +02:00
Victor Stinner
08b6b23cad Port API types extra specs to Python 3
* Replace dict.iteritems() with dict.items(). The iteritems() method
  of dictionaries was removed in Python 3.
* Add cinder.tests.unit.api.contrib tests to tests-py3.txt:

  - test_availability_zones
  - test_capabilities
  - test_extended_snapshot_attributes
  - test_hosts
  - test_qos_specs_manage
  - test_quotas
  - test_quotas_classes
  - test_scheduler_stats
  - test_services
  - test_types_extra_specs
  - test_types_manage
  - test_used_limits

Partial-Implements: blueprint cinder-python3
Change-Id: Ie3d2de456c34286cca0505f6125a1a723bd8ad8b
2015-10-14 22:17:26 +02:00
Victor Stinner
ad65824806 Port API to Python 3
* test_make_flat_dict(): only use one dictionary key. On Python 3,
  the hash function is now randomized by default and so dictionary
  keys are returned in a random order.
* Replace "not cmp(a, b) == 0" with "a != b"
* test_common: replace range(n) with list(range(n)) to get a list on
  Python 3. On Python 3, range() now returns an iterator.
* Replace dict.items()[0] with list(dict.items()[0]). On Python 3,
  dict.items() now returns a view which is not indexable.
* VolumeTypesController.index(): replace dict.values() with
  list(dict.values()) to get a list on Python 3.
* test_xmlutil: use byte strings for XML
* test_extensions: use byte strings for HTTP body
* Add the following tests to tests-py3.txt:

  - cinder.tests.unit.api.test_common
  - cinder.tests.unit.api.test_extensions
  - cinder.tests.unit.api.test_versions
  - cinder.tests.unit.api.test_xmlutil

Partial-Implements: blueprint cinder-python3
Change-Id: I40c28f6b6a1cf72ce13774755153c8691b4d621b
2015-10-14 22:17:26 +02:00
Jenkins
71932e9c4f Merge "Port WSGI tests to Python 3" 2015-10-14 04:04:29 +00:00
Victor Stinner
d7dddd19da Port WSGI tests to Python 3
* Replace dict.keys()[0] with list(data.keys())[0]. On Python 3,
  dict.keys() now returns a view which is not indexable.
* Skip SSL tests on Python 3. Tests hang for an unknown reason, they
  must be fixed later.
* Fix unit tests: HTTP body type is bytes, not Unicode.
* Debug.print_generator(): on Python 3, write into sys.stdout.buffer
  instead of sys.stdout, because HTTP body type is bytes not Unicode.
* ResponseObject: encode serializer output to UTF-8 if it's Unicode.
* tox.ini: add the following tests to Python 3.4

  - cinder.tests.unit.api.openstack.test_wsgi
  - cinder.tests.unit.wsgi

Note: Ignore pylint error E1101 on sys.stdout.buffer. pylint on
Python 2 complains that the buffer attribute doesn't exist, whereas
the code is only executed on Python 3 and the attribute exists on
Python 3.

Related-Bug: #1505103
Partial-Implements: blueprint cinder-python3
Change-Id: I0db0e04010e41be71192a2e4db13829114ad6eef
2015-10-13 18:25:51 +00:00
Eric Harney
77b5519b2f Move ssh_utils tests to test_ssh_utils
The code was split from utils.py a bit ago,
should move the tests as well.

Change-Id: Ifff9d3f6eb8d3c1669102c06b040654be139ccd6
2015-10-12 10:01:18 -04:00
Jenkins
ad5170a9e1 Merge "Port violin driver to Python 3" 2015-10-10 16:03:55 +00:00
Jenkins
0f929bab45 Merge "Port EMC scaleio to Python 3" 2015-10-10 00:53:00 +00:00
Jenkins
7d8436c18f Merge "Port IBM flashsystem to Python 3" 2015-10-09 12:16:17 +00:00
Jenkins
8ce6c46119 Merge "Port image cache to Python 3" 2015-10-09 11:32:35 +00:00
Jenkins
b1bc63c9e3 Merge "Port targets test_iet_driver to Python 3" 2015-10-09 01:56:41 +00:00
Victor Stinner
c54e225a2a Port IBM flashsystem to Python 3
* Replace dict.keys()[0] with list(dict.keys())[0]. On Python 3,
  dict.keys() now returns a view which is not indexable.
* tests-py3.txt: add cinder.tests.unit.test_ibm_flashsystem

Partial-Implements: blueprint cinder-python3
Change-Id: Ic77145784acc8c88e77d50a5086019e69d15e6ff
2015-10-08 22:47:44 +02:00
Victor Stinner
3fda737f53 Port test_srb to Python 3
* Replace itertools.izip() with six.moves.zip()
* Replace (int, long) with six.integer_types
* tests-py3.txt: add cinder.tests.unit.test_srb

Disable pylint on six.moves.zip() because pylint doesn't handle
correctly six.moves, see:
https://bitbucket.org/logilab/pylint/issues/200/

Partial-Implements: blueprint cinder-python3
Change-Id: I5ce550107ce5a72fee87e36bfb56a9794789b43a
2015-10-08 12:33:40 +02:00
Victor Stinner
1874f7cfae Port violin driver to Python 3
* Replace dict.items()[0] with list(dict.items())[0], same for
  dict.values()
* Replace dict.iteritems() with dict.items()
* Replace dict.itervalues() with dict.values()
* Replace a/b with a//b to get integer on Python 3.
* test_get_active_fc_targets(): ignore order when comparing active
  FC targets. On Python 3, the hash function is randomized and so
  dictionaries values are returned in a random order.

Partial-Implements: blueprint cinder-python3
Change-Id: If2c50606ae68b7f645bfdbe5aaf7510a512e709a
2015-10-07 23:21:05 +02:00