Skip to content

Commit

Permalink
Merge pull request #299 from zhilong-xu/pure
Browse files Browse the repository at this point in the history
pure codeview-Add files and change class names
  • Loading branch information
luopan-code authored Nov 11, 2021
2 parents 008c5cc + 19a7a81 commit f7352a8
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 4 deletions.
Empty file added delfin/drivers/pure/__init__.py
Empty file.
3 changes: 1 addition & 2 deletions delfin/drivers/pure/pure/pure_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,8 @@ def list_disks(self, context):
disk_dict['physical_type'] = physical_type \
if physical_type in constants.DiskPhysicalType.ALL else \
constants.DiskPhysicalType.UNKNOWN
status = disk.get('status')
disk_dict['status'] = consts.DISK_STATUS_MAP. \
get(status, constants.DiskStatus.OFFLINE)
get(disk.get('status'), constants.DiskStatus.OFFLINE)
disk_dict['storage_id'] = self.storage_id
disk_dict['capacity'] = int(int(disk.get('capacity')) /
units.Ki)
Expand Down
2 changes: 1 addition & 1 deletion delfin/drivers/pure/pure/rest_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def login(self):
try:
data = {'username': self.rest_username, 'password': cryptor.decode(
self.rest_password)}
self.init_http_head()
token_res = self.get_token(RestHandler.REST_AUTH_URL, data,
method='POST')
if token_res.status_code != consts.SUCCESS_STATUS_CODE:
Expand Down Expand Up @@ -128,7 +129,6 @@ def rest_call(self, url, data=None, method='GET'):
return result_json

def get_token(self, url, data=None, method='GET'):
self.init_http_head()
res = self.do_call(url, data, method)
return res

Expand Down
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
'huawei oceanstor = delfin.drivers.huawei.oceanstor.oceanstor:OceanStorDriver',
'ibm storwize_svc = delfin.drivers.ibm.storwize_svc.storwize_svc:StorwizeSVCDriver',
'netapp cmode = delfin.drivers.netapp.dataontap.cluster_mode:NetAppCmodeDriver'
'pure pure = delfin.drivers.pure.pure.pure_storage:StorageDriver'
'pure pure = delfin.drivers.pure.pure.pure_storage:PureStorageDriver'
]
},
)

0 comments on commit f7352a8

Please sign in to comment.