Repository navigation
[CSTACKEX-282] QoS Automation #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
suryag1201
wants to merge
2
commits into
main
Choose a base branch
from
feature/CSTACKEX-282
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,711
−5
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
1,292 changes: 1,292 additions & 0 deletions
1,292
test/integration/plugins/ontap/helpers/qos_offerings.py
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. |
89 changes: 89 additions & 0 deletions
89
test/integration/plugins/ontap/iscsi/qos/test_qos_offerings.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| """ | ||
| QoS offering coverage for a NetApp ONTAP iSCSI primary pool. | ||
|
|
||
| Disk offerings cover no IOPS, max only, min and max, min only, custom | ||
| size, custom IOPS, thin/sparse/fat, a shared policy, and resize. Compute | ||
| offerings cover a fixed offering, an offering that carries its own IOPS, | ||
| one bound to a disk offering, a strict offering, a custom offering, and | ||
| custom IOPS supplied at deploy. Root and data disks are also checked | ||
| together. iSCSI checks the QoS policy on the LUN. | ||
|
|
||
| Minimum IOPS run on AFF. On FAS those creates are rejected and no QoS | ||
| policy is left behind. Each test removes its CloudStack volumes and VMs, | ||
| then the ONTAP LUN and any unused QoS policy. tearDownClass still | ||
| force-deletes the pool and the FlexVol. | ||
|
|
||
| Workflow: | ||
| 01 Fixed disk, no IOPS | ||
| 02 Fixed disk, maximum IOPS only | ||
| 03 Fixed disk, minimum and maximum IOPS | ||
| 04 Fixed disk, minimum IOPS only | ||
| 05 Custom-size disk with fixed IOPS | ||
| 06 Custom IOPS, maximum only | ||
| 07 Custom IOPS, minimum and maximum | ||
| 08 Custom size and custom IOPS | ||
| 09 Thin, sparse, and fat disks keep maximum IOPS | ||
| 10 Two volumes share one policy until the last delete | ||
| 11 Resize onto a disk offering with a higher maximum | ||
| 12 Resize onto a disk offering without IOPS | ||
| 13 Reject a disk offering whose minimum exceeds its maximum | ||
| 14 Reject a disk offering whose minimum is zero | ||
| 15 Reject custom IOPS whose minimum exceeds the maximum | ||
| 16 Reject a minimum that exceeds the pool IOPS capacity | ||
| 17 Fixed compute offering with an override QoS disk | ||
| 18 Compute offering that carries its own maximum IOPS | ||
| 19 Compute offering bound to a QoS disk | ||
| 20 Strict compute offering rejects a different override disk | ||
| 21 Custom compute offering with a bound QoS disk | ||
| 22 Custom compute offering with a custom-size, custom-IOPS root disk | ||
| 23 Compute offering with custom IOPS supplied at deploy | ||
| 24 Root disk without IOPS and a data disk with IOPS | ||
| 25 Root and data disks use different policies | ||
| 26 Hypervisor rate limits do not create an ONTAP policy | ||
| 27 Constrained custom compute with a fixed-IOPS root disk | ||
| 28 Constrained custom compute with custom IOPS at deploy | ||
|
|
||
| Prerequisites: | ||
| - CloudStack management server with the NetApp ONTAP plugin deployed | ||
| - KVM cluster whose hosts have an iSCSI initiator | ||
| - Ready KVM template for the compute-offering cases | ||
| - ONTAP SVM with iSCSI enabled | ||
| - ontap.cfg populated | ||
|
|
||
| Running: | ||
| PYTHONPATH=test/integration/plugins/ontap nosetests --with-marvin \\ | ||
| --marvin-config=test/integration/plugins/ontap/ontap.cfg \\ | ||
| test/integration/plugins/ontap/iscsi/qos/test_qos_offerings.py -v | ||
| """ | ||
|
|
||
| # Import the module, not the base class: nose would otherwise collect the | ||
| # unparameterised base as a second test class in this file. | ||
| from helpers import qos_offerings as qos | ||
|
|
||
|
|
||
| class TestOntapISCSIQosOfferings(qos.OntapQosOfferingsBase): | ||
|
|
||
| PROTOCOL = "ISCSI" | ||
| PROTOCOL_CFG_KEY = "iscsi" | ||
| POOL_URL_SCHEME = "iscsi" | ||
| _vol_name_prefix = "QosIscsi" | ||
|
|
||
|
|
||
| qos.tag_qos_tests(TestOntapISCSIQosOfferings, "iscsi_qos") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. |
88 changes: 88 additions & 0 deletions
88
test/integration/plugins/ontap/nfs3/qos/test_qos_offerings.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| """ | ||
| QoS offering coverage for a NetApp ONTAP NFS3 primary pool. | ||
|
|
||
| Disk offerings cover no IOPS, max only, min and max, min only, custom | ||
| size, custom IOPS, thin/sparse/fat, a shared policy, and resize. Compute | ||
| offerings cover a fixed offering, an offering that carries its own IOPS, | ||
| one bound to a disk offering, a strict offering, a custom offering, and | ||
| custom IOPS supplied at deploy. Root and data disks are also checked | ||
| together. | ||
|
|
||
| Minimum IOPS run on AFF. On FAS those creates are rejected and no QoS | ||
| policy is left behind. Each test removes its CloudStack volumes and VMs, | ||
| then the ONTAP file and any unused QoS policy. tearDownClass unmounts the | ||
| pool, then force-deletes the pool, the FlexVol, and the export policy. | ||
|
|
||
| Workflow: | ||
| 01 Fixed disk, no IOPS | ||
| 02 Fixed disk, maximum IOPS only | ||
| 03 Fixed disk, minimum and maximum IOPS | ||
| 04 Fixed disk, minimum IOPS only | ||
| 05 Custom-size disk with fixed IOPS | ||
| 06 Custom IOPS, maximum only | ||
| 07 Custom IOPS, minimum and maximum | ||
| 08 Custom size and custom IOPS | ||
| 09 Thin, sparse, and fat disks keep maximum IOPS | ||
| 10 Two volumes share one policy until the last delete | ||
| 11 Resize onto a disk offering with a higher maximum | ||
| 12 Resize onto a disk offering without IOPS | ||
| 13 Reject a disk offering whose minimum exceeds its maximum | ||
| 14 Reject a disk offering whose minimum is zero | ||
| 15 Reject custom IOPS whose minimum exceeds the maximum | ||
| 16 Reject a minimum that exceeds the pool IOPS capacity | ||
| 17 Fixed compute offering with an override QoS disk | ||
| 18 Compute offering that carries its own maximum IOPS | ||
| 19 Compute offering bound to a QoS disk | ||
| 20 Strict compute offering rejects a different override disk | ||
| 21 Custom compute offering with a bound QoS disk | ||
| 22 Custom compute offering with a custom-size, custom-IOPS root disk | ||
| 23 Compute offering with custom IOPS supplied at deploy | ||
| 24 Root disk without IOPS and a data disk with IOPS | ||
| 25 Root and data disks use different policies | ||
| 26 Hypervisor rate limits do not create an ONTAP policy | ||
| 27 Constrained custom compute with a fixed-IOPS root disk | ||
| 28 Constrained custom compute with custom IOPS at deploy | ||
|
|
||
| Prerequisites: | ||
| - CloudStack management server with the NetApp ONTAP plugin deployed | ||
| - KVM cluster and a ready KVM template for the compute-offering cases | ||
| - ONTAP SVM with NFS enabled | ||
| - ontap.cfg populated | ||
|
|
||
| Running: | ||
| PYTHONPATH=test/integration/plugins/ontap nosetests --with-marvin \\ | ||
| --marvin-config=test/integration/plugins/ontap/ontap.cfg \\ | ||
| test/integration/plugins/ontap/nfs3/qos/test_qos_offerings.py -v | ||
| """ | ||
|
|
||
| # Import the module, not the base class: nose would otherwise collect the | ||
| # unparameterised base as a second test class in this file. | ||
| from helpers import qos_offerings as qos | ||
|
|
||
|
|
||
| class TestOntapNFS3QosOfferings(qos.OntapQosOfferingsBase): | ||
|
|
||
| PROTOCOL = "NFS3" | ||
| PROTOCOL_CFG_KEY = "nfs3" | ||
| POOL_URL_SCHEME = "nfs" | ||
| _vol_name_prefix = "QosNfs" | ||
|
|
||
|
|
||
| qos.tag_qos_tests(TestOntapNFS3QosOfferings, "nfs3_qos") |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test/integration/plugins/ontap/README.md and TEST_CASES.md are not updated for the QoS test suites.