Lines Matching refs:target
45 from solaris_install.target.size import Size
56 help='iSCSI target group name.'), ]
65 host string, target host
66 port int, target port (RAD_PORT_TLS = 12302)
102 1.2.3 - Replace volume-specific targets with one shared target in
630 def _check_target(self, target, protocol):
631 """Verify the target and check its status."""
633 (out, _err) = self._execute('/usr/sbin/stmfadm', 'list-target',
634 '-v', target)
647 " for target '%s'.")
648 % (protocol, tmp_protocol, target))
651 LOG.debug(_("The target '%s' is not found.") % target)
654 err_msg = (_("Failed to list the target '%s': '%s'")
655 % (target, error.stderr))
658 def _online_target(self, target, protocol):
659 """Online the target in the offline state."""
660 self._execute('/usr/sbin/stmfadm', 'online-target',
661 target)
662 assert self._check_target(target, protocol) == 'Online'
665 """Check if the target group exists."""
671 LOG.debug(_("The target group '%s' is not found.") % tg)
674 err_msg = (_("Failed to list the target group '%s': '%s'")
764 def _add_tg_member(self, target, tg, tpg):
765 """Create the target and then add it to the target group."""
766 self._stmf_execute('/usr/sbin/itadm', 'create-target', '-n',
767 target, '-t', tpg)
768 self._stmf_execute('/usr/sbin/stmfadm', 'offline-target',
769 target)
771 tg, target)
773 def _get_target_portal(self, target):
774 """Get the current target IP address."""
775 (out, _err) = self._execute('/usr/sbin/itadm', 'list-target',
776 '-v', target)
813 target_name = '%s%s-%s-%s-target' % \
826 """Setup the target and target group."""
831 target_name = '%s%s-%s-target' % \
840 # Create the primary target
850 # Online the target from the 'Offline' status
858 """Get target members of the target group."""
865 target = line.split()[-1]
866 if target == primary_target:
868 targets.append(target)
869 target_portal = self._get_target_portal(target)
907 target, target group, view entry and lu, are deleted.
915 # Remove the target and its target group if they were created by
922 self._stmf_execute('/usr/sbin/itadm', 'delete-target', '-f',
936 :target_iqn: the IQN of the iSCSI target
937 :target_portal: the portal of the iSCSI target
938 :target_lun: the lun of the iSCSI target
960 target_name = '%s%s-%s-target' % \
972 # iSCSI target with iscsi_ip_address.
986 # The multipathing doesn't apply to the old volume-specific target
1083 """Check wwns and setup the target group."""
1108 """Get the target members in the tg."""
1121 """Setup the target group."""
1124 # Add free target wwns into the target group
1129 self._stmf_execute('/usr/sbin/stmfadm', 'offline-target',
1135 LOG.error(_LE("Failed to add and online the target '%s'.")
1140 msg = (_("No target members exist in the target group '%s'.")
1161 """Check if the target has been added into a target group."""
1162 target = 'wwn.%s' % wwn.upper()
1170 if line.startswith("Member:") and target in line:
1172 LOG.debug(_("The target '%s' is not in %s target group.") %
1173 (target, tg if tg else 'any'))
1205 # setup the target group if it doesn't exist.
1224 # Remove the target group when the LU to be deleted is last one
1225 # exposed by the target group.
1238 :target_wwn: the world wide name of the FC port target