fwInstallation  8.4.1
Functions | Variables
fwInstallationRedu.ctl File Reference

Functions

void fwInstallationRedu_setReduSplitOff (int pairToKeep)
 
int fwInstallationRedu_reduSetSplitOff (string sSystem, bool bAsk=true, int stayHost=1)
 
int fwInstallationRedu_checkComponents (bool &isOk, dyn_dyn_mixed &componentsToBeInstalled, dyn_dyn_mixed &componentsToBeRemoved)
 
int fwInstallationRedu_synchronize (bool deleteFiles=false, string &dontRestartProject, dyn_string descFilesInstallComponents=makeDynString())
 
string fwInstallationRedu_getLocalDp (string dp)
 
string fwInstallationRedu_getReduDp (string dp, string systemName="", int reduHostNum=0)
 
int fwInstallationRedu_dpTypeChange (dyn_dyn_string elements, dyn_dyn_int types)
 
int fwInstallationRedu_dpTypeCreate (dyn_dyn_string elements, dyn_dyn_int types)
 
int fwInstallationRedu_dpDelete (string dpname)
 
int fwInstallationRedu_dpCreate (string dpname, string dptype)
 
int fwInstallationRedu_dpSet (string dpname, anytype val)
 
int fwInstallationRedu_isPassive ()
 
dyn_string fwInstallationRedu_getDataHosts ()
 
string fwInstallationRedu_getPair ()
 
bool fwInstallationRedu_isComponentInstalledInPair (string component, string version)
 
bool fwInstallationRedu_isRedundant ()
 
int fwInstallationRedu_myReduHostNum ()
 
private bool fwInstallationRedu_matchAliasWithHostName (string alias, string hostName)
 
string _fwInstallationRedu_getEventFromCfg ()
 
bool fwInstallationRedu_isSplitMode ()
 
bool fwInstallationRedu_isSplitActive ()
 
int fwInstallationRedu_getRecoveringDirection (string peer="my")
 

Variables

const string csFwInstallationReduLibVersion = "8.4.1"
 

Detailed Description

This library contains helper functions to address redundant systems

Author
Fernando Varela Rodriguez (EN-ICE)
Date
August 2010

Function Documentation

void fwInstallationRedu_setReduSplitOff ( int  pairToKeep)
Starts control script connecting to both event manager to exit the split mode.
Parameters
pairToKeeppeer to keep alive
int fwInstallationRedu_reduSetSplitOff ( string  sSystem,
bool  bAsk = true,
int  stayHost = 1 
)
Exists the split mode

sSystem PVSS system name

Parameters
bAskask user input
stayHosthost that survives
int fwInstallationRedu_checkComponents ( bool &  isOk,
dyn_dyn_mixed &  componentsToBeInstalled,
dyn_dyn_mixed &  componentsToBeRemoved 
)

This method resolves the list of components missing in the local peer w.r.t the remote one a

int fwInstallationRedu_synchronize ( bool  deleteFiles = false,
string &  dontRestartProject,
dyn_string  descFilesInstallComponents = makeDynString() 
)

This function forces the sync of component in the local system, i.e. it removes from the local system components that are not installed in the remote redu peer and installs the ones that are missing in the local peer but already installed in the remote one

