Discussion:
[Libstoragemgmt-devel] Where are the CIM_SCSIProtocolController(s) from? FW: [Help]How can I create the SPC only with InitiatorPortIDs by pywbem? Is there any example for this?
Qixiaozhen
2014-04-09 01:31:52 UTC
Permalink
Hi, Gris and Tony

Libstoragemgmt does not create the 'CIM_SCSIProtocolController'.

However, the CIM_SCSIProtocolController is used in the function _get_access_groups() in smis.py.

Where are the CIM_SCSIProtocolController(s) from?


def _get_access_groups(self, property_list=None):
"""
Return a list of CIM_SCSIProtocolController.
Following SNIA SMIS 'Masking and Mapping Profile':
CIM_ComputerSystem
|
| CIM_HostedService
v
CIM_ControllerConfigurationService
|
| CIM_ConcreteDependency
v
CIM_SCSIProtocolController
"""

I tried to create the CIM_SCSIProtocolController with InitiatorPortIDs, but it failed.
conn.EnumerateInstances('CIM_ProtocolControllerMaskingCapabilities')[0].items()
[(u'SPCSupportsDefaultViews', False), (u'ElementName', u'XVE Storage System Masking Capabilities'), (u'ProtocolControllerSupportsCollections', False), (u'ProtocolControllerRequiresAuthorizedIdentity', False), (u'ExposePathsSupported', True), (u'OneHardwareIDPerView', False), (u'InstanceID', u'210235G6LPZ0C3000033:196609:7:Nex_ProtocolControllerMaskingCapabilities'), (u'UniqueUnitNumbersPerPort', False), (u'PortsPerView', 4L), (u'SPCAllowsNoLUs', True), (u'SPCAllowsNoInitiators', True), (u'ClientSelectableDeviceNumbers', True), (u'MaximumMapCount', 8L), (u'ValidHardwareIdTypes', [2L, 5L]), (u'SPCAllowsNoTargets', True), (u'PrivilegeDeniedSupported', False), (u'CreateProtocolControllerSupported', False)]
Can anyone kindly tell me that how the ExposePaths method was invoked to create the CIM_SCSIProtocolController?

Sincerely,

Xiaozhen

From: Qixiaozhen [mailto:***@huawei.com]
Sent: Tuesday, April 08, 2014 8:57 PM
To: libstoragemgmt-***@lists.sourceforge.net
Cc: Gris Ge
Subject: [Libstoragemgmt-devel] [Help]How can I create the SPC only with InitiatorPortIDs by pywbem? Is there any example for this?

Hi, all

