Skip to content

Commit

Permalink
storage: hide the query for additional mount options
Browse files Browse the repository at this point in the history
The engine is not able to handle additional mount
options so they are going to be lost when
it imports the hosted-engine storage domain.
Hiding the user query for additional mount options
till the engine will be able to handle them.

Change-Id: I2f56851cc69b6c00a519ca06778bcfb000a53afa
Bug-Url: https://bugzilla.redhat.com/1402417
Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
  • Loading branch information
tiraboschi committed Dec 22, 2016
1 parent feb6eee commit 995c6a6
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions src/plugins/gr-he-setup/storage/nfs.py
Expand Up @@ -50,6 +50,8 @@ class Plugin(plugin.PluginBase):
def __init__(self, context):
super(Plugin, self).__init__(context=context)
self._checker = ohosteddomains.DomainChecker()
# TODO: remove once the engine is able to handle this
self.query_for_additional_mnt_options = False

def _mount(self, path, connection, domain_type, mnt_options):
fstype = ''
Expand Down Expand Up @@ -384,22 +386,23 @@ def _customization(self):
prompt=True,
caseSensitive=True,
)
mnt_options = self.environment[
ohostedcons.StorageEnv.MNT_OPTIONS
]
self.environment[
ohostedcons.StorageEnv.MNT_OPTIONS
] = self.dialog.queryString(
name='OVEHOSTED_STORAGE_DOMAIN_MNT_OPTIONS',
note=_(
'If needed, specify additional mount options for '
'the connection to the hosted-engine storage domain '
'[@DEFAULT@]: '
),
prompt=True,
caseSensitive=True,
default=mnt_options if mnt_options else '',
)
if self.query_for_additional_mnt_options:
mnt_options = self.environment[
ohostedcons.StorageEnv.MNT_OPTIONS
]
self.environment[
ohostedcons.StorageEnv.MNT_OPTIONS
] = self.dialog.queryString(
name='OVEHOSTED_STORAGE_DOMAIN_MNT_OPTIONS',
note=_(
'If needed, specify additional mount options for '
'the connection to the hosted-engine storage'
'domain [@DEFAULT@]: '
),
prompt=True,
caseSensitive=True,
default=mnt_options if mnt_options else '',
)
try:
self._fix_path_syntax()
self._validateDomain(
Expand Down

0 comments on commit 995c6a6

Please sign in to comment.