string fwInstallationRedu_getLocalDp ( string  dp)
This functions appends the suffix '_'+ myRedHostNum() to the dp passed as input argument
Parameters
dp,:name of the dp
Returns
dp if redu system is number 1, dp + "_" + myReduHostNumber() if redu number is greater than 1
Author
F. Varela
string fwInstallationRedu_getReduDp ( string  dp,
string  systemName = "",
int  reduHostNum = 0 
)
This functions appends the suffix '_'+ reduHostNum to the dp passed as input argument
Parameters
dp,:name of the dp
systemName,:when it is different that the local system and no reduHostNum is provided, if the remote system is redundant the active system's redu num is used
reduHostNum,:redu number; when 0 and systemName is the local system, the local redu number is used
Returns
dp if redu system is number 1, dp + "_" + reduHostNum if redu number is greater than 1
int fwInstallationRedu_dpTypeChange ( dyn_dyn_string  elements,
dyn_dyn_int  types 
)
Wrapper function for the standard PVSS function dpTypeCreate to work in redundant systems.
Parameters
elements,:dp-type elements
types,:dp-type element types
Returns
0 if OK, -1 if error
Author
F. Varela
int fwInstallationRedu_dpTypeCreate ( dyn_dyn_string  elements,
dyn_dyn_int  types 
)
Wrapper function for the standard PVSS function dpTypeCreate to work in redundant systems.
Parameters
elements,:dp-type elements
types,:dp-type element types
Returns
0 if OK, -1 if error
Author
F. Varela
int fwInstallationRedu_dpDelete ( string  dpname)
Wrapper function for the standard PVSS function dpCreate to work in redundant systems.
Parameters
dpname,:name of the dp to be deleted
Returns
0 if OK, -1 if error
Author
F. Varela
int fwInstallationRedu_dpCreate ( string  dpname,
string  dptype 
)
Wrapper function for the standard PVSS function dpCreate to work in redundant systems.
Parameters
dpnamename of the dp to be created
dptypedp-type of the new dp
Returns
0 if OK, -1 if error
Author
F. Varela
int fwInstallationRedu_dpSet ( string  dpname,
anytype  val 
)
Wrapper function for the standard PVSS function dpSet to work in redundant systems.
Parameters
dpname,:name of the dp to be set
val,:value to be set
Returns
0 if OK, -1 if error
Author
F. Varela
int fwInstallationRedu_isPassive ( )
This functions checks whether the local system is the passive peer in a redundant system or not.
Returns
FALSE - local system is not the passive peer, TRUE the local system is the passive peer
Author
F. Varela
dyn_string fwInstallationRedu_getDataHosts ( )
This functions returns the names of the hosts of a redundant project
Author
F. Varela
string fwInstallationRedu_getPair ( )
This functions returns the name of the host where the redundant pair runs
Returns
name of the redundant pair
Author
F. Varela
bool fwInstallationRedu_isComponentInstalledInPair ( string  component,
string  version 
)
This functions checks if a particular version of a component is installed in the redundant pair
Parameters
component(in) name of the component
version(in) version of the component
Returns
True if the component is installed in the pair. Otherwise, false
Author
F. Varela
bool fwInstallationRedu_isRedundant ( )
This functions returns whether the current project is redundant
Returns
boolean indicating whether the project is redundant
int fwInstallationRedu_myReduHostNum ( )

This functions returns the redu num of the local host. Important: note that this function might (will) return "1" when used on a scattered UI system. It only works on a system where even manager resides. Consider using: fwInstallationRedu_getActivePeer().

Returns
local host redu num (1 when it is called for non-redundant project)
private bool fwInstallationRedu_matchAliasWithHostName ( string  alias,
string  hostName 
)

This function checks if hostname resolved from given network alias matches the given hostname. Note: According to the help of getHostByAddr() function it may introduce a delay until host will be dermined from alias.

Parameters
alias(in) Network alias
hostName(in) Host name
Returns
true if alias points to given hostname, false if not
string _fwInstallationRedu_getEventFromCfg ( )
This functions returns the event host name from the config file
Returns
hostname of the event manager from the config file
bool fwInstallationRedu_isSplitMode ( )
This functions returns whether split mode is enabled for a redundant project
Returns
true if the project is in split mode
bool fwInstallationRedu_isSplitActive ( )
This functions returns whether this is the split active pair
Returns
true if this is the split active pair
int fwInstallationRedu_getRecoveringDirection ( string  peer = "my")

Get recovering direction of the given peer. Default is my peer

Parameters
peer(default my)
Returns
0 -> not recovering 1 -> pushing data to other peer 2-> receiving data from the other peer

Variable Documentation

const string csFwInstallationReduLibVersion = "8.4.1"

Version of this library. Used to determine the coherency of all libraries of the installation tool Please do not edit it manually