Solaris_NFSShareEntry.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "Solaris_NFSShareEntry.h"
#include "nfs_keys.h"
#include "nfs_providers_msgstrings.h"
#include "nfs_provider_names.h"
#include "messageStrings.h"
#include "util.h"
#include "common_functions.h"
#include "createprop_methods.h"
#include "libfsmgt.h"
#define COMMAND "Command"
/*
* Private method declarations
*/
char *command);
/*
* Public methods
*/
/*
* Instance provider methods
*/
/*
* Method: cp_createInstance_Solaris_NFSShareEntry
*
* Description: This method is not supported. It is not supported because in
* order for a Solaris_NFSShareEntry association to exist a corresponding
* Solaris_NFSShare and Solaris_PersistentShare must exist.
*
* Parameters:
* - CCIMObjectPath *hostedShareOP - An object path containing the name of
* the class of which to create an instance of.
* - CCIMInstance *pInst - Not used.
*
* Return Value:
* - Always returns NULL because the method is not supported.
*/
/* ARGSUSED */
CCIMInstance *pInst) {
int err = 0;
util_handleError("SOLARIS_NFSSHAREENT::CREATE_INSTANCE",
return ((CCIMObjectPath *)NULL);
} /* cp_createInstance_Solaris_NFSShareEntry */
/*
* Method: cp_deleteInstance_Solaris_NFSShareEntry
*
* Description: This method is not supported. It is not supported because in
* order for it to be actually deleted the corresponding Solaris_NFSShare or
* Solaris_PersistentShare would need to be deleted. That action is not
* for this provider.
*
* Parameters:
* - CCIMObjectPath *pOP - An object path containing the
* information about the class of which to delete the instance of.
*
* Return Value:
* - Always returns cim_false because the method is not supported.
*/
/* ARGSUSED */
int err = 0;
util_handleError("SOLARIS_NFSSHAREENT::DELETE_INSTANCE",
return (cim_false);
} /* cp_deleteInstance_Solaris_NFSShareEntry */
/*
* Method: cp_enumInstances_Solaris_NFSShareEntry
*
* Description: Enumerates the instances of Solaris_NFSShareEntry on a host.
* An instance of Solaris_NFSShareEntry is an association that links a share to
* it's persistent share entry.
*
* Parameters:
* - CCIMObjectPath *pOP - An object path containing the name of
* the class of which to enumerate the instances of.
*
* Return Value:
* - A pointer to a list of Solaris_NFSShareEntry instances.
* - NULL if an error occurred or if there are no instances of
* Solaris_NFSShareEntry on the host. In the case of an error, the error
* will be logged.
*/
int err = 0;
util_handleError("SOLARIS_NFSSHAREENT::ENUM_INSTANCES",
return ((CCIMInstanceList *)NULL);
}
if (nfsShareOP == NULL) {
ex = cim_getLastError();
util_handleError("SOLARIS_NFSSHAREENT::ENUM_INSTANCES",
&err);
return ((CCIMInstanceList *)NULL);
}
/*
* A NULL return value means error, an empty list does not.
*/
if (nfsShareOPList == NULL) {
ex = cim_getLastError();
util_handleError("SOLARIS_NFSSHAREENT::ENUM_INSTANCES",
return ((CCIMInstanceList *)NULL);
}
return ((CCIMInstanceList *)NULL);
}
if (shareEntryInstList == NULL) {
ex = cim_getLastError();
util_handleError("SOLARIS_NFSSHAREENT::ENUM_INSTANCES",
return ((CCIMInstanceList *)NULL);
}
if (shareEntryInstList == NULL) {
return ((CCIMInstanceList *)NULL);
}
}
return (shareEntryInstList);
} /* cp_enumInstances_Solaris_NFSShareEntry */
/*
* Method: cp_enumInstanceNames_Solaris_NFSShareEntry
*
* Description: Enumerates all of the instances of Solaris_NFSShareEntry on the
* host.
*
* Parameters:
* - CCIMObjectPath* pOP - An object path containing the name of the
* class of which to enumerate instances of.
*
* Returns:
* - A pointer to a list of Solaris_NFSShareEntry object paths.
* - NULL if an error occurred or if there are no NFS mounts on the host.
* In the case of an error, the error will be logged.
*/
int err = 0;
util_handleError("SOLARIS_NFSSHAREENT::ENUM_INSTANCENAMES",
return ((CCIMObjectPathList *)NULL);
}
/*
* Either an error occurred or we don't have any
* Solaris_NFSShareEntry instances on the host.
*/
return ((CCIMObjectPathList *)NULL);
}
return (OPList);
} /* cp_enumInstanceNames_Solaris_NFSShareEntry */
/*
* Method: cp_execQuery_Solaris_NFSShareEntry
*
* Description: Queries the Solaris_NFSShareEntry instances on the host to find
* those that meet the search criteria.
*
* Parameters:
* - CCIMObjectPath *pOP - An object path containing the name of
* the class of which to query.
* - char *selectClause - Not used.
* - char *nonJoinExp - Not used.
* - char *queryExp - Not used.
* - char *queryLang - Not used.
*
* Returns:
* - A pointer to a list of Solaris_NFSShareEntry instances that match the
* criteria.
* - NULL if an error occurred or if there are no Solaris_NFSShareEntry
* instances that match the criteria. In the case of an error, the error
* will be logged.
*
* NOTE: Currently, there is no WQL parser for the C providers. As a result,
* what is returned to the CIMOM is a list of instances with
* a NULL value at the beginning of the list. This NULL value indicates
* to the CIMOM that it must do the filtering for the client.
*/
/* ARGSUSED */
int err = 0;
util_handleError("SOLARIS_NFSSHAREENT::EXEC_QUERY",
return ((CCIMInstanceList *)NULL);
}
if (shareEntryInstList == NULL) {
return ((CCIMInstanceList *)NULL);
}
ex = cim_getLastError();
util_handleError("SOLARIS_NFSSHAREENT::EXEC_QUERY",
return ((CCIMInstanceList *)NULL);
}
if (shareEntryInstList == NULL) {
ex = cim_getLastError();
util_handleError("SOLARIS_NFSSHAREENT::EXEC_QUERY",
return ((CCIMInstanceList *)NULL);
}
return (shareEntryInstList);
} /* cp_execQuery_Solaris_NFSShareEntry */
/*
* Method: cp_getInstance_Solaris_NFSShareEntry
*
* Description: Gets the instance corresponding to the Solaris_NFSShareEntry
* object path passed in.
*
* Parameters:
* - CCIMObjectPath* pOP - An object path containing all the keys of
* the instance that is supposed to be returned.
*
* Returns:
* - A pointer to the Solaris_NFSShareEntry instance corresponding to the
* object path parameter.
* - NULL if an error occurred or if the instance doesn't exist. In the
* case of an error, the error will be logged.
*/
int err = 0;
util_handleError("SOLARIS_NFSSHAREENT::GET_INSTANCE",
return ((CCIMInstance *)NULL);
}
/*
* Determine if the key values are populated.
*/
util_handleError("SOLARIS_NFSSHAREENT::GET_INSTANCE",
return ((CCIMInstance *)NULL);
}
/*
* Either an error occurred or we simply don't have any
* instances of Solaris_NFSShareEntry on the system. In the
* case that an error occurred, it will be handled in
* cp_enumInstances_Solaris_NFSShareEntry.
*/
return ((CCIMInstance *)NULL);
}
return (inst);
} /* cp_getInstance_Solaris_NFSShareEntry */
/*
* Method: cp_setInstance_Solaris_NFSShareEntry
*
* Description: This method is not supported. This is not allowed because in
* order to change the properties a Solaris_NFSShareEntry on the host, the
* Solaris_NFSShare and Solaris_PersistentShare must most likely be changed.
* In order to change the associated objects, they need to be changed in those
* providers and not this one.
*
* Parameters:
* - CCIMObjectPath *pOP - An object path containing the name of the class
* of which to set the instance.
* - CCIMInstance *pInst - Not used.
*
* Returns:
* - cim_false is returned every time since the method is not supported.
*/
/* ARGSUSED */
int err = 0;
util_handleError("SOLARIS_NFSSHAREENT::SET_INSTANCE",
return (cim_false);
} /* cp_setInstance_Solaris_NFSShareEntry */
/*
* Method: cp_setInstanceWithList_Solaris_NFSShareEntry
*
* Description: This method is not supported. This is not allowed because in
* order to change the properties a Solaris_NFSShareEntry on the host, the
* Solaris_NFSShare and Solaris_PersistentShare must most likely be changed.
* In order to change the associated objects, they need to be changed in those
* providers and not this one.
*
* Parameters:
* - CCIMObjectPath *pOP - An object path containing the name of the class
* of which to set the instance.
* - CCIMInstance *pInst - Not used.
*
* Returns:
* - cim_false is returned every time since the method is not supported.
*/
/* ARGSUSED */
int err = 0;
util_handleError("SOLARIS_NFSSHAREENT::SET_INSTANCE",
return (cim_false);
} /* cp_setInstanceWithList_Solaris_NFSShareEntry */
/*
* Association provider methods
*/
/*
* Method: cp_associators_Solaris_NFSShareEntry
*
* Description: Returns the instances associated, via the Solaris_NFSShareEntry
* association, to the pObjectName parameter.
*
* Parameters:
* - CCIMObjectPath *pAssocName - An object path containing the name of
* the association that the caller is trying to reach.
* - CCIMObjectPath *pObjectName - The object path containing information
* (Class Name, Key Properties) about the object whose associated objects
* are to be returned.
* - char *pResultClass - If specified, only return instances that are of
* this class type.
* - char *pRole - If specified, this is the role of the pObjectName
* object path passed in. If this is not valid, NULL is returned.
* - char *pResultRole - If specified, only return instances that are
* playing this role in the association.
*
* Returns:
* - A pointer to a list of Solaris_PersistentShare (if pRole ==
* Element && pObjectName is a Solaris_NFSShare object path) or
* Solaris_NFSShare (if pRole == Setting && pObjectName is a
* Solaris_PersistentShare object path) instances which are associated to
* the pObjectName parameter.
* - NULL if an error occurred or if there are no instances associated to
* the pObjectName passed in. In the case of an error, the error will be
* logged.
*/
/* ARGSUSED */
char *pResultRole) {
int err = 0;
util_handleError("SOLARIS_NFSSHAREENT::ASSOCIATORS",
return ((CCIMInstanceList *)NULL);
}
/*
* Determine whether pObjectname is the Element or the Setting of the
* association. Element = Solaris_NFSShare,
* Setting = Solaris_PersistentShare.
*/
util_handleError("SOLARIS_NFSSHAREENT::ASSOCIATORS",
return ((CCIMInstanceList *)NULL);
}
util_handleError("SOLARIS_NFSSHAREENT::ASSOCIATORS",
return ((CCIMInstanceList *)NULL);
}
} else {
util_handleError("SOLARIS_NFSSHAREENT::ASSOCIATORS",
return ((CCIMInstanceList *)NULL);
}
return (returnInstList);
} /* cp_associators_Solaris_NFSShareEntry */
/*
* Method: cp_associatorNames_Solaris_NFSShareEntry
*
* Description: Returns the object paths of the instances on the other side of
* the association which are associated via the Solaris_NFSShareEntry
* association and having the passed in parameter, pObjectName, as the
* opposite key.
*
* Parameters:
* - CCIMObjectPath *pAssocName - An object path containing information
* about the association that the caller is trying to reach.
* - CCIMObjectPath *pObjectName - The object path which contains the
* information on whose associated objects are to be returned.
* - char *pResultClass - If specified, only return instances that are of
* this class type.
* - char *pRole - If specified, this is the role of the pObjectName
* object path passed in. If this is not valid, NULL is returned.
* - char *pResultRole - If specified, only return instances that are
* playing this role in the association.
*
* Returns:
* - A pointer to a list of Solaris_PersistentShare (if pRole ==
* Element && pObjectName is a Solaris_NFSShare object path) or
* Solaris_NFSShare (if pRole == Setting && pObjectName is a
* Solaris_PersistentShare object path) object paths which are associated
* to the pObjectName parameter.
* - NULL if an error occurred or if there are no instances associated to
* the pObjectName passed in. In the case of an error, the error will be
* logged.
*/
char *pResultRole) {
int err = 0;
util_handleError("SOLARIS_NFSSHAREENT::ASSOCIATOR_NAMES",
return ((CCIMObjectPathList *)NULL);
}
return ((CCIMObjectPathList *)NULL);
}
return (objPathList);
} /* cp_associatorNames_Solaris_NFSShareEntry */
/*
* Method: cp_references_Solaris_NFSShareEntry
*
* Description: Returns the Solaris_NFSShareEntry instances that have the
* passed in parameter, pObjectName, as one of it's keys.
*
* Parameters:
* - CCIMObjectPath *pAssocName - An object path containing information
* about the association that the caller is trying to reach.
* - CCIMObjectPath *pObjectName - The object path which contains the
* information on whose associated objects are to be returned.
* - char *pRole - If specified, this is the role of the pObjectName
* object path passed in. If this is not valid, NULL is returned.
*
* Returns:
* - A pointer to a list of Solaris_NFSShareEntry instances.
* - NULL if an error occurred or if there are no Solaris_NFSShareEntry
* instances having pObjectName as one of it's keys.
*/
int err = 0;
util_handleError("SOLARIS_NFSSHAREENT::REFERENCES",
return ((CCIMInstanceList *)NULL);
}
/*
* Get everything that is related to the pObjectName passed in.
*/
if (objPathList == NULL) {
return ((CCIMInstanceList *)NULL);
}
/*
* Determine whether pObjectname is the Element or the Setting of the
* association. Element = Solaris_NFSShare,
* Setting = Solaris_PersistentShare.
*/
} else {
}
return (instList);
} /* cp_references_Solaris_NFSShareEntry */
/*
* Method: cp_referenceNames_Solaris_NFSShareEntry
*
* Description: Returns the Solaris_NFSShareEntry object paths of the instances
* that have the passed in parameter, pObjectName, as one of it's keys.
*
* Parameters:
* - CCIMObjectPath *pAssocName - An object path containing information
* about the association that the caller is trying to reach.
* - CCIMObjectPath *pObjectName - The object path which contains the
* information on whose associated objects are to be returned.
* - char *pRole - If specified, this is the role of the pObjectName
* object path passed in. If this is not valid, NULL is returned.
*
* Returns:
* - A pointer to a list of Solaris_NFSShareEntry object paths.
* - NULL if an error occurred or if there are no Solaris_NFSShareEntry
* instances having pObjectName as one of it's keys.
*/
int err = 0;
util_handleError("SOLARIS_NFSSHAREENT::REFERENCE_NAMES",
return ((CCIMInstanceList *)NULL);
}
pObjectName, pRole);
if (shareEntryInstList == NULL) {
return ((CCIMObjectPathList *)NULL);
}
return (shareEntryOPList);
} /* cp_referenceNames_Solaris_NFSShareEntry */
/*
* Property provider methods
*/
/*
* Method: cp_getProperty_Solaris_NFSShareEntry
*
* Description: Retrieves a certain property from the instance of
* Solaris_NFSShareEntry on the host that is described by the parameter pOP.
*
* Parameters:
* - CCIMObjectPath *pOP - The object path containing all the
* information needed to find the instance in which the property is to
* be returned.
* - cimchar *pPropName - The name of the property to be found.
*
* Returns:
* - A pointer to the property corresponding to the name passed in with
* pPropName.
* - NULL if an error occurred or if the property doesn't exist. In the
* case of an error, the error will be logged.
*/
int err = 0;
util_handleError("SOLARIS_NFSSHAREENT::GET_PROPERTY",
return ((CCIMProperty *)NULL);
}
if (shareEntryInst == NULL) {
return ((CCIMProperty *)NULL);
}
return (shareEntryProp);
} /* cp_getProperty_Solaris_NFSShareEntry */
/*
* Method: cp_setProperty_Solaris_NFSShareEntry
*
* Description: This method is not supported. This is not allowed because in
* order to change the properties a Solaris_NFSShareEntry on the host, the
* Solaris_NFSShare and Solaris_PersistentShare must most likely be changed.
* In order to change the associated objects, they need to be changed in those
* providers and not this one.
*
* Parameters:
* - CCIMObjectPath *pOP - Not used.
* - CCIMProperty *pProp - Not used.
*
* Returns:
* - cim_false is returned every time since the method is not supported.
*/
/* ARGSUSED */
int err = 0;
util_handleError("SOLARIS_NFSSHAREENT::SET_PROPERTY",
return (cim_false);
} /* cp_setProperty_Solaris_NFSShareEntry */
/*
* Method provider methods
*/
/*
* Method: cp_invokeMethod_Solaris_NFSShareEntry
*
* Description: This method is not supported because the provider doesn't have
* any methods.
*
* Parameters:
* - CCIMObjectPath* op - Not used.
* - cimchar* methodName - Not used.
* - CCIMPropertyList* inParams - Not used.
* - CCIMPropertyList* outParams - Not used.
*
* Return Value:
* - Always returns null because the method is not supported.
*/
/* ARGSUSED */
return ((CCIMProperty *)NULL);
} /* cp_invokeMethod_Solaris_NFSShareEntry */
/*
* Private methods
*/
/*
* Method: create_shareEntry_inst_and_update_list
*
*/
static CCIMInstanceList *
int err = 0;
if (shareEntryInst == NULL) {
ex = cim_getLastError();
util_handleError("SOLARIS_NFSSHAREENT::ENUM_INSTANCES",
&err);
return ((CCIMInstanceList *)NULL);
}
/*
* Retrieve all of the Solaris_PersistentShare object paths
* associated with the current Solaris_NFSShare object path.
*
* NOTE: Although it is wrong, and we can't control it since
* dfstab entries for one nfs share.
*/
&err);
if (sharePersistOPList == NULL) {
if (err != 0) {
return ((CCIMInstanceList *)NULL);
}
return (shareEntInstList);
}
/*
* Add the properties to the Solaris_NFSShareEntry
* instance.
*/
== cim_false) {
return ((CCIMInstanceList *)NULL);
}
== cim_false) {
return ((CCIMInstanceList *)NULL);
}
if (shareEntInstList == NULL) {
ex = cim_getLastError();
util_handleError("SOLARIS_NFSSHAREENT::ENUM_INSTANCES",
return ((CCIMInstanceList *)NULL);
}
}
return (shareEntInstList);
} /* create_shareEntry_inst_and_update_list */
/*
* Method: get_associated_nfsShare_instList
*
* Description: Finds the Solaris_NFSShare instances that are associated to
* the passed in Solaris_PersistentShare object path.
*
* Parameters:
* - CCIMObjectPath *sharePersistOP - The Solaris_PersistentShare object
* path that is to be used to find the associated Solaris_NFSShare
* instances.
*
* Returns:
* - A pointer to a list of Solaris_NFSShare instances that are associated
* to the Solaris_PersistentShare object path, sharePersistOP, passed in.
* - NULL if an error occurred or if there are no Solaris_NFSShare
* instances associated to the Solaris_PersistentShare object path. In
* the case of an error, the error will be logged.
*/
static CCIMInstanceList *
char *settingId;
int err = 0;
SETTING_ID, &err);
"SOLARIS_NFSSHAREENT::GET_ASSOC_SHARE_INSTLIST",
return ((CCIMInstanceList *)NULL);
}
if (nfsShareInstList == NULL) {
ex = cim_getLastError();
"SOLARIS_NFSSHAREENT::GET_ASSOC_SHARE_INSTLIST",
return ((CCIMInstanceList *)NULL);
}
if (nfsShareOP == NULL) {
/*
* An error occurred in get_Solaris_NFSShare_OP and was
* handled there.
*/
return ((CCIMInstanceList *)NULL);
}
/*
* A NULL return value indicates an error, an empty instance does not.
*/
if (nfsShareInst == NULL) {
ex = cim_getLastError();
"SOLARIS_NFSSHAREENT::GET_ASSOC_SHARE_INSTLIST",
return ((CCIMInstanceList *)NULL);
}
return ((CCIMInstanceList *)NULL);
}
/*
* Work around for cimom bug 4649100.
*/
/*
* Key values not found
*/
"get_associated_nfsShareSec_instList",
"No keyProprties found, should return error here");
return ((CCIMInstanceList *)NULL);
}
if (nfsShareInstList == NULL) {
ex = cim_getLastError();
"SOLARIS_NFSSHAREENT::GET_ASSOC_SHARE_INSTLIST",
return ((CCIMInstanceList *)NULL);
}
return (nfsShareInstList);
} /* get_associated_nfsShare_instList */
/*
* Method: get_associated_sharePersist_instList
*
* Description: Finds the Solaris_PersistentShare instances that are
* associated to the passed in Solaris_NFSShare object path.
*
* Parameters:
* - CCIMObjectPath *nfsShareOP - The Solaris_NFSShare object path that is
* to be used to find the associated Solaris_PersistentShare instances.
*
* Returns:
* - A pointer to a list of Solaris_PersistentShare instances that are
* associated to the Solaris_NFSShare object path, nfsShareOP, passed in.
* NOTE: An instance list is returned rather than a single instance
* because it is possible (although unlikely) to have multiple
* - NULL if an error occurred or if there are no Solaris_PersistentShare
* instances associated to the Solaris_NFSShare object path.
*/
static CCIMInstanceList *
char *name;
int err = 0;
util_handleError("SOLARIS_NFSSHAREENT::GET_ASSOC_SP_INSTLIST",
return ((CCIMInstanceList *)NULL);
}
if (sharePersistInstList == NULL) {
ex = cim_getLastError();
util_handleError("SOLARIS_NFSSHAREENT::GET_ASSOC_SP_INSTLIST",
return ((CCIMInstanceList *)NULL);
}
/*
* Check if an error occurred or if there just weren't any
*/
if (err != 0) {
"SOLARIS_NFSSHAREENT::GET_ASSOC_SP_INSTLIST",
return ((CCIMInstanceList *)NULL);
}
return ((CCIMInstanceList *)NULL);
}
char *path;
char *fstype;
char *command;
err = 0;
/*
* Compare the dfstab entry to the nfs share. Do this by first
* checking if the fstype is "nfs" and second by checking
* if the path is the same.
*/
/*
* We can't just call Solaris_PersistentShare's
* cp_getInstance method because there is a chance that
* multiple dfstab entries having the same path. If
* this is the case, that method will return null and
* some sort of "key not unique" error.
*/
if (sharePersistInst == NULL) {
/*
* An error occurred and it was handled in
* get_sharePersist_Inst.
*/
return ((CCIMInstanceList *)NULL);
}
if (sharePersistInstList == NULL) {
ex = cim_getLastError();
"SOLARIS_NFSSHAREENT::GET_ASSOC_SP_INSTLIST",
return ((CCIMInstanceList *)NULL);
}
}
}
return (sharePersistInstList);
} /* get_associated_sharePersist_instList */
/*
* Method: get_associated_sharePersist_OPList
*
* Description: Finds the Solaris_PersistentShare object paths that are
* associated to the passed in Solaris_NFSShare object path.
*
* Parameters:
* - CCIMObjectPath *nfsShareOP - The Solaris_NFSShare object path of
* of which to retrieve the associated Solaris_PersistentShare object
* paths.
*
* Returns:
* - A pointer to a list of Solaris_PersistentShare object paths that are
* associated to the passed in Solaris_NFSShare object path.
* - Upon error, NULL is returned and the error is logged.
*
* Returns:
*/
static CCIMObjectPathList *
int err = 0;
if (sharePersistInstList == NULL) {
/*
* An error occurred in get_associated_sharePersist_InstList
* and was handled in that function.
*/
*errp = -1;
return ((CCIMObjectPathList *)NULL);
}
if (sharePersistOPList == NULL) {
ex = cim_getLastError();
util_handleError("SOLARIS_NFSSHAREENT::GET_ASSOC_SP_OPLIST",
*errp = -1;
return ((CCIMObjectPathList *)NULL);
}
return (sharePersistOPList);
} /* get_associated_sharePersist_OPList */
/*
* Method: get_Solaris_NFSShare_OP
*
* Description:
*
* Parameters:
*
* Returns:
*/
static CCIMObjectPath *
get_Solaris_NFSShare_OP(char *nameKey) {
char *sysName;
int err = 0;
if (nfsShareOP == NULL) {
ex = cim_getLastError();
util_handleError("SOLARIS_NFSSHAREENT::GET_NFSSHARE_OP",
&err);
return ((CCIMObjectPath *)NULL);
}
util_handleError("SOLARIS_NFSSHAREENT::GET_NFSSHARE_OP",
return ((CCIMObjectPath *)NULL);
}
/*
* Create the property list which to add all the key properties to and
* which will be added to the object path.
*/
if (nfsShareKeyPropList == NULL) {
ex = cim_getLastError();
util_handleError("SOLARIS_NFSSHAREENT::GET_NFSSHARE_OP",
return ((CCIMObjectPath *)NULL);
}
/*
* add_property_to_list parameters are as follows:
* 1.) property name (cimchar *),
* 2.) property type (CIMType),
* 3.) property value (cimchar *),
* 4.) property object path for reference properties (CCIMObjectPath *),
* 5.) is property a key? (CIMBool),
* 6.) property list to add the property to (CCIMPropertyList *).
*/
if (nfsShareKeyPropList == NULL) {
return ((CCIMObjectPath *)NULL);
}
if (nfsShareKeyPropList == NULL) {
return ((CCIMObjectPath *)NULL);
}
if (nfsShareKeyPropList == NULL) {
return ((CCIMObjectPath *)NULL);
}
if (nfsShareKeyPropList == NULL) {
return ((CCIMObjectPath *)NULL);
}
if (nfsShareOP == NULL) {
ex = cim_getLastError();
util_handleError("SOLARIS_NFSSHAREENT::GET_NFSSHARE_OP",
return ((CCIMObjectPath *)NULL);
}
return (nfsShareOP);
} /* get_Solaris_NFSShare_OP */
/*
* Method: get_Solaris_PersistentShare_Inst
*
* Description: Creates an instance of the Solaris_PersistentShare class.
*
* Parameters:
* - char *path - The value to be used for the SettingID property.
* - char *command - The value to be used for the Command property.
*
* Returns:
* - A pointer to a Solaris_PersistentShare instance.
* - Upon error, NULL is returned and the error is logged.
*/
static CCIMInstance *
int err = 0;
util_handleError("SOLARIS_NFSSHAREENT::GET_SHAREPERSIST_INST",
return ((CCIMInstance *)NULL);
}
if (sharePersistInst == NULL) {
ex = cim_getLastError();
util_handleError("SOLARIS_NFSSHAREENT::GET_SHAREPERSIST_INST",
return ((CCIMInstance *)NULL);
}
/*
* add_property_to_instance parameters are as follows:
* 1.) property name (cimchar *),
* 2.) property type (CIMType),
* 3.) property value (cimchar *),
* 4.) property object path for reference properties (CCIMObjectPath *),
* 5.) is property a key? (CIMBool),
* 6.) instance to add the property to (CCIMInstance *).
*/
== cim_false) {
return ((CCIMInstance *)NULL);
}
== cim_false) {
return ((CCIMInstance *)NULL);
}
return ((CCIMInstance *)NULL);
}
return ((CCIMInstance *)NULL);
}
return ((CCIMInstance *)NULL);
}
return (sharePersistInst);
} /* get_Solaris_PersistentShare_Inst */