Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r4028 - in trunk/geant2_java-sshtelnet-mp: conf contrib/metadata_configuration_tools/CSV_Generator_script/conf contrib/metadata_configuration_tools/Configuration_Tool/conf doc/commands src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/encryption src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/internalChecks src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/metadata src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters src/main/java/org/perfsonar/service/measurementPoint/remote/ssh

Subject: perfsonar development work

List archive

perfsonar: r4028 - in trunk/geant2_java-sshtelnet-mp: conf contrib/metadata_configuration_tools/CSV_Generator_script/conf contrib/metadata_configuration_tools/Configuration_Tool/conf doc/commands src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/encryption src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/internalChecks src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/metadata src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters src/main/java/org/perfsonar/service/measurementPoint/remote/ssh


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r4028 - in trunk/geant2_java-sshtelnet-mp: conf contrib/metadata_configuration_tools/CSV_Generator_script/conf contrib/metadata_configuration_tools/Configuration_Tool/conf doc/commands src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/encryption src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/internalChecks src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/metadata src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters src/main/java/org/perfsonar/service/measurementPoint/remote/ssh
  • Date: Fri, 20 Jun 2008 05:38:18 -0400

Author: melis
Date: 2008-06-20 05:38:17 -0400 (Fri, 20 Jun 2008)
New Revision: 4028

Modified:
trunk/geant2_java-sshtelnet-mp/conf/ciscoipv6commands.txt
trunk/geant2_java-sshtelnet-mp/conf/ciscominimumpackage.txt

trunk/geant2_java-sshtelnet-mp/contrib/metadata_configuration_tools/CSV_Generator_script/conf/ciscoipv6commands.txt

trunk/geant2_java-sshtelnet-mp/contrib/metadata_configuration_tools/CSV_Generator_script/conf/ciscominimumpackage.txt

trunk/geant2_java-sshtelnet-mp/contrib/metadata_configuration_tools/Configuration_Tool/conf/ciscoipv6commands.txt

trunk/geant2_java-sshtelnet-mp/contrib/metadata_configuration_tools/Configuration_Tool/conf/ciscominimumpackage.txt

trunk/geant2_java-sshtelnet-mp/doc/commands/commands-complete-list-v6-AI.xls

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters/CiscoKeyBgpAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters/CiscoSshBgpAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters/JuniperBgpAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters/JuniperKeyBgpAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters/JuniperSshBgpAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/encryption/PasswordEncryptor.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/CiscoAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/CiscoKeyAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/CiscoSshAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/JuniperAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/JuniperKeyAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/JuniperSshAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/ServicePropertiesConfigurator.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/WebserviceEngineAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/internalChecks/InternalChecker.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/CiscoIpAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/CiscoKeyIpAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/CiscoSshIpAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/JuniperIpAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/JuniperKeyIpAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/JuniperSshIpAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/CiscoIpv6Adapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/CiscoKeyIpv6Adapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/CiscoSshIpv6Adapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/JuniperIpv6Adapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/JuniperKeyIpv6Adapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/JuniperSshIpv6Adapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/metadata/DbMetadataConfiguration.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/CiscoKeyStatusAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/CiscoSshStatusAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/CiscoStatusAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/JuniperKeyStatusAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/JuniperSshStatusAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/JuniperStatusAdapter.java

trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/remote/ssh/SshManager.java
Log:
fixed a type in the command configuration files

cleaned up the logging information for all classes

Modified: trunk/geant2_java-sshtelnet-mp/conf/ciscoipv6commands.txt
===================================================================
--- trunk/geant2_java-sshtelnet-mp/conf/ciscoipv6commands.txt 2008-06-20
07:46:48 UTC (rev 4027)
+++ trunk/geant2_java-sshtelnet-mp/conf/ciscoipv6commands.txt 2008-06-20
09:38:17 UTC (rev 4028)
@@ -2,7 +2,7 @@
IPv6_PROTOCOLS@@@show IPv6 protocols@@@0@@@0@@@cache@@@display detailed
information about IPv6 protocols currently configured on the
router@@@---@@@---
IPv6_ACCESS_LIST@@@show IPv6 access-lists@@@0@@@0@@@cache@@@display IPv6
access lists@@@---@@@---
IPv6_BGP_TABLE@@@show bgp IPv6 unicast@@@1@@@1@@@cache@@@display current BGP
table routing entry for <IPv6 prefix>@@@<IPv6
prefix/length>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$
-IPv6_BGP_SUMMARY@@@show bgp ipv6 unicast@@@0@@@0@@@cache@@@display the
status of all current IPv6 BGP connections@@@---@@@---
+IPv6_BGP_SUMMARY@@@show bgp ipv6 summary@@@0@@@0@@@cache@@@display the
status of all current IPv6 BGP connections@@@---@@@---
IPv6_BGP_DAMPENED_PATHS@@@show bgp IPv6
dampened-paths@@@0@@@0@@@cache@@@show all dampened BGP paths@@@---@@@---
IPv6_BGP_NEIGHBOUR_ADVERTISED@@@show bgp IPv6 unicast
neighors@@@1@@@1@@@cache@@@show advertised prefixes from <IPv6
address>@@@<peer IPv6
address>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$
IPv6_BGP_NEIGHBOUR_RECEIVED@@@show bgp IPv6 unicast
neighbors@@@1@@@1@@@cache@@@show received prefixes from <IPv6
address>@@@<peer IPv6
address>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$

Modified: trunk/geant2_java-sshtelnet-mp/conf/ciscominimumpackage.txt
===================================================================
--- trunk/geant2_java-sshtelnet-mp/conf/ciscominimumpackage.txt 2008-06-20
07:46:48 UTC (rev 4027)
+++ trunk/geant2_java-sshtelnet-mp/conf/ciscominimumpackage.txt 2008-06-20
09:38:17 UTC (rev 4028)
@@ -15,7 +15,7 @@
IP_MULTICAST_TRACEROUTE@@@mtrace@@@1@@@1@@@cache@@@trace the path of a
packet from the specified source interface to the receivers of the multicast
traffic@@@<ip
address>@@@^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}(\/[0-9]{1,2})?$
IPv6_INTERFACE_ADDRESS@@@show IPv6 interface brief@@@0@@@0@@@cache@@@display
interface IPv6 addresses@@@---@@@---
IPv6_BGP_TABLE@@@show bgp IPv6 unicast@@@1@@@1@@@cache@@@display current BGP
table routing entry for <IPv6 prefix>@@@<IPv6
prefix/length>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$
-IPv6_BGP_SUMMARY@@@show bgp ipv6 unicast@@@0@@@0@@@cache@@@display the
status of all current IPv6 BGP connections@@@---@@@---
+IPv6_BGP_SUMMARY@@@show bgp ipv6 summary@@@0@@@0@@@cache@@@display the
status of all current IPv6 BGP connections@@@---@@@---
IPv6_BGP_NEIGHBOUR_ADVERTISED@@@show bgp IPv6 unicast
neighors@@@1@@@1@@@cache@@@show advertised prefixes from <IPv6
address>@@@<peer IPv6
address>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$
IPv6_BGP_NEIGHBOUR_RECEIVED@@@show bgp IPv6 unicast
neighbors@@@1@@@1@@@cache@@@show received prefixes from <IPv6
address>@@@<peer IPv6
address>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$
IPv6_PING@@@ping IPv6@@@1@@@1@@@cache@@@Ping an <IPv6 address>@@@<IPv6
address>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$

Modified:
trunk/geant2_java-sshtelnet-mp/contrib/metadata_configuration_tools/CSV_Generator_script/conf/ciscoipv6commands.txt
===================================================================
---
trunk/geant2_java-sshtelnet-mp/contrib/metadata_configuration_tools/CSV_Generator_script/conf/ciscoipv6commands.txt
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/contrib/metadata_configuration_tools/CSV_Generator_script/conf/ciscoipv6commands.txt
2008-06-20 09:38:17 UTC (rev 4028)
@@ -2,7 +2,7 @@
IPv6_PROTOCOLS@@@show IPv6 protocols@@@0@@@0@@@cache@@@display detailed
information about IPv6 protocols currently configured on the
router@@@---@@@---
IPv6_ACCESS_LIST@@@show IPv6 access-lists@@@0@@@0@@@cache@@@display IPv6
access lists@@@---@@@---
IPv6_BGP_TABLE@@@show bgp IPv6 unicast@@@1@@@1@@@cache@@@display current BGP
table routing entry for <IPv6 prefix>@@@<IPv6
prefix/length>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$
-IPv6_BGP_SUMMARY@@@show bgp ipv6 unicast@@@0@@@0@@@cache@@@display the
status of all current IPv6 BGP connections@@@---@@@---
+IPv6_BGP_SUMMARY@@@show bgp ipv6 summray@@@0@@@0@@@cache@@@display the
status of all current IPv6 BGP connections@@@---@@@---
IPv6_BGP_DAMPENED_PATHS@@@show bgp IPv6
dampened-paths@@@0@@@0@@@cache@@@show all dampened BGP paths@@@---@@@---
IPv6_BGP_NEIGHBOUR_ADVERTISED@@@show bgp IPv6 unicast
neighors@@@1@@@1@@@cache@@@show advertised prefixes from <IPv6
address>@@@<peer IPv6
address>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$
IPv6_BGP_NEIGHBOUR_RECEIVED@@@show bgp IPv6 unicast
neighbors@@@1@@@1@@@cache@@@show received prefixes from <IPv6
address>@@@<peer IPv6
address>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$

Modified:
trunk/geant2_java-sshtelnet-mp/contrib/metadata_configuration_tools/CSV_Generator_script/conf/ciscominimumpackage.txt
===================================================================
---
trunk/geant2_java-sshtelnet-mp/contrib/metadata_configuration_tools/CSV_Generator_script/conf/ciscominimumpackage.txt
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/contrib/metadata_configuration_tools/CSV_Generator_script/conf/ciscominimumpackage.txt
2008-06-20 09:38:17 UTC (rev 4028)
@@ -15,7 +15,7 @@
IP_MULTICAST_TRACEROUTE@@@mtrace@@@1@@@1@@@cache@@@trace the path of a
packet from the specified source interface to the receivers of the multicast
traffic@@@<ip
address>@@@^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}(\/[0-9]{1,2})?$
IPv6_INTERFACE_ADDRESS@@@show IPv6 interface brief@@@0@@@0@@@cache@@@display
interface IPv6 addresses@@@---@@@---
IPv6_BGP_TABLE@@@show bgp IPv6 unicast@@@1@@@1@@@cache@@@display current BGP
table routing entry for <IPv6 prefix>@@@<IPv6
prefix/length>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$
-IPv6_BGP_SUMMARY@@@show bgp ipv6 unicast@@@0@@@0@@@cache@@@display the
status of all current IPv6 BGP connections@@@---@@@---
+IPv6_BGP_SUMMARY@@@show bgp ipv6 summary@@@0@@@0@@@cache@@@display the
status of all current IPv6 BGP connections@@@---@@@---
IPv6_BGP_NEIGHBOUR_ADVERTISED@@@show bgp IPv6 unicast
neighors@@@1@@@1@@@cache@@@show advertised prefixes from <IPv6
address>@@@<peer IPv6
address>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$
IPv6_BGP_NEIGHBOUR_RECEIVED@@@show bgp IPv6 unicast
neighbors@@@1@@@1@@@cache@@@show received prefixes from <IPv6
address>@@@<peer IPv6
address>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$
IPv6_PING@@@ping IPv6@@@1@@@1@@@cache@@@Ping an <IPv6 address>@@@<IPv6
address>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$

Modified:
trunk/geant2_java-sshtelnet-mp/contrib/metadata_configuration_tools/Configuration_Tool/conf/ciscoipv6commands.txt
===================================================================
---
trunk/geant2_java-sshtelnet-mp/contrib/metadata_configuration_tools/Configuration_Tool/conf/ciscoipv6commands.txt
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/contrib/metadata_configuration_tools/Configuration_Tool/conf/ciscoipv6commands.txt
2008-06-20 09:38:17 UTC (rev 4028)
@@ -2,7 +2,7 @@
IPv6_PROTOCOLS@@@show IPv6 protocols@@@0@@@0@@@cache@@@display detailed
information about IPv6 protocols currently configured on the
router@@@---@@@---
IPv6_ACCESS_LIST@@@show IPv6 access-lists@@@0@@@0@@@cache@@@display IPv6
access lists@@@---@@@---
IPv6_BGP_TABLE@@@show bgp IPv6 unicast@@@1@@@1@@@cache@@@display current BGP
table routing entry for <IPv6 prefix>@@@<IPv6
prefix/length>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$
-IPv6_BGP_SUMMARY@@@show bgp ipv6 unicast@@@0@@@0@@@cache@@@display the
status of all current IPv6 BGP connections@@@---@@@---
+IPv6_BGP_SUMMARY@@@show bgp ipv6 summary@@@0@@@0@@@cache@@@display the
status of all current IPv6 BGP connections@@@---@@@---
IPv6_BGP_DAMPENED_PATHS@@@show bgp IPv6
dampened-paths@@@0@@@0@@@cache@@@show all dampened BGP paths@@@---@@@---
IPv6_BGP_NEIGHBOUR_ADVERTISED@@@show bgp IPv6 unicast
neighors@@@1@@@1@@@cache@@@show advertised prefixes from <IPv6
address>@@@<peer IPv6
address>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$
IPv6_BGP_NEIGHBOUR_RECEIVED@@@show bgp IPv6 unicast
neighbors@@@1@@@1@@@cache@@@show received prefixes from <IPv6
address>@@@<peer IPv6
address>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$

Modified:
trunk/geant2_java-sshtelnet-mp/contrib/metadata_configuration_tools/Configuration_Tool/conf/ciscominimumpackage.txt
===================================================================
---
trunk/geant2_java-sshtelnet-mp/contrib/metadata_configuration_tools/Configuration_Tool/conf/ciscominimumpackage.txt
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/contrib/metadata_configuration_tools/Configuration_Tool/conf/ciscominimumpackage.txt
2008-06-20 09:38:17 UTC (rev 4028)
@@ -15,7 +15,7 @@
IP_MULTICAST_TRACEROUTE@@@mtrace@@@1@@@1@@@cache@@@trace the path of a
packet from the specified source interface to the receivers of the multicast
traffic@@@<ip
address>@@@^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}(\/[0-9]{1,2})?$
IPv6_INTERFACE_ADDRESS@@@show IPv6 interface brief@@@0@@@0@@@cache@@@display
interface IPv6 addresses@@@---@@@---
IPv6_BGP_TABLE@@@show bgp IPv6 unicast@@@1@@@1@@@cache@@@display current BGP
table routing entry for <IPv6 prefix>@@@<IPv6
prefix/length>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$
-IPv6_BGP_SUMMARY@@@show bgp ipv6 unicast@@@0@@@0@@@cache@@@display the
status of all current IPv6 BGP connections@@@---@@@---
+IPv6_BGP_SUMMARY@@@show bgp ipv6 summary@@@0@@@0@@@cache@@@display the
status of all current IPv6 BGP connections@@@---@@@---
IPv6_BGP_NEIGHBOUR_ADVERTISED@@@show bgp IPv6 unicast
neighors@@@1@@@1@@@cache@@@show advertised prefixes from <IPv6
address>@@@<peer IPv6
address>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$
IPv6_BGP_NEIGHBOUR_RECEIVED@@@show bgp IPv6 unicast
neighbors@@@1@@@1@@@cache@@@show received prefixes from <IPv6
address>@@@<peer IPv6
address>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$
IPv6_PING@@@ping IPv6@@@1@@@1@@@cache@@@Ping an <IPv6 address>@@@<IPv6
address>@@@^([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}(/[0-9]{1,3})?$

Modified:
trunk/geant2_java-sshtelnet-mp/doc/commands/commands-complete-list-v6-AI.xls
===================================================================
(Binary files differ)

Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters/CiscoKeyBgpAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters/CiscoKeyBgpAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters/CiscoKeyBgpAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -206,15 +206,6 @@
} else manager = new SshKeyManager(url, username, keyUrl,
PasswordEncryptor.decryptPassword(passphrase), false, timeout);
}

