Removing obsolete parameters from freezer args (swift related).

Resolves bug: 1522511

Change-Id: Ia01961e8236718bf75fe931bb8aa13c3fb8fe8ac
This commit is contained in:
eldar nugaev 2015-12-03 17:42:12 +00:00
parent b6397636dc
commit 90d9805f03
4 changed files with 77 additions and 115 deletions

View File

@ -720,8 +720,7 @@ Available options::
usage: freezerc [-h] [--config CONFIG]
[--action {backup,restore,info,admin,exec}]
[-F PATH_TO_BACKUP] [-N BACKUP_NAME] [-m MODE] [-C CONTAINER]
[-L] [-l] [-o GET_OBJECT] [-d DST_FILE] [-s]
[--lvm-auto-snap LVM_AUTO_SNAP] [--lvm-srcvol LVM_SRCVOL]
[-s] [--lvm-auto-snap LVM_AUTO_SNAP] [--lvm-srcvol LVM_SRCVOL]
[--lvm-snapname LVM_SNAPNAME] [--lvm-snap-perm {ro,rw}]
[--lvm-snapsize LVM_SNAPSIZE] [--lvm-dirmount LVM_DIRMOUNT]
[--lvm-volgroup LVM_VOLGROUP] [--max-level MAX_LEVEL]
@ -731,7 +730,7 @@ Available options::
[--no-incremental] [--hostname HOSTNAME]
[--mysql-conf MYSQL_CONF] [--metadata-out METADATA_OUT]
[--log-file LOG_FILE] [--exclude EXCLUDE]
[--dereference-symlink {none,soft,hard,all}] [-U]
[--dereference-symlink {none,soft,hard,all}]
[--encrypt-pass-file ENCRYPT_PASS_FILE] [-M MAX_SEGMENT_SIZE]
[--restore-abs-path RESTORE_ABS_PATH]
[--restore-from-host HOSTNAME]
@ -741,7 +740,7 @@ Available options::
[--cinder-vol-id CINDER_VOL_ID] [--nova-inst-id NOVA_INST_ID]
[--cindernative-vol-id CINDERNATIVE_VOL_ID]
[--download-limit DOWNLOAD_LIMIT]
[--sql-server-conf SQL_SERVER_CONF] [--vssadmin VSSADMIN]
[--sql-server-conf SQL_SERVER_CONF] [--vssadmin]
[--command COMMAND] [--compression {gzip,bzip2,xz}]
[--storage {local,swift,ssh}] [--ssh-key SSH_KEY]
[--ssh-username SSH_USERNAME] [--ssh-host SSH_HOST]
@ -769,17 +768,6 @@ Available options::
-C CONTAINER, --container CONTAINER
The Swift container (or path to local storage) used to
upload files to
-L, --list-containers
List the Swift containers on remote Object Storage
Server
-l, --list-objects List the Swift objects stored in a container on remote
Object Storage Server.
-o GET_OBJECT, --get-object GET_OBJECT
The Object name you want to download on the local file
system.
-d DST_FILE, --dst-file DST_FILE
The file name used to save the object on your local
disk and upload file in swift
-s, --snapshot Create a snapshot of the fs containing the resource to
backup. When used, the lvm parameters will be guessed
and/or the default values will be used
@ -868,15 +856,13 @@ Available options::
--dereference-symlink {none,soft,hard,all}
Follow hard and soft links and archive and dump the
files they refer to. Default False.
-U, --upload Upload to Swift the destination file passed to the -d
option. Default upload the data
--encrypt-pass-file ENCRYPT_PASS_FILE
Passing a private key to this option, allow you to
encrypt the files before to be uploaded in Swift.
Default do not encrypt.
-M MAX_SEGMENT_SIZE, --max-segment-size MAX_SEGMENT_SIZE
Set the maximum file chunk size in bytes to upload to
swift Default 67108864 bytes (64MB)
swift Default 33554432 bytes (32MB)
--restore-abs-path RESTORE_ABS_PATH
Set the absolute path where you want your data
restored. Default False.
@ -922,7 +908,7 @@ Available options::
Set the SQL Server configuration file where freezer
retrieve the sql server instance. Following is an
example of config file: instance = <db-instance>
--vssadmin VSSADMIN Create a backup using a snapshot on windows using
--vssadmin Create a backup using a snapshot on windows using
vssadmin. Options are: True and False, default is True
--command COMMAND Command executed by exec action
--compression {gzip,bzip2,xz}

View File

