added the transport type and also include certificates layer

This commit is contained in:
narindergupta 2020-12-01 14:44:24 -06:00
parent 81c6f86293
commit 1de90260be
4 changed files with 37 additions and 12 deletions

View File

@ -1,13 +1,16 @@
includes: ['layer:openstack', 'interface:cinder-backend']
includes:
- "layer:openstack"
- "interface:cinder-backend"
- "interface:tls-certificates"
config:
deletes:
- debug
- verbose
- use-syslog
- use-internal-endpoints
- ssl_ca
- ssl_cert
- ssl_key
- debug
- verbose
- use-syslog
- use-internal-endpoints
- ssl_ca
- ssl_cert
- ssl_key
options:
basic:
use_venv: True

View File

@ -21,17 +21,23 @@ class CinderNetAppCharm(
service = self.config.get('volume-backend-name')
volumedriver = 'cinder.volume.drivers.netapp.common.NetAppDriver'
driver_options_extension = []
driver_transport = []
driver_options_common = [
('netapp_storage_family', self.config.get('netapp-storage-family')),
('netapp_storage_protocol', self.config.get('netapp-storage-protocol')),
('netapp_vserver', self.config.get('netapp-vserver')),
('netapp_server_hostname', self.config.get('netapp-server-hostname')),
('netapp_server_port', self.config.get('netapp-server-port')),
('use_multipath_for_image_xfer', self.config.get('use-multipath')),
('netapp_login', self.config.get('netapp-login')),
('netapp_password', self.config.get('netapp-password')),
('volume_driver', volumedriver),
('volume_backend_name', service)]
if self.config.get('netapp-server-port') == 443:
driver_transport = [
('netapp_transport_type', "https")]
if self.config.get('netapp-storage-family') == "eseries":
driver_options_extension = [
('netapp_controller_ips', self.config.get('netapp-controller-ips')),
@ -43,8 +49,7 @@ class CinderNetAppCharm(
driver_options_extension = [
('nfs_shares_config', self.config.get('netapp-nfs-shares-config'))]
return driver_options_common + driver_options_extension
return driver_options_common + driver_transport + driver_options_extension
class CinderNetAppCharmRocky(CinderNetAppCharm):

View File

@ -42,7 +42,16 @@ applications:
series: focal
charm: cinder-netapp
options:
# Add config options here
netapp-storage-family: ontap_cluster
netapp-storage-protocol: iscsi
netapp-vserver: 'hou-cloud'
netapp-server-hostname: '10.10.10.10'
volume-backend-name: cinder-netapp
netapp-server-port: 80
netapp-login: admin
netapp-password: Passw0rd
use-multipath: True
rabbitmq-server:
charm: cs:~openstack-charmers-next/rabbitmq-server
num_units: 1

View File

@ -42,7 +42,15 @@ applications:
series: focal
charm: cinder-netapp
options:
# Add config options here
netapp-storage-family: ontap_cluster
netapp-storage-protocol: iscsi
netapp-vserver: 'hou-cloud'
netapp-server-hostname: '10.10.10.10'
volume-backend-name: cinder-netapp
netapp-server-port: 80
netapp-login: admin
netapp-password: Passw0rd
use-multipath: True
rabbitmq-server:
charm: cs:~openstack-charmers-next/rabbitmq-server
num_units: 1