Skip to content

Commit

Permalink
Merge pull request #44 from bingyanh/2.5.4_local
Browse files Browse the repository at this point in the history
2.5.4 version information
  • Loading branch information
yunqifeng authored Apr 16, 2023
2 parents 85ce9c0 + 6c44e7a commit b7795e4
Show file tree
Hide file tree
Showing 325 changed files with 45,687 additions and 42,036 deletions.
2 changes: 1 addition & 1 deletion Cinder/Mitaka/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"""Version: 2.5.RC2"""
"""Version: 2.5.RC4"""
19 changes: 18 additions & 1 deletion Cinder/Mitaka/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
ERROR_CONNECT_TO_SERVER = -403
ERROR_UNAUTHORIZED_TO_SERVER = -401
ERROR_BAD_STATUS_LINE = -400
ERROR_DEVICE_COMMUNICATE = 4294967297
HTTP_ERROR_NOT_FOUND = 404
SOCKET_TIMEOUT = 52
ERROR_VOLUME_ALREADY_EXIST = 1077948993
Expand All @@ -76,6 +77,8 @@
HOST_NOT_EXIST = 1077937498

RELOGIN_ERROR_PASS = [ERROR_VOLUME_NOT_EXIST]
RELOGIN_ERROR_CODE = (ERROR_CONNECT_TO_SERVER, ERROR_UNAUTHORIZED_TO_SERVER,
ERROR_BAD_STATUS_LINE, ERROR_DEVICE_COMMUNICATE)
RUNNING_NORMAL = '1'
RUNNING_SYNC = '23'
RUNNING_STOP = '41'
Expand Down Expand Up @@ -142,7 +145,7 @@
LUN_TYPE_MAP = {'Thick': THICK_LUNTYPE,
'Thin': THIN_LUNTYPE}

VALID_PRODUCT = ['T', 'TV2', 'V3', 'V5', '18000', 'Dorado', 'V6']
VALID_PRODUCT = ['V3', 'V5', '18000', 'Dorado', 'V6']
VALID_PROTOCOL = ['FC', 'iSCSI']
VALID_WRITE_TYPE = ['1', '2']
VOLUME_NOT_EXISTS_WARN = 'warning'
Expand Down Expand Up @@ -208,3 +211,17 @@
SUPPORT_CLONE_PAIR_VERSION = "V600R003C00"

DEFAULT_MINIMUM_FC_INITIATOR_ONLINE = 0

SNAPSHOT_HEALTH_STATUS = (
SNAPSHOT_HEALTH_STATUS_NORMAL,
SNAPSHOT_HEALTH_STATUS_FAULTY) = ('1', '2')
SNAPSHOT_RUNNING_STATUS = (
SNAPSHOT_RUNNING_STATUS_ACTIVATED,
SNAPSHOT_RUNNING_STATUS_ROLLINGBACK) = ('43', '44')
SNAPSHOT_ROLLBACK_PROGRESS_FINISH = '100'
SNAPSHOT_ROLLBACK_SPEED_TYPES = (
SNAPSHOT_ROLLBACK_SPEED_LOW,
SNAPSHOT_ROLLBACK_SPEED_MEDIUM,
SNAPSHOT_ROLLBACK_SPEED_HIGH,
SNAPSHOT_ROLLBACK_SPEED_HIGHEST
) = ('1', '2', '3', '4')
Empty file removed Cinder/Mitaka/extend/__init__.py
Empty file.
280 changes: 0 additions & 280 deletions Cinder/Mitaka/extend/fc_zone_helper.py

This file was deleted.

8 changes: 3 additions & 5 deletions Cinder/Mitaka/fc_zone_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

from cinder import exception
from cinder.i18n import _
from cinder.i18n import _LI
from cinder.i18n import _LW
from cinder.volume.drivers.huawei import constants


Expand Down Expand Up @@ -80,8 +78,8 @@ def _filter_not_connected_fabric(fabric_name, fabric):
tgt_port_wwn_list = fabric.get('target_port_wwn_list')

if not ini_port_wwn_list or not tgt_port_wwn_list:
LOG.warning(_LW("Fabric %(fabric_name)s doesn't really "
"connect host and array: %(fabric)s."),
LOG.warning("Fabric %(fabric_name)s doesn't really "
"connect host and array: %(fabric)s.",
{'fabric_name': fabric_name,
'fabric': fabric})
return None
Expand All @@ -99,7 +97,7 @@ def _filter_not_connected_fabric(fabric_name, fabric):
LOG.error(msg)
raise exception.VolumeBackendAPIException(data=msg)

LOG.info(_LI("Got fabric: %s."), valid_fabrics)
LOG.info("Got fabric: %s.", valid_fabrics)
return valid_fabrics

def _filter_fabric(self, fabrics, host_id):
Expand Down
23 changes: 21 additions & 2 deletions Cinder/Mitaka/huawei_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import base64
import re

from oslo_log import log as logging
from lxml import etree as ET
from oslo_log import log as logging
import six

from cinder import exception
Expand Down Expand Up @@ -94,7 +94,8 @@ def update_config_value(self):
self._hyper_pair_sync_speed,
self._replication_pair_sync_speed,
self._get_local_minimum_fc_initiator,
self._hyper_enforce_multipath)
self._hyper_enforce_multipath,
self._rollback_speed)

tree = ET.parse(self.conf.cinder_huawei_conf_file,
ET.XMLParser(resolve_entities=False))
Expand Down Expand Up @@ -609,3 +610,21 @@ def _get_local_minimum_fc_initiator(self, xml_root):
LOG.error(msg)
raise exception.InvalidInput(reason=msg)
setattr(self.conf, 'min_fc_ini_online', minimum_fc_initiator)

def _rollback_speed(self, xml_root):
text = xml_root.findtext('LUN/SnapshotRollbackSpeed')
if text and text.strip() not in constants.SNAPSHOT_ROLLBACK_SPEED_TYPES:
msg = (_("Invalid SnapshotRollbackSpeed '%(text)s', "
"SnapshotRollbackSpeed must "
"be between %(low)s and %(high)s.")
% {"text": text,
"low": constants.SNAPSHOT_ROLLBACK_SPEED_LOW,
"high": constants.SNAPSHOT_ROLLBACK_SPEED_HIGHEST})
LOG.error(msg)
raise exception.InvalidInput(reason=msg)

if not text:
speed = constants.SNAPSHOT_ROLLBACK_SPEED_HIGH
else:
speed = text.strip()
setattr(self.conf, 'rollback_speed', int(speed))
Loading

0 comments on commit b7795e4

Please sign in to comment.