NetApp ONTAP: change cifs server valid dns hostname
by using hyphen instead of dots and underscore Change-Id: Iba8131fff3d92100d554a07f42f23c7a38c2e469 Closes-Bug: #1716694
This commit is contained in:
parent
a17c89ff08
commit
a8ea49c547
@ -53,4 +53,4 @@
|
|||||||
* - ``netapp_volume_snapshot_reserve_percent`` = ``5``
|
* - ``netapp_volume_snapshot_reserve_percent`` = ``5``
|
||||||
- (Integer) The percentage of share space set aside as reserve for snapshot usage; valid values range from 0 to 90.
|
- (Integer) The percentage of share space set aside as reserve for snapshot usage; valid values range from 0 to 90.
|
||||||
* - ``netapp_vserver_name_template`` = ``os_%s``
|
* - ``netapp_vserver_name_template`` = ``os_%s``
|
||||||
- (String) Name template to use for new Vserver.
|
- (String) Name template to use for new Vserver. When using CIFS protocol make sure to not configure characters illegal in DNS hostnames.
|
||||||
|
@ -1381,7 +1381,11 @@ class NetAppCmodeClient(client_base.NetAppBaseClient):
|
|||||||
|
|
||||||
# 'cifs-server' is CIFS Server NetBIOS Name, max length is 15.
|
# 'cifs-server' is CIFS Server NetBIOS Name, max length is 15.
|
||||||
# Should be unique within each domain (data['domain']).
|
# Should be unique within each domain (data['domain']).
|
||||||
cifs_server = (vserver_name[0:7] + '..' + vserver_name[-6:]).upper()
|
# Cut to 15 char with begin and end, attempt to make valid DNS hostname
|
||||||
|
cifs_server = (vserver_name[0:8] +
|
||||||
|
'-' +
|
||||||
|
vserver_name[-6:]).replace('_', '-').upper()
|
||||||
|
|
||||||
api_args = {
|
api_args = {
|
||||||
'admin-username': security_service['user'],
|
'admin-username': security_service['user'],
|
||||||
'admin-password': security_service['password'],
|
'admin-password': security_service['password'],
|
||||||
|
@ -71,7 +71,9 @@ netapp_provisioning_opts = [
|
|||||||
default='share_%(share_id)s'),
|
default='share_%(share_id)s'),
|
||||||
cfg.StrOpt('netapp_vserver_name_template',
|
cfg.StrOpt('netapp_vserver_name_template',
|
||||||
default='os_%s',
|
default='os_%s',
|
||||||
help='Name template to use for new Vserver.'),
|
help='Name template to use for new Vserver. '
|
||||||
|
'When using CIFS protocol make sure to not '
|
||||||
|
'configure characters illegal in DNS hostnames.'),
|
||||||
cfg.StrOpt('netapp_qos_policy_group_name_template',
|
cfg.StrOpt('netapp_qos_policy_group_name_template',
|
||||||
help='NetApp QoS policy group name template.',
|
help='NetApp QoS policy group name template.',
|
||||||
default='qos_share_%(share_id)s'),
|
default='qos_share_%(share_id)s'),
|
||||||
|
@ -2434,8 +2434,10 @@ class NetAppClientCmodeTestCase(test.TestCase):
|
|||||||
self.client.configure_active_directory(fake.CIFS_SECURITY_SERVICE,
|
self.client.configure_active_directory(fake.CIFS_SECURITY_SERVICE,
|
||||||
fake.VSERVER_NAME)
|
fake.VSERVER_NAME)
|
||||||
|
|
||||||
cifs_server = (
|
cifs_server = (fake.VSERVER_NAME[0:8] +
|
||||||
fake.VSERVER_NAME[0:7] + '..' + fake.VSERVER_NAME[-6:]).upper()
|
'-' +
|
||||||
|
fake.VSERVER_NAME[-6:]).replace('_', '-').upper()
|
||||||
|
|
||||||
cifs_server_create_args = {
|
cifs_server_create_args = {
|
||||||
'admin-username': fake.CIFS_SECURITY_SERVICE['user'],
|
'admin-username': fake.CIFS_SECURITY_SERVICE['user'],
|
||||||
'admin-password': fake.CIFS_SECURITY_SERVICE['password'],
|
'admin-password': fake.CIFS_SECURITY_SERVICE['password'],
|
||||||
|
Loading…
Reference in New Issue
Block a user