Skip to content

Commit 3ec0bc9

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Add Cinder v3 client support for volumes"
2 parents 3816433 + 4d5f2c3 commit 3ec0bc9

12 files changed

Lines changed: 214 additions & 1 deletion

File tree

openstackclient/tests/functional/volume/v3/__init__.py

Whitespace-only changes.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
2+
# not use this file except in compliance with the License. You may obtain
3+
# a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10+
# License for the specific language governing permissions and limitations
11+
# under the License.
12+
13+
import os
14+
15+
from openstackclient.tests.functional import base
16+
17+
18+
class BaseVolumeTests(base.TestCase):
19+
"""Base class for Volume functional tests. """
20+
21+
@classmethod
22+
def setUpClass(cls):
23+
os.environ['OS_VOLUME_API_VERSION'] = '3'
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
2+
# not use this file except in compliance with the License. You may obtain
3+
# a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10+
# License for the specific language governing permissions and limitations
11+
# under the License.
12+
13+
from openstackclient.tests.functional.volume.v2 import test_qos as v2
14+
import os
15+
16+
17+
class QosTests(v2.QosTests):
18+
"""Functional tests for volume qos. """
19+
20+
@classmethod
21+
def setUpClass(cls):
22+
super(QosTests, cls).setUpClass()
23+
os.environ['OS_VOLUME_API_VERSION'] = '3'
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
2+
# not use this file except in compliance with the License. You may obtain
3+
# a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10+
# License for the specific language governing permissions and limitations
11+
# under the License.
12+
13+
from openstackclient.tests.functional.volume.v2 import test_snapshot as v2
14+
import os
15+
16+
17+
class VolumeSnapshotTests(v2.VolumeSnapshotTests):
18+
"""Functional tests for volume snapshot. """
19+
20+
@classmethod
21+
def setUpClass(cls):
22+
super(VolumeSnapshotTests, cls).setUpClass()
23+
os.environ['OS_VOLUME_API_VERSION'] = '3'
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
2+
# not use this file except in compliance with the License. You may obtain
3+
# a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10+
# License for the specific language governing permissions and limitations
11+
# under the License.
12+
13+
from openstackclient.tests.functional.volume.v2 import test_transfer_request \
14+
as v2
15+
import os
16+
17+
18+
class TransferRequestTests(v2.TransferRequestTests):
19+
"""Functional tests for transfer request. """
20+
21+
@classmethod
22+
def setUpClass(cls):
23+
super(TransferRequestTests, cls).setUpClass()
24+
os.environ['OS_VOLUME_API_VERSION'] = '3'
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
2+
# not use this file except in compliance with the License. You may obtain
3+
# a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10+
# License for the specific language governing permissions and limitations
11+
# under the License.
12+
13+
from openstackclient.tests.functional.volume.v2 import test_volume as v2
14+
import os
15+
16+
17+
class VolumeTests(v2.VolumeTests):
18+
"""Functional tests for volume. """
19+
20+
@classmethod
21+
def setUpClass(cls):
22+
super(VolumeTests, cls).setUpClass()
23+
os.environ['OS_VOLUME_API_VERSION'] = '3'
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
2+
# not use this file except in compliance with the License. You may obtain
3+
# a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10+
# License for the specific language governing permissions and limitations
11+
# under the License.
12+
13+
from openstackclient.tests.functional.volume.v2 import test_volume_type as v2
14+
import os
15+
16+
17+
class VolumeTypeTests(v2.VolumeTypeTests):
18+
"""Functional tests for volume type. """
19+
20+
@classmethod
21+
def setUpClass(cls):
22+
super(VolumeTypeTests, cls).setUpClass()
23+
os.environ['OS_VOLUME_API_VERSION'] = '3'

openstackclient/tests/unit/volume/v3/__init__.py

Whitespace-only changes.

openstackclient/volume/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
API_NAME = "volume"
2828
API_VERSIONS = {
2929
"1": "cinderclient.v1.client.Client",
30-
"2": "cinderclient.v2.client.Client"
30+
"2": "cinderclient.v2.client.Client",
31+
"3": "cinderclient.v3.client.Client",
3132
}
3233

3334

openstackclient/volume/v3/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)