I have tried to create the SPC view with the InitiatorPortIDs. No LUNames/ TargetPortIDs/ DeviceAccesses specified.
ccs = conn.EnumerateInstances('CIM_ControllerConfigurationService')[0]
print ccs.path
root/huawei:Nex_ControllerConfigurationService.CreationClassName="Nex_ControllerConfigurationService",SystemName="210235G6LPZ0C3000033:196610:7:210235G6LPZ0C3000033",Name="210235G6LPZ0C3000033:196609:7:Nex_ControllerConfigurationService",SystemCreationClassName="Nex_StorageSystem"
initname_id = 'iqn.com.example.www.123456'
ret, out = conn.InvokeMethod(ccs.path, 'ExposePaths', InitiatorPortIDs=initname_id)
Traceback (most recent call last):
File "<pyshell#277>", line 1, in <module>
ret, out = conn.InvokeMethod(ccs.path, 'ExposePaths', InitiatorPortIDs=initname_id)
File "C:\Python27\lib\site-packages\pywbem\cim_operations.py", line 789, in InvokeMethod
result = self.methodcall(MethodName, obj, **params)
File "C:\Python27\lib\site-packages\pywbem\cim_operations.py", line 310, in methodcall
resp_xml = cim_http.wbem_request(self.url, req_xml.toxml(),
File "C:\Python27\lib\xml\dom\minidom.py", line 45, in toxml
return self.toprettyxml("", "", encoding)
File "C:\Python27\lib\xml\dom\minidom.py", line 59, in toprettyxml
self.writexml(writer, "", indent, newl)
File "C:\Python27\lib\xml\dom\minidom.py", line 816, in writexml
node.writexml(writer, indent+addindent, addindent, newl)
File "C:\Python27\lib\xml\dom\minidom.py", line 816, in writexml
node.writexml(writer, indent+addindent, addindent, newl)
File "C:\Python27\lib\xml\dom\minidom.py", line 816, in writexml
node.writexml(writer, indent+addindent, addindent, newl)
File "C:\Python27\lib\xml\dom\minidom.py", line 806, in writexml
_write_data(writer, attrs[a_name].value)
File "C:\Python27\lib\xml\dom\minidom.py", line 295, in _write_data
data = data.replace("&", "&amp;").replace("<", "&lt;"). \
AttributeError: 'CIMInstanceName' object has no attribute 'replace'
ret, out = conn.InvokeMethod(ccs.path, 'ExposePaths', InitiatorPortIDs=initname_id, LUNames='', TargetPortIDs='')
Traceback (most recent call last):
File "<pyshell#278>", line 1, in <module>
ret, out = conn.InvokeMethod(ccs.path, 'ExposePaths', InitiatorPortIDs=initname_id, LUNames='', TargetPortIDs='')
File "C:\Python27\lib\site-packages\pywbem\cim_operations.py", line 789, in InvokeMethod
result = self.methodcall(MethodName, obj, **params)
File "C:\Python27\lib\site-packages\pywbem\cim_operations.py", line 310, in methodcall
resp_xml = cim_http.wbem_request(self.url, req_xml.toxml(),
File "C:\Python27\lib\xml\dom\minidom.py", line 45, in toxml
return self.toprettyxml("", "", encoding)
File "C:\Python27\lib\xml\dom\minidom.py", line 59, in toprettyxml
self.writexml(writer, "", indent, newl)
File "C:\Python27\lib\xml\dom\minidom.py", line 816, in writexml
node.writexml(writer, indent+addindent, addindent, newl)
File "C:\Python27\lib\xml\dom\minidom.py", line 816, in writexml
node.writexml(writer, indent+addindent, addindent, newl)
File "C:\Python27\lib\xml\dom\minidom.py", line 816, in writexml
node.writexml(writer, indent+addindent, addindent, newl)
File "C:\Python27\lib\xml\dom\minidom.py", line 806, in writexml
_write_data(writer, attrs[a_name].value)
File "C:\Python27\lib\xml\dom\minidom.py", line 295, in _write_data
data = data.replace("&", "&amp;").replace("<", "&lt;"). \
AttributeError: 'CIMInstanceName' object has no attribute 'replace'
1. Refence:
'Table 267 - ExposePath Use Cases' in 'SMI-Sv1.4r6_Block.book.pdf'


Thanks,


-----------------------------------------------------------
Xiaozhen Qi
Huawei Technologies Co.,LTD.
IT Product Line CloudOS PDU
China, Xi'an
Mobile: +86-13609283376
Email: ***@huawei.com<mailto:***@huawei.com>
Gris Ge
2014-04-09 05:50:43 UTC
Permalink
Post by Qixiaozhen
Hi, Gris and Tony
Libstoragemgmt does not create the ‘CIM_SCSIProtocolController’.
Regarding creating SPC, that was documented in "Group Masking and
Mapping" profile. Since we got no support vendor yet, I simply return no
support when user call access_group_create() on SMI-S plugin.
Post by Qixiaozhen
Can anyone kindly tell me that how the ExposePaths method was invoked
to create the CIM_SCSIProtocolController?
You might try "smi-s-developers-***@googlegroups.com" mailist for SNIA
SMI-S related questions.
Post by Qixiaozhen
Sincerely,
Xiaozhen
Hope that helps.
Best regards.
--
Gris Ge
Loading...