Remove Windows support
Since Winstackers project has been retired, running OpenStack on Windows operating systems is no longer tested or maintained. Change-Id: I9f1a17d535f0aae7dfd584f11908dbea7aaaea36
This commit is contained in:
parent
3ef76fe4e2
commit
afb5c8bf12
4
releasenotes/notes/remove-windows-1a58a6af889e45a3.yaml
Normal file
4
releasenotes/notes/remove-windows-1a58a6af889e45a3.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
Support for Windows operating systems has been removed.
|
@ -20,9 +20,7 @@ import functools
|
||||
import hashlib
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
import tempfile
|
||||
import threading
|
||||
import weakref
|
||||
@ -226,7 +224,7 @@ class FileDriver(coordination.CoordinationDriverCachedRunWatchers,
|
||||
def __init__(self, member_id, parsed_url, options):
|
||||
"""Initialize the file driver."""
|
||||
super().__init__(member_id, parsed_url, options)
|
||||
self._dir = self._normalize_path(parsed_url.path)
|
||||
self._dir = parsed_url.path
|
||||
self._group_dir = os.path.join(self._dir, 'groups')
|
||||
self._tmpdir = os.path.join(self._dir, 'tmp')
|
||||
self._driver_lock_path = os.path.join(self._dir, '.driver_lock')
|
||||
@ -238,19 +236,6 @@ class FileDriver(coordination.CoordinationDriverCachedRunWatchers,
|
||||
self._safe_member_id = self._make_filesystem_safe(member_id)
|
||||
self._timeout = int(self._options.get('timeout', 10))
|
||||
|
||||
@staticmethod
|
||||
def _normalize_path(path):
|
||||
if sys.platform == 'win32':
|
||||
# Replace slashes with backslashes and make sure we don't
|
||||
# have any at the beginning of paths that include drive letters.
|
||||
#
|
||||
# Expected url format:
|
||||
# file:////share_address/share_name
|
||||
# file:///C:/path
|
||||
return re.sub(r'\\(?=\w:\\)', '',
|
||||
os.path.normpath(path))
|
||||
return path
|
||||
|
||||
@classmethod
|
||||
def _get_raw_lock(cls, path, member_id):
|
||||
lock_barrier = cls._barriers.setdefault(path, _Barrier())
|
||||
|
@ -14,7 +14,6 @@
|
||||
# under the License.
|
||||
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import fixtures
|
||||
from testtools import testcase
|
||||
@ -53,19 +52,3 @@ class TestFileDriver(testcase.TestCase):
|
||||
safe_group_id, '.metadata'))
|
||||
self.assertRaises(tooz.ToozError,
|
||||
coord.delete_group(b"my_group").get)
|
||||
|
||||
@mock.patch('os.path.normpath', lambda x: x.replace('/', '\\'))
|
||||
@mock.patch('sys.platform', 'win32')
|
||||
def test_base_dir_win32(self):
|
||||
coord = coordination.get_coordinator(
|
||||
'file:///C:/path/', self._FAKE_MEMBER_ID)
|
||||
self.assertEqual('C:\\path\\', coord._dir)
|
||||
|
||||
coord = coordination.get_coordinator(
|
||||
'file:////share_addr/share_path/', self._FAKE_MEMBER_ID)
|
||||
self.assertEqual('\\\\share_addr\\share_path\\', coord._dir)
|
||||
|
||||
# Administrative shares should be handled properly.
|
||||
coord = coordination.get_coordinator(
|
||||
'file:////c$/path/', self._FAKE_MEMBER_ID)
|
||||
self.assertEqual('\\\\c$\\path\\', coord._dir)
|
||||
|
Loading…
Reference in New Issue
Block a user