Merge "Tune sudo settings on server"
[releng.git] / utils / test / dashboard / dashboard / conf / config.py
index 2e0f1ca..48fed88 100644 (file)
@@ -23,11 +23,9 @@ class APIConfig:
 
     def __init__(self):
         self._default_config_location = "../etc/config.ini"
-        self.elastic_url = 'http://localhost:9200'
-        self.elastic_creds = None
-        self.destination = 'elasticsearch'
+        self.es_url = 'http://localhost:9200'
+        self.es_creds = None
         self.kibana_url = None
-        self.is_js = True
         self.js_path = None
 
     def _get_str_parameter(self, section, param):
@@ -65,11 +63,9 @@ class APIConfig:
             raise ParseError("%s not found" % config_location)
 
         # Linking attributes to keys from file with their sections
-        obj.elastic_url = obj._get_str_parameter("elastic", "url")
-        obj.elastic_creds = obj._get_str_parameter("elastic", "creds")
-        obj.destination = obj._get_str_parameter("output", "destination")
+        obj.es_url = obj._get_str_parameter("elastic", "url")
+        obj.es_creds = obj._get_str_parameter("elastic", "creds")
         obj.kibana_url = obj._get_str_parameter("kibana", "url")
-        obj.is_js = obj._get_bool_parameter("kibana", "js")
         obj.js_path = obj._get_str_parameter("kibana", "js_path")
 
         return obj
@@ -77,12 +73,8 @@ class APIConfig:
     def __str__(self):
         return "elastic_url = %s \n" \
                "elastic_creds = %s \n" \
-               "destination = %s \n" \
                "kibana_url = %s \n" \
-               "is_js = %s \n" \
-               "js_path = %s \n" % (self.elastic_url,
-                                        self.elastic_creds,
-                                        self.destination,
-                                        self.kibana_url,
-                                        self.is_js,
-                                        self.js_path)
+               "js_path = %s \n" % (self.es_url,
+                                    self.es_creds,
+                                    self.kibana_url,
+                                    self.js_path)