Index by: file name | procedure name | procedure call | annotation
syncroOff_proc.tcl (annotations | original source)

####################################################################
# Save Admin changes 
####################################################################
proc syncroOff { } {

   global AdminConfig 
   global AdminControl 

   set procName [ lindex [ info level 0 ] 0 ]

   putsLog "## proc - $procName"

   foreach i [ info args $procName ]  {

      upvar 0 $i ilocal

      set propertiesArray($i) $ilocal 

   }

   putsLog "properties are.................."

   foreach { a b } [ array get propertiesArray ] {

       putsLog [ format "%-35s %s" "$a" "$b" ]

   }

   # list the node agents configured under the DM

   if { [ catch { $AdminConfig list NodeAgent } r ] == 0 } {

       if { $r == {} } {

	   putsLog "ERROR: No node agents are configured under the DM."
	   putsLog "ERROR: No node federated to the DM."

           return -code error $r

       } else {

	   foreach i $r {

	      set nodeAgentName   [ $AdminConfig showAttribute $i name ]
	      set nodeAgentServer [ $AdminConfig showAttribute $i server ]

              set host            [ $AdminConfig showAttribute [ $AdminConfig showAttribute $i NODE_DISCOVERY_ADDRESS ] host ]
              set port            [ $AdminConfig showAttribute [ $AdminConfig showAttribute $i NODE_DISCOVERY_ADDRESS ] port ]

	      putsLog "This is node agent \"$nodeAgentName\" on $host listening on $port\."   

	      set fileSynchronizationServiceI [ $AdminConfig showAttribute $i fileSynchronizationService ]

              set autoSynchEnabledValue       [ $AdminConfig showAttribute $fileSynchronizationServiceI autoSynchEnabled ]

	      putsLog "autoSynchEnabled: ***** $autoSynchEnabledValue *****" 
              
	      putsLog "modifying autoSynchEnabled" 
             
	      set autoSynchEnabledNew [ list [ list autoSynchEnabled false ] ]

              if { [ catch { $AdminConfig modify $fileSynchronizationServiceI $autoSynchEnabledNew } r ] == 0 } {

	          putsLog "autoSynchEnabled modified successfully" 
                  set autoSynchEnabledValue [ $AdminConfig showAttribute $fileSynchronizationServiceI autoSynchEnabled ]
	          putsLog "autoSynchEnabled: ***** $autoSynchEnabledValue *****" 

	      } else {

	          putsLog "ERROR - failed to modify autoSynchEnabled" 
	          putsLog $r
		  return -code error $r

	      }

           }

       }

    } else {

	return -code error 

    }

}

Index by: file name | procedure name | procedure call | annotation
File generated 2007-08-07 at 13:42.