def test_delete(self):
     c = IndicesClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.delete('test', callback=h_cb)
     self.wait()
 def test_get_aliases(self):
     c = IndicesClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.get_aliases(index='test', cb=h_cb)
     self.wait()
 def test_snapshot_index(self):
     c = IndicesClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.snapshot_index(callback=h_cb)
     self.wait()
 def test_close(self):
     c = IndicesClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.close('test', cb=h_cb)
     self.wait()
예제 #5
0
 def test_index_exists_type(self):
     c = IndicesClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.index_exists_type('test', 'type', callback=h_cb)
     self.wait()
 def test_flush(self):
     c = IndicesClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.flush(index='test', callback=h_cb)
     self.wait()
 def test_delete_warmer(self):
     c = IndicesClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.delete_warmer('test', 'test', cb=h_cb)
     self.wait()
 def test_refresh(self):
     c = IndicesClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.refresh(index='test', cb=h_cb)
     self.wait()
예제 #9
0
 def test_get_field_mapping(self):
     c = IndicesClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.get_field_mapping('test', index='test', callback=h_cb)
     self.wait()
 def test_exists_template(self):
     c = IndicesClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.exists_template('test', cb=h_cb)
     self.wait()
예제 #11
0
 def test_snapshot_index(self):
     c = IndicesClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.snapshot_index(callback=h_cb)
     self.wait()
예제 #12
0
 def test_delete_index(self):
     c = IndicesClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.delete_index('test', callback=h_cb)
     self.wait()
 def test_get_field_mapping(self):
     c = IndicesClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.get_field_mapping('test', index='test', callback=h_cb)
     self.wait()
 def test_exists_type(self):
     c = IndicesClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.exists_type('test', 'type', callback=h_cb)
     self.wait()
 def test_exists_alias(self):
     c = IndicesClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.exists_alias('test', index='test', callback=h_cb)
     self.wait()
 def test_get_template(self):
     c = IndicesClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.get_template(name='test', callback=h_cb)
     self.wait()
예제 #17
0
 def test_refresh_index(self):
     c = IndicesClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.refresh_index(index='test', callback=h_cb)
     self.wait()
예제 #18
0
 def test_get_template(self):
     c = IndicesClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.get_template(name='test', callback=h_cb)
     self.wait()
 def test_analyze(self):
     c = IndicesClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 404]}
     )
     c.analyze(index='test', cb=h_cb)
     self.wait()
예제 #20
0
 def test_get_aliases(self):
     c = IndicesClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 403, 404]}
     )
     c.get_aliases(index='test', callback=h_cb)
     self.wait()
    def test_put_settings(self):
        c = IndicesClient()
        body = """
        {
            "index" : {
                "number_of_replicas" : 1
            }
        }

        """
        c.put_settings(body, callback=self.handle_cb)
        self.wait()
예제 #22
0
    def test_put_settings(self):
        c = IndicesClient()
        body = """
        {
            "index" : {
                "number_of_replicas" : 1
            }
        }

        """
        c.put_settings(body, callback=self.handle_cb)
        self.wait()
    def test_put_alias(self):
        c = IndicesClient()
        h_cb = partial(
            self.handle_cb,
            **{'codes':[400, 403, 404]}
        )
        body = """
        {
            "actions" : [
                { "add" : { "index" : "test1", "alias" : "alias1" } }
            ]
        }

        """
        c.put_alias('test', 'test', body, callback=h_cb)
        self.wait()
예제 #24
0
    def test_put_alias(self):
        c = IndicesClient()
        h_cb = partial(
            self.handle_cb,
            **{'codes':[400, 403, 404]}
        )
        body = """
        {
            "actions" : [
                { "add" : { "index" : "test1", "alias" : "alias1" } }
            ]
        }

        """
        c.put_alias('test', 'test', body, callback=h_cb)
        self.wait()
    def test_update_aliases(self):
        c = IndicesClient()
        h_cb = partial(
            self.handle_cb,
            **{'codes':[400, 403, 404]}
        )
        body = """
        {
            "actions" : [
                { "add" : { "index" : "test1", "alias" : "alias1" } },
                { "add" : { "index" : "test2", "alias" : "alias1" } }
            ]
        }

        """
        c.update_aliases(body, cb=h_cb)
        self.wait()
    def test_put_template(self):
        c = IndicesClient()
        body = """
        {
            "template" : "te*",
            "settings" : {
                "number_of_shards" : 1
            },
            "mappings" : {
                "type1" : {
                    "_source" : { "enabled" : false }
                }
            }
        }

        """
        c.put_template('test', body, callback=self.handle_cb)
        self.wait()
