Skip to content

Commit

Permalink
Merge pull request #58 from huangpeng5/suyan_326
Browse files Browse the repository at this point in the history
Resolve the Pacific storage compatibility issue.
  • Loading branch information
huangpeng5 authored Mar 26, 2024
2 parents d4a8bcb + 046a54d commit bf7b095
Showing 1 changed file with 9 additions and 21 deletions.
30 changes: 9 additions & 21 deletions Manila/file_driver_dir/huawei/oceanstorPacific/helper/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,13 +412,9 @@ def query_nfs_share_information(self, account_id, fs_id, dtree_id=0):

url = "nas_protocol/nfs_share_list"
nfs_para = {
'account_id': account_id,
'filter': [
{
'fs_id': fs_id,
'dtree_id': dtree_id,
}
]
"account_id": account_id,
"filter": "[{\"fs_id\": %d, \"dtree_id\": \"%s\"}]" %
(fs_id, str(fs_id) + '@' + str(dtree_id))
}
data = jsonutils.dumps(nfs_para)
result = self.call(url, data, "GET")
Expand All @@ -437,12 +433,8 @@ def query_cifs_share_information(self, account_id, share_name):
url = "file_service/cifs_share_list"

cifs_para = {
'account_id': account_id,
'filter': [
{
'name': share_name
}
]
"account_id": account_id,
"filter": "[{\"name\":\"%s\"}]" % share_name
}

data = jsonutils.dumps(cifs_para)
Expand Down Expand Up @@ -598,14 +590,12 @@ def _query_nfs_share_clients_information(self, offset, extra_param):

url = "nas_protocol/nfs_share_auth_client_list"
filter_para = {
'filter': [{
"share_id": extra_param[0]
}],
"filter": "[{\"share_id\": \"%s\"}]" % str(extra_param[0]),
"range": {
"offset": offset,
"limit": constants.MAX_QUERY_COUNT
},
'account_id': extra_param[1]
"account_id": extra_param[1]
}

data = jsonutils.dumps(filter_para)
Expand All @@ -629,14 +619,12 @@ def _query_cifs_share_user_information(self, offset, extra_param):

url = "file_service/cifs_share_auth_client_list"
filter_para = {
'filter': [{
"share_id": extra_param[0]
}],
"filter": "[{\"share_id\": \"%s\"}]" % str(extra_param[0]),
"range": {
"offset": offset,
"limit": constants.MAX_QUERY_COUNT
},
'account_id': extra_param[1],
"account_id": extra_param[1],
}

data = jsonutils.dumps(filter_para)
Expand Down

0 comments on commit bf7b095

Please sign in to comment.