Merge "Fix typos vc_ca_file -> vcenter_ca_file" into stable/mitaka

This commit is contained in:
Jenkins 2016-09-16 16:05:54 +00:00 committed by Gerrit Code Review
commit 62fb7c25df
2 changed files with 6 additions and 6 deletions

View File

@ -678,7 +678,7 @@ VCENTER_INSECURE = {
}
VCENTER_CA_FILE = {
'name': "vc_ca_file",
'name': "vcenter_ca_file",
'type': 'file',
'label': "CA file",
'description': ('File containing the trusted CA bundle that emitted '
@ -694,10 +694,10 @@ def upgrade_vmware_attributes_metadata():
fields.append(VCENTER_INSECURE)
for value in values:
value['vcenter_insecure'] = True
if 'vc_ca_file' not in names:
if 'vcenter_ca_file' not in names:
fields.append(VCENTER_CA_FILE)
for value in values:
value['vc_ca_file'] = {}
value['vcenter_ca_file'] = {}
def update_glance(fields, values):
names = [f['name'] for f in fields]

View File

@ -687,7 +687,7 @@ class TestReleasesUpdate(base.BaseAlembicMigrationTest):
attrs = jsonutils.loads(result['vmware_attributes_metadata'])
fields = attrs['editable']['metadata'][0]['fields']
self.assertItemsEqual(['vcenter_insecure', 'vc_ca_file'],
self.assertItemsEqual(['vcenter_insecure', 'vcenter_ca_file'],
[f['name'] for f in fields])
fields = attrs['editable']['metadata'][1]['fields']
@ -700,11 +700,11 @@ class TestReleasesUpdate(base.BaseAlembicMigrationTest):
'availability_zones':
[
{
'vc_ca_file': {},
'vcenter_ca_file': {},
'vcenter_insecure': True,
},
{
'vc_ca_file': {},
'vcenter_ca_file': {},
'vcenter_insecure': True
}
],