1 #
2 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
3 # Use is subject to license terms.
4 #
5
6 #
7 # BSD 3 Clause License
8 #
9 # Redistribution and use in source and binary forms, with or without
10 # modification, are permitted provided that the following conditions
11 # are met:
12 # - Redistributions of source code must retain the above copyright
13 # notice, this list of conditions and the following disclaimer.
14 #
15 # - Redistributions in binary form must reproduce the above copyright
16 # notice, this list of conditions and the following disclaimer in
17 # the documentation and/or other materials provided with the
18 # distribution.
19 #
20 # - Neither the name of Sun Microsystems, Inc. nor the
21 # names of its contributors may be used to endorse or promote products
22 # derived from this software without specific prior written permission.
23 #
24 # THIS SOFTWARE IS PROVIDED BY SUN MICROSYSTEMS, INC. "AS IS" AND ANY
25 # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 # DISCLAIMED. IN NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY
28 # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29 # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES
30 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31 # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 #
35
36 #
37 # This file contains all the sub routines for the
38 # CONFIG interface methods. Each Method tests different
39 # error conditions depending on the input file
40 #
41 #
42 # Copyright 2015 Nexenta Systems, Inc. All rights reserved.
43 #
44
45 use strict;
46 use warnings;
47
48 our $log_flag = 1;
49 our $option = "cli";
50 sub config_get_auth_attr_nne {
51 my $interface = "NDMP_CONFIG_GET_AUTH_ATTR";
52 my $error = "NDMP_NO_ERR";
53 my %args = ('option',$option,'inf',$interface,'err',$error);
54 ndmp_execute::ndmp_execute_cli(\%args);
55 }
56 sub config_get_auth_attr_nae {
57 my $interface = "NDMP_CONFIG_GET_AUTH_ATTR";
58 my $error = "NDMP_NOT_AUTHORIZED_ERR";
59 my %args = ('option',$option,'inf',$interface,'err',$error);
60 ndmp_execute::ndmp_execute_cli(\%args);
61 }
62 sub config_get_server_info_nne {
63 my $interface = "NDMP_CONFIG_GET_SERVER_INFO";
64 my $error = "NDMP_NO_ERR";
65 my %args = ('option',$option,'inf',$interface,'err',$error);
66 ndmp_execute::ndmp_execute_cli(\%args);
67 }
68 sub config_get_scsi_info_nne {
69 my $interface = "NDMP_CONFIG_GET_SCSI_INFO";
70 my $error = "NDMP_NO_ERR";
71 my %args = ('option',$option,'inf',$interface,'err',$error);
72 ndmp_execute::ndmp_execute_cli(\%args);
73 }
74 sub config_get_scsi_info_nae {
75 my $interface = "NDMP_CONFIG_GET_SCSI_INFO";
76 my $error = "NDMP_NOT_AUTHORIZED_ERR";
77 my %args = ('option',$option,'inf',$interface,'err',$error);
78 ndmp_execute::ndmp_execute_cli(\%args);
79 }
80 sub config_get_host_info_nne {
81 my $interface = "NDMP_CONFIG_GET_HOST_INFO";
82 my $error = "NDMP_NO_ERR";
83 my %args = ('option',$option,'inf',$interface,'err',$error);
84 ndmp_execute::ndmp_execute_cli(\%args);
85 }
86 sub config_get_fs_info_nae {
87 my $interface = "NDMP_CONFIG_GET_FS_INFO";
88 my $error = "NDMP_NOT_AUTHORIZED_ERR";
89 my %args = ('option',$option,'inf',$interface,'err',$error);
90 ndmp_execute::ndmp_execute_cli(\%args);
91 }
92 sub config_get_ext_list_dandn {
93 my $interface = "NDMP_CONFIG_GET_EXT_LIST";
94 my $error = "NDMP_EXT_DANDN_ILLEGAL_ERR";
95 my %args = ('option',$option,'inf',$interface,'err',$error);
96 ndmp_execute::ndmp_execute_cli(\%args);
97 }
98 sub config_get_conn_type_nne {
99 my $interface = "NDMP_CONFIG_GET_CONNECTION_TYPE";
100 my $error = "NDMP_NO_ERR";
101 my %args = ('option',$option,'inf',$interface,'err',$error);
102 ndmp_execute::ndmp_execute_cli(\%args);
103 }
104 sub config_get_conn_type_nae {
105 my $interface = "NDMP_CONFIG_GET_CONNECTION_TYPE";
106 my $error = "NDMP_NOT_AUTHORIZED_ERR";
107 my %args = ('option',$option,'inf',$interface,'err',$error);
108 ndmp_execute::ndmp_execute_cli(\%args);
109 }
110 sub config_get_butype_nne {
111 my $interface = "NDMP_CONFIG_GET_BUTYPE_INFO";
112 my $error = "NDMP_NO_ERR";
113 my %args = ('option',$option,'inf',$interface,'err',$error);
114 ndmp_execute::ndmp_execute_cli(\%args);
115 }
116 sub config_get_butype_nae {
117 my $interface = "NDMP_CONFIG_GET_BUTYPE_INFO";
118 my $error = "NDMP_NOT_AUTHORIZED_ERR";
119 my %args = ('option',$option,'inf',$interface,'err',$error);
120 ndmp_execute::ndmp_execute_cli(\%args);
121 }
122
123 sub config_get_tape_info_nne {
124 my $interface = "NDMP_CONFIG_GET_TAPE_INFO";
125 my $error = "NDMP_NO_ERR";
126 my %args = ('option',$option,'inf',$interface,'err',$error);
127 ndmp_execute::ndmp_execute_cli(\%args);
128 }
129 sub config_get_tape_info_nae {
130 my $interface = "NDMP_CONFIG_GET_TAPE_INFO";
131 my $error = "NDMP_NOT_AUTHORIZED_ERR";
132 my %args = ('option',$option,'inf',$interface,'err',$error);
133 ndmp_execute::ndmp_execute_cli(\%args);
134 }
135 1;
136