- logger.debug("[CiscoKeyBgpAdapter] Trying to connect");
-
- //if (passphrase == null || passphrase.equals("")) {
- //manager.connect(username, keyUrl);
- //} else {
- //manager.connect(username, keyUrl,
PasswordEncryptor.decryptPassword(passphrase));
- //}
- logger.debug("[CiscoKeyBgpAdapter][connect] Logged in");
-
} catch (Exception e) {

logger.error("[CiscoKeyBgpAdapter][Connect] Error occuring while
connecting");

Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters/CiscoSshBgpAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters/CiscoSshBgpAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters/CiscoSshBgpAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -202,15 +202,9 @@

}

- logger.info("[CiscoSshBgpAdapter][connect] Trying to connect");
-
- //manager.connect(username, "Username:",
PasswordEncryptor.decryptPassword(password), "Password:");
-
- logger.info("[CiscoSshBgpAdapter][connect] Logged in");
-
} catch (Exception e) {

- logger.error("[CiscoSshBgpAdapter] Error occuring while
connecting");
+ logger.error("[CiscoSshBgpAdapter][connect] Error occuring while
connecting");
logger.error(e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");
@@ -278,7 +272,6 @@

BgpCommand command = new BgpCommand(token,
properties.getProperty(subject, token, "command"));
try {
- logger.debug("service.mp." + subject + ".commands."
+ token + ".minParamCount");
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {

Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters/JuniperBgpAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters/JuniperBgpAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters/JuniperBgpAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -215,7 +215,7 @@

} catch (Exception e) {

- logger.error("[JuniperBgpAdapter] Error occuring while
connecting");
+ logger.error("[JuniperBgpAdapter][connect] Error occuring while
connecting");
logger.error(e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");
@@ -283,7 +283,6 @@

BgpCommand command = new BgpCommand(token,
properties.getProperty(subject, token, "command"));
try {
- logger.debug("service.mp." + subject + ".commands."
+ token + ".minParamCount");
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
@@ -427,7 +426,7 @@

}

- logger.debug("[JuniperBgpAdapter] TelnetManager created: " + url + "
" + port);
+ logger.debug("[JuniperBgpAdapter][takeAction] TelnetManager created:
" + url + " " + port);

try {

@@ -441,7 +440,7 @@

}

- logger.debug("[JuniperBgpAdapter] Prompt set in TelnetManager: " +
prompt);
+ logger.debug("[JuniperBgpAdapter][takeAction] Prompt set in
TelnetManager: " + prompt);

// This private method call will include all supported methods
// that can be performed on the remote device

Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters/JuniperKeyBgpAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters/JuniperKeyBgpAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters/JuniperKeyBgpAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -83,13 +83,13 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERKEYBGPADAPTER][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[JuniperKeyBgpAdapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");

}

- logger.debug("[JuniperKeyBgpAdapter] Constructor finished");
+ logger.info("[JuniperKeyBgpAdapter] Constructor finished");

}// JuniperKeyBgpAdapter

@@ -99,7 +99,7 @@
*/
public List getAvailableSpecificCommands() {

- logger.debug("[JuniperKeyBgpAdapter] getAvailableSpecificCommands
called");
+ logger.info("[JuniperKeyBgpAdapter] getAvailableSpecificCommands
called");

return availableSpecificCommands;

@@ -109,7 +109,7 @@
*/
public void setAvailableSpecificCommands(List availableSpecificCommands)
{

- logger.debug("[JuniperKeyBgpAdapter] setAvailableSpecificCommand
called");
+ logger.info("[JuniperKeyBgpAdapter] setAvailableSpecificCommand
called");

this.availableSpecificCommands = availableSpecificCommands;

@@ -119,7 +119,7 @@
*/
public void addAvailableSpecificCommand(BgpCommandInterface command) {

- logger.debug("[JuniperKeyBgpAdapter] addAvailableSpecificCommand
called");
+ logger.info("[JuniperKeyBgpAdapter] addAvailableSpecificCommand
called");

availableSpecificCommands.add(command);

@@ -130,7 +130,7 @@
public BgpCommandInterface getCommand(String description)
throws PerfSONARException {

- logger.debug("[JuniperKeyBgpAdapter] getCommand called");
+ logger.info("[JuniperKeyBgpAdapter] getCommand called");

BgpCommandInterface command = null;
Iterator it = availableSpecificCommands.iterator();
@@ -141,7 +141,7 @@

if (command.getDescription().equalsIgnoreCase(description)) {

- logger.debug("[JuniperKeyBgpAdapter] Command found");
+ logger.debug("[JuniperKeyBgpAdapter][getCommand] Command
found: " + command);
return command;

}
@@ -158,11 +158,10 @@
*/
public BgpCommandInterface executeCommand(BgpCommandInterface command) {

- logger.debug("[JuniperKeyBgpAdapter] executeCommand called");
+ logger.info("[JuniperKeyBgpAdapter] executeCommand called");

if (manager != null) {

- logger.debug("Executing command");
String temp2 = manager.executeCommand(command.getCommand() + " "
+ command.getParameterString());

command.setResult(temp2);
@@ -170,9 +169,9 @@

}// if

- logger.info("NEW RESULT RETURNED");
+ logger.info("[JuniperKeyBgpAdapter][executeCommand] New result
returned");
cachedResults.add(command);
- logger.debug("[JuniperStatusAdapter] executeCommand finished");
+ logger.debug("[JuniperKeyBgpAdapter] executeCommand finished");
return command;

}// executeCommand
@@ -205,19 +204,10 @@

}

- logger.info("[JuniperKeyBgpAdapter] Trying to connect");
-
- //if (passphrase == null || passphrase.equals("")) {
- //manager.connect(username, keyUrl);
- //} else {
- //manager.connect(username, keyUrl,
PasswordEncryptor.decryptPassword(passphrase));
- //}
- logger.info("[JuniperKeyBgpAdapter] Login");
-
} catch (Exception e) {

- logger.error("[JuniperKeyBgpAdapter] Error occuring while
connecting");
- logger.error(e.getStackTrace().toString());
+ logger.error("[JuniperKeyBgpAdapter][connect] Error occuring
while connecting");
+ logger.error(e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");
}
@@ -286,13 +276,13 @@
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[JUNIPERKEYBGPADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[JuniperKeyBgpAdapter][ConfigureCommands] MinParamCount not
found: " + e1.getStackTrace()[0].toString());
}
try {
int maxParamCount =
Integer.parseInt(properties.getProperty(subject, token, "maxParamCount"));
command.setMaxParamCount(maxParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[JUNIPERKEYBGPADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[JuniperKeyBgpAdapter][ConfigureCommands] MaxParamCount not
found: " + e1.getStackTrace()[0].toString());
}

command.setDeviceName(subject);
@@ -304,7 +294,7 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERKEYBGPADAPTER][ConfigureCommands]" +
e.getStackTrace().toString());
+ logger.error("[JuniperKeyBgpAdapter][ConfigureCommands] Unable
to retrieve commands: " + e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve commands");

@@ -392,14 +382,14 @@
EndPoint endpoint = (EndPoint) s.getChildArray()[0];
String subject = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subject);
+ logger.debug("[JuniperKeyBgpAdapter][takeAction] SubjectString: " +
subject);

EventType eventType = metadata[0].getEventType();
String eventTypeString = eventType.getEventType();
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));


- logger.debug("EVENTTYPESTRING: " + eventTypeString);
+ logger.debug("[JuniperKeyBgpAdapter][takeAction] EventTypeString: "
+ eventTypeString);

//JuniperKeyBgpAdapter adapter = new JuniperKeyBgpAdapter();

@@ -419,20 +409,21 @@

} catch (NumberFormatException e1) {

- logger.error("[JUNIPERKEYBGPADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperKeyBgpAdapter][TakeAction] One of the
numbers in the metadata " +
+ "configuration file is not parsable: " +
e1.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.mp.sshtelnet.configuration",
- "Invalid port number in configuration");
+ "Invalid port number or cache or timeout value in
configuration");

} catch (PerfSONARException e1) {

- logger.error("[JUNIPERKEYBGPADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperKeyBgpAdapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve connection details");

}

- logger.debug("[JuniperKeyBgpAdapter] TelnetManager created: " + url
+ " " + port);
+ logger.debug("[JuniperKeyBgpAdapter][takeAction] SshKeyManager
created: " + url + " " + port);

// This private method call will include all supported methods
// that can be performed on the remote device
@@ -450,7 +441,7 @@

Parameter param = parametersArray[i];
String parameter = param.getParameterValue();
- logger.debug("PARAMETERVALUE: " + parameter);
+ logger.debug("[JuniperKeyBgpAdapter][takeAction] Parameter
value: " + parameter);

if (new ParameterChecker().checkParam(subject,
eventTypeString,
parameter)) {
@@ -474,12 +465,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(bgpCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(bgpCommand.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(bgpCommand.getDeviceName()) &&
cachedCommand.getTimestamp() + (caching * 1000) > System.currentTimeMillis())
{

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperKeyBgpAdapter][takeAction]
Cached result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching *
1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperKeyBgpAdapter][takeAction]
Cached result removed");
it.remove();

}
@@ -510,12 +501,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(bgpCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(bgpCommand.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(bgpCommand.getDeviceName()) &&
cachedCommand.getTimestamp() + (caching * 1000) > System.currentTimeMillis())
{

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperKeyBgpAdapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching * 1000)
<= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperKeyBgpAdapter][takeAction] Cached
result removed");
it.remove();

}
@@ -537,7 +528,7 @@

}

- logger.info("[JuniperKeyBgpAdapter] Command executed succesfully");
+ logger.info("[JuniperKeyBgpAdapter][takeAction] Command executed
succesfully");

Datum datum = new Datum();

@@ -547,7 +538,7 @@
datum.setDatum(temp);
}

- logger.info("[JuniperKeyBgpAdapter] Constructing response message");
+ logger.info("[JuniperKeyBgpAdapter][takeAction] Constructing
response message");

Message response = new Message();

@@ -560,7 +551,7 @@
response.setMetadata(respMetaData[0]);
response.setData(respData[0]);

- logger.info("[JuniperKeyBgpAdapter] takeAction finished");
+ logger.info("[JuniperKeyBgpAdapter][takeAction] takeAction
finished");

return response;


Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters/JuniperSshBgpAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters/JuniperSshBgpAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters/JuniperSshBgpAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -76,7 +76,6 @@

this.properties = new DbMetadataConfiguration();
properties.initStorage();
-
this.serviceEngineType =
"service.MeasurementPoint.TELNETSSHType";

//FOR LOCAL TESTING
@@ -84,14 +83,12 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERSSHBGPADAPTER][Constructor]" +
e.getStackTrace().toString());
- throw new PerfSONARException("error.mp.sshYE.configuration",
+ logger.error("[JuniperSshBgpAdapter][Constructor]" +
e.getStackTrace()[0].toString());
+ throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");

}

- logger.debug("[JuniperSshBgpAdapter] Constructor started");
-
logger.debug("[JuniperSshBgpAdapter] Constructor finished");

}// JuniperSshBgpAdapter
@@ -102,7 +99,7 @@
*/
public List getAvailableSpecificCommands() {

- logger.debug("[JuniperSshBgpAdapter] getAvailableSpecificCommands
called");
+ logger.info("[JuniperSshBgpAdapter] getAvailableSpecificCommands
called");

return availableSpecificCommands;

@@ -112,7 +109,7 @@
*/
public void setAvailableSpecificCommands(List availableSpecificCommands)
{

- logger.debug("[JuniperSshBgpAdapter] setAvailableSpecificCommand
called");
+ logger.info("[JuniperSshBgpAdapter] setAvailableSpecificCommand
called");

this.availableSpecificCommands = availableSpecificCommands;

@@ -122,7 +119,7 @@
*/
public void addAvailableSpecificCommand(BgpCommandInterface command) {

- logger.debug("[JuniperSshBgpAdapter] addAvailableSpecificCommand
called");
+ logger.info("[JuniperSshBgpAdapter] addAvailableSpecificCommand
called");

availableSpecificCommands.add(command);

@@ -133,7 +130,7 @@
public BgpCommandInterface getCommand(String description)
throws PerfSONARException {

- logger.debug("[JuniperSshBgpAdapter] getCommand called");
+ logger.info("[JuniperSshBgpAdapter] getCommand called");

BgpCommandInterface command = null;
Iterator it = availableSpecificCommands.iterator();
@@ -144,7 +141,7 @@

if (command.getDescription().equalsIgnoreCase(description)) {

- logger.debug("[JuniperSshBgpAdapter] Command found");
+ logger.info("[JuniperSshBgpAdapter] Command found: " +
command);
return command;

}
@@ -161,7 +158,7 @@
*/
public BgpCommandInterface executeCommand(BgpCommandInterface command) {

- logger.debug("[JuniperSshBgpAdapter] executeCommand called");
+ logger.info("[JuniperSshBgpAdapter] executeCommand called");

if (manager != null) {

@@ -171,7 +168,7 @@

}// if

- logger.info("NEW RESULT RETURNED");
+ logger.info("[JuniperSshBgpAdapter][executeCommand] New result
returned");
cachedResults.add(command);
logger.debug("[JuniperSshBgpAdapter] executeCommand finished");
return command;
@@ -206,16 +203,10 @@

}

- logger.info("[JuniperSshBgpAdapter] Trying to connect");
-
- //manager.connect(username, "Username:",
PasswordEncryptor.decryptPassword(password), "Password:");
-
- logger.info("[JuniperSshBgpAdapter Login");
-
} catch (Exception e) {

- logger.error("[JuniperSshBgpAdapter] Error occuring while
connecting");
- logger.error(e.getStackTrace().toString());
+ logger.error("[JuniperSshBgpAdapter][connect] Error occuring
while connecting");
+ logger.error(e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");

@@ -282,17 +273,16 @@

BgpCommand command = new BgpCommand(token,
properties.getProperty(subject, token, "command"));
try {
- logger.debug("service.mp." + subject + ".commands."
+ token + ".minParamCount");
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[JUNIPERSSHBGPADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[JuniperSshBgpAdapter][ConfigureCommands] MinParamCount not
found: " + e1.getStackTrace()[0].toString());
}
try {
int maxParamCount =
Integer.parseInt(properties.getProperty(subject, token, "maxParamCount"));
command.setMaxParamCount(maxParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[JUNIPERSSHBGPADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[JuniperSshBgpAdapter][ConfigureCommands] MaxParamCount not
found: " + e1.getStackTrace()[0].toString());
}

command.setDeviceName(subject);
@@ -304,7 +294,7 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERSSHBGPADAPTER][ConfigureCommands]" +
e.getStackTrace().toString());
+ logger.error("[JuniperSshBgpAdapter][ConfigureCommands]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve commands");

@@ -392,14 +382,14 @@
EndPoint endpoint = (EndPoint) s.getChildArray()[0];
String subject = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subject);
+ logger.debug("[JuniperSshBgpAdapter][takeAction] SubjectString: " +
subject);

EventType eventType = metadata[0].getEventType();
String eventTypeString = eventType.getEventType();
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));


- logger.debug("EVENTTYPESTRING: " + eventTypeString);
+ logger.debug("[JuniperKeyBgpAdapter][takeAction] EventTypeString: "
+ eventTypeString);

//JuniperSshBgpAdapter adapter = new JuniperSshBgpAdapter();

@@ -421,20 +411,21 @@

} catch (NumberFormatException e1) {

- logger.error("[JUNIPERSSHBGPADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperSshBgpAdapter][TakeAction] One of the
numbers in the metadata " +
+ "configuration file is not parsable: " +
e1.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.mp.sshtelnet.configuration",
- "Invalid port number in configuration");
+ "Invalid port number or cache or timeout value in
configuration");

} catch (PerfSONARException e1) {

- logger.error("[JUNIPERSSHBGPADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperSshBgpAdapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve connection details");

}

- logger.debug("[CiscoStatusAdapter] SshManager created: " + url + " "
+ port);
+ logger.debug("[JuniperSshBgpAdapter][takeAction] SshManager created:
" + url + " " + port);

//This private method call will include all supported methods
//that can be performed on the remote device
@@ -454,7 +445,7 @@

Parameter param = parametersArray[i];
String parameter = param.getParameterValue();
- logger.debug("PARAMETERVALUE: " + parameter);
+ logger.debug("[JuniperSshBgpAdapter][takeAction] Parameter
value: " + parameter);

if (new ParameterChecker().checkParam(subject,
eventTypeString,
parameter)) {
@@ -478,12 +469,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(bgpCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(bgpCommand.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(bgpCommand.getDeviceName()) &&
cachedCommand.getTimestamp() + (caching * 1000) > System.currentTimeMillis())
{

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperSshBgpAdapter][takeAction]
Cached result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching *
1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperSshBgpAdapter][takeAction]
Cached result removed");
it.remove();

}
@@ -513,12 +504,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(bgpCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(bgpCommand.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(bgpCommand.getDeviceName()) &&
cachedCommand.getTimestamp() + (caching * 1000) > System.currentTimeMillis())
{

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperSshBgpAdapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching * 1000)
<= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperSshBgpAdapter][takeAction] Cached
result removed");
it.remove();

}
@@ -540,7 +531,7 @@

}

- logger.info("[JuniperSshBgpAdapter] Command executed succesfully");
+ logger.info("[JuniperSshBgpAdapter][takeAction] Command executed
succesfully");

Datum datum = new Datum();
if (valid) {
@@ -549,7 +540,7 @@
datum.setDatum(temp);
}

- logger.info("[JuniperSshBgpAdapter] Constructing response message");
+ logger.info("[JuniperSshBgpAdapter][takeAction] Constructing
response message");

Message response = new Message();


Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/encryption/PasswordEncryptor.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/encryption/PasswordEncryptor.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/encryption/PasswordEncryptor.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -18,6 +18,7 @@
import javax.crypto.spec.DESKeySpec;

import org.apache.ws.security.util.Base64;
+import org.perfsonar.base.exceptions.PerfSONARException;



@@ -37,7 +38,7 @@
* @return String encryptedPassword
*/

- public static String encryptPassword(String pass) {
+ public static String encryptPassword(String pass) throws
PerfSONARException{

String result = "";

@@ -68,27 +69,25 @@

ciphertext = desCipher.doFinal(cleartext);

- System.out.println("CipherText: " + ciphertext);
-
return Base64.encode(ciphertext);

//System.out.println("result.length()" + result.length());
} catch (InvalidKeyException e) {
- e.printStackTrace();
+ throw new PerfSONARException(e.getMessage());
} catch (NoSuchAlgorithmException e) {
- e.printStackTrace();
+ throw new PerfSONARException(e.getMessage());
} catch (InvalidKeySpecException e) {
- e.printStackTrace();
+ throw new PerfSONARException(e.getMessage());
} catch (NoSuchPaddingException e) {
- e.printStackTrace();
+ throw new PerfSONARException(e.getMessage());
} catch (IllegalBlockSizeException e) {
- e.printStackTrace();
+ throw new PerfSONARException(e.getMessage());
} catch (BadPaddingException e) {
- e.printStackTrace();
+ throw new PerfSONARException(e.getMessage());
} catch (Exception e) {
- e.printStackTrace();
+ throw new PerfSONARException(e.getMessage());
}
- return result;
+
}


@@ -99,7 +98,7 @@
* @return String plain-text password
*/

- public static String decryptPassword(String pass) {
+ public static String decryptPassword(String pass) throws
PerfSONARException{
String result = "";

try {
@@ -132,31 +131,28 @@
byte[] cleartext1 = desCipher.doFinal(encrypted);

result = new String(cleartext1, "ISO-8859-1");
+
+ return result;
} catch (InvalidKeyException e) {
- e.printStackTrace();
+ throw new PerfSONARException(e.getMessage());
} catch (NoSuchAlgorithmException e) {
- e.printStackTrace();
+ throw new PerfSONARException(e.getMessage());
} catch (InvalidKeySpecException e) {
- e.printStackTrace();
+ throw new PerfSONARException(e.getMessage());
} catch (NoSuchPaddingException e) {
- e.printStackTrace();
+ throw new PerfSONARException(e.getMessage());
} catch (IllegalBlockSizeException e) {
- e.printStackTrace();
+ throw new PerfSONARException(e.getMessage());
} catch (BadPaddingException e) {
- e.printStackTrace();
+ throw new PerfSONARException(e.getMessage());
} catch (Exception e) {
- e.printStackTrace();
+ throw new PerfSONARException(e.getMessage());
}

- return result;
}

public static void main (String[] args) {
- //String encrypt = encryptPassword(args[0]);
- //System.out.println("Encrypted Password : " + encrypt);
-
- //System.out.println("Decrypted string: " + decryptPassword(encrypt));
- System.out.println("Decrypted string: " + decryptPassword(args[0]));
+
}

}

Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/CiscoAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/CiscoAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/CiscoAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -79,7 +79,7 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOADAPTER][Constructor]" +
e.getStackTrace()[0].toString());
+ logger.error("[CiscoAdapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");
}
@@ -109,7 +109,7 @@
EndPoint endpoint = (EndPoint) subject.getChildArray()[0];
String subjectString = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subjectString);
+ logger.debug("[CiscoAdapted][takeAction] subjectString: " +
subjectString);

EventType eventType = null;
String eventTypeString = "";
@@ -119,12 +119,12 @@
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));

} catch (Exception e) {
- logger.error("[CISCOADAPTER][TakeAction]" +
e.getStackTrace()[0].toString());
+ logger.error("[CiscoAdapter][TakeAction]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.command",
"No Command/EventType specified in request");
}

- logger.debug("EVENTTYPESTRING: " + eventTypeString);
+ logger.debug("[CiscoAdapted][takeAction] eventTypeString: " +
eventTypeString);

long last = 0;

@@ -132,7 +132,7 @@
try {
rate = properties.getProperty(subjectString, "rate");
} catch (PerfSONARException e2) {
- logger.error("[CISCOADAPTER][TakeAction]" +
e2.getStackTrace()[0].toString());
+ logger.error("[CiscoAdapter][TakeAction]" +
e2.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");
}
@@ -161,18 +161,18 @@
s.writeLong(System.currentTimeMillis());
s.flush();
} catch (FileNotFoundException e1) {
- logger.error("[CISCOADAPTER][TakeAction]" +
e1.getStackTrace()[0].toString());
+ logger.error("[CiscoAdapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.token",
"Unable to write/retrieve token for request");
} catch (IOException e1) {
- logger.error("[CISCOADAPTER][TakeAction]" +
e1.getStackTrace()[0].toString());
+ logger.error("[CiscoAdapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.token",
"Unable to write/retrieve token for request");
}

//e.printStackTrace();
} catch (IOException e) {
- logger.error("[CISCOADAPTER][TakeAction]" +
e.getStackTrace()[0].toString());
+ logger.error("[CiscoAdapter][TakeAction]" +
e.getStackTrace()[0].toString());
}

if (System.currentTimeMillis() - last > rateLong) {

Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/CiscoKeyAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/CiscoKeyAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/CiscoKeyAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -79,7 +79,7 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOKEYADAPTER][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[CiscoKeyAdapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");
}
@@ -109,7 +109,7 @@
EndPoint endpoint = (EndPoint) subject.getChildArray()[0];
String subjectString = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subjectString);
+ logger.debug("[CiscoKeyAdapted][takeAction] subjectString: " +
subjectString);

EventType eventType = null;
String eventTypeString = "";
@@ -119,19 +119,19 @@
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));

} catch (Exception e) {
- logger.error("[CISCOKEYADAPTER][TakeAction]" +
e.getStackTrace().toString());
+ logger.error("[CiscoKeyAdapter][TakeAction]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.command",
"No Command/EventType specified in request");
}

- logger.debug("EVENTTYPESTRING: " + eventTypeString);
+ logger.debug("[CiscoAdapted][takeAction] eventTypeString: " +
eventTypeString);
long last = 0;

String rate;
try {
rate = properties.getProperty(subjectString, "rate");
} catch (PerfSONARException e2) {
- logger.error("[CISCOKEYADAPTER][TakeAction]" +
e2.getStackTrace().toString());
+ logger.error("[CiscoKeyAdapter][TakeAction]" +
e2.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");
}
@@ -160,18 +160,18 @@
s.writeLong(System.currentTimeMillis());
s.flush();
} catch (FileNotFoundException e1) {
- logger.error("[CISCOKEYADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[CiscoKeyAdapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.token",
"Unable to write/retrieve token for request");
} catch (IOException e1) {
- logger.error("[CISCOKEYADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[CiscoKeyAdapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.token",
"Unable to write/retrieve token for request");
}

//e.printStackTrace();
} catch (IOException e) {
- logger.error("[CISCOKEYADAPTER][TakeAction]" +
e.getStackTrace().toString());
+ logger.error("[CiscoKeyAdapter][TakeAction]" +
e.getStackTrace()[0].toString());
}

if (System.currentTimeMillis() - last > rateLong) {

Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/CiscoSshAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/CiscoSshAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/CiscoSshAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -98,7 +98,7 @@

} catch (PerfSONARException e) {

-
logger.error("[CISCOSSHADAPTER][Constructor]"+e.getStackTrace().toString());
+
logger.error("[CiscoSshAdapter][Constructor]"+e.getStackTrace()[0].toString());
throw new
PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the
properties and/or logger instances.");
}
@@ -130,7 +130,7 @@
EndPoint endpoint = (EndPoint) subject.getChildArray()[0];
String subjectString = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subjectString);
+ logger.debug("[CiscoSshAdapted][takeAction] subjectString: "
+ subjectString);

EventType eventType = null;
String eventTypeString = "";
@@ -140,20 +140,20 @@
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));

} catch (Exception e) {
-
logger.error("[CISCOSSHADAPTER][TakeAcion]"+e.getStackTrace().toString());
+
logger.error("[CiscoSshAdapter][TakeAcion]"+e.getStackTrace()[0].toString());
throw new
PerfSONARException("error.mp.sshtelnet.command",
"No Command/EventType specified in
request");
}


- logger.debug("EVENTTYPESTRING: " + eventTypeString);

+ logger.debug("[CiscoSshAdapted][takeAction] eventTypeString:
" + eventTypeString);
long last = 0;

String rate;
try {
rate = properties.getProperty(subjectString, "rate");
} catch (PerfSONARException e2) {
-
logger.error("[CISCOSSHADAPTER][TakeAcion]"+e2.getStackTrace().toString());
+
logger.error("[CiscoSshAdapter][TakeAcion]"+e2.getStackTrace()[0].toString());
throw new
PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the
properties and/or logger instances.");
}
@@ -184,18 +184,18 @@
s.writeLong(System.currentTimeMillis());
s.flush();
} catch (FileNotFoundException e1) {
-
logger.error("[CISCOSSHADAPTER][TakeAcion]"+e1.getStackTrace().toString());
+
logger.error("[CiscoSshAdapter][TakeAcion]"+e1.getStackTrace()[0].toString());
throw new
PerfSONARException("error.mp.sshtelnet.token",
"Unable to write/retrieve
token for request");
} catch (IOException e1) {
-
logger.error("[CISCOSSHADAPTER][TakeAcion]"+e1.getStackTrace().toString());
+
logger.error("[CiscoSshAdapter][TakeAcion]"+e1.getStackTrace()[0].toString());
throw new
PerfSONARException("error.mp.sshtelnet.token",
"Unable to write/retrieve
token for request");
}

//e.printStackTrace();
} catch (IOException e) {
-
logger.error("[CISCOSSHADAPTER][TakeAcion]"+e.getStackTrace().toString());
+
logger.error("[CiscoSshAdapter][TakeAcion]"+e.getStackTrace()[0].toString());
}

if (System.currentTimeMillis() - last > rateLong) {

Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/JuniperAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/JuniperAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/JuniperAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -79,7 +79,7 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERADAPTER][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[JuniperAdapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");
}
@@ -109,7 +109,7 @@
EndPoint endpoint = (EndPoint) subject.getChildArray()[0];
String subjectString = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subjectString);
+ logger.debug("[JuniperAdapted][takeAction] subjectString: " +
subjectString);

EventType eventType = null;
String eventTypeString = "";
@@ -119,20 +119,20 @@
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));

} catch (Exception e) {
- logger.error("[JUNIPERADAPTER][TakeAction]" +
e.getStackTrace().toString());
+ logger.error("[JuniperAdapter][TakeAction]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.command",
"No Command/EventType specified in request");
}


- logger.debug("EVENTTYPESTRING: " + eventTypeString);
+ logger.debug("[JuniperAdapted][takeAction] eventTypeString: " +
eventTypeString);
long last = 0;

String rate;
try {
rate = properties.getProperty(subjectString, "rate");
} catch (PerfSONARException e2) {
- logger.error("[JUNIPERADAPTER][TakeAction]" +
e2.getStackTrace().toString());
+ logger.error("[JuniperAdapter][TakeAction]" +
e2.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");
}
@@ -161,18 +161,18 @@
s.writeLong(System.currentTimeMillis());
s.flush();
} catch (FileNotFoundException e1) {
- logger.error("[JUNIPERADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperAdapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.token",
"Unable to write/retrieve token for request");
} catch (IOException e1) {
- logger.error("[JUNIPERADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperAdapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.token",
"Unable to write/retrieve token for request");
}

//e.printStackTrace();
} catch (IOException e) {
- logger.error("[JUNIPERADAPTER][TakeAction]" +
e.getStackTrace().toString());
+ logger.error("[JuniperAdapter][TakeAction]" +
e.getStackTrace()[0].toString());
}

if (System.currentTimeMillis() - last > rateLong) {

Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/JuniperKeyAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/JuniperKeyAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/JuniperKeyAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -88,7 +88,7 @@

} catch (PerfSONARException e) {

-
logger.error("[JUNIPERKEYADAPTER][Constructor]"+e.getStackTrace().toString());
+
logger.error("[JuniperKeyAdapter][Constructor]"+e.getStackTrace()[0].toString());
throw new
PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the
properties and/or logger instances.");
}
@@ -119,7 +119,7 @@
EndPoint endpoint = (EndPoint) subject.getChildArray()[0];
String subjectString = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subjectString);
+ logger.debug("[JuniperKeyAdapted][takeAction] subjectString:
" + subjectString);

EventType eventType = null;
String eventTypeString = "";
@@ -129,20 +129,20 @@
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));

} catch (Exception e) {
-
logger.error("[JUNIPERKEYADAPTER][TakeAction]"+e.getStackTrace().toString());
+
logger.error("[JuniperKeyAdapter][TakeAction]"+e.getStackTrace()[0].toString());
throw new
PerfSONARException("error.mp.sshtelnet.command",
"No Command/EventType specified in
request");
}


- logger.debug("EVENTTYPESTRING: " + eventTypeString);

+ logger.debug("[JuniperKeyAdapted][takeAction]
eventTypeString: " + eventTypeString);
long last = 0;

String rate;
try {
rate = properties.getProperty(subjectString, "rate");
} catch (PerfSONARException e2) {
-
logger.error("[JUNIPERKEYADAPTER][TakeAction]"+e2.getStackTrace().toString());
+
logger.error("[JuniperKeyAdapter][TakeAction]"+e2.getStackTrace()[0].toString());
throw new
PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the
properties and/or logger instances.");
}
@@ -173,18 +173,18 @@
s.writeLong(System.currentTimeMillis());
s.flush();
} catch (FileNotFoundException e1) {
-
logger.error("[JUNIPERKEYADAPTER][TakeAction]"+e1.getStackTrace().toString());
+
logger.error("[JuniperKeyAdapter][TakeAction]"+e1.getStackTrace()[0].toString());
throw new
PerfSONARException("error.mp.sshtelnet.token",
"Unable to write/retrieve
token for request");
} catch (IOException e1) {
-
logger.error("[JUNIPERKEYADAPTER][TakeAction]"+e1.getStackTrace().toString());
+
logger.error("[JuniperKeyAdapter][TakeAction]"+e1.getStackTrace()[0].toString());
throw new
PerfSONARException("error.mp.sshtelnet.token",
"Unable to write/retrieve
token for request");
}

//e.printStackTrace();
} catch (IOException e) {
-
logger.error("[JUNIPERKEYADAPTER][TakeAction]"+e.getStackTrace().toString());
+
logger.error("[JuniperKeyAdapter][TakeAction]"+e.getStackTrace()[0].toString());
}

if (System.currentTimeMillis() - last > rateLong) {

Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/JuniperSshAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/JuniperSshAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/JuniperSshAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -88,7 +88,7 @@

} catch (PerfSONARException e) {

-
logger.error("[JUNIPERSSHADAPTER][Constructor]"+e.getStackTrace().toString());
+
logger.error("[JuniperSshAdapter][Constructor]"+e.getStackTrace()[0].toString());
throw new
PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the
properties and/or logger instances.");
}
@@ -119,7 +119,7 @@
EndPoint endpoint = (EndPoint) subject.getChildArray()[0];
String subjectString = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subjectString);
+ logger.debug("[JuniperSshAdapted][takeAction] subjectString:
" + subjectString);

EventType eventType = null;
String eventTypeString = "";
@@ -129,20 +129,20 @@
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));

} catch (Exception e) {
-
logger.error("[JUNIPERSSHADAPTER][TakeAction]"+e.getStackTrace().toString());
+
logger.error("[JuniperSshAdapter][TakeAction]"+e.getStackTrace()[0].toString());
throw new
PerfSONARException("error.mp.sshtelnet.command",
"No Command/EventType specified in
request");
}


- logger.debug("EVENTTYPESTRING: " + eventTypeString);

+ logger.debug("[JuniperSshAdapted][takeAction]
eventTypeString: " + eventTypeString);
long last = 0;

String rate;
try {
rate = properties.getProperty(subjectString, "rate");
} catch (PerfSONARException e2) {
-
logger.error("[JUNIPERSSHADAPTER][TakeAction]"+e2.getStackTrace().toString());
+
logger.error("[JuniperSshAdapter][TakeAction]"+e2.getStackTrace()[0].toString());
throw new
PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the
properties and/or logger instances.");
}
@@ -173,18 +173,18 @@
s.writeLong(System.currentTimeMillis());
s.flush();
} catch (FileNotFoundException e1) {
-
logger.error("[JUNIPERSSHADAPTER][TakeAction]"+e1.getStackTrace().toString());
+
logger.error("[JuniperSshAdapter][TakeAction]"+e1.getStackTrace()[0].toString());
throw new
PerfSONARException("error.mp.sshtelnet.token",
"Unable to write/retrieve
token for request");
} catch (IOException e1) {
-
logger.error("[JUNIPERSSHADAPTER][TakeAction]"+e1.getStackTrace().toString());
+
logger.error("[JuniperSshAdapter][TakeAction]"+e1.getStackTrace()[0].toString());
throw new
PerfSONARException("error.mp.sshtelnet.token",
"Unable to write/retrieve
token for request");
}

//e.printStackTrace();
} catch (IOException e) {
-
logger.error("[JUNIPERSSHADAPTER][TakeAction]"+e.getStackTrace().toString());
+
logger.error("[JuniperSshAdapter][TakeAction]"+e.getStackTrace()[0].toString());
}

if (System.currentTimeMillis() - last > rateLong) {

Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/ServicePropertiesConfigurator.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/ServicePropertiesConfigurator.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/ServicePropertiesConfigurator.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -28,6 +28,7 @@
import org.jdom.Namespace;
import org.jdom.input.SAXBuilder;
import org.jdom.output.XMLOutputter;
+import org.perfsonar.base.exceptions.PerfSONARException;
import
org.perfsonar.service.measurementPoint.lookingGlassType.encryption.PasswordEncryptor;

/**
@@ -1066,6 +1067,8 @@
}
} catch (IOException e) {
e.printStackTrace();
+ } catch (PerfSONARException e) {
+ e.printStackTrace();
}

System.out.println();

Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/WebserviceEngineAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/WebserviceEngineAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/WebserviceEngineAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -90,7 +90,7 @@

} catch (PerfSONARException e) {

-
logger.error("[WEBSERVICEENGINEADAPTER][Constructor]"+e.getStackTrace()[0].toString());
+
logger.error("[WebserviceEngineAdapter][Constructor]"+e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");

@@ -128,7 +128,7 @@
} // Find the correct handler for the device requested
else {

- logger.debug("NUMBER OF BLOCKs: " + requestMetadata.length);
+ logger.debug("[WebserviceEngineAdapter][takeAction] Number of
blocks: " + requestMetadata.length);

messages = new Message[requestMetadata.length];
RequestMonitor requestMonitor = new RequestMonitor(
@@ -152,7 +152,7 @@

if (deviceElementOK && devices.contains(value)) {

- logger.debug("Device: " + value);
+ logger.debug("[WebserviceEngineAdapter][takeAction]
Device: " + value);
//logger.debug("Device index: " +
devices.indexOf(value));
//logger.debug("Size of Count: " + count.length +
"\nindex of device: " + devices.indexOf(value));
count[devices.indexOf(value)]++;
@@ -161,7 +161,7 @@
currentDevices[i] = devices.indexOf(value);
//contains the indexes of the devices in use
//logger.debug("currentDevices["+i+"]: " +
currentDevices[i]);

- logger.debug("Number of current connections for
device \"" + value + "\": " + count[currentDevices[i]]);
+ logger.debug("[WebserviceEngineAdapter][takeAction]
Number of current connections for device \"" + value + "\": " +
count[currentDevices[i]]);

if (Integer.parseInt(configuration.getProperty(value,
"numberOfUsers")) <= 0 // numberOfUsers <= 0 --> unlimited amount of users
|| count[devices.indexOf(value)] <=
Integer.parseInt(configuration.getProperty(value, "numberOfUsers"))){
@@ -288,7 +288,7 @@
//toolkit.beep();
Thread.sleep(2000);
} catch (InterruptedException e) {
-
logger.error("[WEBSERVICEENGINEADAPTER][TakeAction]"+e.getStackTrace()[0].toString());
+ logger.error("[WebserviceEngineAdapter][TakeAction]
"+e.getStackTrace()[0].toString());
}
}

@@ -316,7 +316,7 @@
for (int i = 0; i<currentDevices.length; i++) {
if (currentDevices[i] > -1) {
count[currentDevices[i]]--;
- logger.debug("Concurrent connections for device \"" +
devices.get(i) +
+ logger.debug("[WebserviceEngineAdapter][takeAction]
Concurrent connections for device \"" + devices.get(i) +
"\" decreased by 1; concurrent
connections: "+ count[currentDevices[i]]);
}
}
@@ -370,7 +370,7 @@
try {
metaparam.setParameterValue(configuration.getProperty(token,
"url"));
} catch (PerfSONARException e1) {
-
logger.debug("[WEBSERVICEENGINEADAPTER][CreateServiceCapabilitiesResponse]
url parameter not found for device: "+ token);
+
logger.debug("[WebserviceEngineAdapter][CreateServiceCapabilitiesResponse]
url parameter not found for device: "+ token);
}

metaParams.addChild(metaparam);
@@ -395,7 +395,7 @@

eventType = new EventType();
eventType.addText(innerToken);
- logger.debug(innerToken);
+
logger.debug("[WebserviceEngineAdapter][CreateServiceCapabilitiesResponse]
EventType: " + innerToken);

Parameters params = new Parameters();
params.setId("params" + tokencounter);
@@ -406,7 +406,7 @@
param1.setParameterName("description");

param1.setParameterValue(configuration.getProperty(token, innerToken,
"description"));
} catch (PerfSONARException e) {
-
logger.debug("[WEBSERVICEENGINEADAPTER][CreateServiceCapabilitiesResponse]
description parameter not found for device: "+ token + " and command: " +
innerToken);
+
logger.debug("[WebserviceEngineAdapter][CreateServiceCapabilitiesResponse]
description parameter not found for device: "+ token + " and command: " +
innerToken);
}

Parameter param2 = new Parameter();
@@ -415,7 +415,7 @@
param2.setParameterName("syntax");

param2.setParameterValue(configuration.getProperty(token, innerToken,
"syntax"));
} catch (PerfSONARException e) {
-
logger.debug("[WEBSERVICEENGINEADAPTER][CreateServiceCapabilitiesResponse]
syntax parameter not found for device: "+ token + " and command: " +
innerToken);
+
logger.debug("[WebserviceEngineAdapter][CreateServiceCapabilitiesResponse]
syntax parameter not found for device: "+ token + " and command: " +
innerToken);
}

Parameter param3 = new Parameter();
@@ -424,7 +424,7 @@
param3.setParameterName("command");

param3.setParameterValue(configuration.getProperty(token, innerToken,
"command"));
} catch (PerfSONARException e) {
-
logger.debug("[WEBSERVICEENGINEADAPTER][CreateServiceCapabilitiesResponse]
command parameter not found for device: "+ token + " and command: " +
innerToken);
+
logger.debug("[WebserviceEngineAdapter][CreateServiceCapabilitiesResponse]
command parameter not found for device: "+ token + " and command: " +
innerToken);
}

params.addChild(param1);

Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/internalChecks/InternalChecker.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/internalChecks/InternalChecker.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/internalChecks/InternalChecker.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -65,24 +65,24 @@
public boolean checkExist () {
boolean clear = true;

- logger.debug("[INTERNALCHECKER][checkExist] Checking the
connection to the " +
+ logger.debug("[InternalChecker][checkExist] Checking the
connection to the " +
"eXist database...");

try {
this.properties = new DbMetadataConfiguration();
properties.initStorage();

- logger.debug("[INTERNALCHECKER][checkExist] eXist
database reachable.");
- logger.debug("[INTERNALCHECKER][checkExist] Importing
names of the configured" +
+ logger.debug("[InternalChecker][checkExist] eXist
database reachable.");
+ logger.debug("[InternalChecker][checkExist] Importing
names of the configured" +
" devices from eXist database...");

devices =
properties.getProperties(MetadataConfiguration.DEVICE_NAMES);

- logger.debug("[INTERNALCHECKER][checkExist]
Succesfully imported list of configured" +
+ logger.debug("[InternalChecker][checkExist]
Succesfully imported list of configured" +
" devices from eXist database.");

} catch (PerfSONARException e) {
- logger.error("[INTERNALCHECKER][checkExist] Failed to
initialise the " +
+ logger.error("[InternalChecker][checkExist] Failed to
initialise the " +
"StorageManager. Problem with eXist
database!");
description = "Failed to initialise the
StorageManager. Problem with eXist " +
"database!";
@@ -95,7 +95,7 @@
public boolean checkDevices () {
boolean clear = true;

- logger.debug("[INTERNALCHECKER][checkDevices] Checking the
connection to the " +
+ logger.debug("[InternalChecker][checkDevices] Checking the
connection to the " +
"devices...");

Iterator<String> it = devices.iterator();
@@ -105,9 +105,9 @@
}

if (clear) {
- logger.debug("[INTERNALCHECKER][checkDevices] Devices
can be reached and are " +
+ logger.debug("[InternalChecker][checkDevices] Devices
can be reached and are " +
"working correctly.");
- } else logger.debug("[INTERNALCHECKER][checkDevices] At least
one device cannot be" +
+ } else logger.debug("[InternalChecker][checkDevices] At least
one device cannot be" +
" reached.");
return clear;
}
@@ -115,7 +115,7 @@
public boolean checkDevice (String device) {
boolean clear = true;

- logger.debug("[INTERNALCHECKER][checkDevice] Getting
connection details for device " + device + "...");
+ logger.debug("[InternalChecker][checkDevice] Getting
connection details for device " + device + "...");
try {
class_name = properties.getProperty(device,
"class_name");
username = properties.getProperty(device, "username");
@@ -124,24 +124,24 @@
try {
port =
Integer.parseInt(properties.getProperty(device, "port"));
if (port <= 0){
-
logger.error("[INTERNALCHECKER][checkDevice] Invalid port number! Will not be
able to " +
+
logger.error("[InternalChecker][checkDevice] Invalid port number! Will not be
able to " +
"connect to the
device: " + device);
return false;
}
} catch (NumberFormatException e) {
- logger.error("[INTERNALCHECKER][checkDevice]
Invalid port number! Will not be able to " +
+ logger.error("[InternalChecker][checkDevice]
Invalid port number! Will not be able to " +
"connect to the device: " +
device);
return false;
}
try {
timeout =
Integer.parseInt(properties.getProperty(device, "timeout"));
if (timeout <= 0){
-
logger.debug("[INTERNALCHECKER][checkDevice] Invalid timeout value!" +
+
logger.debug("[InternalChecker][checkDevice] Invalid timeout value!" +
" Disabling timeout...");
timeout = 0;
}
} catch (NumberFormatException e) {
- logger.debug("[INTERNALCHECKER][checkDevice]
Invalid timeout value! Disabling timeout...");
+ logger.debug("[InternalChecker][checkDevice]
Invalid timeout value! Disabling timeout...");
timeout = 0;
}

@@ -152,21 +152,21 @@
keyUrl = properties.getProperty(device,
"keyUrl");
passphrase = properties.getProperty(device,
"passphrase");
} else {
- logger.error("[INTERNALCHECKER][checkDevice]
Unknown class_name found for device. " +
+ logger.error("[InternalChecker][checkDevice]
Unknown class_name found for device. " +
"Connection to device " +
device + " will not work properly!");
return false;
}

} catch (PerfSONARException e) {
- logger.debug("[INTERNALCHECKER][checkDevice]
Something went wrong while getting the" +
+ logger.debug("[InternalChecker][checkDevice]
Something went wrong while getting the" +
" connection details for the device "
+ device);
return false;
}

- logger.debug("[INTERNALCHECKER][checkDevice] Connection
details for device " + device
+ logger.debug("[InternalChecker][checkDevice] Connection
details for device " + device
+ " received.");

- logger.debug("[INTERNALCHECKER][checkDevice] Getting details
for a command...");
+ logger.debug("[InternalChecker][checkDevice] Getting details
for a command...");

try {
List commands = properties.getProperties(device,
"commands");
@@ -180,7 +180,7 @@
minimumParameterCount =
Integer.parseInt(

properties.getProperty(device, command_name, "minParamCount"));
} catch (NumberFormatException e) {
-
logger.debug("[INTERNALCHECKER][checkDevice] Invalide parameterCount
parameters." +
+
logger.debug("[InternalChecker][checkDevice] Invalide parameterCount
parameters." +
" Command will not be executed!");
return false;
}
@@ -190,13 +190,13 @@
}

if (command.equals("")){
- logger.debug("[INTERNALCHECKER][checkDevice]
No command found which doesn't need a " +
+ logger.debug("[InternalChecker][checkDevice]
No command found which doesn't need a " +
"parameter. Will just try to log in
on the device, and then exit.");
command = "exit";
}

} catch (PerfSONARException e) {
- logger.debug("[INTERNALCHECKER][checkDevice]
Something went wrong while getting " +
+ logger.debug("[InternalChecker][checkDevice]
Something went wrong while getting " +
"the details for the command " +
command_name + " for device " + device);
return false;
}
@@ -244,18 +244,18 @@
TelnetManager manager = new TelnetManager(url, port,
false, timeout);
manager.setPrompt(prompt);

- logger.debug("[INTERNALCHECKER][takeTelnetAction]
Connecting to device...");
+ logger.debug("[InternalChecker][takeTelnetAction]
Connecting to device...");
manager.connect(username, "Username:",
PasswordEncryptor.decryptPassword(password), "Password:");
- logger.debug("[INTERNALCHECKER][takeTelnetAction]
Connected to device");
+ logger.debug("[InternalChecker][takeTelnetAction]
Connected to device");

- logger.debug("[INTERNALCHECKER][takeTelnetAction]
Executing Commands...");
+ logger.debug("[InternalChecker][takeTelnetAction]
Executing Commands...");
manager.executeCommand(command);
manager.executeCommand("");
- logger.debug("[INTERNALCHECKER][takeTelnetAction]
Command succesfully executed");
+ logger.debug("[InternalChecker][takeTelnetAction]
Command succesfully executed");

manager.disconnect();
} catch (Exception e) {
- logger.error("[INTERNALCHECKER][takeTelnetAction]
Error while connecting to device " + device);
+ logger.error("[InternalChecker][takeTelnetAction]
Error while connecting to device " + device);
clear = false;
}
return clear;
@@ -267,13 +267,13 @@
try {
SshManager manager = new SshManager(url, username,
PasswordEncryptor.decryptPassword(password), false, timeout);

- logger.debug("[INTERNALCHECKER][takeSshAction]
Connecting to device and executing commands...");
+ logger.debug("[InternalChecker][takeSshAction]
Connecting to device and executing commands...");
manager.connect(username, "Username:",
PasswordEncryptor.decryptPassword(password), "Password:");

manager.executeCommand(command);
- logger.debug("[INTERNALCHECKER][takeSshAction]
Command succesfully executed");
+ logger.debug("[InternalChecker][takeSshAction]
Command succesfully executed");
} catch (PerfSONARException e) {
- logger.error("[INTERNALCHECKER][takeSshAction] Error
while connecting to device " + device);
+ logger.error("[InternalChecker][takeSshAction] Error
while connecting to device " + device);
clear = false;
}

@@ -290,13 +290,13 @@
else
manager = new SshKeyManager(url, username,
keyUrl, PasswordEncryptor.decryptPassword(passphrase), false, timeout);

- logger.debug("[INTERNALCHECKER][takeSshAction]
Connecting to device and executing commands...");
+ logger.debug("[InternalChecker][takeSshAction]
Connecting to device and executing commands...");
manager.connect(username, "Username:",
PasswordEncryptor.decryptPassword(password), "Password:");

manager.executeCommand(command);
- logger.debug("[INTERNALCHECKER][takeSshAction]
Command succesfully executed");
+ logger.debug("[InternalChecker][takeSshAction]
Command succesfully executed");
} catch (PerfSONARException e) {
- logger.error("[INTERNALCHECKER][takeSshAction] Error
while connecting to device " + device);
+ logger.error("[InternalChecker][takeSshAction] Error
while connecting to device " + device);
clear = false;
}


Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/CiscoIpAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/CiscoIpAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/CiscoIpAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -84,13 +84,13 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOIPADAPTER][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[CiscoIpAdapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");

}

- logger.debug("[CiscoIpAdapter] Constructor finished");
+ logger.info("[CiscoIpAdapter] Constructor finished");

}// CiscoIpAdapter

@@ -100,7 +100,7 @@
*/
public List getAvailableSpecificCommands() {

- logger.debug("[CiscoIpAdapter] getAvailableSpecificCommands called");
+ logger.info("[CiscoIpAdapter] getAvailableSpecificCommands called");

return availableSpecificCommands;

@@ -110,7 +110,7 @@
*/
public void setAvailableSpecificCommands(List availableSpecificCommands)
{

- logger.debug("[CiscoIpAdapter] setAvailableSpecificCommand called");
+ logger.info("[CiscoIpAdapter] setAvailableSpecificCommand called");

this.availableSpecificCommands = availableSpecificCommands;

@@ -120,7 +120,7 @@
*/
public void addAvailableSpecificCommand(IpCommandInterface command) {

- logger.debug("[CiscoIpAdapter] addAvailableSpecificCommand called");
+ logger.info("[CiscoIpAdapter] addAvailableSpecificCommand called");

availableSpecificCommands.add(command);

@@ -131,7 +131,7 @@
public IpCommandInterface getCommand(String description)
throws PerfSONARException {

- logger.debug("[CiscoIpAdapter] getCommand called");
+ logger.info("[CiscoIpAdapter] getCommand called");

IpCommandInterface command = null;
Iterator it = availableSpecificCommands.iterator();
@@ -142,7 +142,7 @@

if (command.getDescription().equalsIgnoreCase(description)) {

- logger.debug("[CiscoIpAdapter] Command found");
+ logger.debug("[CiscoIpAdapter] Command found: " + command);
return command;

}
@@ -159,7 +159,7 @@
*/
public IpCommandInterface executeCommand(IpCommandInterface command) {

- logger.debug("[CiscoIpAdapter] executeCommand called");
+ logger.info("[CiscoIpAdapter] executeCommand called");

if (manager != null) {

@@ -177,7 +177,7 @@

}// if

- logger.info("NEW RESULT RETURNED");
+ logger.info("[CiscoIpAdapter][executeCommand] New result returned");
cachedResults.add(command);
logger.debug("[CiscoIpAdapter] executeCommand finished");
return command;
@@ -191,7 +191,7 @@
*/
public void connect(String subject) throws PerfSONARException {

- logger.debug("[CiscoIpAdapter] Connect called");
+ logger.info("[CiscoIpAdapter] Connect called");

try {

@@ -208,8 +208,8 @@
"Username or password not set");
}
} catch (Exception e) {
- logger.error("[CiscoIpAdapter] Error in configuration");
- logger.error("[CISCOIPADAPTER][Connect]" +
e.getStackTrace().toString());
+ logger.error("[CiscoIpAdapter][connect] Error in
configuration");
+ logger.error(e.getStackTrace()[0].toString());
throw e;
}
caching = Integer.parseInt(properties.getProperty(subject,
"cache"));
@@ -220,16 +220,16 @@

}

- logger.debug("[CiscoIpAdapter] Trying to connect");
+ logger.info("[CiscoIpAdapter][connect] Trying to connect");

manager.connect(username, "Username:",
PasswordEncryptor.decryptPassword(password), "Password:");

- logger.debug("[CiscoIpv6Adapter Login");
+ logger.info("[CiscoIpAdapter][connect] Logged in");

} catch (Exception e) {

- logger.error("[CiscoIpAdapter] Error occuring while connecting");
- logger.error("[CISCOIPADAPTER][Connect]" +
e.getStackTrace().toString());
+ logger.error("[CiscoIpAdapter][connect] Error occuring while
connecting");
+ logger.error("[CiscoIpAdapter][connect]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");

@@ -281,7 +281,7 @@
*/
private void configureCommands(String subject) throws PerfSONARException
{

- logger.debug("[CiscoIpAdapter] Configuring available operations
...");
+ logger.info("[CiscoIpAdapter] Configuring available operations ...");

Iterator commands = null;
String token = null;
@@ -300,17 +300,16 @@
else if (token.endsWith("RECEIVED"))
command.setSuffix("received-routes");
try {
- logger.debug("service.mp." + subject + ".commands."
+ token + ".minParamCount");
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
- logger.error("[CISCOIPADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+ logger.error("[CiscoIpAdapter][ConfigureCommands]
MinParamCount not found: " + e1.getStackTrace()[0].toString());
}
try {
int maxParamCount =
Integer.parseInt(properties.getProperty(subject, token, "maxParamCount"));
command.setMaxParamCount(maxParamCount);
} catch (PerfSONARException e1) {
- logger.error("[CISCOIPADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+ logger.error("[CiscoIpAdapter][ConfigureCommands]
MaxParamCount not found: " + e1.getStackTrace()[0].toString());
}

command.setDeviceName(subject);
@@ -322,7 +321,7 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOIPADAPTER][ConfigureCommands]" +
e.getStackTrace().toString());
+ logger.error("[CiscoIpAdapter][ConfigureCommands] Unable to
retrieve commands: " + e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve commands");

@@ -336,7 +335,7 @@
// IpCommand(ActionType.MP_IP_ROUTESUPERNETS, "show ip route
// supernets-only"));

- logger.debug("[CiscoIpAdapter] Available operations configured");
+ logger.info("[CiscoIpAdapter] Available operations configured");

}

@@ -404,14 +403,15 @@
EndPoint endpoint = (EndPoint) s.getChildArray()[0];
String subject = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subject);
+ logger.debug("[CiscoIpAdapter][takeAction] SubjectString: " +
subject);

EventType eventType = metadata[0].getEventType();
String eventTypeString = eventType.getEventType();
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));


- logger.debug("EVENTTYPESTRING: " + eventTypeString);
+ logger.debug("[CiscoIpAdapter][takeAction] EventTypeString: " +
eventTypeString);
+

CiscoIpAdapter adapter = new CiscoIpAdapter();

@@ -431,20 +431,21 @@

} catch (NumberFormatException e1) {

- logger.error("[CISCOIPADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[CiscoIpAdapter][TakeAction] One of the numbers in
the metadata " +
+ "configuration file is not parsable: " +
e1.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.mp.sshtelnet.configuration",
- "Invalid port number in configuration");
+ "Invalid port number or cache or timeout value in
configuration");

} catch (PerfSONARException e1) {

- logger.error("[CISCOIPADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[CiscoIpAdapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve url");

}

- logger.debug("[CiscoStatusAdapter] TelnetManager created: " + url +
" " + port);
+ logger.debug("[CiscoIpAdapter][takeAction] TelnetManager created: "
+ url + " " + port);

try {

@@ -452,13 +453,13 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOIPADAPTER][TakeAction]" +
e.getStackTrace().toString());
+ logger.error("[CiscoIpAdapter][TakeAction]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve connection details");

}

- logger.debug("[CiscoStatusAdapter] Prompt set in TelnetManager: " +
prompt);
+ logger.debug("[CiscoIpAdapter][takeAction] Prompt set in
TelnetManager: " + prompt);

// This private method call will include all supported methods
// that can be performed on the remote device
@@ -478,7 +479,7 @@

Parameter param = parametersArray[i];
String parameter = param.getParameterValue();
- logger.debug("PARAMETERVALUE: " + parameter);
+ logger.debug("[CiscoIpAdapter][takeAction] Parameter value:
" + parameter);

if (new ParameterChecker().checkParam(subject,
eventTypeString,
parameter)) {
@@ -502,12 +503,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipCommand.getParameterString())
&& cachedCommand.getDeviceName().equalsIgnoreCase(ipCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[CiscoIpAdapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching *
1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[CiscoIpAdapter][takeAction] Cached
result removed");
it.remove();

}
@@ -538,12 +539,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipCommand.getParameterString())
&& cachedCommand.getDeviceName().equalsIgnoreCase(ipCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[CiscoIpAdapter][takeAction] Cached result
returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching * 1000)
<= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[CiscoIpAdapter][takeAction] Cached result
removed");
it.remove();

}
@@ -565,7 +566,7 @@

}

- logger.info("[CiscoIpAdapter] Command executed succesfully");
+ logger.info("[CiscoIpAdapter][takeAction] Command executed
succesfully");

Datum datum = new Datum();
if (valid) {
@@ -574,7 +575,7 @@
datum.setDatum(temp);
}

- logger.info("[CiscoIpAdapter] Constructing response message");
+ logger.info("[CiscoIpAdapter][takeAction] Constructing response
message");

Message response = new Message();

@@ -589,13 +590,10 @@
}
response.setData(respData[0]);

- logger.debug(respMetaData + "");
- logger.debug(respData + "");
-
// response.setSonarMetadata(request.getSonarMetadata());
// response.setSonarData(new Data[] { data });

- logger.info("[CiscoIpAdapter] takeAction finished");
+ logger.info("[CiscoIpAdapter][takeAction] takeAction finished");

return response;
// return new ServiceEngineResponse();

Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/CiscoKeyIpAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/CiscoKeyIpAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/CiscoKeyIpAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -104,13 +104,13 @@

} catch (PerfSONARException e) {

-
logger.error("[CISCOKEYIPADAPTER][Constructor]"+e.getStackTrace().toString());
+
logger.error("[CiscoKeyIpAdapter][Constructor]"+e.getStackTrace()[0].toString());
throw new
PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the
properties and/or logger instances.");

}

- logger.debug("[CiscoKeyIpAdapter] Constructor finished");
+ logger.info("[CiscoKeyIpAdapter] Constructor finished");

}// CiscoKeyIpAdapter

@@ -121,8 +121,7 @@
*/
public List getAvailableSpecificCommands() {

- logger
- .debug("[CiscoKeyIpAdapter]
getAvailableSpecificCommands called");
+ logger.info("[CiscoKeyIpAdapter] getAvailableSpecificCommands
called");

return availableSpecificCommands;

@@ -133,8 +132,7 @@
*/
public void setAvailableSpecificCommands(List
availableSpecificCommands) {

- logger
- .debug("[CiscoKeyIpAdapter]
setAvailableSpecificCommand called");
+ logger.info("[CiscoKeyIpAdapter] setAvailableSpecificCommand
called");

this.availableSpecificCommands = availableSpecificCommands;

@@ -145,8 +143,7 @@
*/
public void addAvailableSpecificCommand(IpCommandInterface command) {

- logger
- .debug("[CiscoKeyIpAdapter]
addAvailableSpecificCommand called");
+ logger.info("[CiscoKeyIpAdapter] addAvailableSpecificCommand
called");

availableSpecificCommands.add(command);

@@ -158,7 +155,7 @@
public IpCommandInterface getCommand(String description)
throws PerfSONARException {

- logger.debug("[CiscoKeyIpAdapter] getCommand called");
+ logger.info("[CiscoKeyIpAdapter] getCommand called");

IpCommandInterface command = null;
Iterator it = availableSpecificCommands.iterator();
@@ -169,7 +166,7 @@

if
(command.getDescription().equalsIgnoreCase(description)) {

- logger.debug("[CiscoKeyIpAdapter] Command
found");
+ logger.debug("[CiscoKeyIpAdapter] Command
found: " + command);
return command;

}
@@ -187,11 +184,10 @@
*/
public IpCommandInterface executeCommand(IpCommandInterface command) {

- logger.debug("[CiscoKeyIpAdapter] executeCommand called");
+ logger.info("[CiscoKeyIpAdapter] executeCommand called");

if (manager != null) {

- logger.debug("Executing command");
String temp2 = "";
if (command.getSuffix() != null &&
!command.getSuffix().equals(""))
temp2 = manager.executeCommand(command.getCommand() +
" " + command.getParameterString() + " " + command.getSuffix());
@@ -203,9 +199,9 @@

}// if

- logger.info("NEW RESULT RETURNED");
+ logger.info("[CiscoKeyIpAdapter][executeCommand] New result
returned");
cachedResults.add(command);
- logger.debug("[JuniperStatusAdapter] executeCommand
finished");
+ logger.debug("[CiscoKeyIpAdapter] executeCommand finished");
return command;

}// executeCommand
@@ -236,8 +232,8 @@
throw new
PerfSONARException("error.mp.sshtelnet.configuration",
"Username or
KeyURL not set");
} catch (Exception e) {
- logger.error("[CiscoKeyIpAdapter]
Error in configuration");
-
logger.error(e.getStackTrace().toString());
+
logger.error("[CiscoKeyIpAdapter][connect] Error in configuration");
+
logger.error(e.getStackTrace()[0].toString());
throw e;
}
caching =
Integer.parseInt(properties.getProperty(subject, "cache"));
@@ -249,17 +245,10 @@

}

- logger.info("[CiscoKeyIpAdapter] Trying to connect");
-
- //if (passphrase == null || passphrase.equals(""))
- //manager.connect(username, keyUrl);
- //else manager.connect(username, keyUrl,
PasswordEncryptor.decryptPassword(passphrase));
- logger.info("[CiscoKeyIpAdapter] Login");
-
} catch (Exception e) {

logger.error("[CiscoKeyIpAdapter] Error occuring
while connecting");
- logger.error(e.getStackTrace().toString());
+ logger.error(e.getStackTrace()[0].toString());
throw new
PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying
device");

@@ -313,8 +302,7 @@
*/
private void configureCommands(String subject) throws
PerfSONARException {

- logger
- .debug("[CiscoKeyIpAdapter] Configuring
available operations ...");
+ logger.info("[CiscoKeyIpAdapter] Configuring available
operations ...");

Iterator commands = null;
String token = null;
@@ -339,14 +327,14 @@

.getProperty(subject, token, "minParamCount"));

command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[CISCOKEYIPADAPTER][ConfigureCommands]"+e1.getStackTrace().toString());
+
logger.error("[CiscoKeyIpAdapter][ConfigureCommands] MinParamCount not found:
"+e1.getStackTrace()[0].toString());
}
try {
int maxParamCount =
Integer.parseInt(properties

.getProperty(subject, token, "maxParamCount"));

command.setMaxParamCount(maxParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[CISCOKEYIPADAPTER][ConfigureCommands]"+e1.getStackTrace().toString());
+
logger.error("[CiscoKeyIpAdapter][ConfigureCommands] MaxParamCount not found:
"+e1.getStackTrace()[0].toString());
}

command.setDeviceName(subject);
@@ -358,13 +346,13 @@

} catch (PerfSONARException e) {

-
logger.error("[CISCOKEYIPADAPTER][ConfigureCommands]"+e.getStackTrace().toString());
+ logger.error("[CiscoKeyIpAdapter][ConfigureCommands]
Unable to retrieve commands: "+e.getStackTrace()[0].toString());
throw new
PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve commands");

}

- logger.debug("[CiscoKeyIpAdapter] Available operations
configured");
+ logger.info("[CiscoKeyIpAdapter] Available operations
configured");

}

@@ -426,8 +414,7 @@
public Message takeAction(String actionType, Message request)
throws PerfSONARException {

- logger
- .info("[CiscoKeyIpAdapter] Webservice
takeAction call received");
+ logger.info("[CiscoKeyIpAdapter] Webservice takeAction call
received");

Metadata[] metadata = request.getMetadataArray();
Subject s = metadata[0].getSubject();
@@ -435,13 +422,14 @@
EndPoint endpoint = (EndPoint) s.getChildArray()[0];
String subject = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subject);
+ logger.debug("[CiscoKeyIpAdapter][takeAction] SubjectString:
" + subject);

EventType eventType = metadata[0].getEventType();
String eventTypeString = eventType.getEventType();
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));

-
+ logger.debug("[CiscoKeyIpAdapter][takeAction]
EventTypeString: " + eventTypeString);
+
//CiscoKeyIpAdapter adapter = new CiscoKeyIpAdapter();

//adapter.connect(subject);
@@ -461,7 +449,7 @@
"Username or KeyURL
not set");
} catch (PerfSONARException e) {
logger.error("[CiscoKeyIpAdapter] Error in
configuration");
- logger.error(e.getStackTrace().toString());
+ logger.error(e.getStackTrace()[0].toString());
throw e;
}
caching =
Integer.parseInt(properties.getProperty(subject, "cache"));
@@ -471,20 +459,21 @@

} catch (NumberFormatException e1) {

-
logger.error("[CISCOKEYIPADAPTER][TakeAction]"+e1.getStackTrace().toString());
- throw new PerfSONARException(
- "error.mp.sshtelnet.configuration",
- "Invalid port number in
configuration");
+ logger.error("[CiscoKeyIpAdapter][TakeAction] One of
the numbers in the metadata " +
+ "configuration file is not parsable: " +
e1.getStackTrace()[0].toString());
+ throw new PerfSONARException(
+ "error.mp.sshtelnet.configuration",
+ "Invalid port number or cache or timeout value in
configuration");

} catch (PerfSONARException e1) {

-
logger.error("[CISCOKEYIPADAPTER][TakeAction]"+e1.getStackTrace().toString());
+
logger.error("[CiscoKeyIpAdapter][TakeAction]"+e1.getStackTrace()[0].toString());
throw new
PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve connection
details");

}

- logger.debug("[CiscoKeyIpAdapter] TelnetManager created: " +
url
+ logger.debug("[CiscoKeyIpAdapter] SshKeyManager created: " +
url
+ " " + port);

// This private method call will include all supported methods
@@ -502,7 +491,7 @@

Parameter param = parametersArray[i];
String parameter = param.getParameterValue();
- logger.debug("PARAMETERVALUE: " + parameter);
+ logger.debug("[CiscoKeyIpAdapter][takeAction]
Parameter Value: " + parameter);

if (new
ParameterChecker().checkParam(subject, eventTypeString,
parameter)) {
@@ -532,12 +521,12 @@
&&
cachedCommand.getDeviceName().equalsIgnoreCase(ipCommand.getDeviceName())
&&
cachedCommand.getTimestamp()+(caching*1000) > System.currentTimeMillis()) {

- logger.info("CACHED RESULT
RETURNED");
+
logger.info("[CiscoKeyIpAdapter][takeAction] Cached result returned");
temp =
cachedCommand.getResult();

} else if
(cachedCommand.getTimestamp()+(caching*1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT
REMOVED");
+
logger.info("[CiscoKeyIpAdapter][takeAction] Cached result removed");
it.remove();

}
@@ -571,12 +560,12 @@
&&
cachedCommand.getDeviceName().equalsIgnoreCase(ipCommand.getDeviceName())
&&
cachedCommand.getTimestamp()+(caching*1000) > System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+
logger.info("[CiscoKeyIpAdapter][takeAction] Cached result returned");
temp = cachedCommand.getResult();

} else if
(cachedCommand.getTimestamp()+(caching*1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+
logger.info("[CiscoKeyIpAdapter][takeAction] Cached result removed");
it.remove();

}
@@ -598,7 +587,7 @@

}

- logger.info("[CiscoKeyIpAdapter] Command executed
succesfully");
+ logger.info("[CiscoKeyIpAdapter][takeAction] Command executed
succesfully");

Datum datum = new Datum();
if (valid)
@@ -608,7 +597,7 @@

datum.setDatum(filterResult(temp, ipCommand));

- logger.info("[CiscoKeyIpAdapter] Constructing response
message");
+ logger.info("[CiscoKeyIpAdapter][takeAction] Constructing
response message");

Message response = new Message();


Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/CiscoSshIpAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/CiscoSshIpAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/CiscoSshIpAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -84,16 +84,14 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOSSHIPADAPTER][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[CiscoSshIpAdapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshYE.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");

}

- logger.debug("[CiscoSshIpAdapter] Constructor started");
+ logger.info("[CiscoSshIpAdapter] Constructor finished");

- logger.debug("[CiscoSshIpAdapter] Constructor finished");
-
}// CiscoSshIpAdapter

// ---------------------- public methods
@@ -102,7 +100,7 @@
*/
public List getAvailableSpecificCommands() {

- logger.debug("[CiscoSshIpAdapter] getAvailableSpecificCommands
called");
+ logger.info("[CiscoSshIpAdapter] getAvailableSpecificCommands
called");

return availableSpecificCommands;

@@ -112,7 +110,7 @@
*/
public void setAvailableSpecificCommands(List availableSpecificCommands)
{

- logger.debug("[CiscoSshIpAdapter] setAvailableSpecificCommand
called");
+ logger.info("[CiscoSshIpAdapter] setAvailableSpecificCommand
called");

this.availableSpecificCommands = availableSpecificCommands;

@@ -122,7 +120,7 @@
*/
public void addAvailableSpecificCommand(IpCommandInterface command) {

- logger.debug("[CiscoSshIpAdapter] addAvailableSpecificCommand
called");
+ logger.info("[CiscoSshIpAdapter] addAvailableSpecificCommand
called");

availableSpecificCommands.add(command);

@@ -133,7 +131,7 @@
public IpCommandInterface getCommand(String description)
throws PerfSONARException {

- logger.debug("[CiscoSshIpAdapter] getCommand called");
+ logger.info("[CiscoSshIpAdapter] getCommand called");

IpCommandInterface command = null;
Iterator it = availableSpecificCommands.iterator();
@@ -144,7 +142,7 @@

if (command.getDescription().equalsIgnoreCase(description)) {

- logger.debug("[CiscoSshIpAdapter] Command found");
+ logger.debug("[CiscoSshIpAdapter] Command found: " +
command);
return command;

}
@@ -161,7 +159,7 @@
*/
public IpCommandInterface executeCommand(IpCommandInterface command) {

- logger.debug("[CiscoSshIpAdapter] executeCommand called");
+ logger.info("[CiscoSshIpAdapter] executeCommand called");

if (manager != null) {

@@ -176,7 +174,7 @@

}// if

- logger.info("NEW RESULT RETURNED");
+ logger.info("[CiscoSshIpAdapter][executeCommand] New result
returned");
cachedResults.add(command);
logger.debug("[CiscoSshIpAdapter] executeCommand finished");
return command;
@@ -207,8 +205,8 @@
"Username or password not set");
}
} catch (Exception e) {
- logger.error("[CiscoSshIpAdapter] Error in
configuration");
- logger.error(e.getStackTrace().toString());
+ logger.error("[CiscoSshIpAdapter][connect] Error in
configuration");
+ logger.error(e.getStackTrace()[0].toString());
throw e;
}
caching = Integer.parseInt(properties.getProperty(subject,
"cache"));
@@ -220,16 +218,10 @@
manager = new SshManager(url, username,
PasswordEncryptor.decryptPassword(password), false, timeout);
}

- logger.info("[CiscoSshIpAdapter] Trying to connect");
-
- //manager.connect(username, "Username:",
PasswordEncryptor.decryptPassword(password), "Password:");
-
- logger.info("[CiscoSshIpAdapter Login");
-
} catch (Exception e) {

- logger.error("[CiscoSshIpAdapter] Error occuring while
connecting");
- logger.error(e.getStackTrace().toString());
+ logger.error("[CiscoSshIpAdapter][connect] Error occuring while
connecting");
+ logger.error(e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");

@@ -281,7 +273,7 @@
*/
private void configureCommands(String subject) throws PerfSONARException
{

- logger.debug("[CiscoSshIpAdapter] Configuring available operations
...");
+ logger.info("[CiscoSshIpAdapter] Configuring available operations
...");

Iterator commands = null;
String token = null;
@@ -305,13 +297,13 @@
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[CISCOSSHIPADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+ logger.error("[CiscoSshIpAdapter][ConfigureCommands]
MinParamCount not found: " + e1.getStackTrace()[0].toString());
}
try {
int maxParamCount =
Integer.parseInt(properties.getProperty(subject, token, "maxParamCount"));
command.setMaxParamCount(maxParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[CISCOSSHIPADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+ logger.error("[CiscoSshIpAdapter][ConfigureCommands]
MaxParamCount not found: " + e1.getStackTrace()[0].toString());
}

command.setDeviceName(subject);
@@ -323,13 +315,13 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOSSHIPADAPTER][ConfigureCommands]" +
e.getStackTrace().toString());
+ logger.error("[CiscoSshIpAdapter][ConfigureCommands]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve commands");

}

- logger.debug("[CiscoSshIpAdapter] Available operations configured");
+ logger.info("[CiscoSshIpAdapter] Available operations configured");

}

@@ -397,14 +389,14 @@
EndPoint endpoint = (EndPoint) s.getChildArray()[0];
String subject = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subject);
+ logger.debug("[CiscoSshIpAdapter][takeAction] SubjectString: " +
subject);

EventType eventType = metadata[0].getEventType();
String eventTypeString = eventType.getEventType();
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));


- logger.debug("EVENTTYPESTRING: " + eventTypeString);
+ logger.debug("[CiscoSshIpAdapter][takeAction] EventTypeString: " +
eventTypeString);

//CiscoSshIpAdapter adapter = new CiscoSshIpAdapter();

@@ -426,14 +418,15 @@

} catch (NumberFormatException e1) {

- logger.error("[CISCOSSHIPADAPTER][TakeAction]" +
e1.getStackTrace()[0].toString());
+ logger.error("[CiscoSshIpAdapter][TakeAction] One of the numbers
in the metadata " +
+ "configuration file is not parsable: " +
e1.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.mp.sshtelnet.configuration",
- "Invalid port number in configuration");
+ "Invalid port number or cache or timeout value in
configuration");

} catch (PerfSONARException e1) {

- logger.error("[CISCOSSHIPADAPTER][TakeAction]" +
e1.getStackTrace()[0].toString());
+ logger.error("[CiscoSshIpAdapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve connection details");

@@ -459,7 +452,7 @@

Parameter param = parametersArray[i];
String parameter = param.getParameterValue();
- logger.debug("PARAMETERVALUE: " + parameter);
+ logger.debug("[CiscoSshIpAdapter][takeAction] Parameter
value: " + parameter);

if (new ParameterChecker().checkParam(subject,
eventTypeString,
parameter)) {
@@ -483,12 +476,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipCommand.getParameterString())
&& cachedCommand.getDeviceName().equalsIgnoreCase(ipCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[CiscoSshIpAdapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching *
1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[CiscoSshIpAdapter][takeAction] Cached
result removed");
it.remove();

}
@@ -519,12 +512,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipCommand.getParameterString())
&& cachedCommand.getDeviceName().equalsIgnoreCase(ipCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[CiscoSshIpAdapter][takeAction] Cached
result returnedD");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching * 1000)
<= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[CiscoSshIpAdapter][takeAction] Cached
result removed");
it.remove();

}
@@ -546,7 +539,7 @@

}

- logger.info("[CiscoSshIpAdapter] Command executed succesfully");
+ logger.info("[CiscoSshIpAdapter][takeAction] Command executed
succesfully");

Datum datum = new Datum();
if (valid) {
@@ -555,7 +548,7 @@
datum.setDatum(temp);
}

- logger.info("[CiscoSshIpAdapter] Constructing response message");
+ logger.info("[CiscoSshIpAdapter][takeAction] Constructing response
message");

Message response = new Message();


Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/JuniperIpAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/JuniperIpAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/JuniperIpAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -84,13 +84,13 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERIPADAPTER][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[JuniperIpAdapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");

}

- logger.debug("[JuniperIpAdapter] Constructor finished");
+ logger.info("[JuniperIpAdapter] Constructor finished");

}// JuniperIpAdapter

@@ -100,7 +100,7 @@
*/
public List getAvailableSpecificCommands() {

- logger.debug("[JuniperIpAdapter] getAvailableSpecificCommands
called");
+ logger.info("[JuniperIpAdapter] getAvailableSpecificCommands
called");

return availableSpecificCommands;

@@ -110,7 +110,7 @@
*/
public void setAvailableSpecificCommands(List availableSpecificCommands)
{

- logger.debug("[JuniperIpAdapter] setAvailableSpecificCommand
called");
+ logger.info("[JuniperIpAdapter] setAvailableSpecificCommand called");

this.availableSpecificCommands = availableSpecificCommands;

@@ -120,7 +120,7 @@
*/
public void addAvailableSpecificCommand(IpCommandInterface command) {

- logger.debug("[JuniperIpAdapter] addAvailableSpecificCommand
called");
+ logger.info("[JuniperIpAdapter] addAvailableSpecificCommand called");

availableSpecificCommands.add(command);

@@ -131,7 +131,7 @@
public IpCommandInterface getCommand(String description)
throws PerfSONARException {

- logger.debug("[JuniperIpAdapter] getCommand called");
+ logger.info("[JuniperIpAdapter] getCommand called");

IpCommandInterface command = null;
Iterator it = availableSpecificCommands.iterator();
@@ -142,7 +142,7 @@

if (command.getDescription().equalsIgnoreCase(description)) {

- logger.debug("[JuniperIpAdapter] Command found");
+ logger.debug("[JuniperIpAdapter] Command found: " + command);
return command;

}
@@ -159,7 +159,7 @@
*/
public IpCommandInterface executeCommand(IpCommandInterface command) {

- logger.debug("[JuniperIpAdapter] executeCommand called");
+ logger.info("[JuniperIpAdapter] executeCommand called");

if (manager != null) {

@@ -176,7 +176,7 @@

}// if

- logger.info("NEW RESULT RETURNED");
+ logger.info("[JuniperIpAdapter][executeCommand] New result
returned");
cachedResults.add(command);
logger.debug("[JuniperIpAdapter] executeCommand finished");
return command;
@@ -190,7 +190,7 @@
*/
public void connect(String subject) throws PerfSONARException {

- logger.debug("[JuniperIpAdapter] Connect called");
+ logger.info("[JuniperIpAdapter] Connect called");

try {

@@ -207,8 +207,8 @@
"Username or password not set");
}
} catch (Exception e) {
- logger.error("[JuniperIpAdapter] Error in
configuration");
- logger.error(e.getStackTrace().toString());
+ logger.error("[JuniperIpAdapter][connect] Error in
configuration");
+ logger.error(e.getStackTrace()[0].toString());
throw e;
}
caching = Integer.parseInt(properties.getProperty(subject,
"cache"));
@@ -219,16 +219,16 @@

}

- logger.debug("[JuniperIpAdapter] Trying to connect");
+ logger.info("[JuniperIpAdapter][connect] Trying to connect");

manager.connect(username, "login:",
PasswordEncryptor.decryptPassword(password), "Password:");

- logger.debug("[JuniperIpv6Adapter Login");
+ logger.info("[JuniperIpAdapter][connect] Logged in");

} catch (Exception e) {

- logger.error("[JuniperIpAdapter] Error occuring while
connecting");
- logger.error(e.getStackTrace().toString());
+ logger.error("[JuniperIpAdapter][connect] Error occuring while
connecting");
+ logger.error(e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");

@@ -280,7 +280,7 @@
*/
private void configureCommands(String subject) throws PerfSONARException
{

- logger.debug("[JuniperIpAdapter] Configuring available operations
...");
+ logger.info("[JuniperIpAdapter] Configuring available operations
...");

Iterator commands = null;
String token = null;
@@ -303,13 +303,13 @@
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
- logger.error("[JUNIPERIPADAPTER][ConfigureCommands]"
+ e1.getStackTrace().toString());
+ logger.error("[JuniperIpAdapter][ConfigureCommands]
MinParamCount not found: " + e1.getStackTrace()[0].toString());
}
try {
int maxParamCount =
Integer.parseInt(properties.getProperty(subject, token, "maxParamCount"));
command.setMaxParamCount(maxParamCount);
} catch (PerfSONARException e1) {
- logger.error("[JUNIPERIPADAPTER][ConfigureCommands]"
+ e1.getStackTrace().toString());
+ logger.error("[JuniperIpAdapter][ConfigureCommands]
MaxParamCount not found: " + e1.getStackTrace()[0].toString());
}

command.setDeviceName(subject);
@@ -321,7 +321,7 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERIPADAPTER][ConfigureCommands]" +
e.getStackTrace().toString());
+ logger.error("[JuniperIpAdapter][ConfigureCommands] Unable to
retrieve commands: " + e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve commands");

@@ -331,7 +331,7 @@
//this.addAvailableSpecificCommand(new
IpCommand(ActionType.MP_IP_ROUTE, "show ip route"));
//this.addAvailableSpecificCommand(new
IpCommand(ActionType.MP_IP_ROUTESUPERNETS, "show ip route supernets-only"));

- logger.debug("[JuniperIpAdapter] Available operations configured");
+ logger.info("[JuniperIpAdapter] Available operations configured");

}

@@ -407,12 +407,13 @@
EndPoint endpoint = (EndPoint) s.getChildArray()[0];
String subject = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subject);
+ logger.debug("[JuniperIpAdapter][takeAction] SubjectString: " +
subject);

EventType eventType = metadata[0].getEventType();
String eventTypeString = eventType.getEventType();
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));

+ logger.debug("[JuniperIpAdapter][takeAction] EventTypeString: " +
eventType);

JuniperIpAdapter adapter = new JuniperIpAdapter();
//adapter.connect(subject);
@@ -431,20 +432,21 @@

} catch (NumberFormatException e1) {

- logger.error("[JUNIPERIPADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperIpAdapter][TakeAction] One of the numbers
in the metadata " +
+ "configuration file is not parsable: " +
e1.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.mp.sshtelnet.configuration",
- "Invalid port number in configuration");
+ "Invalid port number or cache or timeout value in
configuration");

} catch (PerfSONARException e1) {

- logger.error("[JUNIPERIPADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperIpAdapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve connection details");

}

- logger.debug("[JuniperIpAdapter] TelnetManager created: " + url + "
" + port);
+ logger.debug("[JuniperIpAdapter][takeAction] TelnetManager created:
" + url + " " + port);

try {

@@ -452,13 +454,13 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERIPADAPTER][TakeAction]" +
e.getStackTrace().toString());
+ logger.error("[JuniperIpAdapter][TakeAction]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve prompt");

}

- logger.debug("[JuniperIpAdapter] Prompt set in TelnetManager: " +
prompt);
+ logger.debug("[JuniperIpAdapter][takeAction] Prompt set in
TelnetManager: " + prompt);

//This private method call will include all supported methods
//that can be performed on the remote device
@@ -476,7 +478,7 @@

Parameter param = parametersArray[i];
String parameter = param.getParameterValue();
- logger.debug("PARAMETERVALUE: " + parameter);
+ logger.debug("[JuniperIpAdapter][takeAction] Parameter
value: " + parameter);

if (new ParameterChecker().checkParam(subject,
eventTypeString,
parameter)) {
@@ -500,12 +502,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipCommand.getParameterString())
&& cachedCommand.getDeviceName().equalsIgnoreCase(ipCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperIpAdapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching *
1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperIpAdapter][takeAction] Cached
result removed");
it.remove();

}
@@ -536,12 +538,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipCommand.getParameterString())
&& cachedCommand.getDeviceName().equalsIgnoreCase(ipCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperIpAdapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching * 1000)
<= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperIpAdapter][takeAction] Cached
result removed");
it.remove();

}
@@ -563,7 +565,7 @@

}

- logger.info("[JuniperIpAdapter] Command executed succesfully");
+ logger.info("[JuniperIpAdapter][takeAction] Command executed
succesfully");

Datum datum = new Datum();
if (valid) {
@@ -572,7 +574,7 @@
datum.setDatum(temp);
}

- logger.info("[JuniperIpAdapter] Constructing response message");
+ logger.info("[JuniperIpAdapter][takeAction] Constructing response
message");

Message response = new Message();

@@ -585,9 +587,6 @@
response.setMetadata(respMetaData[0]);
response.setData(respData[0]);

- logger.debug(respMetaData + "");
- logger.debug(respData + "");
-
//response.setSonarMetadata(request.getSonarMetadata());

//response.setSonarData(new Data[] { data });


Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/JuniperKeyIpAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/JuniperKeyIpAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/JuniperKeyIpAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -87,13 +87,13 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERKEYIPADAPTER][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[JuniperKeyIpAdapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");

}

- logger.debug("[JuniperKeyIpAdapter] Constructor finished");
+ logger.info("[JuniperKeyIpAdapter] Constructor finished");

}// JuniperKeyIpAdapter

@@ -103,7 +103,7 @@
*/
public List getAvailableSpecificCommands() {

- logger.debug("[JuniperKeyIpAdapter] getAvailableSpecificCommands
called");
+ logger.info("[JuniperKeyIpAdapter] getAvailableSpecificCommands
called");

return availableSpecificCommands;

@@ -113,7 +113,7 @@
*/
public void setAvailableSpecificCommands(List availableSpecificCommands)
{

- logger.debug("[JuniperKeyIpAdapter] setAvailableSpecificCommand
called");
+ logger.info("[JuniperKeyIpAdapter] setAvailableSpecificCommand
called");

this.availableSpecificCommands = availableSpecificCommands;

@@ -123,7 +123,7 @@
*/
public void addAvailableSpecificCommand(IpCommandInterface command) {

- logger.debug("[JuniperKeyIpAdapter] addAvailableSpecificCommand
called");
+ logger.info("[JuniperKeyIpAdapter] addAvailableSpecificCommand
called");

availableSpecificCommands.add(command);

@@ -134,7 +134,7 @@
public IpCommandInterface getCommand(String description)
throws PerfSONARException {

- logger.debug("[JuniperKeyIpAdapter] getCommand called");
+ logger.info("[JuniperKeyIpAdapter] getCommand called");

IpCommandInterface command = null;
Iterator it = availableSpecificCommands.iterator();
@@ -145,7 +145,7 @@

if (command.getDescription().equalsIgnoreCase(description)) {

- logger.debug("[JuniperKeyIpAdapter] Command found");
+ logger.debug("[JuniperKeyIpAdapter] Command found: " +
command);
return command;

}
@@ -162,11 +162,10 @@
*/
public IpCommandInterface executeCommand(IpCommandInterface command) {

- logger.debug("[JuniperKeyIpAdapter] executeCommand called");
+ logger.info("[JuniperKeyIpAdapter] executeCommand called");

if (manager != null) {

- logger.debug("Executing command");
String temp2 = "";
if (command.getSuffix() != null &&
!command.getSuffix().equals(""))
temp2 = manager.executeCommand(command.getCommand() +
" " + command.getParameterString() + " " + command.getSuffix());
@@ -177,9 +176,9 @@

}// if

- logger.info("NEW RESULT RETURNED");
+ logger.info("[JuniperKeyIpAdapter][executeCommand] New result
returned");
cachedResults.add(command);
- logger.debug("[JuniperStatusAdapter] executeCommand finished");
+ logger.debug("[JuniperKeyIpAdapter] executeCommand finished");
return command;

}// executeCommand
@@ -209,8 +208,8 @@
"Username or KeyURL not set");
}
} catch (Exception e) {
- logger.error("[JuniperKeyIpAdapter] Error in
configuration");
- logger.error(e.getStackTrace().toString());
+ logger.error("[JuniperKeyIpAdapter][connect] Error in
configuration");
+ logger.error(e.getStackTrace()[0].toString());
throw e;
}
caching = Integer.parseInt(properties.getProperty(subject,
"cache"));
@@ -222,19 +221,10 @@

}

- logger.info("[JuniperKeyIpAdapter] Trying to connect");
-
- //if (passphrase == null || passphrase.equals("")) {
- //manager.connect(username, keyUrl);
- //} else {
- //manager.connect(username, keyUrl,
PasswordEncryptor.decryptPassword(passphrase));
- //}
- logger.info("[JuniperKeyIpAdapter] Login");
-
} catch (Exception e) {

- logger.error("[JuniperKeyIpAdapter] Error occuring while
connecting");
- logger.error(e.getStackTrace().toString());
+ logger.error("[JuniperKeyIpAdapter][connect] Error occuring
while connecting");
+ logger.error(e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");

@@ -286,7 +276,7 @@
*/
private void configureCommands(String subject) throws PerfSONARException
{

- logger.debug("[JuniperKeyIpAdapter] Configuring available operations
...");
+ logger.info("[JuniperKeyIpAdapter] Configuring available operations
...");

Iterator commands = null;
String token = null;
@@ -309,13 +299,13 @@
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[JUNIPERKEYIPADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[JuniperKeyIpAdapter][ConfigureCommands] MinParamCount not
found: " + e1.getStackTrace()[0].toString());
}
try {
int maxParamCount =
Integer.parseInt(properties.getProperty(subject, token, "maxParamCount"));
command.setMaxParamCount(maxParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[JUNIPERKEYIPADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[JuniperKeyIpAdapter][ConfigureCommands] MaxParamCount not
found: " + e1.getStackTrace()[0].toString());
}

command.setDeviceName(subject);
@@ -327,13 +317,13 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERKEYIPADAPTER][ConfigureCommands]" +
e.getStackTrace().toString());
+ logger.error("[JuniperKeyIpAdapter][ConfigureCommands] Unable to
retrieve commands: " + e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve commands");

}

- logger.debug("[JuniperKeyIpAdapter] Available operations
configured");
+ logger.info("[JuniperKeyIpAdapter] Available operations configured");

}

@@ -415,13 +405,14 @@
EndPoint endpoint = (EndPoint) s.getChildArray()[0];
String subject = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subject);
+ logger.debug("[JuniperKeyIpAdapter][takeAction] SubjectString: " +
subject);

EventType eventType = metadata[0].getEventType();
String eventTypeString = eventType.getEventType();
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));

-
+ logger.debug("[JuniperKeyIpAdapter][takeAction] EventTypeString: " +
eventType);
+
//JuniperKeyIpAdapter adapter = new JuniperKeyIpAdapter();

//adapter.connect(subject);
@@ -441,8 +432,8 @@
"Username or KeyURL not set");
}
} catch (PerfSONARException e) {
- logger.error("[JuniperKeyIpAdapter] Error in configuration");
- logger.error(e.getStackTrace().toString());
+ logger.error("[JuniperKeyIpAdapter][takeAction] Error in
configuration");
+ logger.error(e.getStackTrace()[0].toString());
throw e;
}
caching = Integer.parseInt(properties.getProperty(subject,
"cache"));
@@ -452,19 +443,20 @@

} catch (NumberFormatException e1) {

- logger.error("[JUNIPERKEYIPADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperKeyIpAdapter][TakeAction] One of the
numbers in the metadata " +
+ "configuration file is not parsable: " +
e1.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.mp.sshtelnet.configuration",
- "Invalid port number in configuration");
+ "Invalid port number or cache or timeout value in
configuration");

} catch (PerfSONARException e1) {

- logger.error("[JUNIPERKEYIPADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperKeyIpAdapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve connection details");
}

- logger.debug("[JuniperKeyIpAdapter] TelnetManager created: " + url +
" " + port);
+ logger.debug("[JuniperKeyIpAdapter] SshKeyManager created: " + url +
" " + port);

// This private method call will include all supported methods
// that can be performed on the remote device
@@ -481,7 +473,7 @@

Parameter param = parametersArray[i];
String parameter = param.getParameterValue();
- logger.debug("PARAMETERVALUE: " + parameter);
+ logger.debug("[JuniperKeyIpAdapter][takeAction] Parameter
value: " + parameter);

if (new ParameterChecker().checkParam(subject,
eventTypeString,
parameter)) {
@@ -505,12 +497,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipCommand.getParameterString())
&& cachedCommand.getDeviceName().equalsIgnoreCase(ipCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperKeyIpAdapter][takeAction]
Cached result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching *
1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperKeyIpAdapter][takeAction]
Cached result removed");
it.remove();

}
@@ -541,12 +533,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipCommand.getParameterString())
&& cachedCommand.getDeviceName().equalsIgnoreCase(ipCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperKeyIpAdapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching * 1000)
<= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperKeyIpAdapter][takeAction] Cached
result removed");
it.remove();

}
@@ -568,7 +560,7 @@

}

- logger.info("[JuniperKeyIpAdapter] Command executed succesfully");
+ logger.info("[JuniperKeyIpAdapter][takeAction] Command executed
succesfully");

Datum datum = new Datum();
if (valid) {
@@ -579,7 +571,7 @@

datum.setDatum(filterResult(temp, ipCommand));

- logger.info("[JuniperKeyIpAdapter] Constructing response message");
+ logger.info("[JuniperKeyIpAdapter][takeAction] Constructing response
message");

Message response = new Message();


Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/JuniperSshIpAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/JuniperSshIpAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters/JuniperSshIpAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -85,16 +85,14 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERSSHIPADAPTER][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[JuniperSshIpAdapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshYE.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");

}

- logger.debug("[JuniperSshIpAdapter] Constructor started");
+ logger.info("[JuniperSshIpAdapter] Constructor finished");

- logger.debug("[JuniperSshIpAdapter] Constructor finished");
-
}// JuniperSshIpAdapter

// ---------------------- public methods
@@ -103,7 +101,7 @@
*/
public List getAvailableSpecificCommands() {

- logger.debug("[JuniperSshIpAdapter] getAvailableSpecificCommands
called");
+ logger.info("[JuniperSshIpAdapter] getAvailableSpecificCommands
called");

return availableSpecificCommands;

@@ -113,7 +111,7 @@
*/
public void setAvailableSpecificCommands(List availableSpecificCommands)
{

- logger.debug("[JuniperSshIpAdapter] setAvailableSpecificCommand
called");
+ logger.info("[JuniperSshIpAdapter] setAvailableSpecificCommand
called");

this.availableSpecificCommands = availableSpecificCommands;

@@ -123,7 +121,7 @@
*/
public void addAvailableSpecificCommand(IpCommandInterface command) {

- logger.debug("[JuniperSshIpAdapter] addAvailableSpecificCommand
called");
+ logger.info("[JuniperSshIpAdapter] addAvailableSpecificCommand
called");

availableSpecificCommands.add(command);

@@ -134,7 +132,7 @@
public IpCommandInterface getCommand(String description)
throws PerfSONARException {

- logger.debug("[JuniperSshIpAdapter] getCommand called");
+ logger.info("[JuniperSshIpAdapter] getCommand called");

IpCommandInterface command = null;
Iterator it = availableSpecificCommands.iterator();
@@ -145,7 +143,7 @@

if (command.getDescription().equalsIgnoreCase(description)) {

- logger.debug("[JuniperSshIpAdapter] Command found");
+ logger.debug("[JuniperSshIpAdapter] Command found: " +
command);
return command;

}
@@ -162,7 +160,7 @@
*/
public IpCommandInterface executeCommand(IpCommandInterface command) {

- logger.debug("[JuniperSshIpAdapter] executeCommand called");
+ logger.info("[JuniperSshIpAdapter] executeCommand called");

if (manager != null) {

@@ -175,7 +173,7 @@

}// if

- logger.info("NEW RESULT RETURNED");
+ logger.info("[JuniperSshIpAdapter][executeCommand] New result
returned");
cachedResults.add(command);
logger.debug("[JuniperSshIpAdapter] executeCommand finished");
return command;
@@ -206,8 +204,8 @@
"Username or password not set");
}
} catch (Exception e) {
- logger.error("[JuniperSshIpAdapter] Error in
configuration");
- logger.error(e.getStackTrace().toString());
+ logger.error("[JuniperSshIpAdapter][connect] Error in
configuration");
+ logger.error(e.getStackTrace()[0].toString());
throw e;
}
caching = Integer.parseInt(properties.getProperty(subject,
"cache"));
@@ -220,16 +218,10 @@

}

- logger.info("[JuniperSshIpAdapter] Trying to connect");
-
- //manager.connect(username, "Username:",
PasswordEncryptor.decryptPassword(password), "Password:");
-
- logger.info("[JuniperSshIpAdapter Login");
-
} catch (Exception e) {

logger.error("[JuniperSshIpAdapter] Error occuring while
connecting");
- logger.error(e.getStackTrace().toString());
+ logger.error(e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");

@@ -281,7 +273,7 @@
*/
private void configureCommands(String subject) throws PerfSONARException
{

- logger.debug("[JuniperSshIpAdapter] Configuring available operations
...");
+ logger.info("[JuniperSshIpAdapter] Configuring available operations
...");

Iterator commands = null;
String token = null;
@@ -305,13 +297,13 @@
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[JUNIPERSSHIPADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[JuniperSshIpAdapter][ConfigureCommands] MinParamCount not
found: " + e1.getStackTrace()[0].toString());
}
try {
int maxParamCount =
Integer.parseInt(properties.getProperty(subject, token, "maxParamCount"));
command.setMaxParamCount(maxParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[JUNIPERSSHIPADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[JuniperSshIpAdapter][ConfigureCommands] MaxParamCount not
found: " + e1.getStackTrace()[0].toString());
}

command.setDeviceName(subject);
@@ -323,13 +315,13 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERSSHIPADAPTER][ConfigureCommands]" +
e.getStackTrace().toString());
+ logger.error("[JuniperSshIpAdapter][ConfigureCommands] Unable to
retrieve commands: " + e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve commands");

}

- logger.debug("[JuniperSshIpAdapter] Available operations
configured");
+ logger.info("[JuniperSshIpAdapter] Available operations configured");

}

@@ -411,14 +403,14 @@
EndPoint endpoint = (EndPoint) s.getChildArray()[0];
String subject = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subject);
+ logger.debug("[JuniperSshIpAdapter][takeAction] SubjectString: " +
subject);

EventType eventType = metadata[0].getEventType();
String eventTypeString = eventType.getEventType();
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));


- logger.debug("EVENTTYPESTRING: " + eventTypeString);
+ logger.debug("[JuniperSshIpAdapter][takeAction] EventTypeString: " +
eventTypeString);

//JuniperSshIpAdapter adapter = new JuniperSshIpAdapter();

@@ -440,20 +432,21 @@

} catch (NumberFormatException e1) {

- logger.error("[JUNIPERSSHIPADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperSshIpAdapter][TakeAction] One of the
numbers in the metadata " +
+ "configuration file is not parsable: " +
e1.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.mp.sshtelnet.configuration",
- "Invalid port number in configuration");
+ "Invalid port number or cache or timeout value in
configuration");

} catch (PerfSONARException e1) {

- logger.error("[JUNIPERSSHIPADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperSshIpAdapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve connection details");

}

- logger.debug("[CiscoStatusAdapter] SshManager created: " + url + " "
+ port);
+ logger.debug("[CiscoStatusAdapter][takeAction] SshManager created: "
+ url + " " + port);

//This private method call will include all supported methods
//that can be performed on the remote device
@@ -473,7 +466,7 @@

Parameter param = parametersArray[i];
String parameter = param.getParameterValue();
- logger.debug("PARAMETERVALUE: " + parameter);
+ logger.debug("[JuniperSshIpAdapter][takeAction] Parameter
value: " + parameter);

if (new ParameterChecker().checkParam(subject,
eventTypeString,
parameter)) {
@@ -497,12 +490,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipCommand.getParameterString())
&& cachedCommand.getDeviceName().equalsIgnoreCase(ipCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperSshIpAdapter][takeAction]
Cached result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching *
1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperSshIpAdapter][takeAction]
Cached result removed");
it.remove();

}
@@ -533,12 +526,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipCommand.getParameterString())
&& cachedCommand.getDeviceName().equalsIgnoreCase(ipCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperSshIpAdapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching * 1000)
<= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperSshIpAdapter][takeAction] Cached
result removed");
it.remove();

}
@@ -560,7 +553,7 @@

}

- logger.info("[JuniperSshIpAdapter] Command executed succesfully");
+ logger.info("[JuniperSshIpAdapter][takeAction] Command executed
succesfully");

Datum datum = new Datum();
if (valid) {
@@ -569,7 +562,7 @@
datum.setDatum(temp);
}

- logger.info("[JuniperSshIpAdapter] Constructing response message");
+ logger.info("[JuniperSshIpAdapter][takeAction] Constructing response
message");

Message response = new Message();


Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/CiscoIpv6Adapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/CiscoIpv6Adapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/CiscoIpv6Adapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -85,16 +85,14 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOIPv6ADAPTER][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[CiscoIpv6Adapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");

}

- logger.debug("[CiscoIpv6Adapter] Constructor started");
+ logger.info("[CiscoIpv6Adapter] Constructor finished");

- logger.debug("[CiscoIpv6Adapter] Constructor finished");
-
}// CiscoIpv6Adapter

// ---------------------- public methods
@@ -103,7 +101,7 @@
*/
public List getAvailableSpecificCommands() {

- logger.debug("[CiscoIpv6Adapter getAvailableSpecificCommands
called");
+ logger.info("[CiscoIpv6Adapter] getAvailableSpecificCommands
called");

return availableSpecificCommands;

@@ -113,7 +111,7 @@
*/
public void setAvailableSpecificCommands(List availableSpecificCommands)
{

- logger.debug("[CiscoIpv6Adapter setAvailableSpecificCommand called");
+ logger.info("[CiscoIpv6Adapter] setAvailableSpecificCommand called");

this.availableSpecificCommands = availableSpecificCommands;

@@ -123,7 +121,7 @@
*/
public void addAvailableSpecificCommand(Ipv6CommandInterface command) {

- logger.debug("[CiscoIpv6Adapter addAvailableSpecificCommand called");
+ logger.info("[CiscoIpv6Adapter] addAvailableSpecificCommand called");

availableSpecificCommands.add(command);

@@ -134,7 +132,7 @@
public Ipv6CommandInterface getCommand(String description)
throws PerfSONARException {

- logger.debug("[CiscoIpv6Adapter getCommand called");
+ logger.info("[CiscoIpv6Adapter] getCommand called");

Ipv6CommandInterface command = null;
Iterator it = availableSpecificCommands.iterator();
@@ -145,14 +143,14 @@

if (command.getDescription().equalsIgnoreCase(description)) {

- logger.debug("[CiscoIpv6Adapter Command found");
+ logger.debug("[CiscoIpv6Adapter] Command found: " + command);
return command;

}

}// while

- logger.error("[CiscoIpv6Adapter Command NOT found");
+ logger.error("[CiscoIpv6Adapter] Command NOT found");
throw new PerfSONARException("error.mp.sshtelnet.nosuchcommand",
"Requested command not found");

@@ -162,7 +160,7 @@
*/
public Ipv6CommandInterface executeCommand(Ipv6CommandInterface command)
{

- logger.debug("[CiscoIpv6Adapter executeCommand called");
+ logger.info("[CiscoIpv6Adapter] executeCommand called");

if (manager != null) {

@@ -178,9 +176,9 @@

}// if

- logger.info("NEW RESULT RETURNED");
+ logger.info("[CiscoIpv6Adapter][executeCommand] New result
returned");
cachedResults.add(command);
- logger.debug("[CiscoIpv6Adapter executeCommand finished");
+ logger.debug("[CiscoIpv6Adapter] executeCommand finished");
return command;

}// executeCommand
@@ -192,7 +190,7 @@
*/
public void connect(String subject) throws PerfSONARException {

- logger.debug("[CiscoIpv6Adapter Connect called");
+ logger.info("[CiscoIpv6Adapter] Connect called");

try {

@@ -211,16 +209,16 @@

}

- logger.debug("[CiscoIpv6Adapter Trying to connect");
+ logger.info("[CiscoIpv6Adapter][connect] Trying to connect");

manager.connect(username, "Username:",
PasswordEncryptor.decryptPassword(password), "Password:");

- logger.debug("[CiscoIpv6Adapter Login");
+ logger.info("[CiscoIpv6Adapter][connect] Logged in");

} catch (Exception e) {

- logger.error("[CiscoIpv6Adapter Error occuring while
connecting");
- logger.error(e.getStackTrace().toString());
+ logger.error("[CiscoIpv6Adapter][connect] Error occuring while
connecting");
+ logger.error(e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");

@@ -272,7 +270,7 @@
*/
private void configureCommands(String subject) throws PerfSONARException
{

- logger.debug("[CiscoIpv6Adapter Configuring available operations
...");
+ logger.info("[CiscoIpv6Adapter] Configuring available operations
...");

Iterator commands = null;
String token = null;
@@ -292,17 +290,16 @@
command.setSuffix("received-routes");

try {
- logger.debug("service.mp." + subject + ".commands."
+ token + ".minParamCount");
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
- logger.error("[CISCOIPv6ADAPTER][ConfigureCommands]"
+ e1.getStackTrace().toString());
+ logger.error("[CiscoIpv6Adapter][ConfigureCommands]
MinParamCount not found: " + e1.getStackTrace()[0].toString());
}
try {
int maxParamCount =
Integer.parseInt(properties.getProperty(subject, token, "maxParamCount"));
command.setMaxParamCount(maxParamCount);
} catch (PerfSONARException e1) {
- logger.error("[CISCOIPv6ADAPTER][ConfigureCommands]"
+ e1.getStackTrace().toString());
+ logger.error("[CiscoIpv6Adapter][ConfigureCommands]
MaxParamCount not found: " + e1.getStackTrace()[0].toString());
}

command.setDeviceName(subject);
@@ -314,7 +311,7 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOIPv6ADAPTER][ConfigureCommands]" +
e.getStackTrace().toString());
+ logger.error("[CiscoIpv6Adapter][ConfigureCommands]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve commands");

@@ -323,7 +320,7 @@
//this.addAvailableSpecificCommand(new
Ipv6Command(ActionType.MP_IPv6_FORWARDING, "show ipv6 forwarding"));
//this.addAvailableSpecificCommand(new
Ipv6Command(ActionType.MP_IPv6_ROUTE, "show ipv6 route"));

- logger.debug("[CiscoIpv6Adapter Available operations configured");
+ logger.info("[CiscoIpv6Adapter] Available operations configured");

}

@@ -391,14 +388,14 @@
EndPoint endpoint = (EndPoint) s.getChildArray()[0];
String subject = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subject);
+ logger.debug("[CiscoIpv6Adapter][takeAction] SubjectString: " +
subject);

EventType eventType = metadata[0].getEventType();
String eventTypeString = eventType.getEventType();
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));


- logger.debug("EVENTTYPESTRING: " + eventTypeString);
+ logger.debug("[CiscoIpv6Adapter][takeAction] EventTypeString: " +
eventTypeString);

CiscoIpv6Adapter adapter = new CiscoIpv6Adapter();

@@ -418,20 +415,21 @@

} catch (NumberFormatException e1) {

- logger.error("[CISCOIPv6ADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[CiscoIpv6Adapter][TakeAction] One of the numbers
in the metadata " +
+ "configuration file is not parsable: " +
e1.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.mp.sshtelnet.configuration",
- "Invalid port number in configuration");
+ "Invalid port number or cache or timeout value in
configuration");

} catch (PerfSONARException e1) {

- logger.error("[CISCOIPv6ADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[CiscoIpv6Adapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve connection details");

}

- logger.debug("[CiscoStatusAdapter] TelnetManager created: " + url +
" " + port);
+ logger.debug("[CiscoIpv6Adapter] TelnetManager created: " + url + "
" + port);

try {

@@ -439,13 +437,13 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOIPv6ADAPTER][TakeAction]" +
e.getStackTrace().toString());
+ logger.error("[CiscoIpv6Adapter][TakeAction]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve prompt");

}

- logger.debug("[CiscoStatusAdapter] Prompt set in TelnetManager: " +
prompt);
+ logger.debug("[CiscoIpv6Adapter][takeAction] Prompt set in
TelnetManager: " + prompt);

//This private method call will include all supported methods
//that can be performed on the remote device
@@ -465,7 +463,7 @@

Parameter param = parametersArray[i];
String parameter = param.getParameterValue();
- logger.debug("PARAMETERVALUE: " + parameter);
+ logger.debug("[CiscoIpv6Adapter][takeAction] Parameter
value: " + parameter);

if (new ParameterChecker().checkParam(subject,
eventTypeString,
parameter)) {
@@ -489,12 +487,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipv6Command.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipv6Command.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(ipv6Command.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[CiscoIpv6Adapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching *
1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[CiscoIpv6Adapter][takeAction] Cached
result removed");
it.remove();

}
@@ -525,12 +523,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipv6Command.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipv6Command.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(ipv6Command.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[CiscoIpv6Adapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching * 1000)
<= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[CiscoIpv6Adapter][takeAction] Cached
result removed");
it.remove();

}
@@ -552,7 +550,7 @@

}

- logger.info("[CiscoIpv6Adapter Command executed succesfully");
+ logger.info("[CiscoIpv6Adapter][takeAction] Command executed
succesfully");

Datum datum = new Datum();
if (valid) {
@@ -561,7 +559,7 @@
datum.setDatum(temp);
}

- logger.info("[CiscoIpv6Adapter Constructing response message");
+ logger.info("[CiscoIpv6Adapter][takeAction] Constructing response
message");

Message response = new Message();

@@ -574,12 +572,10 @@
response.setMetadata(respMetaData[0]);
response.setData(respData[0]);

- logger.debug(respMetaData + "");
- logger.debug(respData + "");

//response.setSonarMetadata(request.getSonarMetadata());

//response.setSonarData(new Data[] { data });
- logger.info("[CiscoIpv6Adapter takeAction finished");
+ logger.info("[CiscoIpv6Adapter] takeAction finished");

return response;
//return new ServiceEngineResponse();

Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/CiscoKeyIpv6Adapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/CiscoKeyIpv6Adapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/CiscoKeyIpv6Adapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -88,13 +88,13 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOKEYIPv6ADAPTER][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[CiscoKeyIpv6Adapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");

}

- logger.debug("[CiscoKeyIpv6Adapter] Constructor finished");
+ logger.info("[CiscoKeyIpv6Adapter] Constructor finished");

}// CiscoKeyIpv6Adapter

@@ -104,7 +104,7 @@
*/
public List getAvailableSpecificCommands() {

- logger.debug("[CiscoKeyIpv6Adapter] getAvailableSpecificCommands
called");
+ logger.info("[CiscoKeyIpv6Adapter] getAvailableSpecificCommands
called");

return availableSpecificCommands;

@@ -114,7 +114,7 @@
*/
public void setAvailableSpecificCommands(List availableSpecificCommands)
{

- logger.debug("[CiscoKeyIpv6Adapter] setAvailableSpecificCommand
called");
+ logger.info("[CiscoKeyIpv6Adapter] setAvailableSpecificCommand
called");

this.availableSpecificCommands = availableSpecificCommands;

@@ -124,7 +124,7 @@
*/
public void addAvailableSpecificCommand(Ipv6CommandInterface command) {

- logger.debug("[CiscoKeyIpv6Adapter] addAvailableSpecificCommand
called");
+ logger.info("[CiscoKeyIpv6Adapter] addAvailableSpecificCommand
called");

availableSpecificCommands.add(command);

@@ -135,7 +135,7 @@
public Ipv6CommandInterface getCommand(String description)
throws PerfSONARException {

- logger.debug("[CiscoKeyIpv6Adapter] getCommand called");
+ logger.info("[CiscoKeyIpv6Adapter] getCommand called");

Ipv6CommandInterface command = null;
Iterator it = availableSpecificCommands.iterator();
@@ -146,7 +146,7 @@

if (command.getDescription().equalsIgnoreCase(description)) {

- logger.debug("[CiscoKeyIpv6Adapter] Command found");
+ logger.debug("[CiscoKeyIpv6Adapter] Command found: " +
command);
return command;

}
@@ -163,11 +163,10 @@
*/
public Ipv6CommandInterface executeCommand(Ipv6CommandInterface command)
{

- logger.debug("[CiscoKeyIpv6Adapter] executeCommand called");
+ logger.info("[CiscoKeyIpv6Adapter] executeCommand called");

if (manager != null) {

- logger.debug("Executing command");
String temp2 = "";
if (command.getSuffix() != null &&
!command.getSuffix().equals(""))
temp2 = manager.executeCommand(command.getCommand() +
" " + command.getParameterString() + " " + command.getSuffix());
@@ -179,9 +178,9 @@

}// if

- logger.info("NEW RESULT RETURNED");
+ logger.info("[CiscoKeyIpv6Adapter][executeCommand] New result
returned");
cachedResults.add(command);
- logger.debug("[JuniperStatusAdapter] executeCommand finished");
+ logger.debug("[CiscoKeyIpv6Adapter] executeCommand finished");
return command;

}// executeCommand
@@ -214,19 +213,10 @@

}

- logger.info("[CiscoKeyIpv6Adapter] Trying to connect");
-
- //if (passphrase == null || passphrase.equals("")) {
- // manager.connect(username, keyUrl);
- //} else {
- // manager.connect(username, keyUrl,
PasswordEncryptor.decryptPassword(passphrase));
- //}
- logger.info("[CiscoKeyIpv6Adapter] Login");
-
} catch (Exception e) {

- logger.error("[CiscoKeyIpv6Adapter] Error occuring while
connecting");
- logger.error(e.getStackTrace().toString());
+ logger.error("[CiscoKeyIpv6Adapter][connect] Error occuring
while connecting");
+ logger.error(e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");

@@ -278,7 +268,7 @@
*/
private void configureCommands(String subject) throws PerfSONARException
{

- logger.debug("[CiscoKeyIpv6Adapter] Configuring available operations
...");
+ logger.info("[CiscoKeyIpv6Adapter] Configuring available operations
...");

Iterator commands = null;
String token = null;
@@ -301,13 +291,13 @@
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[CISCOKEYIPv6ADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[CiscoKeyIpv6Adapter][ConfigureCommands] MinParamCount not
found: " + e1.getStackTrace()[0].toString());
}
try {
int maxParamCount =
Integer.parseInt(properties.getProperty(subject, token, "maxParamCount"));
command.setMaxParamCount(maxParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[CISCOKEYIPv6ADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[CiscoKeyIpv6Adapter][ConfigureCommands] MaxParamCount not
found: " + e1.getStackTrace()[0].toString());
}

command.setDeviceName(subject);
@@ -319,13 +309,13 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOKEYIPv6ADAPTER][ConfigureCommands]" +
e.getStackTrace().toString());
+ logger.error("[CiscoKeyIpv6Adapter][ConfigureCommands] Unable to
retrieve commands: " + e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve commands");

}

- logger.debug("[CiscoKeyIpv6Adapter] Available operations
configured");
+ logger.info("[CiscoKeyIpv6Adapter] Available operations configured");

}

@@ -393,14 +383,14 @@
EndPoint endpoint = (EndPoint) s.getChildArray()[0];
String subject = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subject);
+ logger.debug("[CiscoKeyIpv6Adapter][takeAction] SubjectString: " +
subject);

EventType eventType = metadata[0].getEventType();
String eventTypeString = eventType.getEventType();
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));


- logger.debug("EVENTTYPESTRING: " + eventTypeString);
+ logger.debug("[CiscoKeyIpv6Adapter][takeAction] EventTypeString: " +
eventTypeString);

//CiscoKeyIpv6Adapter adapter = new CiscoKeyIpv6Adapter();

@@ -420,20 +410,21 @@

} catch (NumberFormatException e1) {

- logger.error("[CISCOKEYIPv6ADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[CiscoKeyIpv6Adapter][TakeAction] One of the
numbers in the metadata " +
+ "configuration file is not parsable: " +
e1.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.mp.sshtelnet.configuration",
- "Invalid port number in configuration");
+ "Invalid port number or cache or timeout value in
configuration");

} catch (PerfSONARException e1) {

- logger.error("[CISCOKEYIPv6ADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[CiscoKeyIpv6Adapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve connection details");

}

- logger.debug("[CiscoKeyIpv6Adapter] TelnetManager created: " + url +
" " + port);
+ logger.debug("[CiscoKeyIpv6Adapter] SshKeyManager created: " + url +
" " + port);

// This private method call will include all supported methods
// that can be performed on the remote device
@@ -451,7 +442,7 @@

Parameter param = parametersArray[i];
String parameter = param.getParameterValue();
- logger.debug("PARAMETERVALUE: " + parameter);
+ logger.debug("[CiscoKeyIpv6Adapter][takeAction] Parameter
value: " + parameter);

if (new ParameterChecker().checkParam(subject,
eventTypeString,
parameter)) {
@@ -475,12 +466,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipv6Command.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipv6Command.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(ipv6Command.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[CiscoKeyIpv6Adapter][takeAction]
Cached result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching *
1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[CiscoKeyIpv6Adapter][takeAction]
Cached result removed");
it.remove();

}
@@ -511,12 +502,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipv6Command.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipv6Command.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(ipv6Command.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[CiscoKeyIpv6Adapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching * 1000)
<= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[CiscoKeyIpv6Adapter][takeAction] Cached
result removed");
it.remove();

}
@@ -538,7 +529,7 @@

}

- logger.info("[CiscoKeyIpv6Adapter] Command executed succesfully");
+ logger.info("[CiscoKeyIpv6Adapter][takeAction] Command executed
succesfully");

Datum datum = new Datum();
if (valid) {
@@ -549,7 +540,7 @@

datum.setDatum(filterResult(temp, ipv6Command));

- logger.info("[CiscoKeyIpv6Adapter] Constructing response message");
+ logger.info("[CiscoKeyIpv6Adapter][takeAction] Constructing response
message");

Message response = new Message();


Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/CiscoSshIpv6Adapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/CiscoSshIpv6Adapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/CiscoSshIpv6Adapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -84,16 +84,14 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOSSHIPv6ADAPTER][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[CiscoSshIpv6Adapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshYE.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");

}

- logger.debug("[CiscoSshIpv6Adapter] Constructor started");
+ logger.info("[CiscoSshIpv6Adapter] Constructor finished");

- logger.debug("[CiscoSshIpv6Adapter] Constructor finished");
-
}// CiscoSshIpv6Adapter

// ---------------------- public methods
@@ -102,7 +100,7 @@
*/
public List getAvailableSpecificCommands() {

- logger.debug("[CiscoSshIpv6Adapter] getAvailableSpecificCommands
called");
+ logger.info("[CiscoSshIpv6Adapter] getAvailableSpecificCommands
called");

return availableSpecificCommands;

@@ -112,7 +110,7 @@
*/
public void setAvailableSpecificCommands(List availableSpecificCommands)
{

- logger.debug("[CiscoSshIpv6Adapter] setAvailableSpecificCommand
called");
+ logger.info("[CiscoSshIpv6Adapter] setAvailableSpecificCommand
called");

this.availableSpecificCommands = availableSpecificCommands;

@@ -122,7 +120,7 @@
*/
public void addAvailableSpecificCommand(Ipv6CommandInterface command) {

- logger.debug("[CiscoSshIpv6Adapter] addAvailableSpecificCommand
called");
+ logger.info("[CiscoSshIpv6Adapter] addAvailableSpecificCommand
called");

availableSpecificCommands.add(command);

@@ -133,7 +131,7 @@
public Ipv6CommandInterface getCommand(String description)
throws PerfSONARException {

- logger.debug("[CiscoSshIpv6Adapter] getCommand called");
+ logger.info("[CiscoSshIpv6Adapter] getCommand called");

Ipv6CommandInterface command = null;
Iterator it = availableSpecificCommands.iterator();
@@ -144,7 +142,7 @@

if (command.getDescription().equalsIgnoreCase(description)) {

- logger.debug("[CiscoSshIpv6Adapter] Command found");
+ logger.debug("[CiscoSshIpv6Adapter] Command found: " +
command);
return command;

}
@@ -161,7 +159,7 @@
*/
public Ipv6CommandInterface executeCommand(Ipv6CommandInterface command)
{

- logger.debug("[CiscoSshIpv6Adapter] executeCommand called");
+ logger.info("[CiscoSshIpv6Adapter] executeCommand called");

if (manager != null) {

@@ -174,7 +172,7 @@

}// if

- logger.info("NEW RESULT RETURNED");
+ logger.info("[CiscoSshIpv6Adapter][executeCommand] New result
returned");
cachedResults.add(command);
logger.debug("[CiscoSshIpv6Adapter] executeCommand finished");
return command;
@@ -209,16 +207,10 @@

}

- logger.info("[CiscoSshIpv6Adapter] Trying to connect");
-
- //manager.connect(username, "Username:",
PasswordEncryptor.decryptPassword(password), "Password:");
-
- logger.info("[CiscoSshIpv6Adapter Login");
-
} catch (Exception e) {

- logger.error("[CiscoSshIpv6Adapter] Error occuring while
connecting");
- logger.error(e.getStackTrace().toString());
+ logger.error("[CiscoSshIpv6Adapter][connect] Error occuring
while connecting");
+ logger.error(e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");

@@ -290,17 +282,16 @@
command.setSuffix("received-routes");

try {
- logger.debug("service.mp." + subject + ".commands."
+ token + ".minParamCount");
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[CISCOSSHIPv6ADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[CiscoSshIpv6Adapter][ConfigureCommands] MinParamCount not
found: " + e1.getStackTrace()[0].toString());
}
try {
int maxParamCount =
Integer.parseInt(properties.getProperty(subject, token, "maxParamCount"));
command.setMaxParamCount(maxParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[CISCOSSHIPv6ADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[CiscoSshIpv6Adapter][ConfigureCommands] MaxParamCount not
found: " + e1.getStackTrace()[0].toString());
}

command.setDeviceName(subject);
@@ -312,13 +303,13 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOSSHIPv6ADAPTER][ConfigureCommands]" +
e.getStackTrace().toString());
+ logger.error("[CiscoSshIpv6Adapter][ConfigureCommands]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve commands");

}

- logger.debug("[CiscoSshIpv6Adapter] Available operations
configured");
+ logger.info("[CiscoSshIpv6Adapter] Available operations configured");

}

@@ -388,14 +379,14 @@
EndPoint endpoint = (EndPoint) s.getChildArray()[0];
String subject = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subject);
+ logger.debug("[CiscoSshIpv6Adapter][takeAction] SubjectString: " +
subject);

EventType eventType = metadata[0].getEventType();
String eventTypeString = eventType.getEventType();
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));


- logger.debug("EVENTTYPESTRING: " + eventTypeString);
+ logger.debug("[CiscoSshIpv6Adapter][takeAction] EventTypeString: " +
eventTypeString);

//CiscoSshIpv6Adapter adapter = new CiscoSshIpv6Adapter();

@@ -417,20 +408,20 @@

} catch (NumberFormatException e1) {

- logger.error("[CISCOSSHIPv6ADAPTER][TakeAction]" +
e1.getStackTrace()[0].toString());
+ logger.error("[CiscoSshIpv6Adapter][TakeAction] One of the
numbers in the metadata " +
+ "configuration file is not parsable: " +
e1.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.mp.sshtelnet.configuration",
- "Invalid port number in configuration");
-
+ "Invalid port number or cache or timeout value in
configuration");
} catch (PerfSONARException e1) {

- logger.error("[CISCOSSHIPv6ADAPTER][TakeAction]" +
e1.getStackTrace()[0].toString());
+ logger.error("[CiscoSshIpv6Adapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve connection details");

}

- logger.debug("[CiscoSshIpv6Adapter] SshManager created: " + url + "
" + port);
+ logger.debug("[CiscoSshIpv6Adapter][takeAction] SshManager created:
" + url + " " + port);

//This private method call will include all supported methods
//that can be performed on the remote device
@@ -450,7 +441,7 @@

Parameter param = parametersArray[i];
String parameter = param.getParameterValue();
- logger.debug("PARAMETERVALUE: " + parameter);
+ logger.debug("[CiscoSshIpv6Adapter][takeAction] Parameter
value: " + parameter);

if (new ParameterChecker().checkParam(subject,
eventTypeString,
parameter)) {
@@ -474,12 +465,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipv6Command.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipv6Command.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(ipv6Command.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[CiscoSshIpv6Adapter][takeAction]
Cached result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching *
1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[CiscoSshIpv6Adapter][takeAction]
Cached result removed");
it.remove();

}
@@ -510,12 +501,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipv6Command.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipv6Command.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(ipv6Command.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[CiscoSshIpv6Adapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching * 1000)
<= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[CiscoSshIpv6Adapter][takeAction] Cached
result removed");
it.remove();

}
@@ -537,7 +528,7 @@

}

- logger.info("[CiscoSshIpv6Adapter] Command executed succesfully");
+ logger.info("[CiscoSshIpv6Adapter][takeAction] Command executed
succesfully");

Datum datum = new Datum();
if (valid) {
@@ -546,7 +537,7 @@
datum.setDatum(temp);
}

- logger.info("[CiscoSshIpv6Adapter] Constructing response message");
+ logger.info("[CiscoSshIpv6Adapter][takeAction] Constructing response
message");

Message response = new Message();


Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/JuniperIpv6Adapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/JuniperIpv6Adapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/JuniperIpv6Adapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -85,13 +85,13 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERIPv6ADAPTER][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[JuniperIpv6Adapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");

}

- logger.debug("[JuniperIpv6Adapter] Constructor finished");
+ logger.info("[JuniperIpv6Adapter] Constructor finished");

}// JuniperIpv6Adapter

@@ -101,7 +101,7 @@
*/
public List getAvailableSpecificCommands() {

- logger.debug("[JuniperIpv6Adapter getAvailableSpecificCommands
called");
+ logger.info("[JuniperIpv6Adapter] getAvailableSpecificCommands
called");

return availableSpecificCommands;

@@ -111,7 +111,7 @@
*/
public void setAvailableSpecificCommands(List availableSpecificCommands)
{

- logger.debug("[JuniperIpv6Adapter setAvailableSpecificCommand
called");
+ logger.info("[JuniperIpv6Adapter] setAvailableSpecificCommand
called");

this.availableSpecificCommands = availableSpecificCommands;

@@ -121,7 +121,7 @@
*/
public void addAvailableSpecificCommand(Ipv6CommandInterface command) {

- logger.debug("[JuniperIpv6Adapter addAvailableSpecificCommand
called");
+ logger.info("[JuniperIpv6Adapter] addAvailableSpecificCommand
called");

availableSpecificCommands.add(command);

@@ -132,7 +132,7 @@
public Ipv6CommandInterface getCommand(String description)
throws PerfSONARException {

- logger.debug("[JuniperIpv6Adapter getCommand called");
+ logger.info("[JuniperIpv6Adapter] getCommand called");

Ipv6CommandInterface command = null;
Iterator it = availableSpecificCommands.iterator();
@@ -143,14 +143,14 @@

if (command.getDescription().equalsIgnoreCase(description)) {

- logger.debug("[JuniperIpv6Adapter Command found");
+ logger.debug("[JuniperIpv6Adapter] Command found: " +
command);
return command;

}

}// while

- logger.error("[JuniperIpv6Adapter Command NOT found");
+ logger.error("[JuniperIpv6Adapter] Command NOT found");
throw new PerfSONARException("error.mp.sshtelnet.nosuchcommand",
"Requested command not found");

@@ -160,7 +160,7 @@
*/
public Ipv6CommandInterface executeCommand(Ipv6CommandInterface command)
{

- logger.debug("[JuniperIpv6Adapter executeCommand called");
+ logger.info("[JuniperIpv6Adapter] executeCommand called");

if (manager != null) {

@@ -176,9 +176,9 @@

}// if

- logger.info("NEW RESULT RETURNED");
+ logger.info("[JuniperIpv6Adapter][executeCommand] New result
returned");
cachedResults.add(command);
- logger.debug("[JuniperIpv6Adapter executeCommand finished");
+ logger.debug("[JuniperIpv6Adapter] executeCommand finished");
return command;

}// executeCommand
@@ -190,7 +190,7 @@
*/
public void connect(String subject) throws PerfSONARException {

- logger.debug("[JuniperIpv6Adapter Connect called");
+ logger.info("[JuniperIpv6Adapter] Connect called");

try {

@@ -209,16 +209,16 @@

}

- logger.debug("[JuniperIpv6Adapter Trying to connect");
+ logger.info("[JuniperIpv6Adapter][connect] Trying to connect");

manager.connect(username, "login:",
PasswordEncryptor.decryptPassword(password), "Password:");

- logger.debug("[JuniperIpv6Adapter Login");
+ logger.info("[JuniperIpv6Adapter][connect] Login");

} catch (Exception e) {

- logger.error("[JuniperIpv6Adapter Error occuring while
connecting");
- logger.error(e.getStackTrace().toString());
+ logger.error("[JuniperIpv6Adapter][connect] Error occuring while
connecting");
+ logger.error(e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");

@@ -270,7 +270,7 @@
*/
private void configureCommands(String subject) throws PerfSONARException
{

- logger.debug("[JuniperIpv6Adapter Configuring available operations
...");
+ logger.info("[JuniperIpv6Adapter] Configuring available operations
...");

Iterator commands = null;
String token = null;
@@ -287,17 +287,16 @@
if (token.equals("IPv6_INTERFACE"))
command.setSuffix("extensive");
try {
- logger.debug("service.mp." + subject + ".commands."
+ token + ".minParamCount");
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[JUNIPERIPv6ADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[JuniperIpv6Adapter][ConfigureCommands] MinParamCount not
found: " + e1.getStackTrace()[0].toString());
}
try {
int maxParamCount =
Integer.parseInt(properties.getProperty(subject, token, "maxParamCount"));
command.setMaxParamCount(maxParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[JUNIPERIPv6ADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[JuniperIpv6Adapter][ConfigureCommands] MaxParamCount not
found: " + e1.getStackTrace()[0].toString());
}

command.setDeviceName(subject);
@@ -309,7 +308,7 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERIPv6ADAPTER][ConfigureCommands]" +
e.getStackTrace().toString());
+ logger.error("[JuniperIpv6Adapter][ConfigureCommands]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve commands");

@@ -320,7 +319,7 @@
// this.addAvailableSpecificCommand(new
// Ipv6Command(ActionType.MP_IPv6_ROUTE, "show ipv6 route"));

- logger.debug("[JuniperIpv6Adapter Available operations configured");
+ logger.info("[JuniperIpv6Adapter] Available operations configured");

}

@@ -388,7 +387,7 @@
public Message takeAction(String actionType, Message request)
throws PerfSONARException {

- logger.info("[JuniperIpv6Adapter Webservice takeAction call
received");
+ logger.info("[JuniperIpv6Adapter] Webservice takeAction call
received");

Metadata[] metadata = request.getMetadataArray();
Subject s = metadata[0].getSubject();
@@ -396,14 +395,14 @@
EndPoint endpoint = (EndPoint) s.getChildArray()[0];
String subject = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subject);
+ logger.debug("[JuniperIpv6Adapter][takeAction] SubjectString: " +
subject);

EventType eventType = metadata[0].getEventType();
String eventTypeString = eventType.getEventType();
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));


- logger.debug("EVENTTYPESTRING: " + eventTypeString);
+ logger.debug("[JuniperIpv6Adapter][takeAction] EventTypeString: " +
eventTypeString);

JuniperIpv6Adapter adapter = new JuniperIpv6Adapter();

@@ -421,20 +420,21 @@

} catch (NumberFormatException e1) {

- logger.error("[JUNIPERIPv6ADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperIpv6Adapter][TakeAction] One of the
numbers in the metadata " +
+ "configuration file is not parsable: " +
e1.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.mp.sshtelnet.configuration",
- "Invalid port number in configuration");
+ "Invalid port number or cache or timeout value in
configuration");

} catch (PerfSONARException e1) {

- logger.error("[JUNIPERIPv6ADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperIpv6Adapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve connection details");

}

- logger.debug("[JuniperIpv6Adapter] TelnetManager created: " + url +
" " + port);
+ logger.debug("[JuniperIpv6Adapter][takeAction] TelnetManager
created: " + url + " " + port);

try {

@@ -442,13 +442,13 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERIPv6ADAPTER][TakeAction]" +
e.getStackTrace().toString());
+ logger.error("[JuniperIpv6Adapter][TakeAction]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve prompt");

}

- logger.debug("[JuniperIpv6Adapter] Prompt set in TelnetManager: " +
prompt);
+ logger.debug("[JuniperIpv6Adapter][takeAction] Prompt set in
TelnetManager: " + prompt);

// This private method call will include all supported methods
// that can be performed on the remote device
@@ -466,7 +466,7 @@

Parameter param = parametersArray[i];
String parameter = param.getParameterValue();
- logger.debug("PARAMETERVALUE: " + parameter);
+ logger.debug("[JuniperIpv6Adapter][takeAction] Parameter
value: " + parameter);

if (new ParameterChecker().checkParam(subject,
eventTypeString,
parameter)) {
@@ -490,12 +490,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipv6Command.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipv6Command.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(ipv6Command.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperIpv6Adapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching *
1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperIpv6Adapter][takeAction] Cached
result removed");
it.remove();

}
@@ -526,12 +526,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipv6Command.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipv6Command.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(ipv6Command.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperIpv6Adapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching * 1000)
<= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperIpv6Adapter][takeAction] Cached
result removed");
it.remove();

}
@@ -553,7 +553,7 @@

}

- logger.info("[JuniperIpv6Adapter Command executed succesfully");
+ logger.info("[JuniperIpv6Adapter][takeAction] Command executed
succesfully");

Datum datum = new Datum();
if (valid) {
@@ -562,7 +562,7 @@
datum.setDatum(temp);
}

- logger.info("[JuniperIpv6Adapter Constructing response message");
+ logger.info("[JuniperIpv6Adapter][takeAction] Constructing response
message");

Message response = new Message();

@@ -575,12 +575,10 @@
response.setMetadata(respMetaData[0]);
response.setData(respData[0]);

- logger.debug(respMetaData + "");
- logger.debug(respData + "");

// response.setSonarMetadata(request.getSonarMetadata());
// response.setSonarData(new Data[] { data });
- logger.info("[JuniperIpv6Adapter takeAction finished");
+ logger.info("[JuniperIpv6Adapter] takeAction finished");

return response;
// return new ServiceEngineResponse();

Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/JuniperKeyIpv6Adapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/JuniperKeyIpv6Adapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/JuniperKeyIpv6Adapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -88,13 +88,13 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERKEYIPv6ADAPTER][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[JuniperKeyIpv6Adapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");

}

- logger.debug("[JuniperKeyIpv6Adapter] Constructor finished");
+ logger.info("[JuniperKeyIpv6Adapter] Constructor finished");

}// JuniperKeyIpv6Adapter

@@ -104,7 +104,7 @@
*/
public List getAvailableSpecificCommands() {

- logger.debug("[JuniperKeyIpv6Adapter] getAvailableSpecificCommands
called");
+ logger.info("[JuniperKeyIpv6Adapter] getAvailableSpecificCommands
called");

return availableSpecificCommands;

@@ -114,7 +114,7 @@
*/
public void setAvailableSpecificCommands(List availableSpecificCommands)
{

- logger.debug("[JuniperKeyIpv6Adapter] setAvailableSpecificCommand
called");
+ logger.info("[JuniperKeyIpv6Adapter] setAvailableSpecificCommand
called");

this.availableSpecificCommands = availableSpecificCommands;

@@ -124,7 +124,7 @@
*/
public void addAvailableSpecificCommand(Ipv6CommandInterface command) {

- logger.debug("[JuniperKeyIpv6Adapter] addAvailableSpecificCommand
called");
+ logger.info("[JuniperKeyIpv6Adapter] addAvailableSpecificCommand
called");

availableSpecificCommands.add(command);

@@ -135,7 +135,7 @@
public Ipv6CommandInterface getCommand(String description)
throws PerfSONARException {

- logger.debug("[JuniperKeyIpv6Adapter] getCommand called");
+ logger.info("[JuniperKeyIpv6Adapter] getCommand called");

Ipv6CommandInterface command = null;
Iterator it = availableSpecificCommands.iterator();
@@ -146,7 +146,7 @@

if (command.getDescription().equalsIgnoreCase(description)) {

- logger.debug("[JuniperKeyIpv6Adapter] Command found");
+ logger.debug("[JuniperKeyIpv6Adapter] Command found: " +
command);
return command;

}
@@ -163,11 +163,10 @@
*/
public Ipv6CommandInterface executeCommand(Ipv6CommandInterface command)
{

- logger.debug("[JuniperKeyIpv6Adapter] executeCommand called");
+ logger.info("[JuniperKeyIpv6Adapter] executeCommand called");

if (manager != null) {

- logger.debug("Executing command");
String temp2 = "";
if (command.getSuffix() != null &&
!command.getSuffix().equals(""))
temp2 = manager.executeCommand(command.getCommand() +
" " + command.getParameterString() + " " + command.getSuffix());
@@ -178,9 +177,9 @@

}// if

- logger.info("NEW RESULT RETURNED");
+ logger.info("[JuniperKeyIpv6Adapter][executeCommand] New result
returned");
cachedResults.add(command);
- logger.debug("[JuniperStatusAdapter] executeCommand finished");
+ logger.debug("[JuniperKeyIpv6Adapter] executeCommand finished");
return command;

}// executeCommand
@@ -212,19 +211,10 @@
else manager = new SshKeyManager(url, username, keyUrl,
PasswordEncryptor.decryptPassword(passphrase), false, timeout);
}

- logger.info("[JuniperKeyIpv6Adapter] Trying to connect");
-
- //if (passphrase == null || passphrase.equals("")) {
- // manager.connect(username, keyUrl);
- //} else {
- // manager.connect(username, keyUrl,
PasswordEncryptor.decryptPassword(passphrase));
- //}
- logger.info("[JuniperKeyIpv6Adapter] Login");
-
} catch (Exception e) {

- logger.error("[JuniperKeyIpv6Adapter] Error occuring while
connecting");
- logger.error(e.getStackTrace().toString());
+ logger.error("[JuniperKeyIpv6Adapter][connect] Error occuring
while connecting");
+ logger.error(e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");

@@ -276,7 +266,7 @@
*/
private void configureCommands(String subject) throws PerfSONARException
{

- logger.debug("[JuniperKeyIpv6Adapter] Configuring available
operations ...");
+ logger.info("[JuniperKeyIpv6Adapter] Configuring available
operations ...");

Iterator commands = null;
String token = null;
@@ -296,13 +286,13 @@
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[JUNIPERKEYIPv6ADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[JuniperKeyIpv6Adapter][ConfigureCommands] MinParamCount not
found: " + e1.getStackTrace()[0].toString());
}
try {
int maxParamCount =
Integer.parseInt(properties.getProperty(subject, token, "maxParamCount"));
command.setMaxParamCount(maxParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[JUNIPERKEYIPv6ADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[JuniperKeyIpv6Adapter][ConfigureCommands] MaxParamCount not
found: " + e1.getStackTrace()[0].toString());
}

command.setDeviceName(subject);
@@ -314,13 +304,13 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERKEYIPv6ADAPTER][ConfigureCommands]" +
e.getStackTrace().toString());
+ logger.error("[JuniperKeyIpv6Adapter][ConfigureCommands]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve commands");

}

- logger.debug("[JuniperKeyIpv6Adapter] Available operations
configured");
+ logger.info("[JuniperKeyIpv6Adapter] Available operations
configured");

}

@@ -402,14 +392,14 @@
EndPoint endpoint = (EndPoint) s.getChildArray()[0];
String subject = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subject);
+ logger.debug("[JuniperKeyIpv6Adapter][takeAction] SubjectString: " +
subject);

EventType eventType = metadata[0].getEventType();
String eventTypeString = eventType.getEventType();
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));


- logger.debug("EVENTTYPESTRING: " + eventTypeString);
+ logger.debug("[JuniperKeyIpv6Adapter][takeAction] EventTypeString: "
+ eventTypeString);

//JuniperKeyIpv6Adapter adapter = new JuniperKeyIpv6Adapter();

@@ -429,20 +419,21 @@

} catch (NumberFormatException e1) {

- logger.error("[JUNIPERKEYIPv6ADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperKeyIpv6Adapter][TakeAction] One of the
numbers in the metadata " +
+ "configuration file is not parsable: " +
e1.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.mp.sshtelnet.configuration",
- "Invalid port number in configuration");
+ "Invalid port number or cache or timeout value in
configuration");

} catch (PerfSONARException e1) {

- logger.error("[JUNIPERKEYIPv6ADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperKeyIpv6Adapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve connection details");

}

- logger.debug("[JuniperKeyIpv6Adapter] TelnetManager created: " + url
+ " " + port);
+ logger.debug("[JuniperKeyIpv6Adapter][takeAction] SshKeyManager
created: " + url + " " + port);

// This private method call will include all supported methods
// that can be performed on the remote device
@@ -460,7 +451,7 @@

Parameter param = parametersArray[i];
String parameter = param.getParameterValue();
- logger.debug("PARAMETERVALUE: " + parameter);
+ logger.debug("[JuniperKeyIpv6Adapter][takeAction] Parameter
value: " + parameter);

if (new ParameterChecker().checkParam(subject,
eventTypeString,
parameter)) {
@@ -484,12 +475,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipv6Command.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipv6Command.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(ipv6Command.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperKeyIpv6Adapter][takeAction]
Cached result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching *
1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperKeyIpv6Adapter][takeAction]
Cached result removed");
it.remove();

}
@@ -520,12 +511,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipv6Command.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipv6Command.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(ipv6Command.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperKeyIpv6Adapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching * 1000)
<= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperKeyIpv6Adapter][takeAction] Cached
result removed");
it.remove();

}
@@ -547,7 +538,7 @@

}

- logger.info("[JuniperKeyIpv6Adapter] Command executed succesfully");
+ logger.info("[JuniperKeyIpv6Adapter][takeAction] Command executed
succesfully");

Datum datum = new Datum();
if (valid) {
@@ -558,7 +549,7 @@

datum.setDatum(filterResult(temp, ipv6Command));

- logger.info("[JuniperKeyIpv6Adapter] Constructing response message");
+ logger.info("[JuniperKeyIpv6Adapter][takeAction] Constructing
response message");

Message response = new Message();


Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/JuniperSshIpv6Adapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/JuniperSshIpv6Adapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters/JuniperSshIpv6Adapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -84,16 +84,14 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERSSHIPv6ADAPTER][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[JuniperSshIpv6Adapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshYE.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");

}

- logger.debug("[JuniperSshIpv6Adapter] Constructor started");
+ logger.info("[JuniperSshIpv6Adapter] Constructor finished");

- logger.debug("[JuniperSshIpv6Adapter] Constructor finished");
-
}// JuniperSshIpv6Adapter

// ---------------------- public methods
@@ -102,7 +100,7 @@
*/
public List getAvailableSpecificCommands() {

- logger.debug("[JuniperSshIpv6Adapter] getAvailableSpecificCommands
called");
+ logger.info("[JuniperSshIpv6Adapter] getAvailableSpecificCommands
called");

return availableSpecificCommands;

@@ -112,7 +110,7 @@
*/
public void setAvailableSpecificCommands(List availableSpecificCommands)
{

- logger.debug("[JuniperSshIpv6Adapter] setAvailableSpecificCommand
called");
+ logger.info("[JuniperSshIpv6Adapter] setAvailableSpecificCommand
called");

this.availableSpecificCommands = availableSpecificCommands;

@@ -122,7 +120,7 @@
*/
public void addAvailableSpecificCommand(Ipv6CommandInterface command) {

- logger.debug("[JuniperSshIpv6Adapter] addAvailableSpecificCommand
called");
+ logger.info("[JuniperSshIpv6Adapter] addAvailableSpecificCommand
called");

availableSpecificCommands.add(command);

@@ -133,7 +131,7 @@
public Ipv6CommandInterface getCommand(String description)
throws PerfSONARException {

- logger.debug("[JuniperSshIpv6Adapter] getCommand called");
+ logger.info("[JuniperSshIpv6Adapter] getCommand called");

Ipv6CommandInterface command = null;
Iterator it = availableSpecificCommands.iterator();
@@ -144,7 +142,7 @@

if (command.getDescription().equalsIgnoreCase(description)) {

- logger.debug("[JuniperSshIpv6Adapter] Command found");
+ logger.debug("[JuniperSshIpv6Adapter] Command found: " +
command);
return command;

}
@@ -161,7 +159,7 @@
*/
public Ipv6CommandInterface executeCommand(Ipv6CommandInterface command)
{

- logger.debug("[JuniperSshIpv6Adapter] executeCommand called");
+ logger.info("[JuniperSshIpv6Adapter] executeCommand called");

if (manager != null) {

@@ -175,7 +173,7 @@

}// if

- logger.info("NEW RESULT RETURNED");
+ logger.info("[JuniperSshIpv6Adapter][executeCommand] New result
returned");
cachedResults.add(command);
logger.debug("[JuniperSshIpv6Adapter] executeCommand finished");
return command;
@@ -210,16 +208,10 @@

}

- logger.info("[JuniperSshIpv6Adapter] Trying to connect");
-
- //manager.connect(username, "Username:",
PasswordEncryptor.decryptPassword(password), "Password:");
-
- logger.info("[JuniperSshIpv6Adapter Login");
-
} catch (Exception e) {

- logger.error("[JuniperSshIpv6Adapter] Error occuring while
connecting");
- logger.error(e.getStackTrace().toString());
+ logger.error("[JuniperSshIpv6Adapter][connect] Error occuring
while connecting");
+ logger.error(e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");

@@ -271,7 +263,7 @@
*/
private void configureCommands(String subject) throws PerfSONARException
{

- logger.debug("[JuniperSshIpv6Adapter] Configuring available
operations ...");
+ logger.info("[JuniperSshIpv6Adapter] Configuring available
operations ...");

Iterator commands = null;
String token = null;
@@ -292,13 +284,13 @@
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[JUNIPERSSHIPv6ADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[JuniperSshIpv6Adapter][ConfigureCommands] MinParamCount not
found: " + e1.getStackTrace()[0].toString());
}
try {
int maxParamCount =
Integer.parseInt(properties.getProperty(subject, token, "maxParamCount"));
command.setMaxParamCount(maxParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[JUNIPERSSHIPv6ADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[JuniperSshIpv6Adapter][ConfigureCommands] MaxParamCount not
found: " + e1.getStackTrace()[0].toString());
}

command.setDeviceName(subject);
@@ -310,13 +302,13 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERSSHIPv6ADAPTER][ConfigureCommands]" +
e.getStackTrace().toString());
+ logger.error("[JuniperSshIpv6Adapter][ConfigureCommands]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve commands");

}

- logger.debug("[JuniperSshIpv6Adapter] Available operations
configured");
+ logger.info("[JuniperSshIpv6Adapter] Available operations
configured");

}

@@ -398,14 +390,14 @@
EndPoint endpoint = (EndPoint) s.getChildArray()[0];
String subject = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subject);
+ logger.debug("[JuniperSshIpv6Adapter][takeAction] SubjectString: " +
subject);

EventType eventType = metadata[0].getEventType();
String eventTypeString = eventType.getEventType();
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));


- logger.debug("EVENTTYPESTRING: " + eventTypeString);
+ logger.debug("[JuniperSshIpv6Adapter][takeAction] EventTypeString: "
+ eventTypeString);

//JuniperSshIpv6Adapter adapter = new JuniperSshIpv6Adapter();

@@ -427,20 +419,21 @@

} catch (NumberFormatException e1) {

- logger.error("[JUNIPERSSHIPv6ADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperSshIpv6Adapter][TakeAction] One of the
numbers in the metadata " +
+ "configuration file is not parsable: " +
e1.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.mp.sshtelnet.configuration",
- "Invalid port number in configuration");
+ "Invalid port number or cache or timeout value in
configuration");

} catch (PerfSONARException e1) {

- logger.error("[JUNIPERSSHIPv6ADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperSshIpv6Adapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve connection details");

}

- logger.debug("[CiscoStatusAdapter] SshManager created: " + url + " "
+ port);
+ logger.debug("[CiscoStatusAdapter][takeAction] SshManager created: "
+ url + " " + port);

//This private method call will include all supported methods
//that can be performed on the remote device
@@ -460,7 +453,7 @@

Parameter param = parametersArray[i];
String parameter = param.getParameterValue();
- logger.debug("PARAMETERVALUE: " + parameter);
+ logger.debug("[JuniperSshIpv6Adapter][takeAction] Parameter
value: " + parameter);

if (new ParameterChecker().checkParam(subject,
eventTypeString,
parameter)) {
@@ -484,12 +477,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipv6Command.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipv6Command.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(ipv6Command.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperSshIpv6Adapter][takeAction]
Cached result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching *
1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperSshIpv6Adapter][takeAction]
Cached result removed");
it.remove();

}
@@ -520,12 +513,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(ipv6Command.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(ipv6Command.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(ipv6Command.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperSshIpv6Adapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching * 1000)
<= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperSshIpv6Adapter][takeAction] Cached
result removed");
it.remove();

}
@@ -547,7 +540,7 @@

}

- logger.info("[JuniperSshIpv6Adapter] Command executed succesfully");
+ logger.info("[JuniperSshIpv6Adapter][takeAction] Command executed
succesfully");

Datum datum = new Datum();
if (valid) {
@@ -556,7 +549,7 @@
datum.setDatum(temp);
}

- logger.info("[JuniperSshIpv6Adapter] Constructing response message");
+ logger.info("[JuniperSshIpv6Adapter][takeAction] Constructing
response message");

Message response = new Message();


Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/metadata/DbMetadataConfiguration.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/metadata/DbMetadataConfiguration.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/metadata/DbMetadataConfiguration.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -43,7 +43,7 @@

} catch (PerfSONARException e) {

- logger.error("[DBMETADATACONFIGURATION][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[DbMetadataConfiguration][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.common.no_logger",
"MetadataConfigurationStorageManager.constructor: " +
"Cannot get logger component");
@@ -56,7 +56,7 @@

} catch (PerfSONARException e) {

- logger.error("[DBMETADATACONFIGURATION][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[DbMetadataConfiguration][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.common.no_configuration",
"MetadataConfigurationStorageManager.constructor: " +
"Cannot get config component");
@@ -103,7 +103,7 @@
try {
object = this.existDbXmlStorageManager.fetch(query);
} catch (Exception ex) {
- logger.error("[DBMETADATACONFIGURATION][GetProperty]
MetadataConfigurationStorageManager.fetch: " + "Connection to xml database
failed: " + ex.toString());
+ logger.error("[DbMetadataConfiguration][GetProperty]
MetadataConfigurationStorageManager.fetch: " + "Connection to xml database
failed: " + ex.toString());
//ex.printStackTrace();
throw new PerfSONARException(
"error.common.storage.xmldb",
@@ -156,7 +156,7 @@
try {
object = this.existDbXmlStorageManager.fetch(query);
} catch (Exception ex) {
-
logger.error("[DBMETADATACONFIGURATION][GetProperty]MetadataConfigurationStorageManager.fetch:
" + "Connection to xml database failed: " + ex.toString());
+
logger.error("[DbMetadataConfiguration][GetProperty]MetadataConfigurationStorageManager.fetch:
" + "Connection to xml database failed: " + ex.toString());
//ex.printStackTrace();
throw new PerfSONARException(
"error.common.storage.xmldb",
@@ -203,7 +203,7 @@
try {
object = this.existDbXmlStorageManager.fetch(query);
} catch (Exception ex) {
-
logger.error("[DBMETADATACONFIGURATION][GetProperties]DbMetadataConfiguration.getProperties:
" + "Connection to xml database failed: " + ex.toString());
+
logger.error("[DbMetadataConfiguration][GetProperties]DbMetadataConfiguration.getProperties:
" + "Connection to xml database failed: " + ex.toString());
ex.printStackTrace();
throw new PerfSONARException(
"error.common.storage.xmldb",
@@ -269,7 +269,7 @@
try {
object = this.existDbXmlStorageManager.fetch(query);
} catch (Exception ex) {
-
logger.error("[DBMETADATACONFIGURATION][GetProperty]DbMetadataConfiguration.getProperties:
" + "Connection to xml database failed: " + ex.toString());
+
logger.error("[DbMetadataConfiguration][GetProperty]DbMetadataConfiguration.getProperties:
" + "Connection to xml database failed: " + ex.toString());
//ex.printStackTrace();
throw new PerfSONARException(
"error.common.storage.xmldb",
@@ -315,7 +315,7 @@
xmldbAccess =

configuration.getProperty("component.mp.xmldb.db_access");
} catch (Exception ex) {
- logger.error("[DBMETADATACONFIGURATION][GetStorageManager]" +
ex.getStackTrace().toString());
+ logger.error("[DbMetadataConfiguration][GetStorageManager]" +
ex.getStackTrace()[0].toString());
throw new PerfSONARException(
"warning.mp.metadata_configuration",
"DbMetadataConfiguration.getStorageManager: " +
"Something went wrong while reading the properties file");

Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/CiscoKeyStatusAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/CiscoKeyStatusAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/CiscoKeyStatusAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -88,13 +88,13 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOKEYSTATUSADAPTER][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[CiscoKeyStatusAdapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");

}

- logger.debug("[CiscoKeyStatusAdapter] Constructor finished");
+ logger.info("[CiscoKeyStatusAdapter] Constructor finished");

}// CiscoKeyStatusAdapter

@@ -104,7 +104,7 @@
*/
public List getAvailableSpecificCommands() {

- logger.debug("[CiscoKeyStatusAdapter] getAvailableSpecificCommands
called");
+ logger.info("[CiscoKeyStatusAdapter] getAvailableSpecificCommands
called");

return availableSpecificCommands;

@@ -114,7 +114,7 @@
*/
public void setAvailableSpecificCommands(List availableSpecificCommands)
{

- logger.debug("[CiscoKeyStatusAdapter] setAvailableSpecificCommand
called");
+ logger.info("[CiscoKeyStatusAdapter] setAvailableSpecificCommand
called");

this.availableSpecificCommands = availableSpecificCommands;

@@ -124,7 +124,7 @@
*/
public void addAvailableSpecificCommand(StatusCommandInterface command) {

- logger.debug("[CiscoKeyStatusAdapter] addAvailableSpecificCommand
called");
+ logger.info("[CiscoKeyStatusAdapter] addAvailableSpecificCommand
called");

availableSpecificCommands.add(command);

@@ -135,7 +135,7 @@
public StatusCommandInterface getCommand(String description)
throws PerfSONARException {

- logger.debug("[CiscoKeyStatusAdapter] getCommand called");
+ logger.info("[CiscoKeyStatusAdapter] getCommand called");

StatusCommandInterface command = null;
Iterator it = availableSpecificCommands.iterator();
@@ -146,7 +146,7 @@

if (command.getDescription().equalsIgnoreCase(description)) {

- logger.debug("[CiscoKeyStatusAdapter] Command found");
+ logger.debug("[CiscoKeyStatusAdapter] Command found: "+
command);
return command;

}
@@ -163,11 +163,10 @@
*/
public StatusCommandInterface executeCommand(StatusCommandInterface
command) {

- logger.debug("[CiscoKeyStatusAdapter] executeCommand called");
+ logger.info("[CiscoKeyStatusAdapter] executeCommand called");

if (manager != null) {

- logger.debug("Executing command");
String temp2 = manager.executeCommand(command.getCommand() + " "
+ command.getParameterString());

manager.disconnect();
@@ -177,9 +176,9 @@

}// if

- logger.info("NEW RESULT RETURNED");
+ logger.info("[CiscoKeyStatusAdapter][executeCommand] New result
returned");
cachedResults.add(command);
- logger.debug("[JuniperStatusAdapter] executeCommand finished");
+ logger.debug("[CiscoKeyStatusAdapter] executeCommand finished");
return command;

}// executeCommand
@@ -211,19 +210,10 @@
else manager = new SshKeyManager(url, username, keyUrl,
PasswordEncryptor.decryptPassword(passphrase), false, timeout);
}

- logger.info("[CiscoKeyStatusAdapter] Trying to connect");
-
- //if (passphrase == null || passphrase.equals("")) {
- // manager.connect(username, keyUrl);
- //} else {
- // manager.connect(username, keyUrl,
PasswordEncryptor.decryptPassword(passphrase));
- //}
- logger.info("[CiscoKeyStatusAdapter] Login");
-
} catch (Exception e) {

logger.error("[CiscoKeyStatusAdapter] Error occuring while
connecting");
- logger.error(e.getStackTrace().toString());
+ logger.error(e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");

@@ -275,7 +265,7 @@
*/
private void configureCommands(String subject) throws PerfSONARException
{

- logger.debug("[CiscoKeyStatusAdapter] Configuring available
operations ...");
+ logger.info("[CiscoKeyStatusAdapter] Configuring available
operations ...");

Iterator commands = null;
String token = null;
@@ -293,13 +283,13 @@
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[CISCOKEYSTATUSADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[CiscoKeyStatusAdapter][ConfigureCommands] MinParamCount not
found: " + e1.getStackTrace()[0].toString());
}
try {
int maxParamCount =
Integer.parseInt(properties.getProperty(subject, token, "maxParamCount"));
command.setMaxParamCount(maxParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[CISCOKEYSTATUSADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[CiscoKeyStatusAdapter][ConfigureCommands] MaxParamCount not
found: " + e1.getStackTrace()[0].toString());
}

command.setDeviceName(subject);
@@ -311,13 +301,13 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOKEYSTATUSADAPTER][ConfigureCommands]" +
e.getStackTrace().toString());
+ logger.error("[CiscoKeyStatusAdapter][ConfigureCommands]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve commands");

}

- logger.debug("[CiscoKeyStatusAdapter] Available operations
configured");
+ logger.info("[CiscoKeyStatusAdapter] Available operations
configured");

}

@@ -386,14 +376,14 @@
EndPoint endpoint = (EndPoint) s.getChildArray()[0];
String subject = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subject);
+ logger.debug("[CiscoKeyStatusAdapter][takeAction] SubjectString: " +
subject);

EventType eventType = metadata[0].getEventType();
String eventTypeString = eventType.getEventType();
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));


- logger.debug("EVENTTYPESTRING: " + eventTypeString);
+ logger.debug("[CiscoKeyStatusAdapter][takeAction] EventTypeString: "
+ eventTypeString);

//CiscoKeyStatusAdapter adapter = new CiscoKeyStatusAdapter();

@@ -413,20 +403,21 @@

} catch (NumberFormatException e1) {

- logger.error("[CISCOKEYSTATUSADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[CiscoKeyStatusAdapter][TakeAction] One of the
numbers in the metadata " +
+ "configuration file is not parsable: " +
e1.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.mp.sshtelnet.configuration",
- "Invalid port number in configuration");
+ "Invalid port number or cache or timeout value in
configuration");

} catch (PerfSONARException e1) {

- logger.error("[CISCOKEYSTATUSADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[CiscoKeyStatusAdapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve connection details");

}

- logger.debug("[CiscoKeyStatusAdapter] TelnetManager created: " + url
+ " " + port);
+ logger.debug("[CiscoKeyStatusAdapter] SshKeyManager created: " + url
+ " " + port);

// This private method call will include all supported methods
// that can be performed on the remote device
@@ -444,7 +435,7 @@

Parameter param = parametersArray[i];
String parameter = param.getParameterValue();
- logger.debug("PARAMETERVALUE: " + parameter);
+ logger.debug("[CiscoKeyStatusAdapter][takeAction] Parameter
value: " + parameter);

if (new ParameterChecker().checkParam(subject,
eventTypeString,
parameter)) {
@@ -468,12 +459,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(statusCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(statusCommand.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(statusCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[CiscoKeyStatusAdapter][takeAction]
Cached result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching *
1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[CiscoKeyStatusAdapter][takeAction]
Cached result removed");
it.remove();

}
@@ -504,12 +495,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(statusCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(statusCommand.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(statusCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[CiscoKeyStatusAdapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching * 1000)
<= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[CiscoKeyStatusAdapter][takeAction] Cached
result removed");
it.remove();

}
@@ -531,7 +522,7 @@

}

- logger.info("[CiscoKeyStatusAdapter] Command executed succesfully");
+ logger.info("[CiscoKeyStatusAdapter][takeAction] Command executed
succesfully");

Datum datum = new Datum();
if (valid) {
@@ -540,7 +531,7 @@
datum.setDatum(temp);
}

- logger.info("[CiscoKeyStatusAdapter] Constructing response message");
+ logger.info("[CiscoKeyStatusAdapter][takeAction] Constructing
response message");

Message response = new Message();


Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/CiscoSshStatusAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/CiscoSshStatusAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/CiscoSshStatusAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -93,16 +93,14 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOSSHSTATUSADAPTER][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[CiscoSshStatusAdapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshYE.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");

}

- logger.debug("[CiscoSshStatusAdapter] Constructor started");
+ logger.info("[CiscoSshStatusAdapter] Constructor finished");

- logger.debug("[CiscoSshStatusAdapter] Constructor finished");
-
}// CiscoSshStatusAdapter

// ---------------------- public methods
@@ -111,7 +109,7 @@
*/
public List getAvailableSpecificCommands() {

- logger.debug("[CiscoSshStatusAdapter] getAvailableSpecificCommands
called");
+ logger.info("[CiscoSshStatusAdapter] getAvailableSpecificCommands
called");

return availableSpecificCommands;

@@ -121,7 +119,7 @@
*/
public void setAvailableSpecificCommands(List availableSpecificCommands)
{

- logger.debug("[CiscoSshStatusAdapter] setAvailableSpecificCommand
called");
+ logger.info("[CiscoSshStatusAdapter] setAvailableSpecificCommand
called");

this.availableSpecificCommands = availableSpecificCommands;

@@ -131,7 +129,7 @@
*/
public void addAvailableSpecificCommand(StatusCommandInterface command) {

- logger.debug("[CiscoSshStatusAdapter] addAvailableSpecificCommand
called");
+ logger.info("[CiscoSshStatusAdapter] addAvailableSpecificCommand
called");

availableSpecificCommands.add(command);

@@ -142,7 +140,7 @@
public StatusCommandInterface getCommand(String description)
throws PerfSONARException {

- logger.debug("[CiscoSshStatusAdapter] getCommand called");
+ logger.info("[CiscoSshStatusAdapter] getCommand called");

StatusCommandInterface command = null;
Iterator it = availableSpecificCommands.iterator();
@@ -153,7 +151,7 @@

if (command.getDescription().equalsIgnoreCase(description)) {

- logger.debug("[CiscoSshStatusAdapter] Command found");
+ logger.debug("[CiscoSshStatusAdapter] Command found: " +
command);
return command;

}
@@ -170,7 +168,7 @@
*/
public StatusCommandInterface executeCommand(StatusCommandInterface
command) {

- logger.debug("[CiscoSshStatusAdapter] executeCommand called");
+ logger.info("[CiscoSshStatusAdapter] executeCommand called");

if (manager != null) {

@@ -180,7 +178,7 @@

}// if

- logger.info("NEW RESULT RETURNED");
+ logger.info("[CiscoSshStatusAdapter][executeCommand] New result
returned");
cachedResults.add(command);
logger.debug("[CiscoSshStatusAdapter] executeCommand finished");
return command;
@@ -216,16 +214,10 @@

}

- logger.info("[CiscoSshStatusAdapter] Trying to connect");
-
- //manager.connect(username, "Username:",
PasswordEncryptor.decryptPassword(password), "Password:");
-
- logger.info("[CiscoSshStatusAdapter Login");
-
} catch (Exception e) {

- logger.error("[CiscoSshStatusAdapter] Error occuring while
connecting");
- logger.error(e.getStackTrace().toString());
+ logger.error("[CiscoSshStatusAdapter][connect] Error occuring
while connecting");
+ logger.error(e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");

@@ -277,7 +269,7 @@
*/
private void configureCommands(String subject) throws PerfSONARException
{

- logger.debug("[CiscoSshStatusAdapter] Configuring available
operations ...");
+ logger.info("[CiscoSshStatusAdapter] Configuring available
operations ...");

Iterator commands = null;
String token = null;
@@ -292,17 +284,16 @@

StatusCommand command = new StatusCommand(token,
properties.getProperty(subject, token, "command"));
try {
- logger.debug("service.mp." + subject + ".commands."
+ token + ".minParamCount");
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[CISCOSSHSTATUSADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[CiscoSshStatusAdapter][ConfigureCommands] MinParamCount not
found: " + e1.getStackTrace()[0].toString());
}
try {
int maxParamCount =
Integer.parseInt(properties.getProperty(subject, token, "maxParamCount"));
command.setMaxParamCount(maxParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[CISCOSSHSTATUSADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[CiscoSshStatusAdapter][ConfigureCommands] MinParamCount not
found: " + e1.getStackTrace()[0].toString());
}

command.setDeviceName(subject);
@@ -314,13 +305,13 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOSSHSTATUSADAPTER][ConfigureCommands]" +
e.getStackTrace().toString());
+ logger.error("[CiscoSshStatusAdapter][ConfigureCommands]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve commands");

}

- logger.debug("[CiscoSshStatusAdapter] Available operations
configured");
+ logger.info("[CiscoSshStatusAdapter] Available operations
configured");

}

@@ -389,14 +380,14 @@
EndPoint endpoint = (EndPoint) s.getChildArray()[0];
String subject = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subject);
+ logger.debug("[CiscoSshStatusAdapter][takeAction] SubjectString: " +
subject);

EventType eventType = metadata[0].getEventType();
String eventTypeString = eventType.getEventType();
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));


- logger.debug("EVENTTYPESTRING: " + eventTypeString);
+ logger.debug("[CiscoSshStatusAdapter][takeAction] EventTypeString: "
+ eventTypeString);

//CiscoSshStatusAdapter adapter = new CiscoSshStatusAdapter();

@@ -418,20 +409,21 @@

} catch (NumberFormatException e1) {

- logger.error("[CISCOSSHSTATUSADAPTER][TakeAction]" +
e1.getStackTrace()[0].toString());
+ logger.error("[CiscoSshStatusAdapter][TakeAction] One of the
numbers in the metadata " +
+ "configuration file is not parsable: " +
e1.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.mp.sshtelnet.configuration",
- "Invalid port number in configuration");
+ "Invalid port number or cache or timeout value in
configuration");

} catch (PerfSONARException e1) {

- logger.error("[CISCOSSHSTATUSADAPTER][TakeAction]" +
e1.getStackTrace()[0].toString());
+ logger.error("[CiscoSshStatusAdapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve connection details");

}

- logger.debug("[CiscoStatusAdapter] SshManager created: " + url + " "
+ port);
+ logger.debug("[CiscoStatusAdapter][takeAction] SshManager created: "
+ url + " " + port);

//This private method call will include all supported methods
//that can be performed on the remote device
@@ -451,7 +443,7 @@

Parameter param = parametersArray[i];
String parameter = param.getParameterValue();
- logger.debug("PARAMETERVALUE: " + parameter);
+ logger.debug("[CiscoSshStatusAdapter][takeAction] Parameter
value: " + parameter);

if (new ParameterChecker().checkParam(subject,
eventTypeString,
parameter)) {
@@ -475,12 +467,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(statusCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(statusCommand.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(statusCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[CiscoSshStatusAdapter][takeAction]
Cached result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching *
1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[CiscoSshStatusAdapter][takeAction]
Cached result removed");
it.remove();

}
@@ -511,12 +503,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(statusCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(statusCommand.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(statusCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[CiscoSshStatusAdapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching * 1000)
<= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[CiscoSshStatusAdapter][takeAction] Cached
result removed");
it.remove();

}
@@ -538,7 +530,7 @@

}

- logger.info("[CiscoSshStatusAdapter] Command executed succesfully");
+ logger.info("[CiscoSshStatusAdapter][takeAction] Command executed
succesfully");

Datum datum = new Datum();
if (valid) {
@@ -547,7 +539,7 @@
datum.setDatum(temp);
}

- logger.info("[CiscoSshStatusAdapter] Constructing response message");
+ logger.info("[CiscoSshStatusAdapter][takeAction] Constructing
response message");

Message response = new Message();


Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/CiscoStatusAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/CiscoStatusAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/CiscoStatusAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -85,13 +85,13 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOSTATUSADAPTER][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[CiscoStatusAdapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");

}

- logger.debug("[CiscoStatusAdapter] Constructor finished");
+ logger.info("[CiscoStatusAdapter] Constructor finished");

}// CiscoStatusAdapter

@@ -101,7 +101,7 @@
*/
public List getAvailableSpecificCommands() {

- logger.debug("[CiscoStatusAdapter] getAvailableSpecificCommands
called");
+ logger.info("[CiscoStatusAdapter] getAvailableSpecificCommands
called");

return availableSpecificCommands;

@@ -113,7 +113,7 @@
*/
public void setAvailableSpecificCommands(List availableSpecificCommands)
{

- logger.debug("[CiscoStatusAdapter] setAvailableSpecificCommand
called");
+ logger.info("[CiscoStatusAdapter] setAvailableSpecificCommand
called");

this.availableSpecificCommands = availableSpecificCommands;

@@ -123,7 +123,7 @@
*/
public void addAvailableSpecificCommand(StatusCommandInterface command) {

- logger.debug("[CiscoStatusAdapter] addAvailableSpecificCommand
called");
+ logger.info("[CiscoStatusAdapter] addAvailableSpecificCommand
called");

availableSpecificCommands.add(command);

@@ -134,7 +134,7 @@
public StatusCommandInterface getCommand(String description)
throws PerfSONARException {

- logger.debug("[CiscoStatusAdapter] getCommand called");
+ logger.info("[CiscoStatusAdapter] getCommand called");

StatusCommandInterface command = null;
Iterator it = availableSpecificCommands.iterator();
@@ -145,7 +145,7 @@

if (command.getDescription().equalsIgnoreCase(description)) {

- logger.debug("[CiscoStatusAdapter] Command found");
+ logger.debug("[CiscoStatusAdapter] Command found: " +
command);
return command;

}
@@ -162,7 +162,7 @@
*/
public StatusCommandInterface executeCommand(StatusCommandInterface
command) {

- logger.debug("[CiscoStatusAdapter] executeCommand called");
+ logger.info("[CiscoStatusAdapter] executeCommand called");

if (manager != null) {

@@ -174,7 +174,7 @@

}// if

- logger.info("NEW RESULT RETURNED");
+ logger.info("[CiscoStatusAdapter][executeCommand] New result
returned");
cachedResults.add(command);
logger.debug("[CiscoStatusAdapter] executeCommand finished");
return command;
@@ -188,7 +188,7 @@
*/
public void connect(String subject) throws PerfSONARException {

- logger.debug("[CiscoStatusAdapter] Connect called");
+ logger.info("[CiscoStatusAdapter] Connect called");

try {

@@ -212,16 +212,16 @@

}

- logger.debug("[CiscoStatusAdapter] Trying to connect");
+ logger.info("[CiscoStatusAdapter][connect] Trying to connect");

manager.connect(username, "Username:",
PasswordEncryptor.decryptPassword(password), "Password:");

- logger.debug("[CiscoStatusAdapter] Login");
+ logger.info("[CiscoStatusAdapter][connect] Logged in");

} catch (Exception e) {

- logger.error("[CiscoStatusAdapter] Error occuring while
connecting");
- logger.error(e.getStackTrace().toString());
+ logger.error("[CiscoStatusAdapter][connect] Error occuring while
connecting");
+ logger.error(e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");

@@ -273,7 +273,7 @@
*/
private void configureCommands(String subject) throws PerfSONARException
{

- logger.debug("[CiscoStatusAdapter] Configuring available operations
...");
+ logger.info("[CiscoStatusAdapter] Configuring available operations
...");

Iterator commands = null;
String token = null;
@@ -292,13 +292,13 @@
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[CISCOSTATUSADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[CiscoStatusAdapter][ConfigureCommands] MinParamCount not
found: " + e1.getStackTrace()[0].toString());
}
try {
int maxParamCount =
Integer.parseInt(properties.getProperty(subject, token, "maxParamCount"));
command.setMaxParamCount(maxParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[CISCOSTATUSADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[CiscoStatusAdapter][ConfigureCommands] MaxParamCount not
found: " + e1.getStackTrace()[0].toString());
}

command.setDeviceName(subject);
@@ -310,7 +310,7 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOSTATUSADAPTER][ConfigureCommands]" +
e.getStackTrace().toString());
+ logger.error("[CiscoStatusAdapter][ConfigureCommands]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve commands");

@@ -335,7 +335,7 @@
// this.addAvailableSpecificCommand(new
// StatusCommand(ActionType.MP_STATUS_INTERFACE, "show interface"));

- logger.debug("[CiscoStatusAdapter] Available operations configured");
+ logger.info("[CiscoStatusAdapter] Available operations configured");

}

@@ -409,12 +409,12 @@
EndPoint endpoint = (EndPoint) s.getChildArray()[0];
String subject = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subject);
+ logger.debug("[CiscoStatusAdapter][takeAction] SubjectString: " +
subject);

EventType eventType = metadata[0].getEventType();
String eventTypeString = eventType.getEventType();

- logger.debug("EVENTTYPESTRING: " + eventTypeString);
+ logger.debug("[CiscoStatusAdapter][takeAction] EventTypeString: " +
eventTypeString);

CiscoStatusAdapter adapter = new CiscoStatusAdapter();

@@ -434,20 +434,21 @@

} catch (NumberFormatException e1) {

- logger.error("[CISCOSTATUSADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[CiscoStatusAdapter][TakeAction] One of the
numbers in the metadata " +
+ "configuration file is not parsable: " +
e1.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.mp.sshtelnet.configuration",
- "Invalid port number in configuration");
+ "Invalid port number or cache or timeout value in
configuration");

} catch (PerfSONARException e1) {

- logger.error("[CISCOSTATUSADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[CiscoStatusAdapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve connection details");

}

- logger.debug("[CiscoStatusAdapter] TelnetManager created: " + url +
" " + port);
+ logger.debug("[CiscoStatusAdapter][takeAction] TelnetManager
created: " + url + " " + port);

try {

@@ -455,13 +456,13 @@

} catch (PerfSONARException e) {

- logger.error("[CISCOSTATUSADAPTER][TakeAction]" +
e.getStackTrace().toString());
+ logger.error("[CiscoStatusAdapter][TakeAction]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve prompt");

}

- logger.debug("[CiscoStatusAdapter] Prompt set in TelnetManager: " +
prompt);
+ logger.debug("[CiscoStatusAdapter][takeAction] Prompt set in
TelnetManager: " + prompt);

// This private method call will include all supported methods
// that can be performed on the remote device
@@ -479,7 +480,7 @@

Parameter param = parametersArray[i];
String parameter = param.getParameterValue();
- logger.debug("PARAMETERVALUE: " + parameter);
+ logger.debug("[CiscoStatusAdapter][takeAction] Parameter
value: " + parameter);

if (new ParameterChecker().checkParam(subject,
eventTypeString,
parameter)) {
@@ -503,12 +504,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(statusCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(statusCommand.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(statusCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[CiscoStatusAdapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching *
1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[CiscoStatusAdapter][takeAction] Cached
result removed");
it.remove();

}
@@ -539,12 +540,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(statusCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(statusCommand.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(statusCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[CiscoStatusAdapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching * 1000)
<= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[CiscoStatusAdapter][takeAction] Cached
result removed");
it.remove();

}
@@ -566,7 +567,7 @@

}

- logger.info("[CiscoStatusAdapter] Command executed succesfully");
+ logger.info("[CiscoStatusAdapter][takeAction] Command executed
succesfully");

Datum datum = new Datum();
if (valid) {
@@ -575,7 +576,7 @@
datum.setDatum(temp);
}

- logger.info("[CiscoStatusAdapter] Constructing response message");
+ logger.info("[CiscoStatusAdapter][takeAction] Constructing response
message");

Message response = new Message();

@@ -588,9 +589,6 @@
response.setMetadata(respMetaData[0]);
response.setData(respData[0]);

- logger.debug(respMetaData + "");
- logger.debug(respData + "");
-
// response.setSonarMetadata(request.getSonarMetadata());
// response.setSonarData(new Data[] { data });


Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/JuniperKeyStatusAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/JuniperKeyStatusAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/JuniperKeyStatusAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -88,13 +88,13 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERKEYSTATUSADAPTER][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[JuniperKeyStatusAdapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");

}

- logger.debug("[JuniperKeyStatusAdapter] Constructor finished");
+ logger.info("[JuniperKeyStatusAdapter] Constructor finished");

}// JuniperKeyStatusAdapter

@@ -104,7 +104,7 @@
*/
public List getAvailableSpecificCommands() {

- logger.debug("[JuniperKeyStatusAdapter] getAvailableSpecificCommands
called");
+ logger.info("[JuniperKeyStatusAdapter] getAvailableSpecificCommands
called");

return availableSpecificCommands;

@@ -114,7 +114,7 @@
*/
public void setAvailableSpecificCommands(List availableSpecificCommands)
{

- logger.debug("[JuniperKeyStatusAdapter] setAvailableSpecificCommand
called");
+ logger.info("[JuniperKeyStatusAdapter] setAvailableSpecificCommand
called");

this.availableSpecificCommands = availableSpecificCommands;

@@ -124,7 +124,7 @@
*/
public void addAvailableSpecificCommand(StatusCommandInterface command) {

- logger.debug("[JuniperKeyStatusAdapter] addAvailableSpecificCommand
called");
+ logger.info("[JuniperKeyStatusAdapter] addAvailableSpecificCommand
called");

availableSpecificCommands.add(command);

@@ -135,7 +135,7 @@
public StatusCommandInterface getCommand(String description)
throws PerfSONARException {

- logger.debug("[JuniperKeyStatusAdapter] getCommand called");
+ logger.info("[JuniperKeyStatusAdapter] getCommand called");

StatusCommandInterface command = null;
Iterator it = availableSpecificCommands.iterator();
@@ -146,7 +146,7 @@

if (command.getDescription().equalsIgnoreCase(description)) {

- logger.debug("[JuniperKeyStatusAdapter] Command found");
+ logger.debug("[JuniperKeyStatusAdapter] Command found: " +
command);
return command;

}
@@ -163,11 +163,10 @@
*/
public StatusCommandInterface executeCommand(StatusCommandInterface
command) {

- logger.debug("[JuniperKeyStatusAdapter] executeCommand called");
+ logger.info("[JuniperKeyStatusAdapter] executeCommand called");

if (manager != null) {

- logger.debug("Executing command");
String temp2 = manager.executeCommand(command.getCommand() + " "
+ command.getParameterString());

manager.disconnect();
@@ -177,9 +176,9 @@

}// if

- logger.info("NEW RESULT RETURNED");
+ logger.info("[JuniperKeyStatusAdapter][executeCommand] New result
returned");
cachedResults.add(command);
- logger.debug("[JuniperStatusAdapter] executeCommand finished");
+ logger.debug("[JuniperKeyStatusAdapter] executeCommand finished");
return command;

}// executeCommand
@@ -211,19 +210,10 @@
else manager = new SshKeyManager(url, username, keyUrl,
PasswordEncryptor.decryptPassword(passphrase), false, timeout);
}

- logger.info("[JuniperKeyStatusAdapter] Trying to connect");
-
- //if (passphrase == null || passphrase.equals("")) {
- // manager.connect(username, keyUrl);
- //} else {
- // manager.connect(username, keyUrl,
PasswordEncryptor.decryptPassword(passphrase));
- //}
- logger.info("[JuniperKeyStatusAdapter] Login");
-
} catch (Exception e) {

logger.error("[JuniperKeyStatusAdapter] Error occuring while
connecting");
- logger.error(e.getStackTrace().toString());
+ logger.error(e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");

@@ -275,7 +265,7 @@
*/
private void configureCommands(String subject) throws PerfSONARException
{

- logger.debug("[JuniperKeyStatusAdapter] Configuring available
operations ...");
+ logger.info("[JuniperKeyStatusAdapter] Configuring available
operations ...");

Iterator commands = null;
String token = null;
@@ -293,13 +283,13 @@
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[JUNIPERKEYSTATUSADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[JuniperKeyStatusAdapter][ConfigureCommands] MinParamCount not
found: " + e1.getStackTrace()[0].toString());
}
try {
int maxParamCount =
Integer.parseInt(properties.getProperty(subject, token, "maxParamCount"));
command.setMaxParamCount(maxParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[JUNIPERKEYSTATUSADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[JuniperKeyStatusAdapter][ConfigureCommands] MaxParamCount not
found: " + e1.getStackTrace()[0].toString());
}

command.setDeviceName(subject);
@@ -311,13 +301,13 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERKEYSTATUSADAPTER][ConfigureCommands]" +
e.getStackTrace().toString());
+ logger.error("[JuniperKeyStatusAdapter][ConfigureCommands]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve commands");

}

- logger.debug("[JuniperKeyStatusAdapter] Available operations
configured");
+ logger.info("[JuniperKeyStatusAdapter] Available operations
configured");

}

@@ -400,14 +390,14 @@
EndPoint endpoint = (EndPoint) s.getChildArray()[0];
String subject = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subject);
+ logger.debug("[JuniperKeyStatusAdapter][takeAction] SubjectString: "
+ subject);

EventType eventType = metadata[0].getEventType();
String eventTypeString = eventType.getEventType();
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));


- logger.debug("EVENTTYPESTRING: " + eventTypeString);
+ logger.debug("[JuniperKeyStatusAdapter][takeAction] EventTypeString:
" + eventTypeString);

//JuniperKeyStatusAdapter adapter = new JuniperKeyStatusAdapter();

@@ -427,20 +417,21 @@

} catch (NumberFormatException e1) {

- logger.error("[JUNIPERKEYSTATUSADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperKeyStatusAdapter][TakeAction] One of the
numbers in the metadata " +
+ "configuration file is not parsable: " +
e1.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.mp.sshtelnet.configuration",
- "Invalid port number in configuration");
+ "Invalid port number or cache or timeout value in
configuration");

} catch (PerfSONARException e1) {

- logger.error("[JUNIPERKEYSTATUSADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperKeyStatusAdapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve connection details");

}

- logger.debug("[JuniperKeyStatusAdapter] TelnetManager created: " +
url + " " + port);
+ logger.debug("[JuniperKeyStatusAdapter][takeAction] SshKeyManager
created: " + url + " " + port);

// This private method call will include all supported methods
// that can be performed on the remote device
@@ -458,7 +449,7 @@

Parameter param = parametersArray[i];
String parameter = param.getParameterValue();
- logger.debug("PARAMETERVALUE: " + parameter);
+ logger.debug("[JuniperKeyStatusAdapter][takeAction]
Parameter value: " + parameter);

if (new ParameterChecker().checkParam(subject,
eventTypeString,
parameter)) {
@@ -482,12 +473,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(statusCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(statusCommand.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(statusCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperKeyStatusAdapter][takeAction]
Cached result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching *
1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperKeyStatusAdapter][takeAction]
Cached result removed");
it.remove();

}
@@ -518,12 +509,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(statusCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(statusCommand.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(statusCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperKeyStatusAdapter][takeAction]
Cached result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching * 1000)
<= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperKeyStatusAdapter][takeAction]
Cached result removed");
it.remove();

}
@@ -545,7 +536,7 @@

}

- logger.info("[JuniperKeyStatusAdapter] Command executed
succesfully");
+ logger.info("[JuniperKeyStatusAdapter][takeAction] Command executed
succesfully");

Datum datum = new Datum();
if (valid) {
@@ -554,7 +545,7 @@
datum.setDatum(temp);
}

- logger.info("[JuniperKeyStatusAdapter] Constructing response
message");
+ logger.info("[JuniperKeyStatusAdapter][takeAction] Constructing
response message");

Message response = new Message();


Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/JuniperSshStatusAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/JuniperSshStatusAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/JuniperSshStatusAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -84,16 +84,14 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERSSHSTATUSADAPTER][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[JuniperSshStatusAdapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshYE.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");

}

- logger.debug("[JuniperSshStatusAdapter] Constructor started");
+ logger.info("[JuniperSshStatusAdapter] Constructor finished");

- logger.debug("[JuniperSshStatusAdapter] Constructor finished");
-
}// JuniperSshStatusAdapter

// ---------------------- public methods
@@ -102,7 +100,7 @@
*/
public List getAvailableSpecificCommands() {

- logger.debug("[JuniperSshStatusAdapter] getAvailableSpecificCommands
called");
+ logger.info("[JuniperSshStatusAdapter] getAvailableSpecificCommands
called");

return availableSpecificCommands;

@@ -112,7 +110,7 @@
*/
public void setAvailableSpecificCommands(List availableSpecificCommands)
{

- logger.debug("[JuniperSshStatusAdapter] setAvailableSpecificCommand
called");
+ logger.info("[JuniperSshStatusAdapter] setAvailableSpecificCommand
called");

this.availableSpecificCommands = availableSpecificCommands;

@@ -122,7 +120,7 @@
*/
public void addAvailableSpecificCommand(StatusCommandInterface command) {

- logger.debug("[JuniperSshStatusAdapter] addAvailableSpecificCommand
called");
+ logger.info("[JuniperSshStatusAdapter] addAvailableSpecificCommand
called");

availableSpecificCommands.add(command);

@@ -133,7 +131,7 @@
public StatusCommandInterface getCommand(String description)
throws PerfSONARException {

- logger.debug("[JuniperSshStatusAdapter] getCommand called");
+ logger.info("[JuniperSshStatusAdapter] getCommand called");

StatusCommandInterface command = null;
Iterator it = availableSpecificCommands.iterator();
@@ -144,7 +142,7 @@

if (command.getDescription().equalsIgnoreCase(description)) {

- logger.debug("[JuniperSshStatusAdapter] Command found");
+ logger.debug("[JuniperSshStatusAdapter] Command found: " +
command);
return command;

}
@@ -161,7 +159,7 @@
*/
public StatusCommandInterface executeCommand(StatusCommandInterface
command) {

- logger.debug("[JuniperSshStatusAdapter] executeCommand called");
+ logger.info("[JuniperSshStatusAdapter] executeCommand called");

if (manager != null) {

@@ -171,7 +169,7 @@

}// if

- logger.info("NEW RESULT RETURNED");
+ logger.info("[JuniperSshStatusAdapter][executeCommand] New result
returned");
cachedResults.add(command);
logger.debug("[JuniperSshStatusAdapter] executeCommand finished");
return command;
@@ -206,16 +204,10 @@

}

- logger.info("[JuniperSshStatusAdapter] Trying to connect");
-
- //manager.connect(username, "Username:",
PasswordEncryptor.decryptPassword(password), "Password:");
-
- logger.info("[JuniperSshStatusAdapter Login");
-
} catch (Exception e) {

logger.error("[JuniperSshStatusAdapter] Error occuring while
connecting");
- logger.error(e.getStackTrace().toString());
+ logger.error(e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");

@@ -267,7 +259,7 @@
*/
private void configureCommands(String subject) throws PerfSONARException
{

- logger.debug("[JuniperSshStatusAdapter] Configuring available
operations ...");
+ logger.info("[JuniperSshStatusAdapter] Configuring available
operations ...");

Iterator commands = null;
String token = null;
@@ -282,17 +274,16 @@

StatusCommand command = new StatusCommand(token,
properties.getProperty(subject, token, "command"));
try {
- logger.debug("service.mp." + subject + ".commands."
+ token + ".minParamCount");
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[JUNIPERSSHSTATUSADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[JuniperSshStatusAdapter][ConfigureCommands] MinParamCount not
found: " + e1.getStackTrace()[0].toString());
}
try {
int maxParamCount =
Integer.parseInt(properties.getProperty(subject, token, "maxParamCount"));
command.setMaxParamCount(maxParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[JUNIPERSSHSTATUSADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[JuniperSshStatusAdapter][ConfigureCommands] MaxParamCount not
found: " + e1.getStackTrace()[0].toString());
}

command.setDeviceName(subject);
@@ -304,13 +295,13 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERSSHSTATUSADAPTER][ConfigureCommands]" +
e.getStackTrace().toString());
+ logger.error("[JuniperSshStatusAdapter][ConfigureCommands]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve commands");

}

- logger.debug("[JuniperSshStatusAdapter] Available operations
configured");
+ logger.info("[JuniperSshStatusAdapter] Available operations
configured");

}

@@ -392,14 +383,14 @@
EndPoint endpoint = (EndPoint) s.getChildArray()[0];
String subject = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subject);
+ logger.debug("[JuniperSshStatusAdapter][takeAction] SubjectString: "
+ subject);

EventType eventType = metadata[0].getEventType();
String eventTypeString = eventType.getEventType();
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));


- logger.debug("EVENTTYPESTRING: " + eventTypeString);
+ logger.debug("[JuniperSshStatusAdapter][takeAction] EventString: " +
eventTypeString);

//JuniperSshStatusAdapter adapter = new JuniperSshStatusAdapter();

@@ -421,20 +412,21 @@

} catch (NumberFormatException e1) {

- logger.error("[JUNIPERSSHSTATUSADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperSshStatusAdapter][TakeAction] One of the
numbers in the metadata " +
+ "configuration file is not parsable: " +
e1.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.mp.sshtelnet.configuration",
- "Invalid port number in configuration");
+ "Invalid port number or cache or timeout value in
configuration");

} catch (PerfSONARException e1) {

- logger.error("[JUNIPERSSHSTATUSADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperSshStatusAdapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve connection details");

}

- logger.debug("[CiscoStatusAdapter] SshManager created: " + url + " "
+ port);
+ logger.debug("[CiscoStatusAdapter][takeAction] SshManager created: "
+ url + " " + port);

//This private method call will include all supported methods
//that can be performed on the remote device
@@ -454,7 +446,7 @@

Parameter param = parametersArray[i];
String parameter = param.getParameterValue();
- logger.debug("PARAMETERVALUE: " + parameter);
+ logger.debug("[JuniperSshStatusAdapter][takeAction]
Parameter value: " + parameter);

if (new ParameterChecker().checkParam(subject,
eventTypeString,
parameter)) {
@@ -478,12 +470,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(statusCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(statusCommand.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(statusCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperSshStatusAdapter][takeAction]
Cached result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching *
1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperSshStatusAdapter][takeAction]
Cached result removed");
it.remove();

}
@@ -514,12 +506,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(statusCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(statusCommand.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(statusCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperSshStatusAdapter][takeAction]
Cached result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching * 1000)
<= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperSshStatusAdapter][takeAction]
Cached result removed");
it.remove();

}
@@ -541,7 +533,7 @@

}

- logger.info("[JuniperSshStatusAdapter] Command executed
succesfully");
+ logger.info("[JuniperSshStatusAdapter][takeAction] Command executed
succesfully");

Datum datum = new Datum();
if (valid) {
@@ -550,7 +542,7 @@
datum.setDatum(temp);
}

- logger.info("[JuniperSshStatusAdapter] Constructing response
message");
+ logger.info("[JuniperSshStatusAdapter][takeAction] Constructing
response message");

Message response = new Message();


Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/JuniperStatusAdapter.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/JuniperStatusAdapter.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters/JuniperStatusAdapter.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -85,13 +85,13 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERSTATUSADAPTER][Constructor]" +
e.getStackTrace().toString());
+ logger.error("[JuniperStatusAdapter][Constructor]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Failed to obtain reference to the properties and/or
logger instances.");

}

- logger.debug("[JuniperStatusAdapter] Constructor finished");
+ logger.info("[JuniperStatusAdapter] Constructor finished");

}// JuniperStatusAdapter

@@ -101,7 +101,7 @@
*/
public List getAvailableSpecificCommands() {

- logger.debug("[JuniperStatusAdapter] getAvailableSpecificCommands
called");
+ logger.info("[JuniperStatusAdapter] getAvailableSpecificCommands
called");

return availableSpecificCommands;

@@ -113,7 +113,7 @@
*/
public void setAvailableSpecificCommands(List availableSpecificCommands)
{

- logger.debug("[JuniperStatusAdapter] setAvailableSpecificCommand
called");
+ logger.info("[JuniperStatusAdapter] setAvailableSpecificCommand
called");

this.availableSpecificCommands = availableSpecificCommands;

@@ -123,7 +123,7 @@
*/
public void addAvailableSpecificCommand(StatusCommandInterface command) {

- logger.debug("[JuniperStatusAdapter] addAvailableSpecificCommand
called");
+ logger.info("[JuniperStatusAdapter] addAvailableSpecificCommand
called");

availableSpecificCommands.add(command);

@@ -134,7 +134,7 @@
public StatusCommandInterface getCommand(String description)
throws PerfSONARException {

- logger.debug("[JuniperStatusAdapter] getCommand called");
+ logger.info("[JuniperStatusAdapter] getCommand called");

StatusCommandInterface command = null;
Iterator it = availableSpecificCommands.iterator();
@@ -145,7 +145,7 @@

if (command.getDescription().equalsIgnoreCase(description)) {

- logger.debug("[JuniperStatusAdapter] Command found");
+ logger.debug("[JuniperStatusAdapter] Command found: " +
command);
return command;

}
@@ -162,7 +162,7 @@
*/
public StatusCommandInterface executeCommand(StatusCommandInterface
command) {

- logger.debug("[JuniperStatusAdapter] executeCommand called");
+ logger.info("[JuniperStatusAdapter] executeCommand called");

if (manager != null) {

@@ -175,7 +175,7 @@

}// if

- logger.info("NEW RESULT RETURNED");
+ logger.info("[JuniperStatusAdapter][executeCommand] New result
returned");
cachedResults.add(command);
logger.debug("[JuniperStatusAdapter] executeCommand finished");
return command;
@@ -189,7 +189,7 @@
*/
public void connect(String subject) throws PerfSONARException {

- logger.debug("[JuniperStatusAdapter] Connect called");
+ logger.info("[JuniperStatusAdapter] Connect called");

try {

@@ -208,15 +208,15 @@

}

- logger.debug("[JuniperStatusAdapter] Trying to connect");
+ logger.info("[JuniperStatusAdapter][connect] Trying to connect");

manager.connect(username, "login:",
PasswordEncryptor.decryptPassword(password), "Password:");
- logger.debug("[JuniperStatusAdapter] Login");
+ logger.info("[JuniperStatusAdapter][connect] Logged in");

} catch (Exception e) {

- logger.error("[JuniperStatusAdapter] Error occuring while
connecting");
- logger.error(e.getStackTrace().toString());
+ logger.error("[JuniperStatusAdapter][connect] Error occuring
while connecting");
+ logger.error(e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.connect",
"Could not connect to underlying device");

@@ -268,7 +268,7 @@
*/
private void configureCommands(String subject) throws PerfSONARException
{

- logger.debug("[JuniperStatusAdapter] Configuring available
operations ...");
+ logger.info("[JuniperStatusAdapter] Configuring available operations
...");

Iterator commands = null;
String token = null;
@@ -288,13 +288,13 @@
int minParamCount =
Integer.parseInt(properties.getProperty(subject, token, "minParamCount"));
command.setMinParamCount(minParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[JUNIPERSTATUSADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[JuniperStatusAdapter][ConfigureCommands] MinParamCount not
found: " + e1.getStackTrace()[0].toString());
}
try {
int maxParamCount =
Integer.parseInt(properties.getProperty(subject, token, "maxParamCount"));
command.setMaxParamCount(maxParamCount);
} catch (PerfSONARException e1) {
-
logger.error("[JUNIPERSTATUSADAPTER][ConfigureCommands]" +
e1.getStackTrace().toString());
+
logger.error("[JuniperStatusAdapter][ConfigureCommands] MaxParamCount not
found: " + e1.getStackTrace()[0].toString());
}

command.setDeviceName(subject);
@@ -306,7 +306,7 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERSTATUSADAPTER][ConfigureCommands]" +
e.getStackTrace().toString());
+ logger.error("[JuniperStatusAdapter][ConfigureCommands]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve commands");

@@ -331,7 +331,7 @@
// this.addAvailableSpecificCommand(new
// StatusCommand(ActionType.MP_STATUS_INTERFACE, "show interface"));

- logger.debug("[JuniperStatusAdapter] Available operations
configured");
+ logger.info("[JuniperStatusAdapter] Available operations
configured");

}

@@ -409,13 +409,13 @@
EndPoint endpoint = (EndPoint) s.getChildArray()[0];
String subject = endpoint.getValue();

- logger.debug("SUBJECTSTRING: " + subject);
+ logger.debug("[JuniperStatusAdapter][takeAction] SubjectString: " +
subject);

EventType eventType = metadata[0].getEventType();
String eventTypeString = eventType.getEventType();
//eventTypeString =
eventTypeString.substring(ServicePropertiesConfigurator.EVENTTYPE_PREFIX.length()-1,
eventTypeString.lastIndexOf("/"));

- logger.debug("EVENTTYPESTRING: " + eventTypeString);
+ logger.debug("[JuniperStatusAdapter][takeAction] EventString: " +
eventTypeString);

JuniperStatusAdapter adapter = new JuniperStatusAdapter();

@@ -433,20 +433,21 @@

} catch (NumberFormatException e1) {

- logger.error("[JUNIPERSTATUSADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperStatusAdapter][TakeAction] One of the
numbers in the metadata " +
+ "configuration file is not parsable: " +
e1.getStackTrace()[0].toString());
throw new PerfSONARException(
"error.mp.sshtelnet.configuration",
- "Invalid port number in configuration");
+ "Invalid port number or cache or timeout value in
configuration");

} catch (PerfSONARException e1) {

- logger.error("[JUNIPERSTATUSADAPTER][TakeAction]" +
e1.getStackTrace().toString());
+ logger.error("[JuniperStatusAdapter][TakeAction]" +
e1.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve connection details");

}

- logger.debug("[JuniperStatusAdapter] TelnetManager created: " + url
+ " " + port);
+ logger.debug("[JuniperStatusAdapter][takeAction] TelnetManager
created: " + url + " " + port);

try {

@@ -454,13 +455,13 @@

} catch (PerfSONARException e) {

- logger.error("[JUNIPERSTATUSADAPTER][TakeAction]" +
e.getStackTrace().toString());
+ logger.error("[JuniperStatusAdapter][TakeAction]" +
e.getStackTrace()[0].toString());
throw new PerfSONARException("error.mp.sshtelnet.configuration",
"Unable to retrieve prompt");

}

- logger.debug("[JuniperStatusAdapter] Prompt set in TelnetManager: "
+ prompt);
+ logger.debug("[JuniperStatusAdapter][takeAction] Prompt set in
TelnetManager: " + prompt);

// This private method call will include all supported methods
// that can be performed on the remote device
@@ -478,7 +479,7 @@

Parameter param = parametersArray[i];
String parameter = param.getParameterValue();
- logger.debug("PARAMETERVALUE: " + parameter);
+ logger.debug("[JuniperStatusAdapter][takeAction] Parameter
value: " + parameter);

if (new ParameterChecker().checkParam(subject,
eventTypeString,
parameter)) {
@@ -502,12 +503,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(statusCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(statusCommand.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(statusCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperStatusAdapter][takeAction]
Cached result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching *
1000) <= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperStatusAdapter][takeAction]
Cached result removed");
it.remove();

}
@@ -538,12 +539,12 @@

if
(cachedCommand.getCommand().equalsIgnoreCase(statusCommand.getCommand()) &&
cachedCommand.getParameterString().equalsIgnoreCase(statusCommand.getParameterString())
&&
cachedCommand.getDeviceName().equalsIgnoreCase(statusCommand.getDeviceName())
&& cachedCommand.getTimestamp() + (caching * 1000) >
System.currentTimeMillis()) {

- logger.info("CACHED RESULT RETURNED");
+ logger.info("[JuniperStatusAdapter][takeAction] Cached
result returned");
temp = cachedCommand.getResult();

} else if (cachedCommand.getTimestamp() + (caching * 1000)
<= System.currentTimeMillis()) {

- logger.info("CACHED RESULT REMOVED");
+ logger.info("[JuniperStatusAdapter][takeAction] Cached
result removed");
it.remove();

}
@@ -565,7 +566,7 @@

}

- logger.info("[JuniperStatusAdapter] Command executed succesfully");
+ logger.info("[JuniperStatusAdapter][takeAction] Command executed
succesfully");

Datum datum = new Datum();
if (valid) {
@@ -574,7 +575,7 @@
datum.setDatum(temp);
}

- logger.info("[JuniperStatusAdapter] Constructing response message");
+ logger.info("[JuniperStatusAdapter][takeAction] Constructing
response message");

Message response = new Message();

@@ -587,10 +588,7 @@
response.setMetadata(respMetaData[0]);
response.setData(respData[0]);

- logger.debug(respMetaData + "");
- logger.debug(respData + "");
-
- // response.setSonarMetadata(request.getSonarMetadata());
+ // response.setSonarMetadata(request.getSonarMetadata());
// response.setSonarData(new Data[] { data });

logger.info("[JuniperStatusAdapter] takeAction finished");

Modified:
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/remote/ssh/SshManager.java
===================================================================
---
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/remote/ssh/SshManager.java
2008-06-20 07:46:48 UTC (rev 4027)
+++
trunk/geant2_java-sshtelnet-mp/src/main/java/org/perfsonar/service/measurementPoint/remote/ssh/SshManager.java
2008-06-20 09:38:17 UTC (rev 4028)
@@ -70,7 +70,7 @@

} catch (PerfSONARException e1) {

- logger.error("[SSHMANAGER][Constructor]" +
e1.getStackTrace().toString());
+ logger.error("[SshManager][Constructor]" +
e1.getStackTrace()[0].toString());

}

@@ -118,7 +118,7 @@

} catch (JSchException e) {

- logger.error("[SSHMANAGER][Connect]" +
e.getStackTrace().toString());
+ logger.error("[SshManager][Connect]" +
e.getStackTrace()[0].toString());

}
}// connect
@@ -151,7 +151,7 @@

} catch (JSchException e) {

- logger.error("[SSHMANAGER][Connect]" +
e.getStackTrace().toString());
+ logger.error("[SshManager][Connect]" +
e.getStackTrace()[0].toString());

}
}// connect
@@ -174,7 +174,7 @@

} catch (JSchException e) {

- logger.error("[SSHMANAGER][GetSshChannel]" +
e.getStackTrace().toString());
+ logger.error("[SshManager][GetSshChannel]" +
e.getStackTrace()[0].toString());
return null;
}




  • perfsonar: r4028 - in trunk/geant2_java-sshtelnet-mp: conf contrib/metadata_configuration_tools/CSV_Generator_script/conf contrib/metadata_configuration_tools/Configuration_Tool/conf doc/commands src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/bgp/adapters src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/encryption src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/internalChecks src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ip/adapters src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/ipv6/adapters src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/metadata src/main/java/org/perfsonar/service/measurementPoint/lookingGlassType/status/adapters src/main/java/org/perfsonar/service/measurementPoint/remote/ssh, svnlog, 06/20/2008

Archive powered by MHonArc 2.6.16.

Top of Page