Merge "Allow user upload CA bundle file for Glance with VMware backend"

This commit is contained in:
Jenkins 2016-04-18 09:16:42 +00:00 committed by Gerrit Code Review
commit 4684e0e3e1
4 changed files with 17 additions and 2 deletions

View File

@ -1624,6 +1624,11 @@
regex:
source: *non_empty_string
error: "Invalid datastore"
-
name: "ca_file"
type: "file"
label: "CA file"
description: "File containing the trusted CA bundle that emitted vCenter server certificate. If empty vCenters certificate is not verified."
value:
availability_zones:
-
@ -1649,6 +1654,7 @@
vcenter_password: ""
datacenter: ""
datastore: ""
ca_file: ""
components_metadata:
- name: hypervisor:qemu
default: true

View File

@ -129,6 +129,12 @@
"source": "\\S",
"error": "Empty datastore"
}
},
{
"type": "file",
"description": "File containing the trusted CA bundle that emitted vCenter server certificate. If empty vCenters certificate is not verified.",
"name": "ca_file",
"label": "CA file"
}
],
"type": "object",
@ -195,7 +201,8 @@
"vcenter_username": "admin",
"vcenter_password": "secret",
"datacenter": "test_datacenter",
"datastore": "test_datastore"
"datastore": "test_datastore",
"ca_file": "file_blob"
},
"network": {
"esxi_vlan_interface": "eth0"

View File

@ -239,7 +239,8 @@ class VmwareDeploymentSerializerMixin(object):
'vc_user': glance_username,
'vc_password': glance_password,
'vc_datacenter': glance_instance.get('datacenter', ''),
'vc_datastore': glance_instance.get('datastore', '')
'vc_datastore': glance_instance.get('datastore', ''),
'vc_ca_file': glance_instance.get('ca_file', '')
}
return vmware_data

View File

@ -2580,6 +2580,7 @@ class BaseDeploymentSerializer(BaseSerializerTest):
self.assertEqual(result['glance']['vc_password'], "secret")
self.assertEqual(result['glance']['vc_datacenter'], "test_datacenter")
self.assertEqual(result['glance']['vc_datastore'], "test_datastore")
self.assertEqual(result['glance']['vc_ca_file'], "file_blob")
def check_no_murano_data(self):
glance_properties = self.serializer.generate_test_vm_image_data(