Merge "NetApp cDOT: use security service ou"

This commit is contained in:
Zuul 2018-08-08 13:23:24 +00:00 committed by Gerrit Code Review
commit a17c89ff08
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.