# Path: os_brick/initiator/connectors/base_rbd.py
# LOG = logging.getLogger(__name__)
# class RBDConnectorMixin(object):
#     def _sanitize_mon_hosts(hosts):
#         def _sanitize_host(host):
#     def _get_rbd_args(cls, connection_properties, conf=None):
# 
# Path: os_brick/tests/base.py
# class TestCase(testtools.TestCase):
#     SENTINEL = object()
#     def setUp(self):
#     def _common_cleanup(self):
#     def log_level(self, level):
#     def mock_object(self, obj, attr_name, new_attr=SENTINEL, **kwargs):
#     def patch(self, path, *args, **kwargs):


from unittest import mock
from os_brick.initiator.connectors import base_rbd
from os_brick.tests import base
import ddt





# Both Linux and Windows tests are using those mocks.
class RBDConnectorTestMixin(object):
    def setUp(self):
        super(RBDConnectorTestMixin, self).setUp()

        self.user = 'fake_user'
        self.pool = 'fake_pool'
        self.volume = 'fake_volume'
        self.clustername = 'fake_ceph'
        self.hosts = ['192.168.10.2']
        self.ports = ['6789']
        self.keyring = "[client.cinder]\n  key = test\n"
        self.image_name = '%s/%s' % (self.pool, self.volume)

        self.connection_properties = {
            'auth_username': self.user,
            'name': self.image_name,
            'cluster_name': self.clustername,
            'hosts': self.hosts,
            'ports': self.ports,
            'keyring': self.keyring,
        }


@ddt.ddt

# Path: os_brick/initiator/connectors/base_rbd.py
# LOG = logging.getLogger(__name__)
# class RBDConnectorMixin(object):
#     def _sanitize_mon_hosts(hosts):
#         def _sanitize_host(host):
#     def _get_rbd_args(cls, connection_properties, conf=None):
# 
# Path: os_brick/tests/base.py
# class TestCase(testtools.TestCase):
#     SENTINEL = object()
#     def setUp(self):
#     def _common_cleanup(self):
#     def log_level(self, level):
#     def mock_object(self, obj, attr_name, new_attr=SENTINEL, **kwargs):
#     def patch(self, path, *args, **kwargs):


# Path: os_brick/tests/initiator/connectors/test_base_rbd.py
from unittest import mock
from os_brick.initiator.connectors import base_rbd
from os_brick.tests import base
import ddt






# Both Linux and Windows tests are using those mocks.
class RBDConnectorTestMixin(object):
    def setUp(self):
        super(RBDConnectorTestMixin, self).setUp()

        self.user = 'fake_user'
        self.pool = 'fake_pool'
        self.volume = 'fake_volume'
        self.clustername = 'fake_ceph'
        self.hosts = ['192.168.10.2']
        self.ports = ['6789']
        self.keyring = "[client.cinder]\n  key = test\n"
        self.image_name = '%s/%s' % (self.pool, self.volume)

        self.connection_properties = {
            'auth_username': self.user,
            'name': self.image_name,
            'cluster_name': self.clustername,
            'hosts': self.hosts,
            'ports': self.ports,
            'keyring': self.keyring,
        }


@ddt.ddt

class TestRBDConnectorMixin(RBDConnectorTestMixin, base.TestCase):