예제 #27
0
    def test_put_template(self):
        c = IndicesClient()
        body = """
        {
            "template" : "te*",
            "settings" : {
                "number_of_shards" : 1
            },
            "mappings" : {
                "type1" : {
                    "_source" : { "enabled" : false }
                }
            }
        }

        """
        c.put_template('test', body, callback=self.handle_cb)
        self.wait()
예제 #28
0
    def test_put_mapping(self):
        c = IndicesClient()
        h_cb = partial(
            self.handle_cb,
            **{'codes':[400, 403, 404]}
        )
        body = """
        {
            "tweet" : {
                "properties" : {
                    "message" : {"type" : "string", "store" : true }
                }
            }
        }

        """
        c.put_mapping('test', body, callback=h_cb)
        self.wait()
    def test_put_mapping(self):
        c = IndicesClient()
        h_cb = partial(
            self.handle_cb,
            **{'codes':[400, 403, 404]}
        )
        body = """
        {
            "tweet" : {
                "properties" : {
                    "message" : {"type" : "string", "store" : true }
                }
            }
        }

        """
        c.put_mapping('test', body, callback=h_cb)
        self.wait()
    def test_put_warmer(self):
        c = IndicesClient()
        body = """
        {
            "query" : {
                "match_all" : {}
            },
            "aggs" : {
                "aggs_1" : {
                    "terms" : {
                        "field" : "field"
                    }
                }
            }
        }

        """
        c.put_warmer("test", body, callback=self.handle_cb)
        self.wait()
예제 #31
0
    def test_create_index(self):
        c = IndicesClient()
        h_cb = partial(
            self.handle_cb,
            **{'codes':[400, 403, 404]}
        )
        body = """
        {
            "settings" : {
                "index" : {
                    "number_of_shards" : 3,
                    "number_of_replicas" : 2
                }
            }
        }

        """
        c.create_index('test', body, callback=h_cb)
        self.wait()
    def test_create(self):
        c = IndicesClient()
        h_cb = partial(
            self.handle_cb,
            **{'codes':[400, 403, 404]}
        )
        body = """
        {
            "settings" : {
                "index" : {
                    "number_of_shards" : 3,
                    "number_of_replicas" : 2
                }
            }
        }

        """
        c.create('test', body, callback=h_cb)
        self.wait()
예제 #33
0
    def test_put_warmer(self):
        c = IndicesClient()
        body = """
        {
            "query" : {
                "match_all" : {}
            },
            "aggs" : {
                "aggs_1" : {
                    "terms" : {
                        "field" : "field"
                    }
                }
            }
        }

        """
        c.put_warmer("test", body, callback=self.handle_cb)
        self.wait()
 def test_validate_query(self):
     c = IndicesClient()
     c.validate_query(callback=self.handle_cb)
     self.wait()
 def test_optimize(self):
     c = IndicesClient()
     c.optimize(callback=self.handle_cb)
     self.wait()
 def test_segments(self):
     c = IndicesClient()
     c.segments(callback=self.handle_cb)
     self.wait()
 def test_get_warmer(self):
     c = IndicesClient()
     c.get_warmer(callback=self.handle_cb)
     self.wait()
 def test_clear_cache(self):
     c = IndicesClient()
     c.clear_cache(callback=self.handle_cb)
     self.wait()
예제 #39
0
 def test_get_warmer(self):
     c = IndicesClient()
     c.get_warmer(callback=self.handle_cb)
     self.wait()
예제 #40
0
 def test_segments(self):
     c = IndicesClient()
     c.segments(callback=self.handle_cb)
     self.wait()
예제 #41
0
 def test_optimize(self):
     c = IndicesClient()
     c.optimize(callback=self.handle_cb)
     self.wait()
예제 #42
0
 def test_validate_query(self):
     c = IndicesClient()
     c.validate_query(callback=self.handle_cb)
     self.wait()
 def test_recovery(self):
     c = IndicesClient()
     c.recovery(callback=self.handle_cb)
     self.wait()
예제 #44
0
 def test_get_settings(self):
     c = IndicesClient()
     c.get_settings(callback=self.handle_cb)
     self.wait()
 def test_stats(self):
     c = IndicesClient()
     c.stats(cb=self.handle_cb)
     self.wait()
 def test_get_settings(self):
     c = IndicesClient()
     c.get_settings(callback=self.handle_cb)
     self.wait()
예제 #47
0
 def test_recovery(self):
     c = IndicesClient()
     c.recovery(callback=self.handle_cb)
     self.wait()
예제 #48
0
 def test_clear_cache(self):
     c = IndicesClient()
     c.clear_cache(callback=self.handle_cb)
     self.wait()