# Path: grafana_dashboards/client/connection.py
# class KerberosConnection(object):
#     def __init__(self, host):
#         logger.debug('Creating new kerberos connection with host=%s', host)
#         self._host = host
# 
#     def make_request(self, uri, body=None):
#         response = requests.post('{0}{1}'.format(self._host, uri), json=body, auth=HTTPKerberosAuth(), verify=False)
#         return response.json()
# 
# class BearerAuthConnection(BaseConnection):
#     def __init__(self, token, host, debug=0):
#         logger.debug('Creating new connection with token=%s host=%s', token[:5], host)
# 
#         super(BearerAuthConnection, self).__init__(host, 'Bearer %s' % token.strip(), debug)
# 
# class BasicAuthConnection(BaseConnection):
#     def __init__(self, username, password, host, debug=0):
#         logger.debug('Creating new connection with username=%s host=%s', username, host)
# 
#         base64string = base64.encodestring(('%s:%s' % (username, password)).encode('utf-8')).replace(b'\n', b'')
# 
#         super(BasicAuthConnection, self).__init__(host, b'Basic ' + base64string, debug)
# 
# Path: grafana_dashboards/exporter.py
# class DashboardExporter(object):
# 
#     def process_dashboard(self, project_name, dashboard_name, dashboard_data):
#         pass


import logging
import os
from grafana_dashboards.client.connection import KerberosConnection, BearerAuthConnection, BasicAuthConnection
from grafana_dashboards.exporter import DashboardExporter
# -*- coding: utf-8 -*-
# Copyright 2015-2019 grafana-dashboard-builder contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import unicode_literals



__author__ = 'Jakub Plichta <jakub.plichta@gmail.com>'


logger = logging.getLogger(__name__)


class GrafanaExporter(DashboardExporter):
    def __init__(self, **kwargs):
        super(GrafanaExporter, self).__init__()

# Path: grafana_dashboards/client/connection.py
# class KerberosConnection(object):
#     def __init__(self, host):
#         logger.debug('Creating new kerberos connection with host=%s', host)
#         self._host = host
# 
#     def make_request(self, uri, body=None):
#         response = requests.post('{0}{1}'.format(self._host, uri), json=body, auth=HTTPKerberosAuth(), verify=False)
#         return response.json()
# 
# class BearerAuthConnection(BaseConnection):
#     def __init__(self, token, host, debug=0):
#         logger.debug('Creating new connection with token=%s host=%s', token[:5], host)
# 
#         super(BearerAuthConnection, self).__init__(host, 'Bearer %s' % token.strip(), debug)
# 
# class BasicAuthConnection(BaseConnection):
#     def __init__(self, username, password, host, debug=0):
#         logger.debug('Creating new connection with username=%s host=%s', username, host)
# 
#         base64string = base64.encodestring(('%s:%s' % (username, password)).encode('utf-8')).replace(b'\n', b'')
# 
#         super(BasicAuthConnection, self).__init__(host, b'Basic ' + base64string, debug)
# 
# Path: grafana_dashboards/exporter.py
# class DashboardExporter(object):
# 
#     def process_dashboard(self, project_name, dashboard_name, dashboard_data):
#         pass


# Path: grafana_dashboards/client/grafana.py
import logging
import os
from grafana_dashboards.client.connection import KerberosConnection, BearerAuthConnection, BasicAuthConnection
from grafana_dashboards.exporter import DashboardExporter

# -*- coding: utf-8 -*-
# Copyright 2015-2019 grafana-dashboard-builder contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import unicode_literals



__author__ = 'Jakub Plichta <jakub.plichta@gmail.com>'


logger = logging.getLogger(__name__)


class GrafanaExporter(DashboardExporter):
    def __init__(self, **kwargs):
        super(GrafanaExporter, self).__init__()

        self._host = os.getenv('GRAFANA_HOST', kwargs.get('host'))