From 0550f54b0b2a275cb9d5eccb8f1646a29e5d697a Mon Sep 17 00:00:00 2001 From: nilabjar Date: Thu, 28 Dec 2006 23:00:45 +0000 Subject: Thu Dec 28 22:59:45 UTC 2006 Nilabja R --- ChangeLog | 11 +++++++++++ DAnCE/TargetManager/CmpClient.cpp | 6 +++--- DAnCE/TargetManager/DomainDataManager.cpp | 12 ++++++++---- DAnCE/TargetManager/DomainDataManager.h | 6 +++--- DAnCE/TargetManager/TargetManager_exec.cpp | 4 ++-- DAnCE/TargetManager/TargetManager_exec.h | 2 +- ciao/Deployment_ResourceCommitmentManager.idl | 13 ++++++++----- ciao/Deployment_TargetManager.idl | 2 +- 8 files changed, 37 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 563c6149855..240b9d43dfe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Thu Dec 28 22:59:45 UTC 2006 Nilabja R + + * DAnCE/TargetManager/CmpClient.cpp: + * DAnCE/TargetManager/DomainDataManager.h: + * DAnCE/TargetManager/DomainDataManager.cpp: + * DAnCE/TargetManager/TargetManager_exec.h: + * DAnCE/TargetManager/TargetManager_exec.cpp: + + * ciao/Deployment_ResourceCommitmentManager.idl: + * ciao/Deployment_TargetManager.idl: + Wed Dec 27 19:59:32 UTC 2006 Nilabja R * DAnCE/TargetManager/CmpClient.cpp: diff --git a/DAnCE/TargetManager/CmpClient.cpp b/DAnCE/TargetManager/CmpClient.cpp index 2e840ab1e32..aa0506df858 100644 --- a/DAnCE/TargetManager/CmpClient.cpp +++ b/DAnCE/TargetManager/CmpClient.cpp @@ -70,7 +70,7 @@ int main (int argc, char* argv[]) bool resource_available = true; - ::Deployment::ResourceAllocationSeq resource_seq; + ::Deployment::ResourceAllocations resource_seq; resource_seq.length (1); @@ -127,8 +127,8 @@ int main (int argc, char* argv[]) { d = 10; resource_seq[0].property[0].value <<= d; - //manager->releaseResources (resource_seq); - targetI->destroyResourceCommitment (manager); + manager->releaseResources (resource_seq); +// targetI->destroyResourceCommitment (manager); ACE_DEBUG ((LM_DEBUG , "\n\nreleaseResources Returned \n")); } } diff --git a/DAnCE/TargetManager/DomainDataManager.cpp b/DAnCE/TargetManager/DomainDataManager.cpp index 575c2eaeeca..841a5f1f420 100644 --- a/DAnCE/TargetManager/DomainDataManager.cpp +++ b/DAnCE/TargetManager/DomainDataManager.cpp @@ -489,6 +489,9 @@ match_properties ( failure.reason = CORBA::string_dup ("Property Not Found\n"); failure.propertyName = CORBA::string_dup (deployed[i].name); + failure.propertyValue.length (0); + + throw failure; } } // outside for ... } @@ -527,7 +530,8 @@ void CIAO::DomainDataManager::commit_release_resource ( failure.reason = CORBA::string_dup ("Insufficient resources!"); failure.propertyName = CORBA::string_dup (available.name); - failure.propertyValue = available.value; + failure.propertyValue.length (1); + failure.propertyValue[0] = available.value; throw failure; } @@ -754,7 +758,7 @@ bool CIAO::DomainDataManager::update_node_status () } int CIAO::DomainDataManager::commitResourceAllocation ( - const ::Deployment::ResourceAllocationSeq & resources) + const ::Deployment::ResourceAllocations & resources) { // commit the resources // parse into the plan and commit resources ... @@ -766,7 +770,7 @@ int CIAO::DomainDataManager::commitResourceAllocation ( } int CIAO::DomainDataManager::releaseResourceAllocation ( - const ::Deployment::ResourceAllocationSeq & resources) + const ::Deployment::ResourceAllocations & resources) { // set the action value current_action_ = release; @@ -776,7 +780,7 @@ int CIAO::DomainDataManager::releaseResourceAllocation ( int CIAO::DomainDataManager:: -commit_release_RA (const ::Deployment::ResourceAllocationSeq & resources) +commit_release_RA (const ::Deployment::ResourceAllocations& resources) { // temporary used to guard against exceptions temp_provisioned_data_ = provisioned_data_; diff --git a/DAnCE/TargetManager/DomainDataManager.h b/DAnCE/TargetManager/DomainDataManager.h index 0e43460cf5d..898855663e9 100644 --- a/DAnCE/TargetManager/DomainDataManager.h +++ b/DAnCE/TargetManager/DomainDataManager.h @@ -156,7 +156,7 @@ namespace CIAO * */ int commitResourceAllocation ( - const ::Deployment::ResourceAllocationSeq & resources); + const ::Deployment::ResourceAllocations & resources); /** * @function releaseResourceAllocation @@ -168,7 +168,7 @@ namespace CIAO * */ int releaseResourceAllocation ( - const ::Deployment::ResourceAllocationSeq & resources); + const ::Deployment::ResourceAllocations & resources); protected: @@ -288,7 +288,7 @@ namespace CIAO const ::Deployment::ResourceAllocation& resource); int commit_release_RA ( - const ::Deployment::ResourceAllocationSeq & resources); + const ::Deployment::ResourceAllocations& resources); /// The ORB pointer diff --git a/DAnCE/TargetManager/TargetManager_exec.cpp b/DAnCE/TargetManager/TargetManager_exec.cpp index 9480407f76c..dfeec640cf1 100644 --- a/DAnCE/TargetManager/TargetManager_exec.cpp +++ b/DAnCE/TargetManager/TargetManager_exec.cpp @@ -163,7 +163,7 @@ namespace CIDL_TargetManager_i ::Deployment::ResourceCommitmentManager_ptr TargetManager_exec_i::createResourceCommitment ( - const ::Deployment::ResourceAllocationSeq & manager + const ::Deployment::ResourceAllocations& manager ACE_ENV_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC ((::CORBA::SystemException, ::Deployment::ResourceCommitmentFailure)) @@ -192,7 +192,7 @@ namespace CIDL_TargetManager_i ACE_ENV_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC ((::CORBA::SystemException)) { - ::Deployment::ResourceAllocationSeq res; + ::Deployment::ResourceAllocations res; res.length (0); resources->releaseResources (res); return; diff --git a/DAnCE/TargetManager/TargetManager_exec.h b/DAnCE/TargetManager/TargetManager_exec.h index 8e85f1b3b27..9a2bbe96983 100644 --- a/DAnCE/TargetManager/TargetManager_exec.h +++ b/DAnCE/TargetManager/TargetManager_exec.h @@ -188,7 +188,7 @@ namespace CIDL_TargetManager_i virtual ::Deployment::ResourceCommitmentManager_ptr createResourceCommitment ( - const ::Deployment::ResourceAllocationSeq & manager + const ::Deployment::ResourceAllocations& manager ACE_ENV_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC (( ::CORBA::SystemException, diff --git a/ciao/Deployment_ResourceCommitmentManager.idl b/ciao/Deployment_ResourceCommitmentManager.idl index 0997c55dcec..78b7e2bc541 100644 --- a/ciao/Deployment_ResourceCommitmentManager.idl +++ b/ciao/Deployment_ResourceCommitmentManager.idl @@ -1,14 +1,17 @@ #ifndef RESOURCE_COMMITMENT_MANAGER_IDL #define RESOURCE_COMMITMENT_MANAGER_IDL + #include "Deployment_Base.idl" +#include "tao/AnyTypeCode/AnySeq.pidl" + module Deployment { exception ResourceCommitmentFailure { string reason; - short index; + long index; string propertyName; - any propertyValue; + ::CORBA::AnySeq propertyValue; }; /** * @struct ResourceAllocation @@ -23,12 +26,12 @@ module Deployment { }; /// The Resource Allocation Sequence - typedef sequence ResourceAllocationSeq; + typedef sequence ResourceAllocations; interface ResourceCommitmentManager { - void commitResources (in ResourceAllocationSeq resources) + void commitResources (in ResourceAllocations resources) raises (ResourceCommitmentFailure); - void releaseResources (in ResourceAllocationSeq resources) + void releaseResources (in ResourceAllocations resources) raises (ResourceCommitmentFailure); }; }; diff --git a/ciao/Deployment_TargetManager.idl b/ciao/Deployment_TargetManager.idl index b898a7b56fa..171ce0c685f 100644 --- a/ciao/Deployment_TargetManager.idl +++ b/ciao/Deployment_TargetManager.idl @@ -20,7 +20,7 @@ module Deployment { interface TargetManager { Domain getAllResources (); Domain getAvailableResources (); - ResourceCommitmentManager createResourceCommitment (in ResourceAllocationSeq manager) + ResourceCommitmentManager createResourceCommitment (in ResourceAllocations manager) raises (ResourceCommitmentFailure); void destroyResourceCommitment (in ResourceCommitmentManager resources); void updateDomain (in ::CORBA::StringSeq elements, -- cgit v1.2.1