ExposePaths method of the CIM_ControllerConfigurationService class

Expose a list of SCSI logical units (such as RAID volumes or tape drives) to a list of initiators through a list of target ports, through one or more SCSIProtocolControllers (SPCs).

There are two modes of operation, create and modify. If a NULL value is passed in for the SPC, then the instrumentation will create at least one SPC that satisfies the request. Depending upon the instrumentation capabilities, more than one SPC MAY be created. (e.g. if CIM_ProtocolControllerMaskingCapabilities.OneHardwareIDPerView is true and more than one initiatorID was passed in, then one SPC per initiatorID will be created). If an SPC is passed in, then the instrumentation attempts to add the new paths to the existing SPC. Depending upon the instrumentation capabilities, this MAY result in the creation of additional SPCs. The instrumentation MAY return an error if honoring this request would violate SCSI semantics.

For creating an SPC, the parameters that MUST be specified are dependent upon the SPCAllows* properties in CIM_ProtocolControllerMaskingCapabilities. If SPCAllowsNoLUs is false, the caller MUST specify a list of LUNames. If it is true, the caller MAY specify a list of LUNames or MAY pass in null. If SPCAllowsNoTargets is false and PortsPerView is not 'All Ports share the same view' the caller MUST specify a list of TargetPortIDs. If it is true, the caller MAY specify a list of TargetPortIDs or MAY pass in null. If SPCAllowsNoInitiators is false, the caller MUST specify a list of InitiatorPortIDs. If it is true, the caller MAY specify a list of InitiatorPortIDs or MAY pass in null. If LUNames is not null, the caller MUST specify DeviceAccesses for each logical unit. If the instrumentation's CIM_ProtocolControllerMaskingCapabilities ClientSelectableDeviceNumbers property is TRUE then the client MAY provide a list of device numbers (LUNs) to use for the paths to be created. If is false, the client MUST pass in NULL for this parameter.

The LUNames, DeviceNumbers, and DeviceAccesses parameters are mutually indexed arrays - any element in DeviceNumbers or DeviceAccesses will set a property relative to the LogicalDevice instance named in the corresponding element of LUNames. LUNames and DeviceAccesses MUST have the same number of elements. DeviceNumbers MUST be null (asking the instrumentation to assign numbers) or have the same number of elements as LUNames. If these conditions are not met, the instrumentation MUST return a 'Invalid Parameter' status or a CIM_Error.

For modifying an SPC, there are three specific use cases identified. The instrumentation MUST support these use cases. Other permutations are allowed, but are vendor-specific. The use cases are: Add LUs to a view, Add initiator IDs to a view, and Add target port IDs to a view. Add LUs to a view requires that the LUNames parameter not be null and that the InitiatorIDs and TargetPortIDs parameters be null. DeviceNumbers MAY be null if ClientSelectableDeviceNumbers is false. DeviceAccesses MUST be specified. Add initiator IDs to a view requires that the LUNames parameter be null, that the InitiatorIDs not be null, and that the TargetPortIDs parameters be null. DeviceNumbers and DeviceAccesses MUST be null. Add target port IDs to a view requires that the LUNames and InitiatorPortIDs parameters be null and is only possible is PortsPerView is 'Multiple Ports Per View'. DeviceNumbers and DeviceAccesses MUST also be null

The relevant rules of SCSI semantics are:

- an SPC MAY NOT be exposed through a particular host/target port pair that is in use by another SPC. (In other words, an SPC and its associated logical units and ports together correspond to the logical unit inventory provided by SCSI REPORT LUNS and INQUIRY commands)

- each LogicalDevice associated to an SPC MUST have a unique ProtocolControllerForUnit DeviceNumber (logical unit number)

The instrumentation MUST report an error if the client request would violate one of these rules.

If the instrumentation provides PrivilegeManagementService, the results of setting DeviceAccesses MUST be synchronized with PrivilegeManagementService as described in the ProtocolControllerForUnit DeviceAccess description.

Syntax

uint32 ExposePaths(
  [out]     CIM_ConcreteJob            REF Job,
  [in]      string                         LUNames[],
  [in]      string                         InitiatorPortIDs[],
  [in]      string                         TargetPortIDs[],
  [in]      string                         DeviceNumbers[],
  [in]      uint16                         DeviceAccesses[],
  [in, out] CIM_SCSIProtocolController REF ProtocolControllers[]
);

Parameters

Job [out]

Reference to the job if 'Method Parameters Checked - Job Started' is returned (MAY be null if job completed).

LUNames [in]

An array of IDs of logical unit instances. The LU instances MUST already exist. The members of this array MUST match the Name property of LogicalDevice instances that represent SCSI logical units. See the method description for conditions where this MAY be null.

InitiatorPortIDs [in]

IDs of initiator ports. If existing StorageHardwareID instances exist, they MUST be used. If no StorageHardwareID instance matches, then one is implicitly created. See the method description for conditions where this MAY be null.

TargetPortIDs [in]

IDs of target ports. See the method description for conditions where this MAY be null.

DeviceNumbers [in]

A list of logical unit numbers to assign to the corresponding logical unit in the LUNames parameter. (within the context of the elements specified in the other parameters). If the LUNames parameter is null, then this parameter MUST be null. Otherwise, if this parameter is null, all LU numbers are assigned by the hardware or instrumentation.

DeviceAccesses [in]

A list of permissions to assign to the corresponding logical unit in the LUNames parameter. This specifies the permission to assign within the context of the elements specified in the other parameters. Setting this to 'No Access' assigns the DeviceNumber for the associated initiators, but does not grant read or write access. If the LUNames parameter is not null then this parameter MUST be specified.

Unknown (0)

Read Write (2)

Read-Only (3)

No Access (4)

DMTF Reserved

5 15999

Vendor Reserved

16000 65535

ProtocolControllers [in, out]

An array of references to SCSIProtocolControllers (SPCs). On input, this can be null, or contain exactly one element; there MAY be multiple references on output. If null on input, the instrumentation will create one or more new SPC instances. If an SPC is specified, the instrumentation will attempt to add associations to one or more existing SPCs. If the first array element is a valid SPC reference and SCSI semantics can be preserved, the instrumentation MUST attach associations to the specified SPC. If multiple elements are non-null on input, the instrumentation MUST report an invalid parameter. On output, this is an array of references to SPCs created or modified as the result of processing the request.

Return value

Success (0)

Not Supported (1)

Unspecified Error (2)

Timeout (3)

Failed (4)

Invalid Parameter (5)

DMTF Reserved (6 4095)

Method Parameters Checked - Job Started (4096)

Invalid logical unit ID (4097)

Invalid initiator port ID (4098)

Invalid target port ID (4099)

Invalid permission (4100)

Target/initiator combination already exposed (4101)

Requested logical unit number in use (4102)

Maximum Map Count Exceeded (4103)

Method Reserved (4104 32767)

Vendor Specific (32768 65535)

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2012 R2
Namespace
Root\CIMv2\Storage\iScsiTarget
MOF
SmIscsiTarget.mof
DLL
SMiSCSITargetProv.dll

See also

CIM_ControllerConfigurationService