#!/bin/ksh93
# IBM_PROLOG_BEGIN_TAG 
# This is an automatically generated prolog. 
#  
# 61haes_r714 src/43haes/usr/sbin/cluster/events/resource_move.sh 1.2 
#  
# Licensed Materials - Property of IBM 
#  
# COPYRIGHT International Business Machines Corp. 2010 
# All Rights Reserved 
#  
# US Government Users Restricted Rights - Use, duplication or 
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 
#  
# IBM_PROLOG_END_TAG 
# @(#)82	1.2  src/43haes/usr/sbin/cluster/events/resource_move.sh, hacmp.assist, 61haes_r714 6/10/12 13:30:52
#########################################################################
#
#   COMPONENT_NAME: CLMGR
#
#   FUNCTIONS:
#       move_resouce_group
#       move_service_ip
#       move_persistent_ip
#
#########################################################################

#
# Name:  move_resource_group
#
function move_resource_group {
    LINENO=2 . $HALIBROOT/log_entry "$0()" "$CL" max

    typeset rgname=$1

    CL=$LINENO KLIB_HACMP_move_resourcegroup "$rgname" \
                                  "${_ENV_ARGS[NODE]}" \
                                  "${_ENV_ARGS[SITE]}" \
                                  "${_ENV_ARGS[STATE]}" \
                                  "${_ENV_ARGS[SECONDARY]}"
    log_return_msg "$?" "$0()" "$LINENO"
    return $?
} # End of "move_resource_group()"


#
# Name:  move_service_ip
#
function move_service_ip {
    LINENO=2 . $HALIBROOT/log_entry "$0()" "$CL" max

    typeset service_ip=$1

    CL=$LINENO KLIB_HACMP_move_service_ip "$service_ip" \
                               "${_ENV_ARGS[INTERFACE]}"
    log_return_msg "$?" "$0()" "$LINENO"
    return $?
} # End of "move_service_ip()"


#
# Name:  move_persistent_ip
#
function move_persistent_ip {
    LINENO=2 . $HALIBROOT/log_entry "$0()" "$CL" max

    typeset persistent_ip=$1

    CL=$LINENO KLIB_HACMP_move_persistent_ip "$persistent_ip" \
                                  "${_ENV_ARGS[INTERFACE]}"
    log_return_msg "$?" "$0()" "$LINENO"
    return $?
} # End of "move_persistent_ip()"



#########################################################################
#########################################################################
##
## MAIN
##
#########################################################################
#########################################################################

LINENO=2 . $HALIBROOT/log_entry resource_move "$CL" max
: version=1.2, src/43haes/usr/sbin/cluster/events/resource_move.sh, hacmp.assist, 61haes_r714
: INPUTS == $*

#===================================================
# Source the file with common definitions, the run
# the action/class-appropriate class processor.
#===================================================
CL=$LINENO . $HAEVENTS/resource_common "$@"
CL=$LINENO runClassProcessor "$RESOURCE_CLASS" _VAR_SUBSTITUTIONS _ENV_ARGS
log_return_msg "$?" resource_move "$LINENO"
exit $?