@ -41,27 +41,27 @@ DEFAULT_LVM_SNAPSIZE = '1G'
DEFAULT_LVM_DIRMOUNT = '/var/lib/freezer'
DEFAULT_PARAMS = {
'os_identity_api_version': None, 'list_objects': False,
'get_object': False, 'lvm_auto_snap': False, 'lvm_volgroup': False,
'os_identity_api_version': None,
'lvm_auto_snap': False, 'lvm_volgroup': False,
'exclude': False, 'sql_server_conf': False,
'backup_name': False, 'quiet': False,
'container': 'freezer_backups', 'no_incremental': False,
'max_segment_size': 67108864, 'lvm_srcvol': False,
'download_limit': None, 'hostname': False, 'remove_from_date': False,
'restart_always_level': False, 'lvm_dirmount': DEFAULT_LVM_DIRMOUNT,
'dst_file': False, 'dereference_symlink': '',
'dereference_symlink': '',
'restore_from_host': False, 'config': False, 'mysql_conf': False,
'insecure': False, 'lvm_snapname': DEFAULT_LVM_SNAPNAME,
'lvm_snapperm': 'ro', 'snapshot': False,
'max_priority': False, 'max_level': False, 'path_to_backup': False,
'encrypt_pass_file': False, 'volume': False, 'proxy': False,
'cinder_vol_id': '', 'cindernative_vol_id': '',
'nova_inst_id': '', 'list_containers': False,
'nova_inst_id': '',
'remove_older_than': None, 'restore_from_date': False,
'upload_limit': None, 'always_level': False, 'version': False,
'dry_run': False, 'lvm_snapsize': DEFAULT_LVM_SNAPSIZE,
'restore_abs_path': False, 'log_file': None,
'upload': True, 'mode': 'fs', 'action': 'backup',
'mode': 'fs', 'action': 'backup',
'vssadmin': False, 'shadow': '', 'shadow_path': '',
'windows_volume': '', 'command': None, 'metadata_out': False,
'storage': 'swift', 'ssh_key': '', 'ssh_username': '', 'ssh_host': '',
@ -141,22 +141,6 @@ def backup_arguments(args_dict={}):
help="The Swift container (or path to local storage) "
"used to upload files to",
dest='container', default='freezer_backups')
arg_parser.add_argument(
'-L', '--list-containers', action='store_true',
help='''List the Swift containers on remote Object Storage Server''',
dest='list_containers', default=False)
arg_parser.add_argument(
'-l', '--list-objects', action='store_true',
help='''List the Swift objects stored in a container on remote Object\
Storage Server.''', dest='list_objects', default=False)
arg_parser.add_argument(
'-o', '--get-object', action='store',
help="The Object name you want to download on the local file system.",
dest='get_object', default=False)
arg_parser.add_argument(
'-d', '--dst-file', action='store',
help="The file name used to save the object on your local disk and\
upload file in swift", dest='dst_file', default=False)
arg_parser.add_argument(
'-s', '--snapshot', action='store_true',
help=('Create a snapshot of the fs containing the resource to backup.'
@ -293,10 +277,6 @@ def backup_arguments(args_dict={}):
"Follow hard and soft links and archive and dump the files they "
" refer to. Default False."),
dest='dereference_symlink', default='')
arg_parser.add_argument(
'-U', '--upload', action='store_true',
help="Upload to Swift the destination file passed to the -d option.\
Default upload the data", dest='upload', default=True)
arg_parser.add_argument(
'--encrypt-pass-file', action='store',
help="Passing a private key to this option, allow you to encrypt the \

View File

@ -325,7 +325,6 @@ class BackupOpt1:
self.time_stamp = 123456789
self.container = 'test-container'
self.work_dir = '/tmp'
self.upload = 'true'
self.sw_connector = fakeswclient
self.max_level = '20'
self.encrypt_pass_file = '/dev/random'
@ -333,8 +332,6 @@ class BackupOpt1:
self.remove_from_date = '2014-12-03T23:23:23'
self.restart_always_level = 100000
self.restore_abs_path = '/tmp'
self.list_containers = False
self.list_objects = False
self.restore_from_date = '2014-12-03T23:23:23'
self.restore_from_host = 'test-hostname'
self.action = 'info'

View File

@ -44,7 +44,6 @@ class TestInfoJob(TestJob):
def test_execute_list_containers(self):
backup_opt = BackupOpt1()
backup_opt.list_containers = True
job = InfoJob(backup_opt, backup_opt.storage)
job.execute()