fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * or http://www.opensolaris.org/os/licensing.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * isnsadm_msg.c : handles the text message.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include "isnsadm.h"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortechar *getTextMessage(msg_code_t code) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte switch (code) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case UNKNOWN:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext("Error: Unknown Failure"));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_PARTIAL_SUCCESS:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext("\nError: one or more objects failed to "
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "be processed.\nCheck the missing object from the "
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "response and issue the operation individaully to get "
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "the specific error information."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_PARTIAL_FAILURE:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext("Error: one or more objects failed to "
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "be processed.\nCheck the following failed object "
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "and issue the operation individaully to get the specific "
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "error information."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_NO_ADDITIONAL_PARTIAL_FAILIRE_INFO:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext("No additional information avaialble from "
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "the response."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_READER_NULL:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: XML reader not set for respone document."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_RESPONSE_ERROR:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Failed to get expected XML element."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_NAME_ATTR_NOT_FOUND:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Name attribute not found in reponse."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_ID_ATTR_NOT_FOUND:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Index attribute not found in reponse."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_TYPE_ATTR_NOT_FOUND:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Node type not found in reponse."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_ALIAS_ATTR_NOT_FOUND:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Node Alias not found in reponse."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_DD_OBJECT_NOT_FOUND:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Discovery Domain object not found in reponse."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_DD_SET_OBJECT_NOT_FOUND:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Discovery Domain Set object not found in "
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "reponse."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_STATUS_ELEM_NOT_FOUND:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Failed to get the status from the server."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_MESSAGE_ELEM_NOT_FOUND:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Failed to get the error information."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_ISNSSERVER_ELEM_NOT_FOUND:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Config information not found in reponse."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_CREATE_WRITER_FAILED:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Failed to create the xml writer."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_CREATE_BUFFER_FAILED:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Creating the buffer for XML writer."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_START_DOC_FAILED:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Failed to create xml start doc."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_END_DOC_FAILED:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Failed to create xml end doc."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_START_ELEMENT_FAILED:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Failed to create xml start element."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_WRITE_ELEMENT_FAILED:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Failed to create xml write element."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_END_ELEMENT_FAILED:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Failed to create xml end element."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_WRITE_ATTRIBUTE_FAILED:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Failed to write an xml attribute."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_STRDUP_FAILED:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: xml strdup failed."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_PARSE_MEMORY_FAILED:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: xml parse memory failed."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_XPATH_NEW_CONTEXT_FAILED:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: xml xpath context setup failed."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_XML_ADD_CHILD_FAILED:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: xml add child failed."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_DOOR_CALL_FAILED:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: call on the door to send a request to the "
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "server failed."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_DOOR_OPEN_FAILED:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: open on the door to communicate to the "
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "server failed."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_ISNS_SMF_SERVICE_NOT_ONLINE:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: network/isns_server smf(5) "
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "service is not online."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_MALLOC_FAILED:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: memory allocation failed."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_DDMEMBER_NOT_FOUND:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: no such Discovery Domain membership exist."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_DDSETMEMBER_NOT_FOUND:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: no such Discovery Domain Set "
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "membership exist."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_DDMEMBER_ALREADY_EXIST:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Discovery Domain membership already exist."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_DDSETMEMBER_ALREADY_EXIST:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Discovery Domain Set membership "
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "already exist."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_OPERATION_NOT_ALLOWED_FOR_DEFAULT_DD:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: operation not allowed for the Default "
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "Discovery Domain."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_OPERATION_NOT_ALLOWED_FOR_DEFAULT_DDSET:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: operation not allowed for the Default "
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "Discovery Domain Set."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_DD_NAME_IN_USE:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Discovery Domain name already exists."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_DDSET_NAME_IN_USE:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: Discovery Domain Set name already exist."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_SERVER_BUSY:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: server reported busy status."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte case ERROR_SERVER_INTERNAL_ERROR:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Error: server reported internal error status."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte default:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (gettext
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ("Unknown error."));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte }
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte}