Merge "Use --config-file from oslo instead of --config" into stable/newton
This commit is contained in:
commit
45c1b66116
|
@ -744,7 +744,7 @@ Osrc should be a path to file with Openstack Credentials like::
|
|||
|
||||
Example of Config file for two local storages and one swift storage::
|
||||
|
||||
[default]
|
||||
[DEFAULT]
|
||||
action = backup
|
||||
mode = fs
|
||||
path_to_backup = /foo/
|
||||
|
@ -1223,7 +1223,7 @@ the arguments provided and remove limits then run trickle using subprocess
|
|||
|
||||
EX: We have a config file contains::
|
||||
|
||||
[default]
|
||||
[DEFAULT]
|
||||
action = backup
|
||||
storage = ssh
|
||||
ssh_host = 127.0.0.1
|
||||
|
@ -1245,7 +1245,7 @@ this will be translated to::
|
|||
|
||||
The new config file has the following arguments::
|
||||
|
||||
[default]
|
||||
[DEFAULT]
|
||||
action = backup
|
||||
storage = ssh
|
||||
ssh_host = 127.0.0.1
|
||||
|
|
|
@ -442,7 +442,7 @@ Example of Config file for two local storages and one swift storage:
|
|||
|
||||
.. code:: bash
|
||||
|
||||
[default]
|
||||
[DEFAULT]
|
||||
action = backup
|
||||
mode = fs
|
||||
path_to_backup = /foo/
|
||||
|
@ -918,4 +918,4 @@ release does not support env markers which further complicated the installation.
|
|||
Copyright
|
||||
---------
|
||||
|
||||
The Freezer logo is released under the licence Attribution 3.0 Unported (CC BY3.0).
|
||||
The Freezer logo is released under the licence Attribution 3.0 Unported (CC BY3.0).
|
||||
|
|
|
@ -400,7 +400,9 @@ _COMMON = [
|
|||
),
|
||||
cfg.StrOpt('config',
|
||||
dest='config',
|
||||
deprecated_for_removal=True,
|
||||
default=DEFAULT_PARAMS['config'],
|
||||
deprecated_reason="Deprecated in favor of --config-file",
|
||||
help="Config file abs path. Option arguments are provided from "
|
||||
"config file. When config file is used any option from "
|
||||
"command line provided take precedence."),
|
||||
|
|
|
@ -207,9 +207,8 @@ class Job(object):
|
|||
@staticmethod
|
||||
def save_action_to_file(action, f):
|
||||
parser = configparser.ConfigParser()
|
||||
parser.add_section('action')
|
||||
for action_k, action_v in action.items():
|
||||
parser.set('action', action_k, action_v)
|
||||
parser.set('DEFAULT', action_k, action_v)
|
||||
parser.write(f)
|
||||
f.seek(0)
|
||||
|
||||
|
@ -330,7 +329,7 @@ class Job(object):
|
|||
with tempfile.NamedTemporaryFile(delete=False) as config_file:
|
||||
self.save_action_to_file(freezer_action, config_file)
|
||||
config_file_name = config_file.name
|
||||
freezer_command = '{0} --metadata-out - --config {1}'.\
|
||||
freezer_command = '{0} --metadata-out - --config-file {1}'.\
|
||||
format(self.executable, config_file.name)
|
||||
self.process = subprocess.Popen(freezer_command.split(),
|
||||
stdout=subprocess.PIPE,
|
||||
|
|
Loading…
Reference in New Issue