# Path: os_brick/exception.py
# LOG = logging.getLogger(__name__)
# class BrickException(Exception):
# class NotFound(BrickException):
# class Invalid(BrickException):
# class InvalidParameterValue(Invalid):
# class NoFibreChannelHostsFound(BrickException):
# class NoFibreChannelVolumeDeviceFound(BrickException):
# class VolumeNotDeactivated(BrickException):
# class VolumeDeviceNotFound(BrickException):
# class VolumePathsNotFound(BrickException):
# class VolumePathNotRemoved(BrickException):
# class ProtocolNotSupported(BrickException):
# class TargetPortalNotFound(BrickException):
# class TargetPortalsNotFound(TargetPortalNotFound):
# class FailedISCSITargetPortalLogin(BrickException):
# class BlockDeviceReadOnly(BrickException):
# class VolumeGroupNotFound(BrickException):
# class VolumeGroupCreationFailed(BrickException):
# class CommandExecutionFailed(BrickException):
# class VolumeDriverException(BrickException):
# class InvalidIOHandleObject(BrickException):
# class VolumeEncryptionNotSupported(Invalid):
# class VolumeLocalCacheNotSupported(Invalid):
# class InvalidConnectorProtocol(ValueError):
# class ExceptionChainer(BrickException):
# class ExecutionTimeout(putils.ProcessExecutionError):
#     def __init__(self, message=None, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def __repr__(self):
#     def __nonzero__(self) -> bool:
#     def add_exception(self, exc_type, exc_val, exc_tb) -> None:
#     def context(self,
#                 catch_exception: bool,
#                 msg: str = '',
#                 *msg_args: Iterable):
#     def __enter__(self):
#     def __exit__(self, exc_type, exc_val, exc_tb):
# 
# Path: os_brick/remotefs/windows_remotefs.py
# LOG = logging.getLogger(__name__)
# class WindowsRemoteFsClient(remotefs.RemoteFsClient):
#     def __init__(self, mount_type, root_helper=None,
#                  execute=None, *args, **kwargs):
#     def get_local_share_path(self, share, expect_existing=True):
#     def _get_share_norm_path(self, share):
#     def get_share_name(self, share):
#     def get_share_subdir(self, share):
#     def mount(self, share, flags=None):
#     def unmount(self, share):
#     def _create_mount_point(self, share, use_local_path):
#     def _parse_credentials(self, opts_str):
# 
# 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 import exception
from os_brick.remotefs import windows_remotefs
from os_brick.tests import base
import ddt
# Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
#    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.





@ddt.ddt
class WindowsRemotefsClientTestCase(base.TestCase):
    _FAKE_SHARE_NAME = 'fake_share'
    _FAKE_SHARE_SERVER = 'fake_share_server'
    _FAKE_SHARE = '\\\\%s\\%s' % (_FAKE_SHARE_SERVER,
                                  _FAKE_SHARE_NAME)


# Path: os_brick/exception.py
# LOG = logging.getLogger(__name__)
# class BrickException(Exception):
# class NotFound(BrickException):
# class Invalid(BrickException):
# class InvalidParameterValue(Invalid):
# class NoFibreChannelHostsFound(BrickException):
# class NoFibreChannelVolumeDeviceFound(BrickException):
# class VolumeNotDeactivated(BrickException):
# class VolumeDeviceNotFound(BrickException):
# class VolumePathsNotFound(BrickException):
# class VolumePathNotRemoved(BrickException):
# class ProtocolNotSupported(BrickException):
# class TargetPortalNotFound(BrickException):
# class TargetPortalsNotFound(TargetPortalNotFound):
# class FailedISCSITargetPortalLogin(BrickException):
# class BlockDeviceReadOnly(BrickException):
# class VolumeGroupNotFound(BrickException):
# class VolumeGroupCreationFailed(BrickException):
# class CommandExecutionFailed(BrickException):
# class VolumeDriverException(BrickException):
# class InvalidIOHandleObject(BrickException):
# class VolumeEncryptionNotSupported(Invalid):
# class VolumeLocalCacheNotSupported(Invalid):
# class InvalidConnectorProtocol(ValueError):
# class ExceptionChainer(BrickException):
# class ExecutionTimeout(putils.ProcessExecutionError):
#     def __init__(self, message=None, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def __repr__(self):
#     def __nonzero__(self) -> bool:
#     def add_exception(self, exc_type, exc_val, exc_tb) -> None:
#     def context(self,
#                 catch_exception: bool,
#                 msg: str = '',
#                 *msg_args: Iterable):
#     def __enter__(self):
#     def __exit__(self, exc_type, exc_val, exc_tb):
# 
# Path: os_brick/remotefs/windows_remotefs.py
# LOG = logging.getLogger(__name__)
# class WindowsRemoteFsClient(remotefs.RemoteFsClient):
#     def __init__(self, mount_type, root_helper=None,
#                  execute=None, *args, **kwargs):
#     def get_local_share_path(self, share, expect_existing=True):
#     def _get_share_norm_path(self, share):
#     def get_share_name(self, share):
#     def get_share_subdir(self, share):
#     def mount(self, share, flags=None):
#     def unmount(self, share):
#     def _create_mount_point(self, share, use_local_path):
#     def _parse_credentials(self, opts_str):
# 
# 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/remotefs/test_windows_remotefs.py
from unittest import mock
from os_brick import exception
from os_brick.remotefs import windows_remotefs
from os_brick.tests import base
import ddt

# Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
#    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.





@ddt.ddt
class WindowsRemotefsClientTestCase(base.TestCase):
    _FAKE_SHARE_NAME = 'fake_share'
    _FAKE_SHARE_SERVER = 'fake_share_server'
    _FAKE_SHARE = '\\\\%s\\%s' % (_FAKE_SHARE_SERVER,
                                  _FAKE_SHARE_NAME)


    @mock.patch.object(windows_remotefs, 'utilsfactory')