pull/54990/head
Chris Archibald 6 years ago committed by John R Barker
parent e079758b31
commit c6f12eea32

@ -308,9 +308,14 @@ class NetAppOntapSVM(object):
self.module.fail_json(msg='Error provisioning SVM %s: %s' self.module.fail_json(msg='Error provisioning SVM %s: %s'
% (self.parameters['name'], to_native(e)), % (self.parameters['name'], to_native(e)),
exception=traceback.format_exc()) exception=traceback.format_exc())
# add allowed-protocols after creation, since vserver-create doesn't allow this attribute during creation # add allowed-protocols, aggr-list after creation,
if self.parameters.get('allowed_protocols'): # since vserver-create doesn't allow these attributes during creation
self.modify_vserver({'allowed_protocols': self.parameters['allowed_protocols']}) options = dict()
for key in ('allowed_protocols', 'aggr_list'):
if self.parameters.get(key):
options[key] = self.parameters[key]
if options:
self.modify_vserver(options)
def delete_vserver(self): def delete_vserver(self):
vserver_delete = netapp_utils.zapi.NaElement.create_node_with_children( vserver_delete = netapp_utils.zapi.NaElement.create_node_with_children(

@ -101,6 +101,7 @@ class TestMyModule(unittest.TestCase):
'name': 'test_svm', 'name': 'test_svm',
'root_volume': 'ansible_vol', 'root_volume': 'ansible_vol',
'root_volume_aggregate': 'ansible_aggr', 'root_volume_aggregate': 'ansible_aggr',
'aggr_list': 'aggr_1,aggr_2',
'ipspace': 'ansible_ipspace', 'ipspace': 'ansible_ipspace',
'subtype': 'default', 'subtype': 'default',
'language': 'c.utf_8', 'language': 'c.utf_8',
@ -113,6 +114,7 @@ class TestMyModule(unittest.TestCase):
'name': self.mock_vserver['name'], 'name': self.mock_vserver['name'],
'root_volume': self.mock_vserver['root_volume'], 'root_volume': self.mock_vserver['root_volume'],
'root_volume_aggregate': self.mock_vserver['root_volume_aggregate'], 'root_volume_aggregate': self.mock_vserver['root_volume_aggregate'],
'aggr_list': self.mock_vserver['aggr_list'],
'ipspace': self.mock_vserver['ipspace'], 'ipspace': self.mock_vserver['ipspace'],
'comment': self.mock_vserver['comment'], 'comment': self.mock_vserver['comment'],
'subtype': 'default', 'subtype': 'default',

Loading…
Cancel
Save