Skip to content
Open
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
61 changes: 61 additions & 0 deletions imcsdk/apis/server/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,67 @@ def virtual_drive_encryption_enable(handle, controller_type,
handle.set_mo(vd)
return handle.query_dn(vd.dn)

def virtual_drive_start_full_initialize(handle, controller_type,
controller_slot, name, server_id=1):
"""
Start full initialization on the virtual drive

Args:
handle (ImcHandle)
controller_type (str): Controller type
'SAS'
controller_slot (str): Controller slot name/number
"MEZZ","0"-"9", "HBA"
name (string): name of the virtual drive
server_id (int): server_id for UCS 3260 platform

Returns:
StorageVirtualDrive object

Examples:
virtual_drive_start_full_initialize(handle, 'SAS', 'HBA', 'test_vd')
"""
from imcsdk.mometa.storage.StorageVirtualDrive import \
StorageVirtualDriveConsts
vd = vd_query_by_name(handle=handle,
controller_type=controller_type,
controller_slot=controller_slot,
name=name,
server_id=server_id)
vd.admin_action = StorageVirtualDriveConsts.ADMIN_ACTION_START_FULL_INITIALIZATION
handle.set_mo(vd)
return handle.query_dn(vd.dn)

def virtual_drive_cancel_initialization(handle, controller_type,
controller_slot, name, server_id=1):
"""
Cancel full initialization on the virtual drive

Args:
handle (ImcHandle)
controller_type (str): Controller type
'SAS'
controller_slot (str): Controller slot name/number
"MEZZ","0"-"9", "HBA"
name (string): name of the virtual drive
server_id (int): server_id for UCS 3260 platform

Returns:
StorageVirtualDrive object

Examples:
virtual_drive_cancel_initialize(handle, 'SAS', 'HBA', 'test_vd')
"""
from imcsdk.mometa.storage.StorageVirtualDrive import \
StorageVirtualDriveConsts
vd = vd_query_by_name(handle=handle,
controller_type=controller_type,
controller_slot=controller_slot,
name=name,
server_id=server_id)
vd.admin_action = StorageVirtualDriveConsts.ADMIN_ACTION_CANCEL_INITIALIZATION
handle.set_mo(vd)
return handle.query_dn(vd.dn)

def virtual_drive_set_boot_drive(handle, controller_type, controller_slot, name, server_id=1):
"""
Expand Down
2 changes: 1 addition & 1 deletion imcsdk/imcsession.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ def _validate_connection(self):
return False

def _validate_model(self, model):
valid_model_prefixes = ["UCSC", "UCS-E", "UCSS", "HX"]
valid_model_prefixes = ["UCSC", "UCS-E", "UCSS", "HX", "DN1"]
valid_models = ["R460-4640810", "C260-BASE-2646"]

if model in valid_models:
Expand Down