Skip to content
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

support cinder netapp nfs backend adoption #768

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tests/playbooks/test_minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
- name: Adoption
hosts: "{{ adoption_host | default('localhost') }}"
gather_facts: false
#testing purpose, will be removed later
vars:
cinder_volume_backend: nfs_netapp
force_handlers: true
module_defaults:
ansible.builtin.shell:
Expand Down
18 changes: 18 additions & 0 deletions tests/roles/cinder_adoption/files/cinder-volume-ontap-secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Define the "cinder-volume-ontap-secrets" Secret that contains sensitive
# information pertaining to the [ontap] backend.
apiVersion: v1
kind: Secret
metadata:
labels:
service: cinder
component: cinder-volume
name: cinder-volume-ontap-secrets
type: Opaque
stringData:
ontap-cinder-secrets: |
[ontap]
netapp_login=admin_username
netapp_password=admin_password
netapp_vserver=svm_name
nas_host=10.63.165.215
nas_share_path=/nfs/test
20 changes: 20 additions & 0 deletions tests/roles/cinder_adoption/files/cinder_netapp_nfs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
spec:
cinder:
template:
cinderVolumes:
ontap-nfs:
networkAttachments:
- storage
customServiceConfig: |
[ontap]
volume_backend_name=ontap
volume_driver=cinder.volume.drivers.netapp.common.NetAppDriver
nfs_snapshot_support=true
nas_secure_file_operations=false
nas_secure_file_permissions=false
netapp_server_hostname=hostname
netapp_server_port=80
netapp_storage_protocol=nfs
netapp_storage_family=ontap_cluster
customServiceConfigSecrets:
- cinder-volume-ontap-secrets
7 changes: 7 additions & 0 deletions tests/roles/cinder_adoption/tasks/volume_backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@
{{ shell_header }}
{{ oc_header }}
oc patch openstackcontrolplane openstack --type=merge --patch '{{ cinder_volume_backend_patch }}'

- name: deploy podified Cinder volume
when: cinder_volume_backend == 'nfs_netapp'
ansible.builtin.shell: |
{{ shell_header }}
{{ oc_header }}
oc patch openstackcontrolplane openstack --type=merge --patch-file={{ role_path }}/files/cinder_netapp_nfs.yaml
Loading