Module OSCPluginUtils
[hide private]
[frames] | no frames]

Module OSCPluginUtils

source code


Copyright: Copyright (C) 2008, 2010 Oracle and/or its affiliates. All rights reserved.

License: See the file COPYING for redistribution information.

Functions [hide private]
 
checkRequired(*required_commands)
Check if the command (full path to the command) is available on the system, if not it will raise the standardized Storage Connect exception.
source code
 
destroyMPDev(mp_dev)
This will destroy a multipath device as well as all of its children (partitions and block devices).
source code
 
getPage83FromMPDev(mp_dev)
This will return the page83_id from the supplied multipath device.
source code
bool
containsFile(fs_record, file_path)
Check if the file is contained on the file system identified by the File System record.
source code
dict
getFileRecord(fs_record, file_path)
Generate a file record for the file identified by the file path for the specific File System record.
source code
 
iSCSIDiscoveryAuth(ss_record)
Generate a file record for the file identified by the file path for the specific File System record.
source code
dict
getNetDevInfo(netdev)
Obtain network device information.
source code
str
__netdev_ioctl__(sock_fd, ioctl_num, dev_name)
Execute specific ioctl op for network devices.
source code
 
_read_port_name(filename) source code
 
getPortNames() source code
 
getInitiatorNames() source code
 
makeMPPage83FromRawPage83(page_83, vendor=None, model=None)
This will return the multipath uuid from the supplied raw page 83 id.
source code
Variables [hide private]
  __package__ = None
Function Details [hide private]

checkRequired(*required_commands)

source code 

Check if the command (full path to the command) is available on the system, if not it will raise the standardized Storage Connect exception.

Parameters:
  • required_commands (str or list) - Commands to check if available.
Raises:

destroyMPDev(mp_dev)

source code 

This will destroy a multipath device as well as all of its children (partitions and block devices).

Parameters:
  • mp_dev (str) - The multipath device (dm device) that need to teared down.

getPage83FromMPDev(mp_dev)

source code 

This will return the page83_id from the supplied multipath device.

Parameters:
  • mp_dev (str) - The multi path device (dm device) to interrogate.

containsFile(fs_record, file_path)

source code 

Check if the file is contained on the file system identified by the File System record.

Parameters:
Returns: bool
True if the file is contained in the file system.
Raises:

getFileRecord(fs_record, file_path)

source code 

Generate a file record for the file identified by the file path for the specific File System record.

Parameters:
  • fs_record (dict) - File System record
  • file_path (str) - File path to create the file record for.
Returns: dict
File record
Raises:

iSCSIDiscoveryAuth(ss_record)

source code 

Generate a file record for the file identified by the file path for the specific File System record.

Parameters:
Raises:

getNetDevInfo(netdev)

source code 

Obtain network device information.

Parameters:
  • netdev (str) - Network device name
Returns: dict
Network device information

__netdev_ioctl__(sock_fd, ioctl_num, dev_name)

source code 

Execute specific ioctl op for network devices.

Parameters:
  • sock_fd (int) - File descriptor
  • ioctl_num (int) - ioctl operation
  • dev_name (str) - Device name to query
Returns: str
ioctl system call return value

makeMPPage83FromRawPage83(page_83, vendor=None, model=None)

source code 

This will return the multipath uuid from the supplied raw page 83 id.

Parameters:
  • page_83 (int) - The raw page 83 to convert.
  • vendor (str) - The lun vendor.
  • model (str) - The lun model.