How to use the freezer.tests.integration.common.execute_freezerc function in freezer

To help you get started, we’ve selected a few freezer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github openstack / freezer / tests / integration / test_agent.py View on Github external
'lvm_snapname': lvm_snapname,
                'container': storage_dir.path,
                'storage': 'local',
                'max_level': '6',
                'max_segment_size': '67108864',
                'backup_name': backup_name
            }
            restore_args = {
                'action': 'restore',
                'restore_abs_path': self.dest_tree.path,
                'backup_name': copy(backup_args['backup_name']),
                'storage': 'local',
                'container': storage_dir.path
            }

            result = common.execute_freezerc(backup_args)
            self.assertIsNotNone(result)
            result = common.execute_freezerc(restore_args)
            self.assertIsNotNone(result)
        self.assertTreesMatch()
github openstack / freezer / tests / integration / test_agent.py View on Github external
}
        # --- backup
        result = common.execute_freezerc(backup_args)
        self.assertIsNotNone(result)
        result = json.loads(result)
        self.assertIn('backup_name', result)
        self.assertEquals(result['backup_name'], backup_args['backup_name'])
        self.assertIn('container', result)
        self.assertEquals(result['container'], backup_args['container'])

        # It may be reasonable to insert a check of the files in the
        # swift container
        # file_list = self.get_file_list_openstack(result['container'])

        # --- restore
        result = common.execute_freezerc(restore_args)
        self.assertIsNotNone(result)
        self.assertTreesMatch()

        # --- remove backups and container
        result = common.execute_freezerc(remove_args)
        self.assertIsNotNone(result)

        result = self.remove_swift_container(backup_args['container'])
        self.assertIsNotNone(result)
github openstack / freezer / tests / integration / test_agent.py View on Github external
'storage': 'local',
                'max_level': '6',
                'max_segment_size': '67108864',
                'backup_name': uuid.uuid4().hex
            }

            restore_args = {
                'action': 'restore',
                'restore_abs_path': self.dest_tree.path,
                'backup_name': copy(backup_args['backup_name']),
                'storage': 'local',
                'container': storage_dir.path
            }
            result = common.execute_freezerc(backup_args)
            self.assertIsNotNone(result)
            result = common.execute_freezerc(restore_args)
            self.assertIsNotNone(result)
        self.assertTreesMatch()
github openstack / freezer / tests / integration / test_agent.py View on Github external
'action': 'restore',
            'compression': 'bzip2',
            'restore_abs_path': self.dest_tree.path,
            'backup_name': copy(backup_args['backup_name']),
            'storage': 'swift',
            'container': copy(backup_args['container']),
        }
        remove_args = {
            'action': 'admin',
            'remove_older_than': 0,
            'backup_name': copy(backup_args['backup_name']),
            'storage': 'swift',
            'container': copy(backup_args['container']),
        }
        # --- backup
        result = common.execute_freezerc(backup_args)
        self.assertIsNotNone(result)
        result = json.loads(result)
        self.assertIn('backup_name', result)
        self.assertEquals(result['backup_name'], backup_args['backup_name'])
        self.assertIn('container', result)
        self.assertEquals(result['container'], backup_args['container'])

        # It may be reasonable to insert a check of the files in the
        # swift container
        # file_list = self.get_file_list_openstack(result['container'])

        # --- restore
        result = common.execute_freezerc(restore_args)
        self.assertIsNotNone(result)
        self.assertTreesMatch()
github openstack / freezer / tests / integration / test_agent.py View on Github external
# -- level 1
        self.source_tree.add_random_data()
        self.assertTreesMatchNot()
        result = common.execute_freezerc(backup_args)
        self.assertIsNotNone(result)
        result = common.execute_freezerc(restore_args)
        self.assertIsNotNone(result)
        self.assertTreesMatch()

        # -- level 2
        self.source_tree.add_random_data()
        self.assertTreesMatchNot()
        result = common.execute_freezerc(backup_args)
        self.assertIsNotNone(result)
        result = common.execute_freezerc(restore_args)
        self.assertIsNotNone(result)
        self.assertTreesMatch()
