summaryrefslogtreecommitdiff
path: root/CIAO/DAnCE/TargetManager
diff options
context:
space:
mode:
Diffstat (limited to 'CIAO/DAnCE/TargetManager')
-rw-r--r--CIAO/DAnCE/TargetManager/CmpClient.cpp271
-rw-r--r--CIAO/DAnCE/TargetManager/Deployment_Configuration.cpp152
-rw-r--r--CIAO/DAnCE/TargetManager/Deployment_Configuration.h129
-rw-r--r--CIAO/DAnCE/TargetManager/DomainDataManager.cpp738
-rw-r--r--CIAO/DAnCE/TargetManager/DomainDataManager.h325
-rw-r--r--CIAO/DAnCE/TargetManager/DomainEvents.idl24
-rw-r--r--CIAO/DAnCE/TargetManager/TM_Client.mpc28
-rw-r--r--CIAO/DAnCE/TargetManager/TargetManager.cidl28
-rw-r--r--CIAO/DAnCE/TargetManager/TargetManager.mpc70
-rw-r--r--CIAO/DAnCE/TargetManager/TargetManagerExt.idl80
-rw-r--r--CIAO/DAnCE/TargetManager/TargetManagerImpl.idl43
-rw-r--r--CIAO/DAnCE/TargetManager/TargetManager_exec.cpp396
-rw-r--r--CIAO/DAnCE/TargetManager/TargetManager_exec.h236
-rw-r--r--CIAO/DAnCE/TargetManager/TargetManager_exec_export.h54
-rw-r--r--CIAO/DAnCE/TargetManager/TargetManager_stub_export.h54
-rw-r--r--CIAO/DAnCE/TargetManager/TargetManager_svnt_export.h54
-rw-r--r--CIAO/DAnCE/TargetManager/descriptors/Domain.cdd101
-rw-r--r--CIAO/DAnCE/TargetManager/descriptors/NodeDetails.dat2
-rw-r--r--CIAO/DAnCE/TargetManager/descriptors/NodeManagerMap.dat2
-rw-r--r--CIAO/DAnCE/TargetManager/descriptors/flattened_deploymentplan.cdp92
-rw-r--r--CIAO/DAnCE/TargetManager/descriptors/run_test_TargetManager.pl160
21 files changed, 0 insertions, 3039 deletions
diff --git a/CIAO/DAnCE/TargetManager/CmpClient.cpp b/CIAO/DAnCE/TargetManager/CmpClient.cpp
deleted file mode 100644
index dd540ec3d8b..00000000000
--- a/CIAO/DAnCE/TargetManager/CmpClient.cpp
+++ /dev/null
@@ -1,271 +0,0 @@
-// CmpClient.cpp,v 1.3 2006/01/25 00:10:27 dengg Exp
-/**
- * @file CmpClient.cpp
- *
- * @brief This file contains a client of TargetManager.
- *
- * It picks up the TM ior from the Targetmanager.ior file
- * present in the current directory, and makes the calls on the
- * TM to getAllResources and getAvailable resources
- */
-
-#include "Deployment_DataC.h"
-#include "TargetManagerImplC.h"
-#include "ace/streams.h"
-#include "Config_Handlers/DnC_Dump.h"
-
-void write_to_file (::Deployment::Domain domain);
-
-int main (int argc, char* argv[])
-{
- try {
- // First initialize the ORB, that will remove some arguments...
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv,
- "" /* the ORB name, it can be anything! */);
-
- // There must be at least two arguments, the first is the factory
- // name, the rest are the names of the stock symbols we want to
- // get quotes for.
- if (argc < 2) {
- cerr << "Usage: " << argv[0]
- << " Factory_IOR ..." << endl;
- return 1;
- }
-
- // Use the first argument to create the factory object reference,
- // in real applications we use the naming service, but let's do
- // the easy part first!
- CORBA::Object_var factory_object =
- orb->string_to_object (argv[1]);
-
- // Now downcast the object reference to the appropriate type
- CIAO::TargetManagerImpl_var targetCmp =
- CIAO::TargetManagerImpl::_narrow (factory_object.in ());
-
- // Now get the facet reference from the target Manager Component
- ACE_DEBUG((LM_DEBUG, "Making a Call to provide_targetMgr ()\n"));
- Deployment::TargetManager_ptr targetI = targetCmp->provide_targetMgr ();
-
- // Now make calls on the Target Manager facet
-
- try
- {
- Deployment::Domain_var domainV = targetI->getAllResources ();
- ACE_DEBUG ((LM_DEBUG , "\n\nGetAllResources Returned \n"));
- ::Deployment::DnC_Dump::dump (domainV);
- }
- catch(CORBA::NO_IMPLEMENT &)
- {
- ACE_DEBUG((LM_DEBUG ,"Error:TargetManager:CORBA::NO_IMPLEMENT thrown\n"));
- }
- catch(CORBA::Exception &)
- {
- ACE_DEBUG((LM_DEBUG ,"Error:TargetManager:CORBA Generic Exception \n"));
- ACE_DEBUG((LM_DEBUG ,"Error:TargetManager:Exception in TargetManager call\n"));
- }
-
-
- // make a call to the commit resources .....
-
-
- Deployment::DeploymentPlan plan;
-
- plan.instance.length (2);
-
- ::Deployment::InstanceDeploymentDescription instance_;
- instance_.node = CORBA::string_dup ("foil");
- instance_.deployedResource.length (1);
- instance_.deployedResource[0].requirementName =
- CORBA::string_dup ("Processor");
- instance_.deployedResource[0].resourceName =
- CORBA::string_dup ("CPULoad");
-
- instance_.deployedResource[0].property.length (1);
- instance_.deployedResource[0].property[0].name =
- CORBA::string_dup ("LoadAverage");
- CORBA::Long d = 20;
- instance_.deployedResource[0].property[0].value <<= d;
-
- plan.instance[0] = instance_;
-
- instance_.node = CORBA::string_dup ("blade30");
- instance_.deployedResource.length (1);
- instance_.deployedResource[0].requirementName =
- CORBA::string_dup ("Processor");
- instance_.deployedResource[0].resourceName =
- CORBA::string_dup ("CPULoad");
-
- instance_.deployedResource[0].property.length (1);
- instance_.deployedResource[0].property[0].name =
- CORBA::string_dup ("LoadAverage");
- d = 50;
-
- instance_.deployedResource[0].property[0].value <<= d;
-
- plan.instance[1] = instance_;
-
- bool resource_available = 1;
-
- try
- {
- targetI->commitResources(plan);
- ACE_DEBUG ((LM_DEBUG , "\n\ncommitResources Returned \n"));
- }
- catch(CORBA::NO_IMPLEMENT &)
- {
- cerr << "Error:TargetManager:CORBA::NO_IMPLEMENT thrown" << endl;
- }
- catch (Deployment::ResourceNotAvailable & e)
- {
- resource_available = 0;
- cout << "TargetManager commitResources ResourceNotAvailable Exception" <<endl;
-
- ACE_DEBUG ((LM_DEBUG ,
- "ResourceNotAvailable\n name=[%s]\n elementName=[%s]\n resourceName=[%s]\n \
- resourceType= [%s]\n propertyName=[%s]\n",
- e.name.in (),
- e.elementName.in (),
- e.resourceName.in (),
- e.resourceType.in (),
- e.propertyName.in ()));
- }
- catch(CORBA::Exception & ex)
- {
- cout << "Error:TargetManager:commitResources Exception" <<endl;
- cout << "Error:TargetManager:CORBA Generic Exception " << endl;
- cerr << "Error:TargetManager:Exception in TargetManager call" << ex << endl;
- }
-
-
- // Make a call to release resources , if resource < 0
- try
- {
- if (resource_available == 0)
- {
- targetI->releaseResources(plan);
- ACE_DEBUG ((LM_DEBUG , "\n\nreleaseResources Returned \n"));
- }
- }
- catch(CORBA::NO_IMPLEMENT &)
- {
- cerr << "Error:TargetManager:CORBA::NO_IMPLEMENT thrown" << endl;
- }
- catch (Deployment::ResourceNotAvailable &)
- {
- cout << "Error:TargetManager releaseResources ResourceNotAvailable Exception" <<endl;
- }
- catch(CORBA::Exception & ex)
- {
- cout << "Error:TargetManager:releaseResources Exception" <<endl;
- cout << "Error:TargetManager:CORBA Generic Exception " << endl;
- cerr << "Error:TargetManager:Exception in TargetManager call" << ex << endl;
- }
-
- // Here make a call on the TM with update domain and node deletion
-
- ::Deployment::Domain updated;
- updated.node.length (1);
- updated.node[0].name = CORBA::string_dup (argv[2]);
-
- ::CORBA::StringSeq elements;
- elements.length (0);
-
- bool Add = 1;
- Add = ACE_OS::atoi (argv[3]);
-
- if (Add)
- {
- try
- {
- targetI->updateDomain (elements , updated, ::Deployment::Add);
- }
- catch(CORBA::NO_IMPLEMENT &)
- {
- cerr << "Error:TargetManager:CORBA::NO_IMPLEMENT thrown" << endl;
- }
- catch(CORBA::Exception & ex)
- {
- cout << "Error:TargetManager:CORBA Generic Exception " << endl;
- cerr << "Error:TargetManager:Exception in UpdateDomain call" << ex << endl;
- }
- }
- else
- {
- try
- {
- targetI->updateDomain (elements , updated, ::Deployment::Delete);
- }
- catch(CORBA::NO_IMPLEMENT &)
- {
- cerr << "Error:TargetManager:CORBA::NO_IMPLEMENT thrown" << endl;
- }
- catch(CORBA::Exception & ex)
- {
- cout << "Error:TargetManager:CORBA Generic Exception " << endl;
- cerr << "Error:TargetManager:Exception in UpdateDomain call" << ex << endl;
- }
- }
- // Now make a call of getAvailableResources on the TargetManager ...
- try
- {
- Deployment::Domain_var domainV = targetI->getAvailableResources();
-
- // here write things to file ...
- write_to_file (domainV.in());
-
- ACE_DEBUG ((LM_DEBUG , "\n\nGetAvailableResources Returned \n"));
- ::Deployment::DnC_Dump::dump (domainV);
- }
- catch(CORBA::NO_IMPLEMENT &)
- {
- cerr << "Error:TargetManager:CORBA::NO_IMPLEMENT thrown" << endl;
- }
- catch(CORBA::Exception & ex)
- {
- cout << "Error:TargetManager:CORBA Generic Exception " << endl;
- cerr << "Error:TargetManager:Exception in TargetManager call" << ex << endl;
- }
-
- // Finally destroy the ORB
- orb->destroy ();
- }
- catch (CORBA::Exception & ex) {
- cerr << "Error:TargetManager:CORBA exception raised!" << ex << endl;
- }
- return 0;
-}
-
-void write_to_file (::Deployment::Domain domain)
-{
- for (size_t i = 0;i < domain.node.length ();i++)
- {
- std::ofstream out (domain.node[i].name.in ());
-
-
- // write in the node usage ...
- for (size_t j = 0;j < domain.node[i].resource.length ();j++)
- {
-
- if (!strcmp (domain.node[i].resource[j].name.in (), "Processor"))
- {
- CORBA::Double node_cpu;
- domain.node[i].resource[j].property[0].value >>= node_cpu;
- out << node_cpu << std::endl;
- }
- if (!strcmp (domain.node[i].resource[j].name.in (), "NA_Monitor"))
- {
- std::string file_name = "NA_";
- file_name += domain.node[i].name.in ();
- std::ofstream na_out (file_name.c_str ());
- CORBA::Double na_node_cpu;
- domain.node[i].resource[j].property[0].value >>= na_node_cpu;
- na_out << na_node_cpu << std::endl;
- na_out.close ();
- }
- }
-
- out.close ();
- }
-
-}
diff --git a/CIAO/DAnCE/TargetManager/Deployment_Configuration.cpp b/CIAO/DAnCE/TargetManager/Deployment_Configuration.cpp
deleted file mode 100644
index 6b5325e840c..00000000000
--- a/CIAO/DAnCE/TargetManager/Deployment_Configuration.cpp
+++ /dev/null
@@ -1,152 +0,0 @@
-// $Id$
-
-#include "Deployment_Configuration.h"
-
-#include "ace/OS_NS_stdio.h"
-
-const int NAME_BUFSIZE = 1024;
-
-CIAO::Deployment_Configuration::Deployment_Configuration (CORBA::ORB_ptr o)
- : orb_ (CORBA::ORB::_duplicate (o))
-{
-}
-
-CIAO::Deployment_Configuration::~Deployment_Configuration (void)
-{
- this->deployment_info_.unbind_all ();
-}
-
-int
-CIAO::Deployment_Configuration::init (const char *filename)
-{
- // @@ We should change to use ACE_Configuration here.
-
- if (filename == 0)
- {
- ACE_ERROR ((LM_ERROR, "CIAO (%P|%t) Deployment_Configuration.cpp"
- ": Unable to identify the file name \n"));
- return -1;
- }
-
- FILE *inf = ACE_OS::fopen (filename, "r");
-
- if (inf == NULL)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "DAnCE (%P|%t) Deployment_Configuration.cpp:"
- "Fail to open node manager map data file: %s : \n",
- filename),
- -1);
- }
-
- char destination[NAME_BUFSIZE], ior[NAME_BUFSIZE];
- int first = 1;
-
- while (fscanf (inf, "%s %s", destination, ior ) != EOF)
- {
- // This should not fail!!
- //
- if (this->deployment_info_.bind (destination, ior) != 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "DAnCE (%P|%t) Deployment_Configuration.cpp:"
- "Failed to bind destination [%s] : \n",
- destination),
- -1);
- }
-
- if (first)
- {
- this->default_node_manager_.IOR_ = ior;
- first = 0;
- }
- }
- return 0;
-}
-
-const char *
-CIAO::Deployment_Configuration::get_node_manager_ior (const char *name)
-{
- if (name == 0)
- return get_default_node_manager_ior ();
-
- ACE_Hash_Map_Entry
- <ACE_CString,
- CIAO::Deployment_Configuration::Node_Manager_Info> *entry = 0;
-
- if (this->deployment_info_.find (ACE_CString (name),
- entry) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "DAnCE (%P|%t) Deployment_Configuration.cpp:"
- "Failed to find IOR for destination [%s] : \n",
- name));
- return 0;
- }
-
- return entry->int_id_.IOR_.c_str ();
-}
-
-const char *
-CIAO::Deployment_Configuration::get_default_node_manager_ior (void)
-{
- if (this->default_node_manager_.IOR_.length () == 0)
- return 0;
- return this->default_node_manager_.IOR_.c_str ();
-}
-
-::Deployment::NodeManager_ptr
-CIAO::Deployment_Configuration::get_node_manager (const char *name
- ACE_ENV_ARG_DECL)
-{
- if (name == 0)
- return get_default_node_manager (ACE_ENV_SINGLE_ARG_PARAMETER);
-
- ACE_Hash_Map_Entry
- <ACE_CString,
- CIAO::Deployment_Configuration::Node_Manager_Info> *entry = 0;
-
- if (this->deployment_info_.find (ACE_CString (name),
- entry) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "DAnCE (%P|%t) Deployment_Configuration.cpp:"
- "Failed to find IOR for destination [%s] : \n",
- name));
- return 0;
- }
-
- if (CORBA::is_nil (entry->int_id_.node_manager_.in ()))
- {
- CORBA::Object_var temp = this->orb_->string_to_object
- (entry->int_id_.IOR_.c_str ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- entry->int_id_.node_manager_ =
- ::Deployment::NodeManager::_narrow (temp.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- }
- return ::Deployment::NodeManager::_duplicate
- (entry->int_id_.node_manager_.in ());
-}
-
-::Deployment::NodeManager_ptr
-CIAO::Deployment_Configuration::get_default_node_manager (ACE_ENV_SINGLE_ARG_DECL)
-{
- if (CORBA::is_nil (this->default_node_manager_.node_manager_.in ()))
- {
- CORBA::Object_var temp = this->orb_->string_to_object
- (this->default_node_manager_.IOR_.c_str ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- this->default_node_manager_.node_manager_ =
- ::Deployment::NodeManager::_narrow (temp.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- }
- return ::Deployment::NodeManager::_duplicate
- (this->default_node_manager_.node_manager_.in ());
-}
diff --git a/CIAO/DAnCE/TargetManager/Deployment_Configuration.h b/CIAO/DAnCE/TargetManager/Deployment_Configuration.h
deleted file mode 100644
index effca979a4c..00000000000
--- a/CIAO/DAnCE/TargetManager/Deployment_Configuration.h
+++ /dev/null
@@ -1,129 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Deployment_Configuration.h
- *
- * $Id$
- *
- * The Deployment_Configuration provides abstraction for the
- * deployment mechanisms.
- *
- * @author Nanbor Wang <nanbor@cs.wustl.edu>
- * @author Gan Deng <gan.deng@vanderbilt.edu>
- */
-//=============================================================================
-#ifndef CIAO_DEPLOYMENT_CONFIGURATION_H
-#define CIAO_DEPLOYMENT_CONFIGURATION_H
-#include /**/ "ace/pre.h"
-
-#include "ace/Hash_Map_Manager_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ciao/NodeManagerC.h"
-#include "tao/Valuetype/ValueBase.h"
-#include "tao/Valuetype/Valuetype_Adapter_Impl.h"
-#include "ace/SString.h"
-
-#include "DomainApplicationManager/DomainApplicationManager_Export.h"
-
-namespace CIAO
-{
- /**
- * @class Deployment_Configuration
- *
- * @brief A class that provides strategies on deployment topology.
- *
- * This class provides strategies on how the DomainApplicationManager
- * should deploy an deployment plan at domain-level. This is achieved
- * by providing mappings from deployment destination names to actually
- * NodeManager daemon IORs, and the strategy for which default NodeManager
- * daemons a deployment mechanism should use.
- *
- * This is a trivial implementation of the deployment configuration
- * strategy. We can enhance this class later on to provide
- * different deployment location strategies, such as naming service.
- */
- class DomainApplicationManager_Export Deployment_Configuration
- {
- public:
- typedef struct _node_manager_info
- {
- _node_manager_info (const char *ior = 0)
- {
- IOR_ = ior;
- }
-
- ACE_CString IOR_;
- ::Deployment::NodeManager_var node_manager_;
- } Node_Manager_Info;
-
- Deployment_Configuration (CORBA::ORB_ptr o);
-
- /// Destructor
- virtual ~Deployment_Configuration (void);
-
- /**
- * Init method takes the filename to a configuration file which
- * has a simple line format of name, ior string delimited by a
- * space in each line.
- *
- * name IOR-string
- *
- * @retval 0 on success.
- * @retval -1 otherwise.
- */
- int init (const char *filename);
-
- /**
- * @retval 0 if no valid name were found. When @c name = 0, then
- * this function behave exactly as get_default_activator_ior.
- */
- virtual const char *get_node_manager_ior (const char *name);
-
- /**
- * Return the default NodeManager the DomainApplicationManager
- * should use to deploy a component. In this implementation, the
- * first entry in the deployment configuration data file is always
- * the entry for default activator.
- *
- * @retval 0 if no valid daemon is configured.
- */
- virtual const char *get_default_node_manager_ior ();
-
- /**
- * @retval nil if no valid name were found.
- */
- virtual ::Deployment::NodeManager_ptr
- get_node_manager (const char *name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
-
- /**
- * Return the reference to the default NodeManager the
- * DomainApplicationManager should use to deploy a node-level
- * deployment plan..
- *
- * @retval nil if no valid daemon is configured.
- */
- virtual ::Deployment::NodeManager_ptr
- get_default_node_manager (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
-
- protected:
- CORBA::ORB_var orb_;
-
- ACE_Hash_Map_Manager_Ex<ACE_CString,
- Node_Manager_Info,
- ACE_Hash<ACE_CString>,
- ACE_Equal_To<ACE_CString>,
- ACE_Null_Mutex> deployment_info_;
-
- Node_Manager_Info default_node_manager_;
- };
-
-}
-
-#include /**/ "ace/post.h"
-#endif /* CIAO_DEPLOYMENT_CONFIGURATION_H */
diff --git a/CIAO/DAnCE/TargetManager/DomainDataManager.cpp b/CIAO/DAnCE/TargetManager/DomainDataManager.cpp
deleted file mode 100644
index 708996663d7..00000000000
--- a/CIAO/DAnCE/TargetManager/DomainDataManager.cpp
+++ /dev/null
@@ -1,738 +0,0 @@
-// $Id$
-//===============================================================
-/**
- * @file DomainDataManager.cpp
- *
- * @brief Maintains the Domain Information
- *
- * It contains the entire Domain information.Both the
- * initial domain as well as the current available domain.
- *
- * @author Nilabja Roy nilabjar@dre.vanderbilt.edu
- */
-//===============================================================
-#include "DomainDataManager.h"
-
-#include "Config_Handlers/DD_Handler.h"
-#include "Config_Handlers/DnC_Dump.h"
-#include "ciao/CIAO_common.h"
-
-const char * domain_file_name = "Domain.cdd";
-
-CIAO::DomainDataManager* CIAO::DomainDataManager::global_data_manager_ = 0;
-
-CIAO::DomainDataManager * CIAO::DomainDataManager::create (CORBA::ORB_ptr orb,
- ::Deployment::TargetManager_ptr target
- )
-{
- if (global_data_manager_ == 0)
- {
- global_data_manager_ = new DomainDataManager (orb , target);
- }
- return global_data_manager_;
-}
-
-
-CIAO::DomainDataManager* CIAO::DomainDataManager::get_data_manager ()
-{
- return global_data_manager_;
-}
-
-
-void CIAO::DomainDataManager::delete_data_manger ()
-{
- if (global_data_manager_)
- delete global_data_manager_;
-}
-
-
-
-int CIAO::DomainDataManager::update_domain (
- const ::CORBA::StringSeq &,
- const ::Deployment::Domain & domainSubset,
- ::Deployment::DomainUpdateKind update_kind)
-{
- // Update the subset of the domain which the above
- // parameter corresponds to
-
-
- //check the type of update ..
-
- switch (update_kind)
- {
- case ::Deployment::UpdateAll:
- case ::Deployment::UpdateAvailable:
- break;
- case ::Deployment::Add:
- add_to_domain (domainSubset);
- break;
- case ::Deployment::Delete:
- delete_from_domain (domainSubset);
- break;
- default:
- break;
- }
-
- int size = current_domain_.node.length ();
-
- int i;
- for (i=0;i < size;i++)
- {
- if (!strcmp (domainSubset.node[0].name ,
- current_domain_.node[i].name))
- {
- // found a match
- // for now overwrite the entire Node info ...
- // but later , this has to be changed to overwrite
- // only the specific part ...
- if (CIAO::debug_level () > 9)
- {
- ACE_DEBUG ((LM_DEBUG , "TM::Changed the cpu Value\n"));
- }
- current_domain_.node[i] = domainSubset.node[0];
- break; // finished job ...break
- }
- }
-
- if (i == size)
- {
- // thus the node is new .. add it to current_domain_
- // later change it ...
- current_domain_.node.length (size+1);
- current_domain_.node[size]=domainSubset.node[0];
- }
- if (CIAO::debug_level () > 9)
- {
- ACE_DEBUG ((LM_DEBUG ,
- "TM::Inside The update Domain of Manager\n"));
- }
- return 0;
-}
-
-CIAO::DomainDataManager::
-DomainDataManager (CORBA::ORB_ptr orb,
- ::Deployment::TargetManager_ptr target)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- deployment_config_ (orb_.in()),
- target_mgr_ (::Deployment::TargetManager::_duplicate(target))
-{
- // ACE_DEBUG((LM_DEBUG , "Calling DD_HANDLER\n"));
- CIAO::Config_Handlers::DD_Handler dd (domain_file_name);
- // ACE_DEBUG((LM_DEBUG , "After DD_HANDLER Constructor\n"));
- ::Deployment::Domain* dmn = dd.domain_idl ();
- // ACE_DEBUG((LM_DEBUG , "After DD_HANDLER domain_idl\n"));
-
- if (CIAO::debug_level () > 9)
- ::Deployment::DnC_Dump::dump (*dmn);
-
- current_domain_ = *dmn;
- initial_domain_ = current_domain_;
-
- // initialize the provisioning domain
- provisioned_data_ = initial_domain_;
-
- update_node_status ();
-
- call_all_node_managers ();
-}
-
-::Deployment::Domain* CIAO::DomainDataManager::get_current_domain ()
-{
- return new ::Deployment::Domain (provisioned_data_);
-}
-
-::Deployment::Domain* CIAO::DomainDataManager::get_initial_domain ()
-{
- return new ::Deployment::Domain (initial_domain_);
-}
-
-int CIAO::DomainDataManager::readin_domain_data ()
-{
- // here read in Domain data ...
- //
- return 0;
-}
-
-int CIAO::DomainDataManager::call_all_node_managers ()
-{
- if ( this->deployment_config_.init ("NodeDetails.dat") == -1 )
- {
- ACE_ERROR ((LM_ERROR,
- "TargetM (%P|%t) DomainDataManager.cpp -"
- "CIAO::DomainDataManager::call_all_node_managers -"
- "ERROR while trying to initialize after reading "
- "node details DAT file \n"));
- return 0;
- }
-
- int length = initial_domain_.node.length ();
- if (CIAO::debug_level () > 9)
- {
- ACE_DEBUG ((LM_DEBUG, "Number of nodes in domain.cdd is : %d\n", length));
- }
-
- for (int i=0;i < length;i++)
- {
-
- ::Deployment::NodeManager_var node_manager;
-
-
- try
- {
- node_manager =
- deployment_config_.get_node_manager
- (initial_domain_.node[i].name.in ());
- }
- catch (CORBA::Exception&)
- {
- ACE_ERROR ((LM_ERROR, "DANCE::TM (%P|%t) DomainDataManager.cpp: "
- "Error trying to contact NodeManager %s\n",
- initial_domain_.node[i].name.in ()));
- continue;
- }
-
-
- if (!CORBA::is_nil (node_manager.in ()))
- {
- if (CIAO::debug_level () > 9)
- {
- ACE_DEBUG ((LM_DEBUG, "Trying to contact nodemanager on %s\n",
- initial_domain_.node[i].name.in ()));
- }
- Deployment::Logger_ptr log =
- Deployment::Logger::_nil ();
- ::Deployment::Domain sub_domain;
- sub_domain.UUID = CORBA::string_dup("Node-Level-domain");
- sub_domain.label = CORBA::string_dup("Node-level-domain");
- sub_domain.sharedResource.length(0);
- sub_domain.interconnect.length(0);
- sub_domain.bridge.length(0);
- sub_domain.infoProperty.length(0);
- sub_domain.node.length (1);
- sub_domain.node[0] = initial_domain_.node[i];
- try
- {
- node_manager->joinDomain (sub_domain,
- target_mgr_.in (),
- log);
- }
- catch (CORBA::Exception& ex)
- {
- ACE_DEBUG ((LM_DEBUG , "TM::Error in calling Join Domain==\n"));
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught in "
- "DomainDataManager::joinDomain");
- }
- }
- }
- return 0;
-
-}
-
-CIAO::Host_NodeManager_seq * CIAO::DomainDataManager::get_node_managers ()
-{
- ::CIAO::Host_NodeManager_seq* node_mgr_seq =
- new ::CIAO::Host_NodeManager_seq ();
- node_mgr_seq->length (initial_domain_.node.length ());
- for (unsigned int i=0;i < initial_domain_.node.length ();i++)
- {
- (*node_mgr_seq)[i].host_ =
- CORBA::string_dup (initial_domain_.node[i].name);
- ::Deployment::NodeManager_var node_manager =
- deployment_config_.get_node_manager (initial_domain_.node[i].name);
- // if (node_manager.in () != 0)
- {
- (*node_mgr_seq)[i].node_mgr_ = ::CIAO::NodeManagerDaemon::_narrow (node_manager.in ());
- }
- }
- return node_mgr_seq;
-}
-
-CIAO::Host_Infos* CIAO::DomainDataManager::get_cpu_info ()
-{
- CIAO::Host_Infos* host_info_seq = new CIAO::Host_Infos ();
- host_info_seq->length (current_domain_.node.length ());
-
- if (CIAO::debug_level () > 9)
- ACE_DEBUG ((LM_DEBUG , "TM:: The node length is [%d]",
- current_domain_.node.length ()));
-
- for (unsigned int i=0;i < current_domain_.node.length ();i++)
- {
- (*host_info_seq)[i].hostname =
- CORBA::string_dup (current_domain_.node[i].name);
- // ACE_DEBUG ((LM_DEBUG , "The resource length is [%d]",
- // current_domain_.node[i].resource.length ()));
-
- for (unsigned int j = 0;j < current_domain_.node[i].resource.length ();j++)
- {
- if (!strcmp(
- current_domain_.node[i].resource[j].name,
- "Processor"))
- {
- current_domain_.node[i].resource[j].property[0].value
- >>= (*host_info_seq)[i].cpu_util;
- CORBA::Double d;
- current_domain_.node[i].resource[j].property[0].value
- >>= d;
- // ACE_DEBUG ((LM_DEBUG, "TM::The current cpu util is [%f]\n", d));
- }
- }
- }
-
- if (CIAO::debug_level () > 9)
- ACE_DEBUG ((LM_DEBUG , "TM::Returning from get_cpu_info"));
-
- return host_info_seq;
-}
-
-CORBA::Long CIAO::DomainDataManager::get_pid (ACE_CString cmp)
-{
- CORBA::Long pid;
-
- // This is really ineffiecient this is O(n) ; searching all the nodes
- // all the resources for a particular component.
- // It needs to be stored in some other data structure
-
- for (unsigned int i=0;i < current_domain_.node.length ();i++)
- {
- if (CIAO::debug_level () > 9)
- ACE_DEBUG ((LM_DEBUG , "TM::The resource length is [%d]",
- current_domain_.node[i].resource.length ()));
-
- for (unsigned int j = 0;j < current_domain_.node[i].resource.length ();j++)
- {
- // The resource
- if (!strcmp(
- current_domain_.node[i].resource[j].name,
- "Component") &&
- ACE_CString (current_domain_.node[i].resource[j].property[0].name) ==
- cmp)
- {
- current_domain_.node[i].resource[j].property[0].value
- >>= pid;
- if (CIAO::debug_level () > 9)
- ACE_DEBUG ((LM_DEBUG,
- "TM::getpid::The current pid is [%d]\n", pid));
-
- }
- } // resources
- }// nodes
-
- return pid;
-}
-
-void CIAO::DomainDataManager
-::commitResources (
- const ::Deployment::DeploymentPlan & plan)
-{
- // commit the resources
- // parse into the plan and commit resources ...
-
- // set the action value
- current_action_ = commit;
-
- // temporary created to guard against exceptions
- ::Deployment::Domain temp_provisioned_data =
- provisioned_data_;
-
- for (unsigned int i = 0;i < plan.instance.length ();i++)
- {
- for (unsigned int j = 0;j < temp_provisioned_data.node.length ();j++)
- {
- if (!strcmp (plan.instance[i].node.in () ,
- temp_provisioned_data.node[j].name.in ()))
- {
- if (CIAO::debug_level () > 9)
- ACE_DEBUG ((LM_DEBUG ,
- "TM::commitResource::Host name matched\n"));
- try {
- match_requirement_resource (
- plan.instance[i].deployedResource,
- temp_provisioned_data.node[j].resource);
- }
- catch (::Deployment::ResourceNotAvailable& ex)
- {
- // catch the exception and add parameters
- ex.elementName =
- CORBA::string_dup (temp_provisioned_data.node[j].name);
-
- throw ex;
- }
- }
- }
- }
-
- // here commit the commitresources
- provisioned_data_ = temp_provisioned_data;
-}
-
-
-void CIAO::DomainDataManager::
-releaseResources (
- const ::Deployment::DeploymentPlan& plan)
-{
- // release the resources
-
-
- // set the action value
- current_action_ = release;
-
- for (unsigned int i = 0;i < plan.instance.length ();i++)
- {
- for (unsigned int j = 0;j < provisioned_data_.node.length ();j++)
- {
- if (!strcmp (plan.instance[i].node.in () ,
- provisioned_data_.node[j].name.in ()))
- {
- if (CIAO::debug_level () > 9)
- ACE_DEBUG ((LM_DEBUG ,
- "TM::commitResource::Host name matched\n"));
-
- match_requirement_resource (
- plan.instance[i].deployedResource,
- provisioned_data_.node[j].resource);
-
- }
- }
- }
-
-}
-
-
-void CIAO::DomainDataManager::
-match_requirement_resource (
- ::Deployment::InstanceResourceDeploymentDescriptions deployed,
- ::Deployment::Resources & available
- )
-{
- // here match the deployed to the available
-
- for (unsigned int i = 0;i < deployed.length ();i++)
- {
- // for each deployed resource ....search the corresponding
- // available resource
- for (unsigned int j = 0;j < available.length ();j++)
- {
- if (!strcmp (deployed[i].requirementName, available[j].name))
- {
- if (CIAO::debug_level () > 9)
- ACE_DEBUG ((LM_DEBUG ,
- "TM::commitResource::Requirement name matched\n"));
- // search for the resourcename in the resourceType
- for (unsigned int k = 0;k < available[j].resourceType.length ();k++)
- {
- if (!strcmp (deployed[i].resourceName,
- available[j].resourceType[k]))
- {
- if (CIAO::debug_level () > 9)
- ACE_DEBUG ((LM_DEBUG ,
- "TM::commitResource::Resource name matched\n"));
-
- try {
- match_properties (deployed[i].property,
- available[j].property);
- }
- catch (::Deployment::ResourceNotAvailable& ex)
- {
- // catch the exception and add parameters
- ex.resourceType =
- CORBA::string_dup (available[j].resourceType[k]);
- ex.resourceName =
- CORBA::string_dup (available[j].name);
- throw ex;
- }
- }
- }
- }
- }
- }
-
-}
-
-void CIAO::DomainDataManager::
-match_properties (
- ::Deployment::Properties deployed,
- ::Deployment::SatisfierProperties & available)
-{
- for (unsigned int i = 0;i < deployed.length ();i++)
- {
- for (unsigned int j = 0;j < available.length ();j++)
- if (!strcmp (deployed[i].name , available[j].name))
- {
- // check kind here ....and then subtract ....
- // accordingly , ..this is complex ... better to write
- // some specialised algo
- // for now assuming Capacity ....
- // and tk_double ....
- if (CIAO::debug_level () > 9)
- ACE_DEBUG ((LM_DEBUG ,
- "TM::commitResource::Property name matched\n"));
-
- commit_release_resource (deployed[i] , available[j]);
-
- }
- }
-}
-
-void CIAO::DomainDataManager::commit_release_resource (
- ::Deployment::Property & deployed,
- ::Deployment::SatisfierProperty & available)
-{
- if (current_action_ == commit)
- {
-
- CORBA::Long required_d;
-
- if ((deployed.value >>= required_d) == false)
- ACE_ERROR ((LM_ERROR, "Failed to extract required amount\n"));
-
- CORBA::Long available_d;
-
- if ((available.value >>= available_d) == false)
- ACE_ERROR ((LM_ERROR, "failed to extract available amount\n"));
-
- if (available_d >= required_d)
- {
- available_d = available_d - required_d;
- if (CIAO::debug_level () > 9)
- ACE_DEBUG ((LM_DEBUG, "TM::The available is [%f]",
- available_d));
-
- available.value <<= available_d;
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "Insufficient resources! Available: %d, Required %d\n",
- available_d, required_d));
- throw ::Deployment::ResourceNotAvailable ("",
- "",
- deployed.name.in (),
- "",
- "");
- }
-
-
- }
- else
- {
- //must be release
- CORBA::Long required_d;
- deployed.value >>= required_d;
- CORBA::Long available_d;
- available.value >>= available_d;
-
- available_d = available_d + required_d;
-
-
- // Should we check for bin > 100 ??????
-
- if (CIAO::debug_level () > 9)
- ACE_DEBUG ((LM_DEBUG, "TM::The available is [%f]",
- available_d));
-
- available.value <<= available_d;
- }
-}
-
-void CIAO::DomainDataManager::stop_monitors ()
-{
-
- int length = initial_domain_.node.length ();
- if (CIAO::debug_level () > 9)
- {
- ACE_DEBUG ((LM_DEBUG, "Number of nodes in domain.cdd is : %d\n", length));
- }
-
- for (int i=0;i < length;i++)
- {
-
- ::Deployment::NodeManager_var node_manager;
-
-
- try
- {
- node_manager =
- deployment_config_.get_node_manager
- (initial_domain_.node[i].name.in ());
- }
- catch (CORBA::Exception&)
- {
- ACE_ERROR ((LM_ERROR, "DANCE::TM (%P|%t) DomainDataManager.cpp: "
- "Error in get Node Manager from Deployment Config %s\n",
- initial_domain_.node[i].name.in ()));
- continue;
- }
-
-
- if (!CORBA::is_nil (node_manager.in ()))
- {
- if (CIAO::debug_level () > 9)
- {
- ACE_DEBUG ((LM_DEBUG, "Trying to contact nodemanager on %s\n",
- initial_domain_.node[i].name.in ()));
- }
- try
- {
- node_manager->leaveDomain ();
- }
- catch (CORBA::Exception& ex)
- {
- ACE_DEBUG ((LM_DEBUG , "TM::Error in calling Leave Domain\n"));
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught in "
- "DomainDataManager::leaveDomain");
- }
- }
- }
- return;
-
-}
-
-int CIAO::DomainDataManager::add_to_domain (
- const ::Deployment::Domain& domain)
-{
- // here add the domain to the Domain
- // right now use only a node
-
- // got to take care of the fact , that a node can be added ,
- // while it is still in the domain
-
- //iterate through the supplied domain
- //for each node
- // find it in the pristine domain
- // and copy it back to the provisioned_domain
-
- for (CORBA::ULong i = 0;i < domain.node.length ();i++)
- {
- //find in the pristine domain
- ::Deployment::Node a_node;
-
- if (!this->find_in_initial_domain (domain.node[i].name.in (),
- a_node))
- continue; // dont know this node
-
- //check if already present
- if (!this->find_in_provisioned_domain (domain.node[i].name.in (),
- a_node))
- {
- // add the node to the domain ...
- provisioned_data_.node.length (provisioned_data_.node.length () + 1);
- provisioned_data_.node[provisioned_data_.node.length () - 1] =
- a_node;
- }
- }
-
-// ::Deployment::DnC_Dump::dump (this->provisioned_data_);
-
- ACE_DEBUG ((LM_DEBUG, "TM::Node Up Message Processed\n"));
-
- return 0;
-}
-
-bool CIAO::DomainDataManager::
-find_in_initial_domain (const char* node_name,
- ::Deployment::Node& node)
-{
- for (CORBA::ULong i =0;
- i < this->initial_domain_.node.length ();
- i++)
- {
- if (strcmp (node_name, this->initial_domain_.node[i].name.in ()) == 0)
- {
- node = this->initial_domain_.node[i];
- return true;
- }
- }
-
- // not found the node , retunr a node with an empty name
- return false;
-}
-
-
-bool CIAO::DomainDataManager::
-find_in_provisioned_domain (const char* node_name,
- ::Deployment::Node& node)
-{
- for (CORBA::ULong i =0;
- i < this->provisioned_data_.node.length ();
- i++)
- {
- if (strcmp (node_name, this->provisioned_data_.node[i].name.in ()) == 0)
- {
- node = this->provisioned_data_.node[i];
- return true;
- }
- }
-
- // not found the node , retunr a node with an empty name
- return false;
-}
-
-int CIAO::DomainDataManager::delete_from_domain (
- const ::Deployment::Domain& domain)
-{
- // validate input
- if (domain.node.length () == 0)
- return 1;
-
- if (domain.node.length () >
- this->provisioned_data_.node.length ())
- return 0;
-
- //algo : parse through the provisioned_data
- // for each node , find in the deleted domain list
- // if not found add it to the updated nodes list
-
- ::Deployment::Nodes updated_nodes;
- bool found = 0;
-
-
- for (CORBA::ULong j = 0;
- j < this->provisioned_data_.node.length ();
- j++)
- {
- found = 0;
-
- for (CORBA::ULong i = 0;i < domain.node.length ();i++)
- {
- if (strcmp (domain.node[i].name.in (),
- this->provisioned_data_.node[j].name.in ()) == 0)
- {
- found = 1;
- break; // found the node
- }
- }
- if (found)
- continue;
-
- // not found in the deleted list
-
- // update the length of the list
- updated_nodes.length (updated_nodes.length () + 1);
-
- // copy the node info
- updated_nodes[updated_nodes.length () - 1] =
- this->provisioned_data_.node[j];
-
- } // for provisioned_data
-
- // here update the provisioned data
- this->provisioned_data_.node = updated_nodes;
-
- return 1;
-}
-
-int CIAO::DomainDataManager::intimate_planner (
- const ::Deployment::Domain& domain)
-{
- // use the connection with the planner and get a reference to the planner
- // make a call top the planner
- Deployment::Domain d = domain;
- return 0;
-
-}
-
-bool CIAO::DomainDataManager::update_node_status ()
-{
- // update the node status here ...
- return 0;
-}
diff --git a/CIAO/DAnCE/TargetManager/DomainDataManager.h b/CIAO/DAnCE/TargetManager/DomainDataManager.h
deleted file mode 100644
index 2e39022dce4..00000000000
--- a/CIAO/DAnCE/TargetManager/DomainDataManager.h
+++ /dev/null
@@ -1,325 +0,0 @@
-// $Id$
-//===============================================================
-/**
- * @file DomainDataManager.h
- *
- * @brief Maintains the Domain Information
- *
- * It contains the entire Domain information.Both the
- * initial domain as well as the current available domain.
- *
- * @author Nilabja Roy nilabjar@dre.vanderbilt.edu
- */
-//===============================================================
-#ifndef DOMAIN_DATA_MGRH
-#define DOMAIN_DATA_MGRH
-
-#include "TargetManagerImplC.h"
-#include "Deployment_Configuration.h"
-
-/**
- * @namespace CIAO
- *
- * @brief The main CIAO namespace
- *
- */
-namespace CIAO
-{
- /**
- * @class DomainDataManager
- *
- * @brief Responsible for maintaining the Domain Information
- *
- * It maintains both the Current Domain Information as well
- * as the Initial domain at full capacity.
- */
- class DomainDataManager
- {
-
- public :
- /**
- * @operation updateDomain
- * @brief This function is called by the other classes to update
- * current domain data.
- * @param elements The string sequence of elements
- * being updated
- * @param domainSubset The subset of the actual Domain to be updated
- * @param updateKind Specifies the update type eg. add, delete, update
- *
- */
- int update_domain (const ::CORBA::StringSeq & elements,
- const ::Deployment::Domain & domainSubset,
- ::Deployment::DomainUpdateKind updateKind
- );
- /**
- * @operation getInitialDomain
- * @brief This function is called the Executor code
- * to get the Original Domain data.
- * @return Domain* The Initial Domain
- *
- */
- ::Deployment::Domain* get_initial_domain ();
-
- /**
- * @operation getCurrentDomain
- * @brief This function is called the Executor code
- * to get the Current Domain data.
- * @return Domain* The Current Domain
- */
- ::Deployment::Domain* get_current_domain ();
-
-
- /**
- * @operation create
- * @brief This function is called to create the Datamanager
- * @param orb The orb pointer
- * @param target The Target Manager Object Reference
- *
- * @description This function calls the constructor of the
- * class Domain Data Manager
- */
- static DomainDataManager * create (CORBA::ORB_ptr orb,
- ::Deployment::TargetManager_ptr target
- );
-
- /**
- * @operation get_data_manager
- * @brief Returns the static pointer to the
- * data manager.
- * @return DomainDataManager*
- * @description The staic get_data_manger function returning
- * the data_manager pointer
- */
- static DomainDataManager* get_data_manager ();
-
- /**
- * @operation delete_data_manager
- * @brief deletes the data manager
- */
-
- static void delete_data_manger ();
-
- /**
- * @operation get_node_managers
- * @brief returns the sequence of node managers
- * object reference
- */
-
- CIAO::Host_NodeManager_seq *
- get_node_managers ();
-
- /**
- * @operation get_cpu_info
- * @brief returns the node specific cpu utilization
- *
- * @return CIAO::Host_Infos*
- */
-
- CIAO::Host_Infos* get_cpu_info ();
-
- /**
- * @operation get_pid
- * @brief returns the pid of the component id submitted
- * @param cmp The component id
- *
- * @return process id
- */
- CORBA::Long get_pid (ACE_CString cmp);
-
- /**
- * @operation commitResources
- * @brief commits the resources that are specified
- * in the plan.
- * @param plan ::Deployment::DeploymentPlan
- * @exception ::Deployment::ResourceNotAvailable thrown
- * when the resources mentioned in the plan exceeds
- * the current resource.
- * @exception ::Deployment::PlanError thrown if the plan has any
- * error
- *
- */
- void commitResources (
- const ::Deployment::DeploymentPlan & plan);
-
- /**
- * @operation releaseResources
- * @brief The function releases the resources held by a plan
- *
- * @param argname ::Deployment::DeploymentPlan the plan whose
- * resources are to be released
- */
- void releaseResources (
- const ::Deployment::DeploymentPlan& plan);
-
- /**
- * @operation stop_monitors
- * @brief The function makes a call on the leaveDomain on the
- * NodeManager
- *
- * @description The node manager in turn stops the monitor
- *
- */
-
- void stop_monitors ();
-
- protected:
-
-
- /**
- * @operation Constructor
- * @param orb The orb pointer
- * @param target The Target Manager Object Reference
- * @description The constructor made proteccted so that no one can create
- * it.
- */
- DomainDataManager (CORBA::ORB_ptr orb,
- ::Deployment::TargetManager_ptr target
- );
-
- /**
- * @operation readinDomainData
- * @brief It will read the initial Domain data from
- * XML files.
- */
- int readin_domain_data ();
-
- /**
- * @operation match_requirement_resource
- * @brief Match the deployed resources to the
- * available resource
- */
- void match_requirement_resource (
- ::Deployment::InstanceResourceDeploymentDescriptions deployed,
- ::Deployment::Resources& available
- );
-
- /**
- * @operation match_properties
- * @brief Match the properties of a Requirement to the
- * properties of available resource
- * @param deployed The deployed Properties
- * @param available The available Properties
- */
-
- void match_properties (
- ::Deployment::Properties deployed,
- ::Deployment::SatisfierProperties& available);
-
-
- /// The different actiona that can take place
- enum Action {commit , release};
-
- /**
- * @operation commit_release_resource
- * @brief Either commits or releases the given resource
- * based on the current Action set.
- * @param deployed ::Deployment::Property is the resource
- * to be commited/released
- * @param available ::Deployment::SatisfierProperty is the
- * available resource from which committed/released.
- * @exception ::Deployment::ResourceNotAvailable thrown
- * when the deployed resources exceeds
- * the available resource.
- */
-
- void commit_release_resource ( ::Deployment::Property & deployed,
- ::Deployment::SatisfierProperty & available);
-
- /**
- * @operation call_all_node_managers
- * @brief This function calls all NM and gives them
- * the sub-domain
- */
- int call_all_node_managers ();
-
- /**
- * @operation add_to_domain
- * @brief This function add new elements to the
- * already existing domain
- *
- * @param domain Deployment::Domain contians the new
- * elements
- */
- int add_to_domain (const ::Deployment::Domain& domain);
-
- /**
- * @operation delete_from_domain
- * @brief This function deletes elements from the domain
- *
- * @param domain ::Deployment::Domain contains the new elements
- * in the domain
- */
- int delete_from_domain (const ::Deployment::Domain& domain);
-
- /**
- * @operation intimate_planner
- * @brief This function intimates the planner about a domain
- * change
- *
- * @param domain ::Deployment::Domain contains the new elements
- * in the domain
- */
- int intimate_planner (const ::Deployment::Domain& domain);
-
- /**
- * @operation find_in_initial_domain
- * @brief This function finds a new node in the initial_domain
- *
- * @param node The name of the node which is to be searched
- */
-
- bool find_in_initial_domain (const char* node_name,
- ::Deployment::Node& node);
- /**
- * @operation find_in_provisioned_domain
- * @brief This function finds a new node in the proviosiond_domain
- *
- * @param node The name of the node which is to be searched
- */
-
- bool find_in_provisioned_domain (const char* node_name,
- ::Deployment::Node& node);
-
- /**
- * @operation update_node_status
- * @brief updates the node status by reading it from a file
- */
-
- bool update_node_status ();
-
- /// The ORB pointer
- CORBA::ORB_var orb_;
-
- /// The Deployment Configuration
- CIAO::Deployment_Configuration deployment_config_;
-
- /// The Initial Domain - contains resources
- /// at total capacity
- ::Deployment::Domain initial_domain_;
-
-
- /// The Current Domain - contains resources
- /// at current capacity
- ::Deployment::Domain current_domain_;
-
- /// The Target Manager Context
- ::Deployment::TargetManager_var target_mgr_;
-
- /**
- * The staic data manager pointer implementing
- * singleton pattern
- */
- static DomainDataManager* global_data_manager_;
-
- /**
- * The static provisioned Domain data
- */
- ::Deployment::Domain provisioned_data_;
-
- ///The current action
- Action current_action_;
- };
-
-} // CIAO
-
-#endif /* DOMAIN_DATA_MGRH */
diff --git a/CIAO/DAnCE/TargetManager/DomainEvents.idl b/CIAO/DAnCE/TargetManager/DomainEvents.idl
deleted file mode 100644
index 2b86aac5227..00000000000
--- a/CIAO/DAnCE/TargetManager/DomainEvents.idl
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * @file DomainEvents.idl
- * @brief Contains Events in the Domain
- *
- * @author Nilabja R <nilabjar@dre.vanderbilt.edu>
- */
-
-#ifndef DOMAIN_CHANGE_IDL
-#define DOMAIN_CHANGE_IDL
-
-#include "ciao/Deployment_TargetData.idl"
-#include "ciao/TargetManager.idl"
-#include "ciao/CCM_Event.idl"
-
-module CIAO
-{
- eventtype Domain_Changed_Event
- {
- public ::Deployment::Domain changes;
- public ::Deployment::DomainUpdateKind change_kind;
- };
-};
-
-#endif
diff --git a/CIAO/DAnCE/TargetManager/TM_Client.mpc b/CIAO/DAnCE/TargetManager/TM_Client.mpc
deleted file mode 100644
index e332b49bb27..00000000000
--- a/CIAO/DAnCE/TargetManager/TM_Client.mpc
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id$
-
-// Client.mpc,v 1.6 2005/02/18 09:07:06 jwillemsen Exp
-
-
-project(TMClient): ciao_client_dnc,ciao_deployment_stub, ciao_config_handlers, ciao_events_dnc {
- after += CIAO_TargetManager_stub
- includes += $(CIAO_ROOT)/DAnCE $(TAO_ROOT)/orbsvcs
- includes += $(CIAO_ROOT)/DAnCE/TargetManager
- libs += TargetManager_stub NodeManager_stub
-
-
- IDL_Files {
- }
-
- Source_Files {
- CmpClient.cpp
- }
-
- Header_Files {
- }
-
- Inline_Files {
- }
-
- Template_Files {
- }
-}
diff --git a/CIAO/DAnCE/TargetManager/TargetManager.cidl b/CIAO/DAnCE/TargetManager/TargetManager.cidl
deleted file mode 100644
index b5c75074a1a..00000000000
--- a/CIAO/DAnCE/TargetManager/TargetManager.cidl
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id$
-
-/*
- * @file TargetManager.cidl
- * @brief The file contains the TargetManager component
- * defination
- */
-
-#ifndef TARGETMANAGER_CIDL
-#define TARGETMANAGER_CIDL
-
-
-#include "TargetManagerImpl.idl"
-
-/*
- * @composition TargetManager_i
- */
-
-composition session TargetManager_i
-{
- home executor TargetManagerHome_Exec
- {
- implements CIAO::TargetManagerHome;
- manages TargetManagerImpl_Exec;
- };
-};
-
-#endif
diff --git a/CIAO/DAnCE/TargetManager/TargetManager.mpc b/CIAO/DAnCE/TargetManager/TargetManager.mpc
deleted file mode 100644
index a755ffae6c6..00000000000
--- a/CIAO/DAnCE/TargetManager/TargetManager.mpc
+++ /dev/null
@@ -1,70 +0,0 @@
-// $Id$
-
-project(CIAO_TargetManager_stub): ciao_client_dnc, ciao_deployment_stub {
- after += NodeManager_stub
- sharedname = TargetManager_stub
- idlflags += -Wb,stub_export_macro=TARGETMANAGER_STUB_Export \
- -Wb,stub_export_include=TargetManager_stub_export.h \
- -Wb,skel_export_macro=TARGETMANAGER_SVNT_Export \
- -Wb,skel_export_include=TargetManager_svnt_export.h
- dynamicflags = TARGETMANAGER_STUB_BUILD_DLL
-
- libs += NodeManager_stub
-
- IDL_Files {
- TargetManagerImpl.idl
- TargetManagerExt.idl
- DomainEvents.idl
- }
-
- Source_Files {
- TargetManagerImplC.cpp
- TargetManagerExtC.cpp
- DomainEventsC.cpp
- }
-}
-
-project(CIAO_TargetManager_svnt) : ciao_servant_dnc {
- after += CIAO_TargetManager_stub
- sharedname = TargetManager_svnt
- libs += TargetManager_stub NodeManager_stub
-
- idlflags += -Wb,export_macro=TARGETMANAGER_SVNT_Export \
- -Wb,export_include=TargetManager_svnt_export.h
- dynamicflags = TARGETMANAGER_SVNT_BUILD_DLL
-
- CIDL_Files {
- TargetManager.cidl
- }
-
- IDL_Files {
- TargetManagerE.idl
- }
-
- Source_Files {
- TargetManagerEC.cpp
- TargetManagerImplS.cpp
- TargetManagerExtS.cpp
- TargetManager_svnt.cpp
- DomainEventsS.cpp
- }
-}
-
-
-project(CIAO_TargetManager_exec) : ciao_component_dnc, ciao_config_handlers, ciao_domainapplicationmanager_dnc {
- after += CIAO_TargetManager_svnt
- sharedname = TargetManager_exec
- libs += TargetManager_stub TargetManager_svnt NodeManager_stub
-
- idlflags += -Wb,export_macro=TARGETMANAGER_EXEC_Export \
- -Wb,export_include=TargetManager_exec_export.h
- dynamicflags = TARGETMANAGER_EXEC_BUILD_DLL
-
- Source_Files {
- DomainDataManager.cpp
- TargetManager_exec.cpp
- }
-
- IDL_Files {
- }
-}
diff --git a/CIAO/DAnCE/TargetManager/TargetManagerExt.idl b/CIAO/DAnCE/TargetManager/TargetManagerExt.idl
deleted file mode 100644
index 3336f3ffe5c..00000000000
--- a/CIAO/DAnCE/TargetManager/TargetManagerExt.idl
+++ /dev/null
@@ -1,80 +0,0 @@
-// $Id$
-
-/**
- * @file TargetManagerExt.idl
- *
- * @brief The Extensions to the TM interface for ARMS demo
- *
- * @author Nilabja R <nilabjar@dre.vanderbilt.edu>
- * @author Nishanth Shankaran <nshankar@dre.vanderbilt.edu>
- *
- * This file declares a interface which will be implemented as
- * a facet by the TargetManager component
- */
-
-/**
- * @module CIAO
- *
- * @brief The CIAO module
- */
-
-//#include <ciao/Deployment.idl>
-#include "DAnCE/Interfaces/NodeManagerDaemon.idl"
-
-module CIAO
-{
- /**
- * @struct Cpu_Info
- * @brief Consists of individual host-cpu info
- */
- struct Host_Info
- {
- string hostname;
- double cpu_util;
- };
-
- /// The sequence of CPU infos
- typedef sequence<Host_Info> Host_Infos;
-
- /**
- * @struct Component_Cpu_Util
- * @brief Contains a component CPU Util
- */
- struct Component_Info
- {
- string component_name;
- double cpu_util;
- };
-
- /// The sequence of component cpu utilization
- typedef sequence <Component_Info> Component_Infos;
-
-
- /**
- * @struct Host_NodeManager
- * @brief Contains the node manager to host reference
- */
- struct Host_NodeManager
- {
- string host_;
- ::CIAO::NodeManagerDaemon node_mgr_;
- };
-
- /// Sequence of NodeManager.
- typedef sequence <Host_NodeManager> Host_NodeManager_seq;
-
- /**
- * @interface TargetManagerExt
- * @brief The Target Manager Extension
- *
- * Contains the interface used by the RACE
- * controller.
- */
- interface TargetManagerExt
- {
- long get_pid (in string component_uuid);
- Host_Infos get_host_cpu ();
- Component_Infos get_component_cpu ();
- Host_NodeManager_seq get_all_node_managers ();
- };
-};
diff --git a/CIAO/DAnCE/TargetManager/TargetManagerImpl.idl b/CIAO/DAnCE/TargetManager/TargetManagerImpl.idl
deleted file mode 100644
index 97ef0d3fd9d..00000000000
--- a/CIAO/DAnCE/TargetManager/TargetManagerImpl.idl
+++ /dev/null
@@ -1,43 +0,0 @@
-// $Id$
-
-/**
- * @file TargetManagerImpl.idl
- * @brief TargetManager interface defintion
- *
- * @author Nilabja R <nilabjar@dre.vanderbilt.edu>
- */
-
-#ifndef TARGETMGR_IDL
-#define TARGETMGR_IDL
-
-
-
-#include "ciao/Components.idl"
-#include "ciao/Target_Data.idl"
-#include "TargetManagerExt.idl"
-
-#include "DomainEvents.idl"
-
-
-/**
- * @module CIAO
- *
- * @brief TargetManagenr interface defintion
- *
- */
-module CIAO
-{
- component TargetManagerImpl
- {
- provides ::Deployment::TargetManager targetMgr;
- provides CIAO::TargetManagerExt target_manager_ext;
-
- publishes Domain_Changed_Event changes;
- };
-
- home TargetManagerHome manages TargetManagerImpl
- {
- };
-};
-
-#endif
diff --git a/CIAO/DAnCE/TargetManager/TargetManager_exec.cpp b/CIAO/DAnCE/TargetManager/TargetManager_exec.cpp
deleted file mode 100644
index 2c22d608ecb..00000000000
--- a/CIAO/DAnCE/TargetManager/TargetManager_exec.cpp
+++ /dev/null
@@ -1,396 +0,0 @@
-// $Id$
-//===============================================================
-/**
- * @file TargetManager_exec.cpp
- *
- * @brief TargetManager Executor code
- *
- * @author Nilabja Roy nilabjar@dre.vanderbilt.edu
- */
-//===============================================================
-#include "TargetManager_exec.h"
-#include "ciao/CIAO_common.h"
-#include <orbsvcs/CosNamingC.h>
-#include "Config_Handlers/DD_Handler.h"
-#include "Config_Handlers/DnC_Dump.h"
-
-#include "DomainEventsC.h"
-
-using namespace std;
-
-namespace CIDL_TargetManager_i
-{
- //==================================================================
- // Facet Executor Implementation Class: TargetManager_exec_i
- //==================================================================
-
- TargetManager_exec_i::
- TargetManager_exec_i (TargetManagerImpl_exec_i* exec ,
- CORBA::ORB_ptr orb,
- TargetManagerImpl_Context *context
- )
- : _exec (exec),
- orb_ (orb),
- context_ (context)
- {
- // The DomainDataManager created here ...
-
- // get its own obj ref , then call
-
- ACE_DEBUG ((LM_DEBUG, "TM_Exec: getting ccm object\n"));
- CORBA::Object_var object = context_->get_CCM_object ();
- ACE_DEBUG ((LM_DEBUG, "TM_Exec: narrowing target_impl\n"));
- CIAO::TargetManagerImpl_var target_impl =
- CIAO::TargetManagerImpl::_narrow (object.in ());
- ACE_DEBUG ((LM_DEBUG, "TM_Exec: provide target manager\n"));
- ::Deployment::TargetManager_var target =
- target_impl->provide_targetMgr ();
- // dataManager_.reset (new CIAO::DomainDataManager (orb, target.in ()));
- ACE_DEBUG ((LM_DEBUG, "TM_Exec: creating domain data manager\n"));
- CIAO::DomainDataManager::create (orb, target.in());
- ACE_DEBUG ((LM_DEBUG, "TM_Exec: DDD created!\n"));
- }
-
- TargetManager_exec_i::~TargetManager_exec_i (void)
- {
- }
-
- // Operations from ::Deployment::TargetManager
-
- ::Deployment::Domain *
- TargetManager_exec_i::getAllResources (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return CIAO::DomainDataManager::
- get_data_manager ()->get_initial_domain ();
- }
-
- ::Deployment::Domain *
- TargetManager_exec_i::getAvailableResources (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return CIAO::DomainDataManager::
- get_data_manager ()->get_current_domain ();
- }
-
- void
- TargetManager_exec_i::commitResources (
- const ::Deployment::DeploymentPlan & plan
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Deployment::ResourceNotAvailable,
- ::Deployment::PlanError))
- {
- return CIAO::DomainDataManager::
- get_data_manager ()->commitResources (plan);
- }
-
- void
- TargetManager_exec_i::releaseResources (
- const ::Deployment::DeploymentPlan & plan
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return CIAO::DomainDataManager::
- get_data_manager ()->releaseResources (plan);
- }
-
- void
- TargetManager_exec_i::updateDomain (
- const ::CORBA::StringSeq & elements ,
- const ::Deployment::Domain & domainSubset ,
- ::Deployment::DomainUpdateKind updateKind
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- // Your code here.
- if (CIAO::debug_level () > 9)
- {
- ACE_DEBUG ((LM_DEBUG , ".. Update Domain called ...\n"));
- }
- CIAO::DomainDataManager::
- get_data_manager ()->update_domain (
- elements,
- domainSubset,
- updateKind
- );
-
- // here tell the planner about the changes
-
- // first get the node names which have failed ...
- // assuming nodes to only fail , for now
-
- if (updateKind == ::Deployment::Delete ||
- updateKind == ::Deployment::Add)
- {
- ACE_DEBUG ((LM_DEBUG , "TM::Creating the changed event\n"));
-
- CIAO::Domain_Changed_Event_var changed_event =
- new OBV_CIAO::Domain_Changed_Event ();
-
- ::Deployment::Domain_var temp_domain =
- new ::Deployment::Domain (domainSubset);
-
- ACE_DEBUG ((LM_DEBUG , "TM::After getting the current domain\n"));
- changed_event->changes (temp_domain);
- changed_event->change_kind (updateKind);
-
- ACE_DEBUG ((LM_DEBUG , "TM::Sending the event to the Planner_Manager\n"));
- context_->push_changes (changed_event);
- ACE_DEBUG ((LM_DEBUG , "TM::After Sending the event to the Planner_Manager\n"));
- }
-
- }
-
- //==================================================================
- // Facet Executor Implementation Class: TargetManagerExt_exec_i
- // required for RACE
- //==================================================================
-
- TargetManagerExt_exec_i::TargetManagerExt_exec_i (void)
- {
- }
-
- TargetManagerExt_exec_i::~TargetManagerExt_exec_i (void)
- {
- }
-
- // Operations from ::CIAO::TargetManagerExt
-
- ::CORBA::Long
- TargetManagerExt_exec_i::get_pid (
- const char * component_uuid
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- // Your code here.
- ACE_DEBUG ((LM_DEBUG, "Get PID :: Skeleton Impl"));
- return CIAO::DomainDataManager::
- get_data_manager ()->get_pid (component_uuid);
- }
-
- ::CIAO::Host_Infos *
- TargetManagerExt_exec_i::get_host_cpu (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- // Your code here.
- ACE_DEBUG ((LM_DEBUG, "Get host cpu :: Skeleton Impl entering\n"));
- return CIAO::DomainDataManager::
- get_data_manager ()->get_cpu_info ();
- }
-
- ::CIAO::Component_Infos *
- TargetManagerExt_exec_i::get_component_cpu (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- // Your code here.
- ACE_DEBUG ((LM_DEBUG, "Get component cpu :: Skeleton Impl"));
- return 0;
- }
-
- ::CIAO::Host_NodeManager_seq *
- TargetManagerExt_exec_i::get_all_node_managers
- (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return CIAO::DomainDataManager::
- get_data_manager ()->get_node_managers ();
- }
-
- //==================================================================
- // Component Executor Implementation Class: TargetManagerImpl_exec_i
- //==================================================================
-
- TargetManagerImpl_exec_i::TargetManagerImpl_exec_i (void)
- : exec_object_ (0)
- {
- }
-
- TargetManagerImpl_exec_i::~TargetManagerImpl_exec_i (void)
- {
- }
-
- // Supported or inherited operations.
-
- // Attribute operations.
-
- // Port operations.
-
- ::Deployment::CCM_TargetManager_ptr
- TargetManagerImpl_exec_i::get_targetMgr (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- // Your code here.
- if (CIAO::debug_level () > 9)
- {
- ACE_DEBUG ((LM_DEBUG , "Calling TM constructor"));
- }
-
- if (this->exec_object_.in () == 0)
- {
- this->exec_object_ = new TargetManager_exec_i(this,
- context_->_ciao_the_Container()->the_ORB(),
- context_
- );
- }
- return this->exec_object_.in ();
- }
-
- ::CIAO::CCM_TargetManagerExt_ptr TargetManagerImpl_exec_i
- ::get_target_manager_ext (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED
- ) ACE_THROW_SPEC ((CORBA::SystemException))
- {
- if (this->exec_ext_object_.in () == 0)
- {
- this->exec_ext_object_ = new TargetManagerExt_exec_i();
- }
- return this->exec_ext_object_.in ();
- }
-
- // Operations from Components::SessionComponent
-
- void
- TargetManagerImpl_exec_i::set_session_context (
- ::Components::SessionContext_ptr ctx
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CCMException))
- {
- this->context_ =
- TargetManagerImpl_Context::_narrow (
- ctx
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (this->context_ == 0)
- {
- ACE_THROW (CORBA::INTERNAL ());
- }
- }
-
- void
- TargetManagerImpl_exec_i::ciao_preactivate (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CCMException))
- {
- // Your code here.
- }
-
- void
- TargetManagerImpl_exec_i::ciao_postactivate (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CCMException))
- {
- // Your code here.
- }
-
-
- void
- TargetManagerImpl_exec_i::ccm_activate (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CCMException))
- {
- // Your code here.
- if (CIAO::debug_level () > 9)
- {
- ACE_DEBUG ((LM_DEBUG , "Inside CCM_ACTIVATE\n"));
- }
- get_targetMgr ();
- }
-
- void
- TargetManagerImpl_exec_i::ccm_passivate (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CCMException))
- {
- // Your code here.
- }
-
- void
- TargetManagerImpl_exec_i::ccm_remove (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CCMException))
- {
- // Your code here.
- ACE_DEBUG ((LM_DEBUG , "TM::ccm_remove , calling LeaveDomain\n"));
-
- //CIAO::DomainDataManager::get_data_manager ()->stop_monitors ();
-
- ACE_DEBUG ((LM_DEBUG , "TM::ccm_remove , After calling LeaveDomain\n"));
- return;
- }
-
-
- //==================================================================
- // Home Executor Implementation Class: TargetManagerHome_exec_i
- //==================================================================
-
- TargetManagerHome_exec_i::TargetManagerHome_exec_i (void)
- {
- }
-
- TargetManagerHome_exec_i::~TargetManagerHome_exec_i (void)
- {
- }
-
- // Supported or inherited operations.
-
- // Home operations.
-
- // Factory and finder operations.
-
- // Attribute operations.
-
- // Implicit operations.
-
- ::Components::EnterpriseComponent_ptr
- TargetManagerHome_exec_i::create (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CCMException))
- {
- ::Components::EnterpriseComponent_ptr retval =
- ::Components::EnterpriseComponent::_nil ();
-
- ACE_NEW_THROW_EX (
- retval,
- TargetManagerImpl_exec_i,
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (::Components::EnterpriseComponent::_nil ());
-
- return retval;
- }
-
- extern "C" TARGETMANAGER_EXEC_Export ::Components::HomeExecutorBase_ptr
- create_CIAO_TargetManagerHome_Impl (void)
- {
- ::Components::HomeExecutorBase_ptr retval =
- ::Components::HomeExecutorBase::_nil ();
-
- ACE_NEW_RETURN (
- retval,
- TargetManagerHome_exec_i,
- ::Components::HomeExecutorBase::_nil ());
-
- return retval;
- }
-}
diff --git a/CIAO/DAnCE/TargetManager/TargetManager_exec.h b/CIAO/DAnCE/TargetManager/TargetManager_exec.h
deleted file mode 100644
index 1b3b7b0e470..00000000000
--- a/CIAO/DAnCE/TargetManager/TargetManager_exec.h
+++ /dev/null
@@ -1,236 +0,0 @@
-// $Id$
-//===============================================================
-/**
- * @file TargetManager_exec.h
- *
- * @brief TargetManager Executor code
- *
- * @author Nilabja Roy nilabjar@dre.vanderbilt.edu
- */
-//===============================================================
-
-#ifndef CIAO_TARGETMANAGER_EXEC_H
-#define CIAO_TARGETMANAGER_EXEC_H
-
-#include /**/ "ace/pre.h"
-
-#include "TargetManager_svnt.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "TargetManager_exec_export.h"
-#include "tao/LocalObject.h"
-#include "DomainDataManager.h"
-
-namespace CIDL_TargetManager_i
-{
- class TargetManager_exec_i;
-
- class TARGETMANAGER_EXEC_Export TargetManagerImpl_exec_i
- : public virtual TargetManagerImpl_Exec,
- public virtual TAO_Local_RefCounted_Object
- {
- public:
- TargetManagerImpl_exec_i (void);
- virtual ~TargetManagerImpl_exec_i (void);
-
- // Supported or inherited operations.
-
- // Attribute operations.
-
- // Port operations.
-
- virtual ::Deployment::CCM_TargetManager_ptr
- get_targetMgr (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::CIAO::CCM_TargetManagerExt_ptr
- get_target_manager_ext (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((::CORBA::SystemException));
-
- // Operations from Components::SessionComponent
-
- virtual void
- set_session_context (
- ::Components::SessionContext_ptr ctx
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CCMException));
-
- virtual void
- ciao_preactivate (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CCMException));
-
- virtual void
- ciao_postactivate (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CCMException));
-
- virtual void
- ccm_activate (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CCMException));
-
- virtual void
- ccm_passivate (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CCMException));
-
- virtual void
- ccm_remove (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CCMException));
-
- protected:
- /// The service context pointer
- TargetManagerImpl_Context *context_;
-
- /// The exec Object
- ::Deployment::CCM_TargetManager_var exec_object_;
-
- ::CIAO::CCM_TargetManagerExt_var exec_ext_object_;
- };
-
- class TARGETMANAGER_EXEC_Export TargetManagerExt_exec_i
- : public virtual ::CIAO::CCM_TargetManagerExt,
- public virtual TAO_Local_RefCounted_Object
- {
- public:
- TargetManagerExt_exec_i (void);
- virtual ~TargetManagerExt_exec_i (void);
-
- // Operations from ::CIAO::TargetManagerExt
-
- virtual ::CORBA::Long
- get_pid (
- const char * component_uuid
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::CIAO::Host_Infos *
- get_host_cpu (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::CIAO::Component_Infos *
- get_component_cpu (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::CIAO::Host_NodeManager_seq *
- get_all_node_managers (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- };
-
- class TARGETMANAGER_EXEC_Export TargetManager_exec_i
- : public virtual ::Deployment::CCM_TargetManager,
- public virtual TAO_Local_RefCounted_Object
- {
- public:
- TargetManager_exec_i (TargetManagerImpl_exec_i* exec,
- CORBA::ORB_ptr orb,
- TargetManagerImpl_Context *context
- );
- virtual ~TargetManager_exec_i (void);
-
- // Operations from ::Deployment::TargetManager
-
- virtual ::Deployment::Domain *
- getAllResources (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Deployment::Domain *
- getAvailableResources (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- commitResources (
- const ::Deployment::DeploymentPlan & plan
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Deployment::ResourceNotAvailable,
- ::Deployment::PlanError));
-
- virtual void
- releaseResources (
- const ::Deployment::DeploymentPlan & argname
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- updateDomain (
- const ::CORBA::StringSeq & elements,
- const ::Deployment::Domain & domainSubset,
- ::Deployment::DomainUpdateKind updateKind
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- private:
- TargetManagerImpl_exec_i * _exec;
-
- ///The pointer to the Domain Manager
- std::auto_ptr<CIAO::DomainDataManager> dataManager_;
-
- /// The CORBA ORB ...
- CORBA::ORB_var orb_;
-
- /// The context object ...
- TargetManagerImpl_Context *context_;
- };
-
-
-
- class TARGETMANAGER_EXEC_Export TargetManagerHome_exec_i
- : public virtual TargetManagerHome_Exec,
- public virtual TAO_Local_RefCounted_Object
- {
- public:
- TargetManagerHome_exec_i (void);
- virtual ~TargetManagerHome_exec_i (void);
-
- // Supported or inherited operations.
-
- // Home operations.
-
- // Factory and finder operations.
-
- // Attribute operations.
-
- // Implicit operations.
-
- virtual ::Components::EnterpriseComponent_ptr
- create (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CCMException));
- };
-
- extern "C" TARGETMANAGER_EXEC_Export ::Components::HomeExecutorBase_ptr
- create_CIAO_TargetManagerHome_Impl (void);
-}
-
-#include /**/ "ace/post.h"
-
-#endif /* CIAO_TARGETMANAGER_EXEC_H */
diff --git a/CIAO/DAnCE/TargetManager/TargetManager_exec_export.h b/CIAO/DAnCE/TargetManager/TargetManager_exec_export.h
deleted file mode 100644
index 690e5b6136e..00000000000
--- a/CIAO/DAnCE/TargetManager/TargetManager_exec_export.h
+++ /dev/null
@@ -1,54 +0,0 @@
-
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl TARGETMANAGER_EXEC
-// ------------------------------
-#ifndef TARGETMANAGER_EXEC_EXPORT_H
-#define TARGETMANAGER_EXEC_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if !defined (TARGETMANAGER_EXEC_HAS_DLL)
-# define TARGETMANAGER_EXEC_HAS_DLL 1
-#endif /* ! TARGETMANAGER_EXEC_HAS_DLL */
-
-#if defined (TARGETMANAGER_EXEC_HAS_DLL) && (TARGETMANAGER_EXEC_HAS_DLL == 1)
-# if defined (TARGETMANAGER_EXEC_BUILD_DLL)
-# define TARGETMANAGER_EXEC_Export ACE_Proper_Export_Flag
-# define TARGETMANAGER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define TARGETMANAGER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* TARGETMANAGER_EXEC_BUILD_DLL */
-# define TARGETMANAGER_EXEC_Export ACE_Proper_Import_Flag
-# define TARGETMANAGER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define TARGETMANAGER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* TARGETMANAGER_EXEC_BUILD_DLL */
-#else /* TARGETMANAGER_EXEC_HAS_DLL == 1 */
-# define TARGETMANAGER_EXEC_Export
-# define TARGETMANAGER_EXEC_SINGLETON_DECLARATION(T)
-# define TARGETMANAGER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* TARGETMANAGER_EXEC_HAS_DLL == 1 */
-
-// Set TARGETMANAGER_EXEC_NTRACE = 0 to turn on library specific tracing even if
-// tracing is turned off for ACE.
-#if !defined (TARGETMANAGER_EXEC_NTRACE)
-# if (ACE_NTRACE == 1)
-# define TARGETMANAGER_EXEC_NTRACE 1
-# else /* (ACE_NTRACE == 1) */
-# define TARGETMANAGER_EXEC_NTRACE 0
-# endif /* (ACE_NTRACE == 1) */
-#endif /* !TARGETMANAGER_EXEC_NTRACE */
-
-#if (TARGETMANAGER_EXEC_NTRACE == 1)
-# define TARGETMANAGER_EXEC_TRACE(X)
-#else /* (TARGETMANAGER_EXEC_NTRACE == 1) */
-# if !defined (ACE_HAS_TRACE)
-# define ACE_HAS_TRACE
-# endif /* ACE_HAS_TRACE */
-# define TARGETMANAGER_EXEC_TRACE(X) ACE_TRACE_IMPL(X)
-# include "ace/Trace.h"
-#endif /* (TARGETMANAGER_EXEC_NTRACE == 1) */
-
-#endif /* TARGETMANAGER_EXEC_EXPORT_H */
-
-// End of auto generated file.
diff --git a/CIAO/DAnCE/TargetManager/TargetManager_stub_export.h b/CIAO/DAnCE/TargetManager/TargetManager_stub_export.h
deleted file mode 100644
index d362f4f4ac8..00000000000
--- a/CIAO/DAnCE/TargetManager/TargetManager_stub_export.h
+++ /dev/null
@@ -1,54 +0,0 @@
-
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl TARGETMANAGER_STUB
-// ------------------------------
-#ifndef TARGETMANAGER_STUB_EXPORT_H
-#define TARGETMANAGER_STUB_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if !defined (TARGETMANAGER_STUB_HAS_DLL)
-# define TARGETMANAGER_STUB_HAS_DLL 1
-#endif /* ! TARGETMANAGER_STUB_HAS_DLL */
-
-#if defined (TARGETMANAGER_STUB_HAS_DLL) && (TARGETMANAGER_STUB_HAS_DLL == 1)
-# if defined (TARGETMANAGER_STUB_BUILD_DLL)
-# define TARGETMANAGER_STUB_Export ACE_Proper_Export_Flag
-# define TARGETMANAGER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define TARGETMANAGER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* TARGETMANAGER_STUB_BUILD_DLL */
-# define TARGETMANAGER_STUB_Export ACE_Proper_Import_Flag
-# define TARGETMANAGER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define TARGETMANAGER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* TARGETMANAGER_STUB_BUILD_DLL */
-#else /* TARGETMANAGER_STUB_HAS_DLL == 1 */
-# define TARGETMANAGER_STUB_Export
-# define TARGETMANAGER_STUB_SINGLETON_DECLARATION(T)
-# define TARGETMANAGER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* TARGETMANAGER_STUB_HAS_DLL == 1 */
-
-// Set TARGETMANAGER_STUB_NTRACE = 0 to turn on library specific tracing even if
-// tracing is turned off for ACE.
-#if !defined (TARGETMANAGER_STUB_NTRACE)
-# if (ACE_NTRACE == 1)
-# define TARGETMANAGER_STUB_NTRACE 1
-# else /* (ACE_NTRACE == 1) */
-# define TARGETMANAGER_STUB_NTRACE 0
-# endif /* (ACE_NTRACE == 1) */
-#endif /* !TARGETMANAGER_STUB_NTRACE */
-
-#if (TARGETMANAGER_STUB_NTRACE == 1)
-# define TARGETMANAGER_STUB_TRACE(X)
-#else /* (TARGETMANAGER_STUB_NTRACE == 1) */
-# if !defined (ACE_HAS_TRACE)
-# define ACE_HAS_TRACE
-# endif /* ACE_HAS_TRACE */
-# define TARGETMANAGER_STUB_TRACE(X) ACE_TRACE_IMPL(X)
-# include "ace/Trace.h"
-#endif /* (TARGETMANAGER_STUB_NTRACE == 1) */
-
-#endif /* TARGETMANAGER_STUB_EXPORT_H */
-
-// End of auto generated file.
diff --git a/CIAO/DAnCE/TargetManager/TargetManager_svnt_export.h b/CIAO/DAnCE/TargetManager/TargetManager_svnt_export.h
deleted file mode 100644
index f57ce799949..00000000000
--- a/CIAO/DAnCE/TargetManager/TargetManager_svnt_export.h
+++ /dev/null
@@ -1,54 +0,0 @@
-
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl TARGETMANAGER_SVNT
-// ------------------------------
-#ifndef TARGETMANAGER_SVNT_EXPORT_H
-#define TARGETMANAGER_SVNT_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if !defined (TARGETMANAGER_SVNT_HAS_DLL)
-# define TARGETMANAGER_SVNT_HAS_DLL 1
-#endif /* ! TARGETMANAGER_SVNT_HAS_DLL */
-
-#if defined (TARGETMANAGER_SVNT_HAS_DLL) && (TARGETMANAGER_SVNT_HAS_DLL == 1)
-# if defined (TARGETMANAGER_SVNT_BUILD_DLL)
-# define TARGETMANAGER_SVNT_Export ACE_Proper_Export_Flag
-# define TARGETMANAGER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define TARGETMANAGER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* TARGETMANAGER_SVNT_BUILD_DLL */
-# define TARGETMANAGER_SVNT_Export ACE_Proper_Import_Flag
-# define TARGETMANAGER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define TARGETMANAGER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* TARGETMANAGER_SVNT_BUILD_DLL */
-#else /* TARGETMANAGER_SVNT_HAS_DLL == 1 */
-# define TARGETMANAGER_SVNT_Export
-# define TARGETMANAGER_SVNT_SINGLETON_DECLARATION(T)
-# define TARGETMANAGER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* TARGETMANAGER_SVNT_HAS_DLL == 1 */
-
-// Set TARGETMANAGER_SVNT_NTRACE = 0 to turn on library specific tracing even if
-// tracing is turned off for ACE.
-#if !defined (TARGETMANAGER_SVNT_NTRACE)
-# if (ACE_NTRACE == 1)
-# define TARGETMANAGER_SVNT_NTRACE 1
-# else /* (ACE_NTRACE == 1) */
-# define TARGETMANAGER_SVNT_NTRACE 0
-# endif /* (ACE_NTRACE == 1) */
-#endif /* !TARGETMANAGER_SVNT_NTRACE */
-
-#if (TARGETMANAGER_SVNT_NTRACE == 1)
-# define TARGETMANAGER_SVNT_TRACE(X)
-#else /* (TARGETMANAGER_SVNT_NTRACE == 1) */
-# if !defined (ACE_HAS_TRACE)
-# define ACE_HAS_TRACE
-# endif /* ACE_HAS_TRACE */
-# define TARGETMANAGER_SVNT_TRACE(X) ACE_TRACE_IMPL(X)
-# include "ace/Trace.h"
-#endif /* (TARGETMANAGER_SVNT_NTRACE == 1) */
-
-#endif /* TARGETMANAGER_SVNT_EXPORT_H */
-
-// End of auto generated file.
diff --git a/CIAO/DAnCE/TargetManager/descriptors/Domain.cdd b/CIAO/DAnCE/TargetManager/descriptors/Domain.cdd
deleted file mode 100644
index fe21a4b48f5..00000000000
--- a/CIAO/DAnCE/TargetManager/descriptors/Domain.cdd
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<Deployment:domain
- xmlns:Deployment="http://www.omg.org/Deployment"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
-
-<UUID>effd4bd0-6db0-4c50-9bb7-db9decebae1c</UUID>
-<label>Hello Domain</label>
-
-
-<node>
- <name>TargetManagerNode_1</name>
- <label>Sender's Node</label>
- <resource>
- <name>Processor</name>
- <resourceType>CPULoad</resourceType>
- <property>
- <name>LoadAverage</name>
- <kind>Quantity</kind>
- <dynamic>true</dynamic>
- <value>
- <type>
- <kind>tk_long</kind>
- </type>
- <value><long>99</long></value>
- </value>
- </property>
- </resource>
-</node>
-<node>
- <name>TargetManagerNode_2</name>
- <label>Receiver's Node</label>
- <resource>
- <name>Processor</name>
- <resourceType>CPULoad</resourceType>
- <property>
- <name>LoadAverage</name>
- <kind>Quantity</kind>
- <dynamic>true</dynamic>
- <value>
- <type>
- <kind>tk_long</kind>
- </type>
- <value><long>99</long></value>
- </value>
- </property>
- </resource>
-</node>
-
-
-<interconnect>
- <name>NoBridgeInterConnect</name>
- <connect>
- <name>Receiver</name>
- <resource>
- <name>Processor</name>
- <resourceType>CPULoad</resourceType>
- <property>
- <name>LoadAverage</name>
- <kind>Quantity</kind>
- <dynamic>true</dynamic>
- <value>
- <type>
- <kind>tk_long</kind>
- </type>
- <value><long>99</long></value>
- </value>
- </property>
- </resource>
- </connect>
-</interconnect>
-
-
-<bridge>
- <name>NoBridge</name>
- <connect>
- <name>NoBridgeInterConnect</name>
- <connect>
- <name>Receiver</name>
- <resource>
- <name>Processor</name>
- <resourceType>CPULoad</resourceType>
- <property>
- <name>LoadAverage</name>
- <kind>Quantity</kind>
- <dynamic>true</dynamic>
- <value>
- <type>
- <kind>tk_long</kind>
- </type>
- <value><long>99</long></value>
- </value>
- </property>
- </resource>
- </connect>
- </connect>
-</bridge>
-
-
-</Deployment:domain>
diff --git a/CIAO/DAnCE/TargetManager/descriptors/NodeDetails.dat b/CIAO/DAnCE/TargetManager/descriptors/NodeDetails.dat
deleted file mode 100644
index 0ca8bfefd8b..00000000000
--- a/CIAO/DAnCE/TargetManager/descriptors/NodeDetails.dat
+++ /dev/null
@@ -1,2 +0,0 @@
-TargetManagerNode_1 corbaloc:iiop:localhost:40000/NodeManager
-TargetManagerNode_2 corbaloc:iiop:localhost:30000/NodeManager
diff --git a/CIAO/DAnCE/TargetManager/descriptors/NodeManagerMap.dat b/CIAO/DAnCE/TargetManager/descriptors/NodeManagerMap.dat
deleted file mode 100644
index 0ca8bfefd8b..00000000000
--- a/CIAO/DAnCE/TargetManager/descriptors/NodeManagerMap.dat
+++ /dev/null
@@ -1,2 +0,0 @@
-TargetManagerNode_1 corbaloc:iiop:localhost:40000/NodeManager
-TargetManagerNode_2 corbaloc:iiop:localhost:30000/NodeManager
diff --git a/CIAO/DAnCE/TargetManager/descriptors/flattened_deploymentplan.cdp b/CIAO/DAnCE/TargetManager/descriptors/flattened_deploymentplan.cdp
deleted file mode 100644
index fae71c39fa1..00000000000
--- a/CIAO/DAnCE/TargetManager/descriptors/flattened_deploymentplan.cdp
+++ /dev/null
@@ -1,92 +0,0 @@
-<Deployment:deploymentPlan
- xmlns:Deployment="http://www.omg.org/Deployment"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.omg.org/Deployment Modified_Deployment.xsd">
-
- <label>Hello-DeploymentPlan</label>
- <!-- Could be ZERO -->
- <realizes>
- <label>BasicSP-realizes-cid</label>
- <UUID>c0965470-7b83-11d9-9669-0800200c9a66</UUID>
- <specificType><!-- @@ What does here? --></specificType>
- <supportedType>IDL:BasicSP/EC:1.0</supportedType>
- <port>
- <name>read_message</name>
- <specificType>IDL:Hello/ReadMessage:1.0</specificType>
- <supportedType>IDL:Hello/ReadMessage:1.0</supportedType>
- <provider>false></provider>
- <exclusiveProvider>false</exclusiveProvider>
- <exclusiveUser>true</exclusiveUser>
- <optional>false</optional>
- <kind>SimplexReceptacle</kind>
- </port>
- </realizes>
-
- <implementation id="TargetManager-mdd">
- <name>TargetManager-mdd</name>
- <source><!-- @@ Don't know what goes here --></source>
- <artifact>TargetManager_exec</artifact>
- <artifact>TargetManager_svnt</artifact>
- <!--
- <execParameter></execParameter>
- <deployRequirement></deployRequirement>
- -->
- </implementation>
-
- <instance id="TargetManager-idd">
- <name>TargetManager-idd</name>
- <node>TargetManagerNode_1</node>
- <source><!-- @@ What goes here --></source>
- <implementation>TargetManager-mdd</implementation>
- <configProperty>
- <name>ComponentIOR</name>
- <value>
- <type>
- <kind>tk_string</kind>
- </type>
- <value>
- <string>TargetManager.ior</string>
- </value>
- </value>
- </configProperty>
- </instance>
-
- <!-- @@ Runtime library name must match exactly in "location" tag -->
-
- <artifact id="TargetManager_exec">
- <name>TargetManager_exec</name>
- <source><!-- @@ Not sure about this--></source>
- <node><!-- blank --></node>
- <location>TargetManager_exec</location>
- <execParameter>
- <name>entryPoint</name>
- <value>
- <type>
- <kind>tk_string</kind>
- </type>
- <value>
- <string>create_CIAO_TargetManagerHome_Impl</string>
- </value>
- </value>
- </execParameter>
- </artifact>
-
- <artifact id="TargetManager_svnt">
- <name>TargetManager_svnt</name>
- <source><!-- @@ Not sure --></source>
- <node><!-- blank --></node>
- <location>TargetManager_svnt</location>
- <execParameter>
- <name>entryPoint</name>
- <value>
- <type>
- <kind>tk_string</kind>
- </type>
- <value>
- <string>create_CIAO_TargetManagerHome_Servant</string>
- </value>
- </value>
- </execParameter>
- </artifact>
-</Deployment:deploymentPlan>
diff --git a/CIAO/DAnCE/TargetManager/descriptors/run_test_TargetManager.pl b/CIAO/DAnCE/TargetManager/descriptors/run_test_TargetManager.pl
deleted file mode 100644
index a98401ef296..00000000000
--- a/CIAO/DAnCE/TargetManager/descriptors/run_test_TargetManager.pl
+++ /dev/null
@@ -1,160 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib "$ENV{'ACE_ROOT'}/bin";
-use PerlACE::Run_Test;
-$CIAO_ROOT = "$ENV{'CIAO_ROOT'}";
-$DAnCE = "$ENV{'CIAO_ROOT'}/DAnCE";
-
-$daemons_running = 0;
-$em_running = 0;
-$daemons = 2;
-@ports = ( 40000, 30000 );
-@iorfiles = ( "NodeApp1.ior", "NodeApp2.ior" );
-$status = 0;
-$dat_file = "NodeDetails.dat";
-$cdp_file = "flattened_DeploymentPlan.cdp";
-
-$E = 0;
-$EM = 0;
-
-# Delete if there are any .ior files.
-sub delete_ior_files {
- for ($i = 0; $i < $daemons; ++$i) {
- unlink $iorfiles[$i];
- }
- unlink PerlACE::LocalFile ("EM.ior");
- unlink PerlACE::LocalFile ("TargetManager.ior");
- unlink PerlACE::LocalFile ("DAM.ior");
-}
-
-sub kill_node_daemons {
- for ($i = 0; $i < $daemons; ++$i) {
- $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1);
- }
-}
-
-sub kill_open_processes {
- if ($daemons_running == 1) {
- kill_node_daemons ();
- }
-
- if ($em_running == 1) {
- $EM->Kill ();
- $EM->TimedWait (1);
- }
-}
-
-sub run_node_daemons {
- for ($i = 0; $i < $daemons; ++$i)
- {
- $iorfile = $iorfiles[$i];
- $port = $ports[$i];
-
- $iiop = "iiop://localhost:$port";
- $node_app = "$DAnCE/NodeApplication/NodeApplication";
-
- $d_cmd = "$DAnCE/NodeManager/NodeManager";
- $d_param = "-ORBEndpoint $iiop -s $node_app -o $iorfile";
-
- $Daemons[$i] = new PerlACE::Process ($d_cmd, $d_param);
- $result = $Daemons[$i]->Spawn ();
- push(@processes, $Daemons[$i]);
-
- if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR
- "ERROR: The ior file of node daemon $i could not be found\n";
- for (; $i > 0; --$i) {
- $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1);
- }
- return -1;
- }
- }
- $daemons_running = 1;
- return 0;
-}
-
-delete_ior_files ();
-
-# Invoke node daemons.
-print "Invoking node daemons\n";
-$status = run_node_daemons ();
-
-if ($status != 0) {
- print STDERR "ERROR: Unable to execute the node daemons\n";
- exit 1;
-}
-
-$ns_running = 1;
-
-# Invoke execution manager.
-print "Invoking execution manager\n";
-$EM = new PerlACE::Process ("$DAnCE/ExecutionManager/Execution_Manager",
- "-o EM.ior -i $dat_file");
-$EM->Spawn ();
-
-if (PerlACE::waitforfile_timed ("EM.ior",
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR
- "ERROR: The ior file of execution manager could not be found\n";
- kill_open_processes ();
- exit 1;
-}
-
-$em_running = 1;
-
-# Invoke executor - start the application -.
-print "Invoking executor - start the application -\n";
-$E =
- new PerlACE::Process ("$DAnCE/Plan_Launcher/plan_launcher",
- "-p flattened_deploymentplan.cdp -k file://EM.ior -o DAM.ior");
-
-$E->SpawnWaitKill (5000);
-
-if (PerlACE::waitforfile_timed (
- "TargetManager.ior",
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: The ior file of receiver could not be found\n";
- kill_open_processes ();
- exit 1;
-}
-
-print "Waiting for 15 secs then invoking client ===\n";
-sleep (15);
-
-print "Making 5 such calls \n";
-
-$call_num = 5;
-
-for ($i = 0; $i < $call_num; ++$i)
-{
- print "Invoking the client\n";
- $tmclient = new PerlACE::Process ("../CmpClient", "file://TargetManager.ior");
- $result = $tmclient->SpawnWaitKill (3000);
-
- if ($result != 0) {
- print STDERR "ERROR: The client returned $result\n";
- $status = 1;
- }
- sleep (15);
-}
-
-# Invoke executor - stop the application -.
-print "Invoking executor - stop the application -\n";
-$E =
- new PerlACE::Process ("$DAnCE/Plan_Launcher/plan_launcher",
- "-k file://EM.ior -i file://DAM.ior");
-$E->SpawnWaitKill (3000);
-
-print "Executor returned.\n";
-print "Shutting down rest of the processes.\n";
-
-delete_ior_files ();
-kill_open_processes ();
-
-exit $status;