Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pure codeview-Add files and change class names #299

Merged
merged 1 commit into from
Nov 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'
]
},
)