CreateProtocolControllerWithPorts method of the MSISCSITARGET_ControllerConfigurationService class

Atomically creates a specified instance of the CIM_ProtocolController class or subclass along with any required CIM_AuthorizedPrivilege, CIM_AuthorizedTarget, and CIM_AuthorizedSubject instances.

Some implementations require permissions to be established atomically with the creation of a protocol controller. This method provides this capability by specifying the Privilege and Identity properties. This method will instantiate appropriate CIM_AuthorizedTarget and CIM_AuthorizedSubject associations, as defined in the User and Security Model, to restrict access to the downstream logical devices.

This method is inherited from the CIM_ControllerConfigurationService class.

Syntax

uint32 CreateProtocolControllerWithPorts(
  [in]  string                     ElementName,
  [in]  string                     Ports[],
  [in]  uint16                     Protocol,
  [in]  CIM_Privilege Ref          Privilege,
  [in]  CIM_ManagedElement Ref     Identity,
  [out] CIM_ProtocolController Ref ProtocolController
);

Parameters

ElementName [in]

Specifies the ElementName of the new CIM_ProtocolController instance.

Ports [in]

Contains string representations of references to instances of CIM_LogicalPort or subclass instances. This is the list of target ports that are associated to the protocol controller. CIM_ProtocolControllerForPort associations are created by the instrumentation that associate the new protocol controller to these ports. If this parameter is null, then all ports in the scope of the CIM_System instance are attached to the new CIM_ProtocolController instance.

If multiple target ports are specified in this parameter, all expose the same view, that is they have the same unit numbers and permissions.

Note

This method does not create the port instances, but does create CIM_ProtocolControllerForPort associations between the specified ports and the new CIM_ProtocolController instance.

Protocol [in]

Specifies the protocol type for the new CIM_ProtocolController instance.

Unknown (0)

Other (1)

SCSI (2)

Privilege [in]

Specifies a CIM_Privilege or subclass instance to be used as a template.

If supplied, this parameter and the Identity parameter specify how this method will create the related CIM_AuthorizedPrivilege, CIM_AuthorizedTarget, and CIM_AuthorizedSubject instances.

Note

If the CIM_ProtocolControllerMaskingCapabilities.ProtocolControllerRequiresAuthorizedIdentity is True, then both the Identity and Privilege parameters must be specified. If false, then neither can be specified.

Identity [in]

Specifies a CIM_ManagedElement subclass instance. If CIM_ProtocolControllerMaskingCapabilities.ProtocolControllerSupportsCollection is True, the reference may be either a collection of CIM_Identity or subclass instances or a single instance. If false, it must be a single instance.

If supplied, this parameter and the Privilege parameter specify how this method will create the related CIM_AuthorizedPrivilege, CIM_AuthorizedTarget, and CIM_AuthorizedSubject instances.

Note

If the CIM_ProtocolControllerMaskingCapabilities.ProtocolControllerRequiresAuthorizedIdentity is True, then both the Identity and Privilege parameters must be specified. If false, then neither can be specified.

ProtocolController [out]

On return contains a reference to the new CIM_ProtocolController that is created.

Return value

This method returns one of the following values.

Success (0)

Not Supported (1)

Unspecified Error (2)

Timeout (3)

Failed (4)

Invalid Parameter (5)

DMTF Reserved (6 4095)

ID Parameter Missing or Not Unique (4096)

Hardware Implementation Requires Null Ports Parameter (4097)

Busy (4098)

Method Reserved (4099 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

MSISCSITARGET_ControllerConfigurationService

MSISCSITARGET_ProtocolControllerMaskingCapabilities

MSISCSITARGET_AuthorizedPrivilege

MSISCSITARGET_AuthorizedSubject

MSISCSITARGET_AuthorizedTarget