3998N/A# vim: tabstop=4 shiftwidth=4 softtabstop=4 3998N/A# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. 3998N/A# Licensed under the Apache License, Version 2.0 (the "License"); you may 3998N/A# not use this file except in compliance with the License. You may obtain 3998N/A# Unless required by applicable law or agreed to in writing, software 3998N/A# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 3998N/A# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 3998N/A# License for the specific language governing permissions and limitations 3998N/A"""Generic Solaris iSCSI utilities.""" 5085N/A """Get the device path from the target info. 5085N/A The output of cmd below is like this: 5085N/A Target: iqn.2010-10.org.openstack:hostname1-tgt-grp-target 3998N/A """Return the iSCSI initiator node name IQN""" 3998N/A # Sample first line of command output: 3998N/A # Initiator node name: iqn.1986-03.com.sun:01:e00000000000.4f757217 3998N/A # TODO(Strony): handle the CHAP authentication 3998N/A """Attach the volume to instance_name. 3998N/A connection_properties for iSCSI must include: 3998N/A target_portal - ip and optional port 3998N/A target_iqn - iSCSI Qualified Name 3998N/A target_lun - LUN id of the volume 3998N/A # TODO(Strony): support the iSCSI multipath on Solaris. 3998N/A # check if it is a valid device path. 4791N/A # Set the label EFI to the disk on SPARC before it is accessed and 4791N/A # make sure the correct device path with slice 0