github openstack / freezer / tests / integration / test_agent.py View on Github external
'storage': 'local',
                'max_level': '6',
                'max_segment_size': '67108864',
                'backup_name': backup_name
            }
            restore_args = {
                'action': 'restore',
                'restore_abs_path': self.dest_tree.path,
                'backup_name': copy(backup_args['backup_name']),
                'storage': 'local',
                'container': storage_dir.path
            }

            result = common.execute_freezerc(backup_args)
            self.assertIsNotNone(result)
            result = common.execute_freezerc(restore_args)
            self.assertIsNotNone(result)
        self.assertTreesMatch()
github openstack / freezer / tests / integration / test_agent.py View on Github external
self.assertIn('backup_name', result)
        self.assertEquals(result['backup_name'], backup_args['backup_name'])
        self.assertIn('container', result)
        self.assertEquals(result['container'], backup_args['container'])

        # It may be reasonable to insert a check of the files in the
        # swift container
        # file_list = self.get_file_list_openstack(result['container'])

        # --- restore
        result = common.execute_freezerc(restore_args)
        self.assertIsNotNone(result)
        self.assertTreesMatch()

        # --- remove backups and container
        result = common.execute_freezerc(remove_args)
        self.assertIsNotNone(result)

        result = self.remove_swift_container(backup_args['container'])
        self.assertIsNotNone(result)
github openstack / freezer / tests / integration / test_agent.py View on Github external
'path_to_backup': self.source_tree.path,
                'container': storage_dir.path,
                'storage': 'local',
                'max_level': '6',
                'max_segment_size': '67108864',
                'backup_name': uuid.uuid4().hex
            }

            restore_args = {
                'action': 'restore',
                'restore_abs_path': self.dest_tree.path,
                'backup_name': copy(backup_args['backup_name']),
                'storage': 'local',
                'container': storage_dir.path
            }
            result = common.execute_freezerc(backup_args)
            self.assertIsNotNone(result)
            result = common.execute_freezerc(restore_args)
            self.assertIsNotNone(result)
        self.assertTreesMatch()
github openstack / freezer / tests / integration / test_agent.py View on Github external
self.assertIn('backup_name', result)
        self.assertEquals(result['backup_name'], backup_args['backup_name'])
        self.assertIn('container', result)
        self.assertEquals(result['container'], backup_args['container'])

        # It may be reasonable to insert a check of the files in the
        # swift container
        # file_list = self.get_file_list_openstack(result['container'])

        # --- restore
        result = common.execute_freezerc(restore_args)
        self.assertIsNotNone(result)
        self.assertTreesMatch()

        # --- remove backups and container
        result = common.execute_freezerc(remove_args)
        self.assertIsNotNone(result)

        result = self.remove_swift_container(backup_args['container'])
        self.assertIsNotNone(result)
github openstack / freezer / tests / integration / test_agent.py View on Github external
}
        # --- backup
        result = common.execute_freezerc(backup_args)
        self.assertIsNotNone(result)
        result = json.loads(result)
        self.assertIn('backup_name', result)
        self.assertEquals(result['backup_name'], backup_args['backup_name'])
        self.assertIn('container', result)
        self.assertEquals(result['container'], backup_args['container'])

        # It may be reasonable to insert a check of the files in the
        # swift container
        # file_list = self.get_file_list_openstack(result['container'])

        # --- restore
        result = common.execute_freezerc(restore_args)
        self.assertIsNotNone(result)
        self.assertTreesMatch()

        # --- remove backups and container
        result = common.execute_freezerc(remove_args)
        self.assertIsNotNone(result)

        result = self.remove_swift_container(backup_args['container'])
        self.assertIsNotNone(result)