[asterisk-scf-commits] asterisk-scf/integration/logger.git branch "retry_deux" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Jan 31 11:33:44 CST 2012


branch "retry_deux" has been created
        at  9c20ce819adf50adfee676e4e57709de6613234b (commit)

- Log -----------------------------------------------------------------
commit 9c20ce819adf50adfee676e4e57709de6613234b
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Tue Jan 31 11:32:37 2012 -0600

    Updates for OperationContext API changes.

diff --git a/client/src/IceConfigurator.cpp b/client/src/IceConfigurator.cpp
index 85c30cf..b0e45b9 100644
--- a/client/src/IceConfigurator.cpp
+++ b/client/src/IceConfigurator.cpp
@@ -35,13 +35,15 @@ bool operator<(const SourceConfiguration& lhs, const SourceConfiguration& rhs)
 }
 }
 
-void IceConfigurator::configured(const Configuration& logConfiguration,
+void IceConfigurator::configured(const AsteriskSCF::System::V1::OperationContextPtr& operationContext, 
+    const Configuration& logConfiguration,
     const Ice::Current&)
 {
-    return configured(logConfiguration);
+    return configured(operationContext, logConfiguration);
 }
 
-void IceConfigurator::configured(const Configuration& logConfiguration)
+void IceConfigurator::configured(const AsteriskSCF::System::V1::OperationContextPtr& operationContext, 
+    const Configuration& logConfiguration)
 {
     std::vector<std::string> oldConfig = mFactory.getLoggerNames();
     SourceConfigurationSeq newConfig = logConfiguration.sourceSettings;
diff --git a/client/src/IceConfigurator.h b/client/src/IceConfigurator.h
index 3348ecc..e597cc0 100644
--- a/client/src/IceConfigurator.h
+++ b/client/src/IceConfigurator.h
@@ -37,8 +37,8 @@ public:
     {
     }
 
-    ASTSCF_DLL_EXPORT void configured(const Configuration& logConfiguration, const Ice::Current&);
-    ASTSCF_DLL_EXPORT void configured(const Configuration& logConfiguration);
+    ASTSCF_DLL_EXPORT void configured(const AsteriskSCF::System::V1::OperationContextPtr& context, const Configuration& logConfiguration, const Ice::Current&);
+    ASTSCF_DLL_EXPORT void configured(const AsteriskSCF::System::V1::OperationContextPtr& context, const Configuration& logConfiguration);
 private:
     LoggerFactory& mFactory;
 };
diff --git a/client/test/IceConfigurator-test.cpp b/client/test/IceConfigurator-test.cpp
index 5b6988a..8f8a679 100644
--- a/client/test/IceConfigurator-test.cpp
+++ b/client/test/IceConfigurator-test.cpp
@@ -14,6 +14,7 @@
  * at the top of the source tree.
  */
 
+#include <IceUtil/UUID.h>
 
 #include <boost/test/unit_test.hpp>
 
@@ -21,6 +22,7 @@
 #include "IceConfigurator.h"
 
 using namespace AsteriskSCF::System::Logging;
+using namespace AsteriskSCF::System::V1;
 
 namespace
 {
@@ -47,7 +49,7 @@ BOOST_AUTO_TEST_CASE(test_simple)
     addConfig(cfg, "AsteriskSCF.Core", Debug);
     addConfig(cfg, "", Error);
 
-    uut.configured(cfg);
+    uut.configured(new OperationContext(IceUtil::generateUUID()), cfg);
 
     BOOST_CHECK_EQUAL(Error, factory.getLogger("").getEffectiveLevel());
     BOOST_CHECK_EQUAL(Info, factory.getLogger("AsteriskSCF").getEffectiveLevel());
@@ -67,11 +69,11 @@ BOOST_AUTO_TEST_CASE(test_reset)
     addConfig(cfg, "AsteriskSCF", Info);
     addConfig(cfg, "AsteriskSCF.Core", Debug);
     addConfig(cfg, "AsteriskSCF.Media", Off);
-    uut.configured(cfg);
+    uut.configured(new OperationContext(IceUtil::generateUUID()), cfg);
 
     cfg.sourceSettings.clear();
     addConfig(cfg, "", Critical);
-    uut.configured(cfg);
+    uut.configured(new OperationContext(IceUtil::generateUUID()), cfg);
 
     BOOST_CHECK_EQUAL(Critical, factory.getLogger("").getEffectiveLevel());
     BOOST_CHECK_EQUAL(Critical, factory.getLogger("AsteriskSCF").getEffectiveLevel());
diff --git a/server/src/Component.cpp b/server/src/Component.cpp
index e258ec5..82d6407 100644
--- a/server/src/Component.cpp
+++ b/server/src/Component.cpp
@@ -18,7 +18,9 @@
 #include <Ice/Properties.h>
 #include <IceBox/IceBox.h>
 #include <IceStorm/IceStorm.h>
+#include <IceUtil/UUID.h>
 
+#include <AsteriskSCF/System/OperationsIf.h>
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 #include <AsteriskSCF/System/Component/ConfigurationIf.h>
 
@@ -29,6 +31,7 @@
 using namespace AsteriskSCF::System::Logging;
 using namespace AsteriskSCF::Core::Discovery::V1;
 using namespace AsteriskSCF::System::Configuration::V1;
+using namespace AsteriskSCF::System::V1;
 
 namespace
 {
@@ -83,7 +86,7 @@ void LoggingService::registerWithServiceLocator(const Ice::CommunicatorPtr& comm
             params->category = LoggingServerCategory;
             params->service = serviceName;
             params->id = mName;
-            mServiceManagement->addLocatorParams(params, "");
+            mServiceManagement->addLocatorParams(new OperationContext(IceUtil::generateUUID()), params, "");
             }
 
             // Do the same for the configuration interface.
@@ -95,7 +98,7 @@ void LoggingService::registerWithServiceLocator(const Ice::CommunicatorPtr& comm
             configParams->category = AsteriskSCF::Configuration::LoggingService::V1::ConfigurationDiscoveryCategory;
             configParams->service = serviceName;
             configParams->id = mName;
-             mConfigManagement->addLocatorParams(configParams, "");
+            mConfigManagement->addLocatorParams(new OperationContext(IceUtil::generateUUID()), configParams, "");
             }
         }
         else
diff --git a/server/src/Configuration.cpp b/server/src/Configuration.cpp
index eb3ed8b..52f80a8 100644
--- a/server/src/Configuration.cpp
+++ b/server/src/Configuration.cpp
@@ -29,6 +29,7 @@ namespace Logging
 
 using namespace AsteriskSCF::System::Configuration::V1;
 using namespace AsteriskSCF::Configuration::LoggingService::V1;
+using namespace AsteriskSCF::System::V1;
 
 class FileItemI : public FileItem
 {
@@ -221,7 +222,8 @@ ConfigurationGroupSeq LoggerConfigurationService::getConfigurationGroups(const I
     return groups;
 }
 
-void LoggerConfigurationService::setConfiguration(const ConfigurationGroupSeq& groups, const Ice::Current&)
+void LoggerConfigurationService::setConfiguration(const OperationContextPtr& operationContext,
+     const ConfigurationGroupSeq& groups, const Ice::Current&)
 {
     class GroupsVisitor : public LoggerConfigurationGroupVisitor
     {
@@ -324,7 +326,8 @@ void LoggerConfigurationService::setConfiguration(const ConfigurationGroupSeq& g
     }
 }
 
-void LoggerConfigurationService::removeConfigurationItems(const ConfigurationGroupSeq& groups, const Ice::Current&)
+void LoggerConfigurationService::removeConfigurationItems(const OperationContextPtr& operationContext,
+    const ConfigurationGroupSeq& groups, const Ice::Current&)
 {
 
     class GroupsVisitor : public LoggerConfigurationGroupVisitor
@@ -410,7 +413,8 @@ void LoggerConfigurationService::removeConfigurationItems(const ConfigurationGro
     }
 }
 
-void LoggerConfigurationService::removeConfigurationGroups(const ConfigurationGroupSeq& groups, const Ice::Current&)
+void LoggerConfigurationService::removeConfigurationGroups(const OperationContextPtr& operationContext,
+    const ConfigurationGroupSeq& groups, const Ice::Current&)
 {
     class LoggerGroupVisitor : public LoggerConfigurationGroupVisitor
     {
diff --git a/server/src/Configuration.h b/server/src/Configuration.h
index fa5563d..7cd87ad 100644
--- a/server/src/Configuration.h
+++ b/server/src/Configuration.h
@@ -49,9 +49,12 @@ public:
     AsteriskSCF::System::Configuration::V1::ConfigurationGroupSeq getConfiguration(const AsteriskSCF::System::Configuration::V1::ConfigurationGroupSeq&, const Ice::Current&);
     AsteriskSCF::System::Configuration::V1::ConfigurationGroupSeq getConfigurationAll(const AsteriskSCF::System::Configuration::V1::ConfigurationGroupSeq&, const Ice::Current&);
     AsteriskSCF::System::Configuration::V1::ConfigurationGroupSeq getConfigurationGroups(const Ice::Current&);
-    void setConfiguration(const AsteriskSCF::System::Configuration::V1::ConfigurationGroupSeq&, const Ice::Current&);
-    void removeConfigurationItems(const AsteriskSCF::System::Configuration::V1::ConfigurationGroupSeq&, const Ice::Current&);
-    void removeConfigurationGroups(const AsteriskSCF::System::Configuration::V1::ConfigurationGroupSeq&, const Ice::Current&);
+    void setConfiguration(const AsteriskSCF::System::V1::OperationContextPtr& operationContext,
+        const AsteriskSCF::System::Configuration::V1::ConfigurationGroupSeq&, const Ice::Current&);
+    void removeConfigurationItems(const AsteriskSCF::System::V1::OperationContextPtr& operationContext,
+        const AsteriskSCF::System::Configuration::V1::ConfigurationGroupSeq&, const Ice::Current&);
+    void removeConfigurationGroups(const AsteriskSCF::System::V1::OperationContextPtr& operationContext,
+        const AsteriskSCF::System::Configuration::V1::ConfigurationGroupSeq&, const Ice::Current&);
 private:
     /**
      * Private implementation details.
diff --git a/server/src/LoggingServer.cpp b/server/src/LoggingServer.cpp
index 1391929..4d284db 100644
--- a/server/src/LoggingServer.cpp
+++ b/server/src/LoggingServer.cpp
@@ -16,12 +16,16 @@
 
 #include <iomanip>
 
+#include <IceUtil/UUID.h>
+
 #include <AsteriskSCF/Logger/Level.h>
 #include <AsteriskSCF/Logger/LogConsts.h>
+#include <AsteriskSCF/System/OperationsIf.h>
 
 #include "LoggingServer.h"
 
 using namespace AsteriskSCF::System::Logging;
+using namespace AsteriskSCF::System::V1;
 
 const std::string LoggingServerI::LoggingPropertyPrefix =
     "AsteriskSCF.Logging.";
@@ -73,7 +77,7 @@ void LoggingServerI::setLevel(const std::string& name, Level level)
 
     if (mConfigurationListener)
     {
-        mConfigurationListener->configured(getConfiguration());
+        mConfigurationListener->configured(new OperationContext(IceUtil::generateUUID()), getConfiguration());
     }
 }
 

commit 0c1e8150abe9fd70aa3cee59085be8486d438acd
Author: Mark Michelson <mmichelson at digium.com>
Date:   Tue Jan 3 14:37:42 2012 -0600

    Adjust component library names and update test config files

diff --git a/server/config/logging-server.conf b/server/config/logging-server.conf
index 79eff77..b300cc4 100644
--- a/server/config/logging-server.conf
+++ b/server/config/logging-server.conf
@@ -2,7 +2,7 @@
 
 # load w/ icebox
 IceBox.InheritProperties=1
-IceBox.Service.Logger=logging-service:createLoggingService
+IceBox.Service.Logger=LoggingService:createLoggingService
 
 Logger.ServiceAdapter.Endpoints=tcp -h 127.0.0.1 -p 4431
 
diff --git a/server/config/testloggingserver.conf b/server/config/testloggingserver.conf
index 7e9bfc5..22993cb 100644
--- a/server/config/testloggingserver.conf
+++ b/server/config/testloggingserver.conf
@@ -1,7 +1,7 @@
 IceBox.InheritProperties=1
 
-IceBox.Service.ServiceDiscovery=service_locator:create
-IceBox.Service.Logger=logging-service:createLoggingService
+IceBox.Service.ServiceDiscovery=ServiceLocator:create
+IceBox.Service.Logger=LoggingService:createLoggingService
 IceBox.Service.LoggerTest=LoggingConfigurationTest:create
 
 IceBox.LoadOrder=ServiceDiscovery,Logger,LoggerTest

commit b1fbf637ca4be926ec6bc2f83259510cbaa3fc77
Merge: 4847d6b 87254bb
Author: Mark Michelson <mmichelson at digium.com>
Date:   Fri Dec 30 14:54:12 2011 -0600

    Merge branch 'master' of git.asterisk.org:asterisk-scf/release/logger


commit 87254bbfef0d69634d732b383ab46c0521d22791
Author: Brent Eagles <beagles at digium.com>
Date:   Tue Dec 6 16:51:08 2011 -0330

    Convert all unit tests to use loopback address.

diff --git a/client/config/logging-client.conf b/client/config/logging-client.conf
index 3488cdb..fe52178 100644
--- a/client/config/logging-client.conf
+++ b/client/config/logging-client.conf
@@ -3,7 +3,7 @@
 AsteriskSCF.LoggingClient.Endpoints=default
 
 # Where to find the Service Locator.
-LocatorService.Proxy=LocatorService:tcp -p 4411
+LocatorService.Proxy=LocatorService:tcp -h 127.0.0.1 -p 4411
 
 # A proxy to the IceStorm topic manager
-TopicManager.Proxy=ServiceDiscoveryIceStorm/TopicManager:default -p 4421
+TopicManager.Proxy=ServiceDiscoveryIceStorm/TopicManager:default -h 127.0.0.1 -p 4421
diff --git a/server/config/logging-server.conf b/server/config/logging-server.conf
index 51ccfda..79eff77 100644
--- a/server/config/logging-server.conf
+++ b/server/config/logging-server.conf
@@ -4,11 +4,11 @@
 IceBox.InheritProperties=1
 IceBox.Service.Logger=logging-service:createLoggingService
 
-Logger.ServiceAdapter.Endpoints=tcp -p 4431
+Logger.ServiceAdapter.Endpoints=tcp -h 127.0.0.1 -p 4431
 
 # A proxy to the service locator management service
-LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4412
+LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -h 127.0.0.1 -p 4412
 
 # A proxy to the IceStorm topic manager
-TopicManager.Proxy=ServiceDiscoveryIceStorm/TopicManager:tcp -p 4421
+TopicManager.Proxy=ServiceDiscoveryIceStorm/TopicManager:tcp -h 127.0.0.1 -p 4421
 
diff --git a/server/config/testloggingserver.conf b/server/config/testloggingserver.conf
index 29d0976..7e9bfc5 100644
--- a/server/config/testloggingserver.conf
+++ b/server/config/testloggingserver.conf
@@ -6,33 +6,33 @@ IceBox.Service.LoggerTest=LoggingConfigurationTest:create
 
 IceBox.LoadOrder=ServiceDiscovery,Logger,LoggerTest
 
-Logger.ServiceAdapter.Endpoints=tcp -p 31337
+Logger.ServiceAdapter.Endpoints=tcp -h 127.0.0.1 -p 31337
 
 #################################################
 # Properties for test component.
-LoggerTestAdapter.Endpoints=default
-LoggerConfiguration.Proxy=LoggerConfigurationService:tcp -p 31337
+LoggerTestAdapter.Endpoints=default -h 127.0.0.1
+LoggerConfiguration.Proxy=LoggerConfigurationService:tcp -h 127.0.0.1  -p 31337
 
 # A proxy to the service locator management service
-LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4412
-LocatorService.Proxy=LocatorService:tcp -p 4411
+LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -h 127.0.0.1 -p 4412
+LocatorService.Proxy=LocatorService:tcp -h 127.0.0.1 -p 4411
 
 # Test endpoints for IceStorm
-TopicManager.Proxy=ServiceDiscovery/TopicManager:default -p 4421
+TopicManager.Proxy=ServiceDiscovery/TopicManager:default -h 127.0.0.1 -p 4421
 
 #################################################
 # Properties for service locator
-ServiceDiscovery.BackplaneAdapter.Endpoints=tcp -p 4410
-ServiceDiscovery.Management.ServiceAdapter.Endpoints=tcp -p 4412
-ServiceDiscovery.Locator.ServiceAdapter.Endpoints=tcp -p 4411
+ServiceDiscovery.BackplaneAdapter.Endpoints=tcp -h 127.0.0.1 -p 4410
+ServiceDiscovery.Management.ServiceAdapter.Endpoints=tcp -h 127.0.0.1 -p 4412
+ServiceDiscovery.Locator.ServiceAdapter.Endpoints=tcp -h 127.0.0.1 -p 4411
 ServiceDiscovery.IceStorm.InstanceName=ServiceDiscovery
 
 # This property defines the endpoints on which the IceStorm
 # TopicManager listens.
 #
 
-ServiceDiscovery.IceStorm.TopicManager.Endpoints=default -p 4421
-ServiceDiscovery.IceStorm.Publish.Endpoints=tcp -p 4422:udp -p 4422
+ServiceDiscovery.IceStorm.TopicManager.Endpoints=default -h 127.0.0.1 -p 4421
+ServiceDiscovery.IceStorm.Publish.Endpoints=tcp -h 127.0.0.1 -p 4422:udp -h 127.0.0.1 -p 4422
 ServiceDiscovery.IceStorm.Trace.TopicManager=2
 ServiceDiscovery.IceStorm.Transient=1
 ServiceDiscovery.IceStorm.Flush.Timeout=2000

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/logger.git



More information about the asterisk-scf-commits mailing list