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.
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.
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]
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
27 * isnsadm_msg.c : handles the text message.
34 char *getTextMessage(msg_code_t code
) {
37 return (gettext("Error: Unknown Failure"));
38 case ERROR_PARTIAL_SUCCESS
:
39 return (gettext("\nError: one or more objects failed to "
40 "be processed.\nCheck the missing object from the "
41 "response and issue the operation individaully to get "
42 "the specific error information."));
43 case ERROR_PARTIAL_FAILURE
:
44 return (gettext("Error: one or more objects failed to "
45 "be processed.\nCheck the following failed object "
46 "and issue the operation individaully to get the specific "
47 "error information."));
48 case ERROR_NO_ADDITIONAL_PARTIAL_FAILIRE_INFO
:
49 return (gettext("No additional information avaialble from "
51 case ERROR_XML_READER_NULL
:
53 ("Error: XML reader not set for respone document."));
54 case ERROR_XML_RESPONSE_ERROR
:
56 ("Error: Failed to get expected XML element."));
57 case ERROR_XML_NAME_ATTR_NOT_FOUND
:
59 ("Error: Name attribute not found in reponse."));
60 case ERROR_XML_ID_ATTR_NOT_FOUND
:
62 ("Error: Index attribute not found in reponse."));
63 case ERROR_XML_TYPE_ATTR_NOT_FOUND
:
65 ("Error: Node type not found in reponse."));
66 case ERROR_XML_ALIAS_ATTR_NOT_FOUND
:
68 ("Error: Node Alias not found in reponse."));
69 case ERROR_XML_DD_OBJECT_NOT_FOUND
:
71 ("Error: Discovery Domain object not found in reponse."));
72 case ERROR_XML_DD_SET_OBJECT_NOT_FOUND
:
74 ("Error: Discovery Domain Set object not found in "
76 case ERROR_XML_STATUS_ELEM_NOT_FOUND
:
78 ("Error: Failed to get the status from the server."));
79 case ERROR_XML_MESSAGE_ELEM_NOT_FOUND
:
81 ("Error: Failed to get the error information."));
82 case ERROR_XML_ISNSSERVER_ELEM_NOT_FOUND
:
84 ("Error: Config information not found in reponse."));
85 case ERROR_XML_CREATE_WRITER_FAILED
:
87 ("Error: Failed to create the xml writer."));
88 case ERROR_XML_CREATE_BUFFER_FAILED
:
90 ("Error: Creating the buffer for XML writer."));
91 case ERROR_XML_START_DOC_FAILED
:
93 ("Error: Failed to create xml start doc."));
94 case ERROR_XML_END_DOC_FAILED
:
96 ("Error: Failed to create xml end doc."));
97 case ERROR_XML_START_ELEMENT_FAILED
:
99 ("Error: Failed to create xml start element."));
100 case ERROR_XML_WRITE_ELEMENT_FAILED
:
102 ("Error: Failed to create xml write element."));
103 case ERROR_XML_END_ELEMENT_FAILED
:
105 ("Error: Failed to create xml end element."));
106 case ERROR_XML_WRITE_ATTRIBUTE_FAILED
:
108 ("Error: Failed to write an xml attribute."));
109 case ERROR_XML_STRDUP_FAILED
:
111 ("Error: xml strdup failed."));
112 case ERROR_XML_PARSE_MEMORY_FAILED
:
114 ("Error: xml parse memory failed."));
115 case ERROR_XML_XPATH_NEW_CONTEXT_FAILED
:
117 ("Error: xml xpath context setup failed."));
118 case ERROR_XML_ADD_CHILD_FAILED
:
120 ("Error: xml add child failed."));
121 case ERROR_DOOR_CALL_FAILED
:
123 ("Error: call on the door to send a request to the "
125 case ERROR_DOOR_OPEN_FAILED
:
127 ("Error: open on the door to communicate to the "
129 case ERROR_ISNS_SMF_SERVICE_NOT_ONLINE
:
131 ("Error: network/isns_server smf(5) "
132 "service is not online."));
133 case ERROR_MALLOC_FAILED
:
135 ("Error: memory allocation failed."));
136 case ERROR_DDMEMBER_NOT_FOUND
:
138 ("Error: no such Discovery Domain membership exist."));
139 case ERROR_DDSETMEMBER_NOT_FOUND
:
141 ("Error: no such Discovery Domain Set "
142 "membership exist."));
143 case ERROR_DDMEMBER_ALREADY_EXIST
:
145 ("Error: Discovery Domain membership already exist."));
146 case ERROR_DDSETMEMBER_ALREADY_EXIST
:
148 ("Error: Discovery Domain Set membership "
150 case ERROR_OPERATION_NOT_ALLOWED_FOR_DEFAULT_DD
:
152 ("Error: operation not allowed for the Default "
153 "Discovery Domain."));
154 case ERROR_OPERATION_NOT_ALLOWED_FOR_DEFAULT_DDSET
:
156 ("Error: operation not allowed for the Default "
157 "Discovery Domain Set."));
158 case ERROR_DD_NAME_IN_USE
:
160 ("Error: Discovery Domain name already exists."));
161 case ERROR_DDSET_NAME_IN_USE
:
163 ("Error: Discovery Domain Set name already exist."));
164 case ERROR_SERVER_BUSY
:
166 ("Error: server reported busy status."));
167 case ERROR_SERVER_INTERNAL_ERROR
:
169 ("Error: server reported internal error status."));