add warning on local deploy and avoid doc build errors on doc gen
Jira-Issue: OPENSTACK-882 Jira_Issue: OPENSTACK-745
This commit is contained in:
parent
984b190eb2
commit
5a6903a06f
|
@ -30,6 +30,9 @@ class DeployApi(object):
|
||||||
that the openstack deployment will be to the local host.
|
that the openstack deployment will be to the local host.
|
||||||
Remote means that the deployment is executed via ssh.
|
Remote means that the deployment is executed via ssh.
|
||||||
|
|
||||||
|
NOTE: local mode is not supported and should never be used
|
||||||
|
in production environments.
|
||||||
|
|
||||||
:param remote_mode: if remote mode is True deployment is done via ssh
|
:param remote_mode: if remote mode is True deployment is done via ssh
|
||||||
:type remote_mode: bool
|
:type remote_mode: bool
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -112,11 +112,11 @@ class HostApi(object):
|
||||||
"""Check hosts for ssh connectivity
|
"""Check hosts for ssh connectivity
|
||||||
|
|
||||||
Check status is a dictionary of form:
|
Check status is a dictionary of form:
|
||||||
- {hostname: {
|
- {hostname: {
|
||||||
'success':<True|False>,
|
'success':<True|False>,
|
||||||
'msg':message_string},
|
'msg':message_string},
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
|
||||||
:param hostnames: list of strings
|
:param hostnames: list of strings
|
||||||
:return: check status
|
:return: check status
|
||||||
|
@ -133,11 +133,12 @@ class HostApi(object):
|
||||||
"""Setup multiple hosts for ssh access
|
"""Setup multiple hosts for ssh access
|
||||||
|
|
||||||
hosts_info is a dictionary of form:
|
hosts_info is a dictionary of form:
|
||||||
{hostname': {
|
- {hostname': {
|
||||||
'password': password
|
'password': password
|
||||||
'uname': user_name},
|
'uname': user_name},
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
|
||||||
The uname entry is optional.
|
The uname entry is optional.
|
||||||
|
|
||||||
:param hosts_info: dictionary
|
:param hosts_info: dictionary
|
||||||
|
|
|
@ -85,10 +85,13 @@ class Setdeploy(Command):
|
||||||
def take_action(self, parsed_args):
|
def take_action(self, parsed_args):
|
||||||
try:
|
try:
|
||||||
mode = parsed_args.mode.strip()
|
mode = parsed_args.mode.strip()
|
||||||
remote_flag = False
|
remote_flag = True
|
||||||
if mode == 'remote':
|
if mode == 'local':
|
||||||
remote_flag = True
|
remote_flag = False
|
||||||
elif mode != 'local':
|
LOG.info(u._('Please note that local mode is not supported '
|
||||||
|
'and should never be used in production '
|
||||||
|
'environments.'))
|
||||||
|
elif mode != 'remote':
|
||||||
raise CommandError(
|
raise CommandError(
|
||||||
u._('Invalid deploy mode. Mode must be '
|
u._('Invalid deploy mode. Mode must be '
|
||||||
'either "local" or "remote".'))
|
'either "local" or "remote".'))
|
||||||
|
|
Loading…
Reference in New Issue