NetApp cDOT: use security service ou

sets organizational unit in AD at NetApp C-mode CIFS server

Change-Id: Ifbbd98d0ad414985ac15da52d9e3305dd109e927
Closes-Bug: #1696669
This commit is contained in:
Maurice Schreiber 2018-06-12 16:57:30 +02:00 committed by Goutham Pacha Ravi
parent 1384257e4f
commit 4c8980029a
4 changed files with 12 additions and 0 deletions

View File

@ -1389,6 +1389,10 @@ class NetAppCmodeClient(client_base.NetAppBaseClient):
'cifs-server': cifs_server,
'domain': security_service['domain'],
}
if security_service['ou'] is not None:
api_args['organizational-unit'] = security_service['ou']
try:
LOG.debug("Trying to setup CIFS server with data: %s", api_args)
self.send_request('cifs-server-create', api_args)

View File

@ -418,6 +418,7 @@ CIFS_SECURITY_SERVICE = {
'type': 'active_directory',
'password': 'fake_password',
'user': 'fake_user',
'ou': 'fake_ou',
'domain': 'fake_domain',
'dns_ip': 'fake_dns_ip',
}

View File

@ -2441,6 +2441,7 @@ class NetAppClientCmodeTestCase(test.TestCase):
'admin-password': fake.CIFS_SECURITY_SERVICE['password'],
'force-account-overwrite': 'true',
'cifs-server': cifs_server,
'organizational-unit': fake.CIFS_SECURITY_SERVICE['ou'],
'domain': fake.CIFS_SECURITY_SERVICE['domain'],
}

View File

@ -0,0 +1,6 @@
---
features:
- |
The NetApp cDOT driver uses the ou field from security services to
set the organizational unit of a vserver's active directory
configuration. This is done at CIFS server creation.