Exemple #1
0
    def test_create_repository(self):
        c = SnapshotClient()
        body = """
        {
            "type": "fs",
            "settings": {
                "location": "/tmp/test",
            }
        }

        """
        h_cb = partial(self.handle_cb, **{'codes': [400, 404]})
        c.create_repository('test', body, callback=h_cb)
        self.wait()
Exemple #2
0
    def test_restore_snapshot(self):
        c = SnapshotClient()
        body = """
        '{
           "indices": "index_1,index_2",
           "ignore_unavailable": "true",
           "include_global_state": false,
           "rename_pattern": "index_(.+)",
           "rename_replacement": "restored_index_$1"
        }

        """
        h_cb = partial(self.handle_cb, **{'codes': [400, 404]})
        c.restore_snapshot('test', 'test', body, callback=h_cb)
        self.wait()
Exemple #3
0
 def test_get(self):
     c = SnapshotClient()
     h_cb = partial(self.handle_cb, **{'codes': [400, 404]})
     c.get_snapshot('test', 'test', callback=h_cb)
     self.wait()
Exemple #4
0
 def test_get_repository(self):
     c = SnapshotClient()
     h_cb = partial(self.handle_cb, **{'codes': [400, 404]})
     c.get_repository(callback=h_cb)
     self.wait()
Exemple #5
0
 def test_snapshot_status(self):
     c = SnapshotClient()
     h_cb = partial(self.handle_cb, **{'codes': [400, 404]})
     c.snapshot_status(callback=h_cb)
     self.wait()