# Path: networking_odl/ceilometer/network/statistics/opendaylight_v2/driver.py
# LOG = log.getLogger(__name__)
# INT64_MAX_VALUE = (2 ** 64 / 2 - 1)
# class OpenDaylightDriver(driver.Driver):
#     def _get_int_sample(key, statistic, resource_id,
#                         resource_meta, tenant_id):
#     def _prepare_cache(self, endpoint, params, cache):
#     def get_sample_data(self, meter_name, parse_url, params, cache):
#     def _get_iter(self, meter_name):
#     def _get_extractor(self, meter_name):
#     def _iter_switch(extractor, data):
#     def _switch(statistic, resource_id,
#                 resource_meta, tenant_id):
#     def _switch_ports(statistic, resource_id,
#                       resource_meta, tenant_id):
#     def _iter_switch_port(extractor, data):
#     def _iter_port(extractor, data):
#     def _port(statistic, resource_id, resource_meta, tenant_id):
#     def _port_uptime(statistic, resource_id,
#                      resource_meta, tenant_id):
#     def _port_receive_packets(statistic, resource_id,
#                               resource_meta, tenant_id):
#     def _port_transmit_packets(statistic, resource_id,
#                                resource_meta, tenant_id):
#     def _port_receive_bytes(statistic, resource_id,
#                             resource_meta, tenant_id):
#     def _port_transmit_bytes(statistic, resource_id,
#                              resource_meta, tenant_id):
#     def _port_receive_drops(statistic, resource_id,
#                             resource_meta, tenant_id):
#     def _port_receive_errors(statistic, resource_id,
#                              resource_meta, tenant_id):
#     def _iter_table(extractor, data):
#     def _switch_table_active_entries(statistic, resource_id,
#                                      resource_meta, tenant_id):


import abc
import urllib
from unittest import mock
from oslotest import base
from ceilometer import service
from networking_odl.ceilometer.network.statistics.opendaylight_v2 import driver
from oslo_utils import uuidutils



ADMIN_ID = str(uuidutils.generate_uuid())
PORT_1_TENANT_ID = str(uuidutils.generate_uuid())
PORT_2_TENANT_ID = str(uuidutils.generate_uuid())
PORT_1_ID = str(uuidutils.generate_uuid())
PORT_2_ID = str(uuidutils.generate_uuid())


class _Base(base.BaseTestCase, metaclass=abc.ABCMeta):

    @abc.abstractmethod
    def switch_data(self):
        pass

    fake_odl_url = urllib.parse.ParseResult('opendaylight.v2',
                                            'localhost:8080',
                                            'controller/statistics',
                                            None,
                                            None,
                                            None)

    fake_params = urllib.parse.parse_qs(
        'user=admin&password=admin&scheme=http&auth=basic')

    def setUp(self):
        super(_Base, self).setUp()
        self.addCleanup(mock.patch.stopall)
        conf = service.prepare_service([], [])

# Path: networking_odl/ceilometer/network/statistics/opendaylight_v2/driver.py
# LOG = log.getLogger(__name__)
# INT64_MAX_VALUE = (2 ** 64 / 2 - 1)
# class OpenDaylightDriver(driver.Driver):
#     def _get_int_sample(key, statistic, resource_id,
#                         resource_meta, tenant_id):
#     def _prepare_cache(self, endpoint, params, cache):
#     def get_sample_data(self, meter_name, parse_url, params, cache):
#     def _get_iter(self, meter_name):
#     def _get_extractor(self, meter_name):
#     def _iter_switch(extractor, data):
#     def _switch(statistic, resource_id,
#                 resource_meta, tenant_id):
#     def _switch_ports(statistic, resource_id,
#                       resource_meta, tenant_id):
#     def _iter_switch_port(extractor, data):
#     def _iter_port(extractor, data):
#     def _port(statistic, resource_id, resource_meta, tenant_id):
#     def _port_uptime(statistic, resource_id,
#                      resource_meta, tenant_id):
#     def _port_receive_packets(statistic, resource_id,
#                               resource_meta, tenant_id):
#     def _port_transmit_packets(statistic, resource_id,
#                                resource_meta, tenant_id):
#     def _port_receive_bytes(statistic, resource_id,
#                             resource_meta, tenant_id):
#     def _port_transmit_bytes(statistic, resource_id,
#                              resource_meta, tenant_id):
#     def _port_receive_drops(statistic, resource_id,
#                             resource_meta, tenant_id):
#     def _port_receive_errors(statistic, resource_id,
#                              resource_meta, tenant_id):
#     def _iter_table(extractor, data):
#     def _switch_table_active_entries(statistic, resource_id,
#                                      resource_meta, tenant_id):


# Path: networking_odl/tests/unit/ceilometer/network/statistics/opendaylight_v2/test_driver.py
import abc
import urllib
from unittest import mock
from oslotest import base
from ceilometer import service
from networking_odl.ceilometer.network.statistics.opendaylight_v2 import driver
from oslo_utils import uuidutils




ADMIN_ID = str(uuidutils.generate_uuid())
PORT_1_TENANT_ID = str(uuidutils.generate_uuid())
PORT_2_TENANT_ID = str(uuidutils.generate_uuid())
PORT_1_ID = str(uuidutils.generate_uuid())
PORT_2_ID = str(uuidutils.generate_uuid())


class _Base(base.BaseTestCase, metaclass=abc.ABCMeta):

    @abc.abstractmethod
    def switch_data(self):
        pass

    fake_odl_url = urllib.parse.ParseResult('opendaylight.v2',
                                            'localhost:8080',
                                            'controller/statistics',
                                            None,
                                            None,
                                            None)

    fake_params = urllib.parse.parse_qs(
        'user=admin&password=admin&scheme=http&auth=basic')

    def setUp(self):
        super(_Base, self).setUp()
        self.addCleanup(mock.patch.stopall)
        conf = service.prepare_service([], [])

        self.driver = driver.OpenDaylightDriver(conf)