1 #
2 # CDDL HEADER START
3 #
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
7 #
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
12 #
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 #
19 # CDDL HEADER END
20 #
21
22 #
23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
25 #
26
27 #
28 # A test purpose file to test functionality of target discovery
29 #
30
31 # __stc_assertion_start
32 #
33 # ID: iscsi_discovery_001
34 #
35 # DESCRIPTION:
36 # iSCSI target port provider can register into the default discovery
37 # domain of iSNS server and be visible by iSNS server
38 #
39 # STRATEGY:
40 # Setup:
41 # Modify default settings to isns enable and configure the isns
42 # server ip address and port on target host
43 # Create target node with specified node name by
44 # itadm create-target option
45 # Test:
46 # Check that target node can be visible by isns server
47 # Cleanup:
48 # Delete the target node
49 # Delete the configuration information in isns server and target
50 #
51 # STRATEGY_NOTES:
52 #
53 # TESTABILITY: explicit
54 #
55 # AUTHOR: john.gu@sun.com
56 #
57 # REVIEWERS:
58 #
59 # ASSERTION_SOURCE:
60 #
61 # TEST_AUTOMATION_LEVEL: automated
62 #
63 # STATUS: IN_PROGRESS
64 #
65 # COMMENTS:
66 #
67 # __stc_assertion_end
68 #
69 function iscsi_discovery_001
70 {
71 cti_pass
72
73 tc_id="iscsi_discovery_001"
74
75 tc_desc="iSCSI target port provider can register into the default"
76 tc_desc="${tc_desc} discovery domain of iSNS server and be visible"
77 tc_desc="${tc_desc} by iSNS server"
78 print_test_case $tc_id - $tc_desc
79
80 typeset t="${IQN_TARGET}.${TARGET[0]}"
81
82 # Enable isns service on target host
83 itadm_modify POS defaults -I "${ISNS_HOST}"
84 itadm_modify POS defaults -i "enable"
85
86 # Create target
87 itadm_create POS target -n ${t}
88
89 isnsadm_verify
90
91 tp_cleanup
92 }
93