Skip to content

Commit ebcf3d0

Browse files
committed
1.Support RoCE Over NvME protocol
1 parent 8dfd455 commit ebcf3d0

File tree

339 files changed

+28150
-127929
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

339 files changed

+28150
-127929
lines changed

Cinder/Antelope/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"""Version: 2.6.RC3"""
1+
"""Version: 2.7.2"""

Cinder/Antelope/cipher.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright (c) 2024 Huawei Technologies Co., Ltd.
2+
# All Rights Reserved.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
5+
# not use this file except in compliance with the License. You may obtain
6+
# a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
# License for the specific language governing permissions and limitations
14+
# under the License.
15+
16+
17+
def decrypt_cipher(text_info, is_need_decrypt=False):
18+
"""
19+
This interface is used to decrypt sensitive information.
20+
When text_info is a plaintext password, no decryption is required by default.
21+
22+
When cipher_text is set to text_info, please set is_need_decrypt to True
23+
and use your own decryption component to decrypt the ciphertext
24+
"""
25+
if is_need_decrypt:
26+
# Please modify this interface and use your own decryption
27+
# component to decrypt the ciphertext.
28+
pass
29+
30+
return text_info

Cinder/Antelope/constants.py

Lines changed: 77 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2016 Huawei Technologies Co., Ltd.
1+
# Copyright (c) 2024 Huawei Technologies Co., Ltd.
22
# All Rights Reserved.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@@ -26,6 +26,15 @@
2626
PORTGROUP_PREFIX = 'OpenStack_PortGroup_'
2727
QOS_NAME_PREFIX = 'OpenStack_'
2828
SENSITIVE_KEYS = ['auth_password']
29+
SENSITIVE_INI_KEYS = ['initiator', 'wwpns', 'host_nqn', 'wwnns', 'nqn']
30+
31+
VALID_PROTOCOL = ['nvmeof', 'iSCSI', 'FC']
32+
33+
ROCE_INITIATOR = '57870'
34+
ROCE_TARGET_NQN_PREFIX = 'nqn.2020-02.huawei.nvme:nvm-subsystem-sn-'
35+
ROCE_TARGET_PORT = 4420
36+
MAX_QUERY_COUNT = 100
37+
ADDRESS_FAMILY_IPV4 = '0'
2938

3039
FC_PORT_CONNECTED = '10'
3140
FC_INIT_ONLINE = '27'
@@ -37,7 +46,8 @@
3746
DEFAULT_WAIT_INTERVAL = 5
3847
MAX_NAME_LENGTH = 31
3948
SOCKET_TIMEOUT = 52
40-
LOGIN_SOCKET_TIMEOUT = 4
49+
LOGIN_SOCKET_TIMEOUT = 32
50+
DEFAULT_SEMAPHORE = 20
4151
PWD_EXPIRED_OR_INITIAL = (3, 4)
4252

4353
LUN_STATUS = (LUN_ONLINE, LUN_INITIALIZING, LUN_OFFLINE) = ('27', '53', '28')
@@ -90,9 +100,13 @@
90100
CREATE_HYPERMETRO_TIMEOUT = 1077949006
91101
HYPERMETRO_ALREADY_EXIST = 1077674256
92102
ERROR_VOLUME_ALREADY_EXIST = 1077948993
103+
HOST_LUN_MAPPING_NOT_EXIST = 1073804587
104+
HOST_LUN_MAPPING_ALREADY_EXIST = 1073804588
93105

94-
RELOGIN_ERROR_CODE = (ERROR_CONNECT_TO_SERVER, ERROR_UNAUTHORIZED_TO_SERVER,
95-
ERROR_DEVICE_COMMUNICATE)
106+
RELOGIN_ERROR_CODE = (
107+
ERROR_CONNECT_TO_SERVER, ERROR_UNAUTHORIZED_TO_SERVER,
108+
ERROR_DEVICE_COMMUNICATE
109+
)
96110

97111
METRO_RUNNING_STATUS = (METRO_RUNNING_NORMAL, METRO_RUNNING_SYNC,
98112
METRO_RUNNING_STOP, RUNNING_TO_BE_SYNC
@@ -101,8 +115,7 @@
101115

102116
THICK_LUNTYPE = '0'
103117
THIN_LUNTYPE = '1'
104-
LUN_TYPE_MAP = {'Thick': THICK_LUNTYPE,
105-
'Thin': THIN_LUNTYPE}
118+
LUN_TYPE_MAP = {'Thick': THICK_LUNTYPE, 'Thin': THIN_LUNTYPE}
106119

107120
QOS_INACTIVATED = '45'
108121
LOWER_LIMIT_KEYS = ('MINIOPS', 'LATENCY', 'MINBANDWIDTH')
@@ -197,3 +210,61 @@
197210
) = ('1', '2', '3', '4')
198211

199212
INBAND_LUN_TYPE = '5'
213+
214+
# Duplicate Field Summary
215+
ID = 'id'
216+
DATA = 'data'
217+
QOS = 'qos'
218+
LUN = 'lun'
219+
POLICY = 'policy'
220+
ISCSI_INFO = 'iscsi_info'
221+
FASTCLONE = 'fastclone'
222+
MULTIPATH = 'multipath'
223+
HYPERMETRO = 'hypermetro'
224+
APPLICATIONNAME = 'applicationname'
225+
IN_BAND_OR_NOT = 'in_band_or_not'
226+
METRO_SYNC_COMPLETED = 'metro_sync_completed'
227+
STATUS = 'status'
228+
TARGET_PORTALS = 'target_portals'
229+
HUAWEI_LUN_WWN = 'huawei_lun_wwn'
230+
HUAWEI_SN = 'huawei_sn'
231+
SEMAPHORE = 'semaphore'
232+
HOSTLUN_ID = 'hostlun_id'
233+
BACKEND_ID = 'backend_id'
234+
HYPERMETRO_ID = 'hypermetro_id'
235+
HUAWEI_LUN_ID = 'huawei_lun_id'
236+
WORKLOADTYPEID = 'WORKLOADTYPEID'
237+
REMOTEHYPERREPLICATION = 'RemoteHyperReplication'
238+
HYPERREPLICATION = 'HyperReplication'
239+
HOSTNAME = 'HostName'
240+
MULTIPATHTYPE = 'MULTIPATHTYPE'
241+
RUNNINGSTATUS = 'RUNNINGSTATUS'
242+
THIN = 'Thin'
243+
HYPERMETRO_UPPER = 'HyperMetro'
244+
ID_UPPER = 'ID'
245+
246+
HUAWEI_DISK_DICT = {
247+
"-1": "",
248+
"0": "fc",
249+
"1": "sas",
250+
"2": "sata",
251+
"3": "ssd",
252+
"4": "nl_sas",
253+
"5": "slc_ssd",
254+
"6": "mlc_ssd",
255+
"7": "fc_sed",
256+
"8": "sas_sed",
257+
"9": "sata_sed",
258+
"10": "ssd_sed",
259+
"11": "nl-sas_sed",
260+
"12": "slc_ssd_sed",
261+
"13": "mlc_ssd_sed",
262+
"14": "nvme_ssd",
263+
"16": "nvme_ssd_sed",
264+
"17": "scm",
265+
"18": "scm_sed",
266+
"19": "capacity-optimized ssd",
267+
"20": "capacity-optimized ssd sed",
268+
"21": "capacity-optimized ssd",
269+
"22": "capacity-optimized ssd sed"
270+
}

0 commit comments

Comments
 (0)