diff options
Diffstat (limited to 'TAO/orbsvcs/tests/Trading')
19 files changed, 6524 insertions, 0 deletions
diff --git a/TAO/orbsvcs/tests/Trading/Makefile.am b/TAO/orbsvcs/tests/Trading/Makefile.am new file mode 100644 index 00000000000..c07c73d2a91 --- /dev/null +++ b/TAO/orbsvcs/tests/Trading/Makefile.am @@ -0,0 +1,206 @@ +## Process this file with automake to create Makefile.in +## +## $Id$ +## +## This file was generated by MPC. Any changes made directly to +## this file will be lost the next time it is generated. +## +## MPC Command: +## ../bin/mwc.pl -type automake -noreldefs TAO.mwc + +ACE_BUILDDIR = $(top_builddir)/.. +ACE_ROOT = $(top_srcdir)/.. +TAO_BUILDDIR = $(top_builddir) +TAO_IDL = ACE_ROOT=$(ACE_ROOT) TAO_ROOT=$(TAO_ROOT) $(TAO_BUILDDIR)/TAO_IDL/tao_idl +TAO_IDL_DEP = $(TAO_BUILDDIR)/TAO_IDL/tao_idl +TAO_IDLFLAGS = -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) -I$(srcdir) -g $(ACE_BUILDDIR)/apps/gperf/src/gperf +TAO_ROOT = $(top_srcdir) + +## Makefile.Trading_Test_Lib.am + +BUILT_SOURCES = \ + TTestC.cpp \ + TTestC.h \ + TTestC.inl \ + TTestS.cpp \ + TTestS.h \ + TTestS.inl \ + TTestS_T.cpp \ + TTestS_T.h \ + TTestS_T.inl + +CLEANFILES = \ + TTest-stamp \ + TTestC.cpp \ + TTestC.h \ + TTestC.inl \ + TTestS.cpp \ + TTestS.h \ + TTestS.inl \ + TTestS_T.cpp \ + TTestS_T.h \ + TTestS_T.inl + +TTestC.cpp TTestC.h TTestC.inl TTestS.cpp TTestS.h TTestS.inl TTestS_T.cpp TTestS_T.h TTestS_T.inl: TTest-stamp + +TTest-stamp: $(srcdir)/TTest.idl $(TAO_IDL_DEP) + $(TAO_IDL) $(TAO_IDLFLAGS) -I$(TAO_ROOT)/orbsvcs -GT -I..\..\.. -I..\..\..\orbsvcs -Sc -Wb,export_macro=TAO_TTest_Export -Wb,export_include=ttest_export.h $(srcdir)/TTest.idl + @touch $@ + +noinst_LTLIBRARIES = libTTest.la + +libTTest_la_CPPFLAGS = \ + -I$(ACE_ROOT) \ + -I$(ACE_BUILDDIR) \ + -I$(TAO_ROOT) \ + -I$(TAO_BUILDDIR) \ + -I$(TAO_ROOT)/orbsvcs \ + -I$(TAO_BUILDDIR)/orbsvcs \ + -DTAO_TTEST_BUILD_DLL + +libTTest_la_SOURCES = \ + Offer_Exporter.cpp \ + Offer_Importer.cpp \ + Service_Type_Exporter.cpp \ + Simple_Dynamic.cpp \ + TT_Info.cpp \ + TTestC.cpp \ + TTestS.cpp + +noinst_HEADERS = \ + Offer_Exporter.h \ + Offer_Importer.h \ + Service_Type_Exporter.h \ + Simple_Dynamic.h \ + TT_Info.h \ + TTest.idl \ + TTestC.h \ + TTestC.inl \ + TTestS.h \ + TTestS.inl \ + TTestS_T.cpp \ + TTestS_T.h \ + TTestS_T.inl \ + ttest_export.h + +## Makefile.Trading_Colocated_Test.am + +noinst_PROGRAMS = colocated_test + +colocated_test_CPPFLAGS = \ + -I$(ACE_ROOT) \ + -I$(ACE_BUILDDIR) \ + -I$(TAO_ROOT) \ + -I$(TAO_BUILDDIR) \ + -I$(TAO_ROOT)/orbsvcs \ + -I$(TAO_BUILDDIR)/orbsvcs + +colocated_test_SOURCES = \ + colocated_test.cpp \ + Offer_Exporter.h \ + Offer_Importer.h \ + Service_Type_Exporter.h \ + Simple_Dynamic.h \ + TT_Info.h \ + ttest_export.h + +colocated_test_LDADD = \ + libTTest.la \ + $(TAO_BUILDDIR)/tao/libTAO_Utils.la \ + $(TAO_BUILDDIR)/tao/libTAO_PI.la \ + $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \ + $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosTrading_Serv.la \ + $(TAO_BUILDDIR)/tao/libTAO_IORTable.la \ + $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \ + $(TAO_BUILDDIR)/tao/libTAO_DynamicAny.la \ + $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosTrading_Skel.la \ + $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ + $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosTrading.la \ + $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \ + $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ + $(TAO_BUILDDIR)/tao/libTAO.la \ + $(ACE_BUILDDIR)/ace/libACE.la + +## Makefile.Trading_Export_Test.am + +noinst_PROGRAMS += export_test + +export_test_CPPFLAGS = \ + -I$(ACE_ROOT) \ + -I$(ACE_BUILDDIR) \ + -I$(TAO_ROOT) \ + -I$(TAO_BUILDDIR) \ + -I$(TAO_ROOT)/orbsvcs \ + -I$(TAO_BUILDDIR)/orbsvcs + +export_test_SOURCES = \ + export_test.cpp \ + Offer_Exporter.h \ + Offer_Importer.h \ + Service_Type_Exporter.h \ + Simple_Dynamic.h \ + TT_Info.h \ + ttest_export.h + +export_test_LDADD = \ + libTTest.la \ + $(TAO_BUILDDIR)/tao/libTAO_Utils.la \ + $(TAO_BUILDDIR)/tao/libTAO_PI.la \ + $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \ + $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosTrading_Serv.la \ + $(TAO_BUILDDIR)/tao/libTAO_IORTable.la \ + $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \ + $(TAO_BUILDDIR)/tao/libTAO_DynamicAny.la \ + $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosTrading_Skel.la \ + $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ + $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosTrading.la \ + $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \ + $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ + $(TAO_BUILDDIR)/tao/libTAO.la \ + $(ACE_BUILDDIR)/ace/libACE.la + +## Makefile.Trading_Import_Test.am + +noinst_PROGRAMS += import_test + +import_test_CPPFLAGS = \ + -I$(ACE_ROOT) \ + -I$(ACE_BUILDDIR) \ + -I$(TAO_ROOT) \ + -I$(TAO_BUILDDIR) \ + -I$(TAO_ROOT)/orbsvcs \ + -I$(TAO_BUILDDIR)/orbsvcs + +import_test_SOURCES = \ + import_test.cpp \ + Offer_Exporter.h \ + Offer_Importer.h \ + Service_Type_Exporter.h \ + Simple_Dynamic.h \ + TT_Info.h \ + ttest_export.h + +import_test_LDADD = \ + libTTest.la \ + $(TAO_BUILDDIR)/tao/libTAO_Utils.la \ + $(TAO_BUILDDIR)/tao/libTAO_PI.la \ + $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \ + $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosTrading_Serv.la \ + $(TAO_BUILDDIR)/tao/libTAO_IORTable.la \ + $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \ + $(TAO_BUILDDIR)/tao/libTAO_DynamicAny.la \ + $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosTrading_Skel.la \ + $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ + $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosTrading.la \ + $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \ + $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ + $(TAO_BUILDDIR)/tao/libTAO.la \ + $(ACE_BUILDDIR)/ace/libACE.la + +## Clean up template repositories, etc. +clean-local: + -rm -f *~ *.bak *.rpo *.sym lib*.*_pure_* core core.* + -rm -f gcctemp.c gcctemp so_locations *.ics + -rm -rf cxx_repository ptrepository ti_files + -rm -rf templateregistry ir.out + -rm -rf ptrepository SunWS_cache Templates.DB diff --git a/TAO/orbsvcs/tests/Trading/Offer_Exporter.cpp b/TAO/orbsvcs/tests/Trading/Offer_Exporter.cpp new file mode 100644 index 00000000000..7245e7ddcdf --- /dev/null +++ b/TAO/orbsvcs/tests/Trading/Offer_Exporter.cpp @@ -0,0 +1,634 @@ +// $Id$ + +#include "Offer_Exporter.h" +#include "ace/INET_Addr.h" +#include "ace/OS_NS_stdio.h" + +ACE_RCSID(Trading, Offer_Exporter, "$Id$") + +TAO_Offer_Exporter:: +TAO_Offer_Exporter (CosTrading::Lookup_ptr lookup_if, + CORBA::Boolean verbose + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)) + : verbose_ (verbose) +{ + // Initialize the offer sequences and structures. + this->create_offers (ACE_ENV_SINGLE_ARG_PARAMETER); + + // Obtain the necessary trading service interfaces. + this->register_ = lookup_if->register_if (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + this->admin_ = lookup_if->admin_if (ACE_ENV_SINGLE_ARG_PARAMETER); + // ACE_CHECK; +} + +TAO_Offer_Exporter::~TAO_Offer_Exporter (void) +{ + while (! this->clean_up_.is_empty ()) + { + TAO_Dynamic_Property* dp = 0; + this->clean_up_.dequeue_head (dp); + dp->destroy (); + } +} + +void +TAO_Offer_Exporter::export_offers (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::Register::InvalidObjectRef, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::Register::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::PropertyTypeMismatch, + CosTrading::ReadonlyDynamicProperty, + CosTrading::MissingMandatoryProperty, + CosTrading::DuplicatePropertyName)) +{ + ACE_DEBUG ((LM_DEBUG, "*** TAO_Offer_Exporter::Exporting offers.\n")); + + for (int i = 0; i < NUM_OFFERS; i++) + { + this->props_plotters_[i][4].value <<= "Default"; + this->props_printers_[i][4].value <<= "Default"; + this->props_fs_[i][4].value <<= "Default"; + } + + this->export_to (this->register_.in () ACE_ENV_ARG_PARAMETER); + // ACE_CHECK; +} + +void +TAO_Offer_Exporter::export_to (CosTrading::Register_ptr reg + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::Register::InvalidObjectRef, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::Register::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::PropertyTypeMismatch, + CosTrading::ReadonlyDynamicProperty, + CosTrading::MissingMandatoryProperty, + CosTrading::DuplicatePropertyName)) +{ + ACE_TRY + { + for (int i = 0; i < NUM_OFFERS; i++) + { + CORBA::Object_ptr offer_obj= this->plotter_[i]._this (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + CosTrading::OfferId_var offer_id = + reg->_cxx_export (offer_obj, + TT_Info::INTERFACE_NAMES[1], + this->props_plotters_[i] + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (this->verbose_) + { + ACE_DEBUG ((LM_DEBUG, "Registered offer id: %s.\n", offer_id.in ())); + } + + offer_obj = this->printer_[i]._this (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + offer_id = reg->_cxx_export (offer_obj, + TT_Info::INTERFACE_NAMES[2], + this->props_printers_[i] + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (this->verbose_) + { + ACE_DEBUG ((LM_DEBUG, "Registered offer id: %s.\n", offer_id.in ())); + } + + offer_obj = this->fs_[i]._this (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + offer_id = reg->_cxx_export (offer_obj, + TT_Info::INTERFACE_NAMES[3], + this->props_fs_[i] + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK + + if (this->verbose_) + { + ACE_DEBUG ((LM_DEBUG, "Registered offer id: %s.\n", offer_id.in ())); + } + } + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_Offer_Exporter::export_offers"); + ACE_RE_THROW; + } + ACE_ENDTRY; + // ACE_CHECK; +} + +void +TAO_Offer_Exporter::export_offers_to_all (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::Register::InvalidObjectRef, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::Register::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::PropertyTypeMismatch, + CosTrading::ReadonlyDynamicProperty, + CosTrading::MissingMandatoryProperty, + CosTrading::DuplicatePropertyName)) +{ + ACE_DEBUG ((LM_DEBUG, "*** TAO_Offer_Exporter::Exporting to all.\n")); + + if (this->verbose_) + { + ACE_DEBUG ((LM_DEBUG, "Obtaining link interface.\n")); + } + + CosTrading::Link_var link_if = this->register_->link_if (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + if (this->verbose_) + { + ACE_DEBUG ((LM_DEBUG, "Obtaining references to traders directly" + " linked to the root trader.\n")); + } + + CosTrading::LinkNameSeq_var link_name_seq = link_if->list_links (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + if (this->verbose_) + { + ACE_DEBUG ((LM_DEBUG, "Registering offers with each of the linked" + " traders.\n")); + } + + for (CORBA::ULong i = link_name_seq->length () - 1; i > 0; i--) + { + ACE_TRY + { + if (this->verbose_) + { + ACE_DEBUG ((LM_DEBUG, "Getting link information for %s\n", + static_cast<const char*> (link_name_seq[i]))); + } + + CosTrading::Link::LinkInfo_var link_info = + link_if->describe_link (link_name_seq[i] ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + for (int j = 0; j < NUM_OFFERS; j++) + { + this->props_plotters_[j][4].value <<= link_name_seq[i]; + this->props_printers_[j][4].value <<= link_name_seq[i]; + this->props_fs_[j][4].value <<= link_name_seq[i]; + } + + if (this->verbose_) + { + ACE_DEBUG ((LM_DEBUG, "Exporting offers to %s\n", + static_cast<const char*> (link_name_seq[i]))); + } + + this->export_to (link_info->target_reg.in () ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + // @@ IGNORE?? + } + ACE_ENDTRY; + } +} + + +void +TAO_Offer_Exporter::withdraw_offers (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalOfferId, + CosTrading::UnknownOfferId, + CosTrading::Register::ProxyOfferId)) +{ + ACE_DEBUG ((LM_DEBUG, "*** TAO_Offer_Exporter::Withdrawing all offers.\n")); + + ACE_TRY + { + CORBA::ULong length; + + CosTrading::OfferIdSeq_var offer_id_seq = this->grab_offerids (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (offer_id_seq.ptr () != 0) + { + length = offer_id_seq->length (); + for (CORBA::ULong i = 0; i < length; i++) + { + this->register_->withdraw (offer_id_seq[i] ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + } + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_Offer_Exporter::withdraw_offers"); + ACE_RE_THROW; + } + ACE_ENDTRY; +} + +void +TAO_Offer_Exporter::describe_offers (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalOfferId, + CosTrading::UnknownOfferId, + CosTrading::Register::ProxyOfferId)) +{ + ACE_DEBUG ((LM_DEBUG, "*** TAO_Offer_Exporter::Describing all offers.\n")); + + ACE_TRY + { + CORBA::ULong length; + CosTrading::OfferIdSeq_var offer_id_seq = this->grab_offerids (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (offer_id_seq.ptr () != 0) + { + length = offer_id_seq->length (); + + if (this->verbose_) + ACE_DEBUG ((LM_DEBUG, "------------------------------\n")); + + for (CORBA::ULong i = 0; i < length; i++) + { + CosTrading::Register::OfferInfo_var offer_info = + this->register_->describe (offer_id_seq[i] ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (this->verbose_) + { + ACE_DEBUG ((LM_DEBUG, "Offer Id: %s\n", (const char *) offer_id_seq[i])); + ACE_DEBUG ((LM_DEBUG, "Service Type: %s\n", offer_info->type.in ())); + TT_Info::dump_properties (offer_info->properties, 0 ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "------------------------------\n")); + } + } + } + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_Offer_Exporter::describe_offers"); + ACE_RE_THROW; + } + ACE_ENDTRY; +} + +void +TAO_Offer_Exporter::modify_offers (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::NotImplemented, + CosTrading::IllegalOfferId, + CosTrading::UnknownOfferId, + CosTrading::Register::ProxyOfferId, + CosTrading::IllegalPropertyName, + CosTrading::Register::UnknownPropertyName, + CosTrading::PropertyTypeMismatch, + CosTrading::ReadonlyDynamicProperty, + CosTrading::Register::MandatoryProperty, + CosTrading::Register::ReadonlyProperty, + CosTrading::DuplicatePropertyName)) +{ + ACE_DEBUG ((LM_DEBUG, "*** TAO_Offer_Exporter::Modifying all offers.\n")); + + ACE_TRY + { + CosTrading::OfferIdSeq_var offer_id_seq = this->grab_offerids (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (offer_id_seq.ptr () != 0) + { + CORBA::ULong length = offer_id_seq->length (); + CosTrading::PropertyNameSeq del_list; + CosTrading::PropertySeq modify_list; + + del_list.length (1); + modify_list.length (2); + del_list[0] = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::DESCRIPTION]; + modify_list[0].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::LOCATION]; + modify_list[0].value <<= "MODIFIED"; + modify_list[1].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::MISCELLANEOUS]; + modify_list[1].value <<= "MODIFIED"; + + for (CORBA::ULong i = 0; i < length; i++) + { + this->register_->modify (offer_id_seq[i], + del_list, + modify_list + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + } + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_Offer_Exporter::modify_offers"); + ACE_RE_THROW; + } + ACE_ENDTRY; +} + +void +TAO_Offer_Exporter:: +withdraw_offers_using_constraints (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::IllegalConstraint, + CosTrading::Register::NoMatchingOffers)) +{ + ACE_DEBUG ((LM_DEBUG, "*** TAO_Offer_Exporter::Withdrawing with constraint.\n")); + + const char* constraint = + "(not exist Description) and (Location == 'MODIFIED') and (exist Name)"; + + if (this->verbose_) + ACE_DEBUG ((LM_DEBUG, "Constraint: %s\n", constraint)); + + ACE_TRY + { + this->register_-> + withdraw_using_constraint (TT_Info::INTERFACE_NAMES[TT_Info::PLOTTER], + constraint + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + this->register_-> + withdraw_using_constraint (TT_Info::INTERFACE_NAMES[TT_Info::PRINTER], + constraint + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + this->register_-> + withdraw_using_constraint (TT_Info::INTERFACE_NAMES[TT_Info::FILESYSTEM], + constraint + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "TAO_Offer_Exporter::withdraw_using_constraint"); + ACE_RE_THROW; + } + ACE_ENDTRY; +} + +CosTrading::OfferIdSeq* +TAO_Offer_Exporter::grab_offerids (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::NotImplemented)) +{ + if (this->verbose_) + ACE_DEBUG ((LM_DEBUG, "TAO_Offer_Exporter::Grabbing all offer ids.\n")); + + CosTrading::OfferIdSeq *offer_id_seq; + ACE_TRY + { + CORBA::ULong length = NUM_OFFERS; + CosTrading::OfferIdIterator_ptr offer_id_iter; + + this->admin_->list_offers (NUM_OFFERS, + CosTrading::OfferIdSeq_out (offer_id_seq), + CosTrading::OfferIdIterator_out (offer_id_iter) + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if ((! CORBA::is_nil (offer_id_iter)) && offer_id_seq != 0) + { + CORBA::Boolean any_left = 0; + CosTrading::OfferIdSeq *id_seq; + CosTrading::OfferIdIterator_var offer_id_iter_var (offer_id_iter); + + do + { + any_left = + offer_id_iter->next_n (length, + CosTrading::OfferIdSeq_out (id_seq) + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + int offers = id_seq->length (); + int old_length = offer_id_seq->length (); + offer_id_seq->length (old_length + offers); + + for (int i = 0; i < offers; i++) + (*offer_id_seq)[i + old_length] = (*id_seq)[i]; + + delete id_seq; + } + while (any_left); + + offer_id_iter->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } + + if (this->verbose_) + { + ACE_DEBUG ((LM_DEBUG, "The following offer ids are registered:\n")); + for (int len = offer_id_seq->length (), j = 0; j < len; j++) + ACE_DEBUG ((LM_DEBUG, "Offer Id: %s\n", (const char *)(*offer_id_seq)[j])); + } + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "TAO_Offer_Exporter::grab_offerids"); + ACE_RE_THROW; + } + ACE_ENDTRY; + // @@ redundant. + // ACE_CHECK_RETURN (offer_id_seq); + + return offer_id_seq; +} + +void +TAO_Offer_Exporter::create_offers (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +{ + const int QUEUE_SIZE = 4; + + int counter = 0, i = 0; + char name[BUFSIZ]; + char description[BUFSIZ]; + CORBA::Any extra_info; + TAO_Trader_Test::StringSeq string_seq (QUEUE_SIZE); + TAO_Trader_Test::ULongSeq ulong_seq (QUEUE_SIZE); + + CosTradingDynamic::DynamicProp* dp_user_queue; + CosTradingDynamic::DynamicProp* dp_file_queue; + CosTradingDynamic::DynamicProp* dp_space_left; + + ACE_INET_Addr addr ((u_short) 0); + const char* hostname = addr.get_host_name (); + + // Initialize plotters + string_seq.length (QUEUE_SIZE); + ulong_seq.length (QUEUE_SIZE); + for (i = 0; i < NUM_OFFERS; i++) + { + ACE_OS::sprintf (name, "Plotter #%d", i); + ACE_OS::sprintf (description, + "%s is a plotter. It plots stuff.", + name); + + for (int j = 0; j < QUEUE_SIZE; j++, counter = (counter + 1) % NUM_OFFERS) + { + string_seq[j] = TT_Info::USERS [counter]; + ulong_seq[j] = counter * 10000; + } + + TAO_Dynamic_Property* user_queue = + new TAO_Simple_Dynamic_Property<TAO_Trader_Test::StringSeq> (string_seq); + TAO_Dynamic_Property* file_sizes = + new TAO_Simple_Dynamic_Property<TAO_Trader_Test::ULongSeq> (ulong_seq); + + this->clean_up_.enqueue_head (user_queue); + this->clean_up_.enqueue_head (file_sizes); + + dp_user_queue = user_queue->construct_dynamic_prop + (TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_USER_QUEUE], + TAO_Trader_Test::_tc_StringSeq, + extra_info); + + dp_file_queue = file_sizes->construct_dynamic_prop + (TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_FILE_SIZES_PENDING], + TAO_Trader_Test::_tc_ULongSeq, + extra_info); + + this->props_plotters_[i].length (11); + this->props_plotters_[i][0].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::NAME]; + this->props_plotters_[i][0].value <<= name; + this->props_plotters_[i][1].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::LOCATION]; + this->props_plotters_[i][1].value <<= TT_Info::LOCATIONS[i]; + this->props_plotters_[i][2].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::DESCRIPTION]; + this->props_plotters_[i][2].value <<= description; + this->props_plotters_[i][3].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::HOST_NAME]; + this->props_plotters_[i][3].value <<= hostname; + this->props_plotters_[i][4].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::TRADER_NAME]; + this->props_plotters_[i][4].value <<= "Default"; + this->props_plotters_[i][5].name = TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_NUM_COLORS]; + this->props_plotters_[i][5].value <<= (CORBA::Long)(i * 2); + this->props_plotters_[i][6].name = TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_AUTO_LOADING]; + this->props_plotters_[i][6].value <<= CORBA::Any::from_boolean ((CORBA::Boolean) (i % 2)); + this->props_plotters_[i][7].name = TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_COST_PER_PAGE]; + this->props_plotters_[i][7].value <<= (CORBA::Float) i; + this->props_plotters_[i][8].name = TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_MODEL_NUMBER]; + this->props_plotters_[i][8].value <<= TT_Info::MODEL_NUMBERS[i]; + this->props_plotters_[i][9].name = TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_USER_QUEUE]; + this->props_plotters_[i][9].value <<= dp_user_queue; + + this->props_plotters_[i][10].name = TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_FILE_SIZES_PENDING]; + this->props_plotters_[i][10].value <<= dp_file_queue; + } + + // Initialize printers + for (i = 0; i < NUM_OFFERS; i++) + { + ACE_OS::sprintf (name, "Printer #%d", i); + ACE_OS::sprintf (description, + "%s is a printer. It prints stuff.", + name); + + for (int j = 0; j < QUEUE_SIZE; j++, counter = (counter + 1) % NUM_OFFERS) + { + string_seq[j] = TT_Info::USERS [counter]; + ulong_seq[j] = counter * 10000; + } + + TAO_Dynamic_Property* user_queue = + new TAO_Simple_Dynamic_Property<TAO_Trader_Test::StringSeq> (string_seq); + TAO_Dynamic_Property* file_sizes = + new TAO_Simple_Dynamic_Property<TAO_Trader_Test::ULongSeq> (ulong_seq); + + this->clean_up_.enqueue_head (user_queue); + this->clean_up_.enqueue_head (file_sizes); + + dp_user_queue = user_queue->construct_dynamic_prop + (TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PLOTTER_USER_QUEUE], + TAO_Trader_Test::_tc_StringSeq, + extra_info); + + dp_file_queue = file_sizes->construct_dynamic_prop + (TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PLOTTER_FILE_SIZES_PENDING], + TAO_Trader_Test::_tc_ULongSeq, + extra_info); + + this->props_printers_[i].length (12); + this->props_printers_[i][0].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::NAME]; + this->props_printers_[i][0].value <<= name; + this->props_printers_[i][1].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::LOCATION]; + this->props_printers_[i][1].value <<= TT_Info::LOCATIONS[i]; + this->props_printers_[i][2].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::DESCRIPTION]; + this->props_printers_[i][2].value <<= description; + this->props_printers_[i][3].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::HOST_NAME]; + this->props_printers_[i][3].value <<= hostname; + this->props_printers_[i][4].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::TRADER_NAME]; + this->props_printers_[i][4].value <<= "Default"; + this->props_printers_[i][5].name = TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_COLOR]; + this->props_printers_[i][5].value <<= CORBA::Any::from_boolean ((CORBA::Boolean) (i % 2)); + this->props_printers_[i][6].name = TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_DOUBLE_SIDED]; + this->props_printers_[i][6].value <<= CORBA::Any::from_boolean ((CORBA::Boolean) ((i + 1) % 2)); + this->props_printers_[i][7].name = TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_COST_PER_PAGE]; + this->props_printers_[i][7].value <<= (CORBA::Float) i; + this->props_printers_[i][8].name = TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_MODEL_NUMBER]; + this->props_printers_[i][8].value <<= TT_Info::MODEL_NUMBERS[i]; + this->props_printers_[i][9].name = TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_PAGES_PER_SEC]; + this->props_printers_[i][9].value <<= (CORBA::UShort) i; + this->props_printers_[i][10].name = TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_USER_QUEUE]; + this->props_printers_[i][10].value <<= dp_user_queue; + this->props_printers_[i][11].name = TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_FILE_SIZES_PENDING]; + this->props_printers_[i][11].value <<= dp_file_queue; + } + + // Initialize FileSystem + for (i = 0; i < NUM_OFFERS; i++) + { + ACE_OS::sprintf (name, "File System #%d", i); + ACE_OS::sprintf (description, + "%s is a File System. It stores stuff.", + name); + + TAO_Dynamic_Property* space_left = + new TAO_Simple_Dynamic_Property<CORBA::ULong> (i * 4434343); + + this->clean_up_.enqueue_head (space_left); + + dp_space_left = space_left->construct_dynamic_prop + (TT_Info::FILESYSTEM_PROPERTY_NAMES[TT_Info::SPACE_REMAINING], + CORBA::_tc_ulong, + extra_info); + + this->props_fs_[i].length (8); + this->props_fs_[i][0].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::NAME]; + this->props_fs_[i][0].value <<= name; + this->props_fs_[i][1].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::LOCATION]; + this->props_fs_[i][1].value <<= TT_Info::LOCATIONS[i]; + this->props_fs_[i][2].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::DESCRIPTION]; + this->props_fs_[i][2].value <<= description; + this->props_fs_[i][3].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::HOST_NAME]; + this->props_fs_[i][3].value <<= hostname; + this->props_fs_[i][4].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::TRADER_NAME]; + this->props_fs_[i][4].value <<= "Default"; + this->props_fs_[i][5].name = TT_Info::FILESYSTEM_PROPERTY_NAMES[TT_Info::DISK_SIZE]; + this->props_fs_[i][5].value <<= (CORBA::ULong) (i * 2000000); + this->props_fs_[i][6].name = TT_Info::FILESYSTEM_PROPERTY_NAMES[TT_Info::PERMISSION_LEVEL]; + this->props_fs_[i][6].value <<= (CORBA::UShort) (i + 1); + this->props_fs_[i][7].name = TT_Info::FILESYSTEM_PROPERTY_NAMES[TT_Info::SPACE_REMAINING]; + this->props_fs_[i][7].value <<= dp_space_left; + } +} diff --git a/TAO/orbsvcs/tests/Trading/Offer_Exporter.h b/TAO/orbsvcs/tests/Trading/Offer_Exporter.h new file mode 100644 index 00000000000..63389ae3a79 --- /dev/null +++ b/TAO/orbsvcs/tests/Trading/Offer_Exporter.h @@ -0,0 +1,143 @@ +// $Id$ + +// ======================================================================== +// +// = FILE +// Offer_Exporter.h +// +// = DESCRIPTION +// Class that tests the Trading Service's Register Interface +// +// = AUTHOR +// Seth Widoff <sbw1@cs.wustl.edu> +// +// ======================================================================= + +#ifndef TAO_OFFER_EXPORTER_H +#define TAO_OFFER_EXPORTER_H + +#include "TT_Info.h" +#include "Simple_Dynamic.h" +#include "ttest_export.h" + +class TAO_TTest_Export TAO_Offer_Exporter +{ +public: + + TAO_Offer_Exporter (CosTrading::Lookup_ptr lookup_if, + CORBA::Boolean verbose + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + ~TAO_Offer_Exporter (void); + + void export_offers (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::Register::InvalidObjectRef, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::Register::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::PropertyTypeMismatch, + CosTrading::ReadonlyDynamicProperty, + CosTrading::MissingMandatoryProperty, + CosTrading::DuplicatePropertyName)); + // Export a number of offers to the Trading Service. + + void export_offers_to_all (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::Register::InvalidObjectRef, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::Register::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::PropertyTypeMismatch, + CosTrading::ReadonlyDynamicProperty, + CosTrading::MissingMandatoryProperty, + CosTrading::DuplicatePropertyName)); + // Export a number of offers to all traders accessible by the + // bootstrapped trader. + + void withdraw_offers (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalOfferId, + CosTrading::UnknownOfferId, + CosTrading::Register::ProxyOfferId)); + // Withdraw all exported offers. + + void describe_offers (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalOfferId, + CosTrading::UnknownOfferId, + CosTrading::Register::ProxyOfferId)); + // Describe all the offers registered with the bootstrapped trader. + + void modify_offers (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::NotImplemented, + CosTrading::IllegalOfferId, + CosTrading::UnknownOfferId, + CosTrading::Register::ProxyOfferId, + CosTrading::IllegalPropertyName, + CosTrading::Register::UnknownPropertyName, + CosTrading::PropertyTypeMismatch, + CosTrading::ReadonlyDynamicProperty, + CosTrading::Register::MandatoryProperty, + CosTrading::Register::ReadonlyProperty, + CosTrading::DuplicatePropertyName)); + // Remove some properties and change some properties in each offer. + + void withdraw_offers_using_constraints (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::IllegalConstraint, + CosTrading::Register::NoMatchingOffers)); + // Withdraw a number of offers based on a constraint string. + +private: + + CosTrading::OfferIdSeq* grab_offerids (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::NotImplemented)); + + void create_offers (ACE_ENV_SINGLE_ARG_DECL); + // Fill in each of the offer structures. + + void export_to (CosTrading::Register_ptr reg + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::Register::InvalidObjectRef, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::Register::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::PropertyTypeMismatch, + CosTrading::ReadonlyDynamicProperty, + CosTrading::MissingMandatoryProperty, + CosTrading::DuplicatePropertyName)); + // Export the offers to the give Register interface. + + typedef ACE_Unbounded_Queue<TAO_Dynamic_Property*> DP_Queue; + + CORBA::Boolean verbose_; + // True if the user wants verbose output. + + CosTrading::Register_var register_; + CosTrading::Admin_var admin_; + + TT_Info::Printer printer_[NUM_OFFERS]; + TT_Info::Plotter plotter_[NUM_OFFERS]; + TT_Info::File_System fs_[NUM_OFFERS]; + // The objects being exported. + + CosTrading::PropertySeq props_plotters_[NUM_OFFERS]; + CosTrading::PropertySeq props_printers_[NUM_OFFERS]; + CosTrading::PropertySeq props_fs_[NUM_OFFERS]; + // Property sequences describing each service. + + DP_Queue clean_up_; + // A list of dynamic properties to clean up upon destruction. +}; + +#endif /* TAO_OFFER_EXPORTER_H */ diff --git a/TAO/orbsvcs/tests/Trading/Offer_Importer.cpp b/TAO/orbsvcs/tests/Trading/Offer_Importer.cpp new file mode 100644 index 00000000000..13f5084d1f6 --- /dev/null +++ b/TAO/orbsvcs/tests/Trading/Offer_Importer.cpp @@ -0,0 +1,304 @@ +// $Id$ + +#include "Offer_Importer.h" + +ACE_RCSID(Trading, Offer_Importer, "$Id$") + +TAO_Offer_Importer::TAO_Offer_Importer (CosTrading::Lookup_ptr lookup_if, + CORBA::Boolean verbose) + : verbose_ (verbose), + lookup_ (lookup_if) +{ +} + +void +TAO_Offer_Importer::perform_queries (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::IllegalConstraint, + CosTrading::Lookup::IllegalPreference, + CosTrading::Lookup::IllegalPolicyName, + CosTrading::Lookup::PolicyTypeMismatch, + CosTrading::Lookup::InvalidPolicyValue, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTrading::DuplicatePolicyName)) +{ + ACE_DEBUG ((LM_DEBUG, "*** TAO_Offer_Importer::Federated Query.\n")); + + TAO_Policy_Creator policies; + policies.exact_type_match (0); + policies.search_card (16*NUM_OFFERS); + policies.match_card (16*NUM_OFFERS); + policies.return_card (16*NUM_OFFERS); + policies.link_follow_rule (CosTrading::always); + + this->perform_queries_with_policies (policies ACE_ENV_ARG_PARAMETER); + // ACE_CHECK; +} + +void +TAO_Offer_Importer::perform_directed_queries (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::IllegalConstraint, + CosTrading::Lookup::IllegalPreference, + CosTrading::Lookup::IllegalPolicyName, + CosTrading::Lookup::PolicyTypeMismatch, + CosTrading::Lookup::InvalidPolicyValue, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTrading::DuplicatePolicyName)) +{ + ACE_DEBUG ((LM_DEBUG, "*** TAO_Offer_Importer::Directed Query.\n")); + + TAO_Policy_Creator policies; + policies.exact_type_match (0); + policies.search_card (16*NUM_OFFERS); + policies.match_card (16*NUM_OFFERS); + policies.return_card (16*NUM_OFFERS); + policies.link_follow_rule (CosTrading::local_only); + + if (this->verbose_) + ACE_DEBUG ((LM_DEBUG, "Obtaining link interface.\n")); + CosTrading::Link_var link_if = this->lookup_->link_if (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + if (this->verbose_) + { + ACE_DEBUG ((LM_DEBUG, "Obtaining references to traders directly" + " linked to the root trader.\n")); + } + CosTrading::LinkNameSeq_var link_name_seq = link_if->list_links (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + if (link_name_seq->length () > 0) + { + if (this->verbose_) + { + ACE_DEBUG ((LM_DEBUG, "Getting link information for %s\n", + static_cast<const char*> (link_name_seq[0u]))); + } + + CosTrading::Link::LinkInfo_var link_info = + link_if->describe_link (link_name_seq[0u] ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + CosTrading::Lookup_ptr lookup_if = link_info->target.in (); + CosTrading::Link_var link_if2 = lookup_if->link_if (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + CosTrading::LinkNameSeq_var link_name_seq2 = link_if2->list_links (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + if (link_name_seq2->length () > 0) + { + CORBA::ULong i = 0; + CORBA::ULong length = link_name_seq2->length (); + for (i = 0; i < length; i++) + { + if (ACE_OS::strcmp (link_name_seq2[i], "Bootstrap") != 0) + break; + } + + if (i < length) + { + CosTrading::LinkName* trader_name = + CosTrading::TraderName::allocbuf (2); + + ACE_DEBUG ((LM_DEBUG, "*** Query through %s to destination %s.\n", + static_cast<const char*> (link_name_seq[0u]), + static_cast<const char*> (link_name_seq2[i]))); + + trader_name[0] = CORBA::string_dup (link_name_seq[0u]); + trader_name[1] = CORBA::string_dup (link_name_seq2[i]); + policies.starting_trader (new CosTrading::TraderName + (2, 2, trader_name, 1)); + + this->perform_queries_with_policies (policies ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + } + else + { + ACE_DEBUG ((LM_DEBUG, "This test requires a complete" + " graph of three traders.\n")); + } + } + else + { + ACE_DEBUG ((LM_DEBUG, "This test requires a complete" + " graph of three traders.\n")); + } +} + + +void +TAO_Offer_Importer::perform_queries_with_policies ( + const TAO_Policy_Creator& policies + ACE_ENV_ARG_DECL + ) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::IllegalConstraint, + CosTrading::Lookup::IllegalPreference, + CosTrading::Lookup::IllegalPolicyName, + CosTrading::Lookup::PolicyTypeMismatch, + CosTrading::Lookup::InvalidPolicyValue, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTrading::DuplicatePolicyName)) +{ + ACE_TRY + { + CosTrading::Lookup::SpecifiedProps desired_props; + + char* props[] = + { + (char*) TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::NAME], + (char*) TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::DESCRIPTION], + (char*) TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::LOCATION], + (char*) TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::HOST_NAME] + }; + + CosTrading::PropertyNameSeq prop_name_seq (4, 4, props, 0); + desired_props.prop_names (prop_name_seq); + + for (int i = 0; i < TT_Info::NUM_QUERIES; i++) + { + ACE_DEBUG ((LM_DEBUG, "\n")); + ACE_DEBUG ((LM_DEBUG, "*** Performing query for %s.\n", TT_Info::QUERIES[i][0])); + ACE_DEBUG ((LM_DEBUG, "*** Query: %s\n", TT_Info::QUERIES[i][1])); + ACE_DEBUG ((LM_DEBUG, "*** Preferences: %s\n", TT_Info::QUERIES[i][2])); + CosTrading::OfferSeq *offer_seq_ptr = 0; + CosTrading::OfferIterator_ptr offer_iterator_ptr = 0; + CosTrading::PolicyNameSeq *limits_applied_ptr = 0; + + CosTrading::OfferSeq_out offer_seq_out (offer_seq_ptr); + CosTrading::OfferIterator_out offer_iterator_out (offer_iterator_ptr); + CosTrading::PolicyNameSeq_out limits_applied_out (limits_applied_ptr); + + this->lookup_->query (TT_Info::QUERIES[i][0], + TT_Info::QUERIES[i][1], + TT_Info::QUERIES[i][2], + policies.policy_seq (), + desired_props, + 8, + offer_seq_out, + offer_iterator_out, + limits_applied_out + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + CosTrading::OfferSeq_var offer_seq (offer_seq_ptr); + CosTrading::OfferIterator_var offer_iterator (offer_iterator_ptr); + CosTrading::PolicyNameSeq_var limits_applied (limits_applied_ptr); + + if (this->verbose_) + { + ACE_DEBUG ((LM_DEBUG, "*** Results:\n\n")); + this->display_results (*offer_seq_ptr, + offer_iterator_ptr + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (limits_applied_out->length () > 0) + ACE_DEBUG ((LM_DEBUG, "*** Limits Applied:\n\n")); + + for (int length = limits_applied_out->length (), j = 0; j < length; j++) + { + const char *policy_name = (*limits_applied_ptr)[j]; + ACE_DEBUG ((LM_DEBUG, "%s\n", + static_cast<const char*> (policy_name))); + } + } + } + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_Offer_Importer::perform_queries"); + ACE_RE_THROW; + } + ACE_ENDTRY; +} + +void +TAO_Offer_Importer::display_results (const CosTrading::OfferSeq& offer_seq, + CosTrading::OfferIterator_ptr offer_iterator + ACE_ENV_ARG_DECL) const + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + ACE_TRY + { + CORBA::ULong length = 0, i = 0; + ACE_DEBUG ((LM_DEBUG, "------------------------------\n")); + ACE_DEBUG ((LM_DEBUG, "Offers in the sequence:\n")); + ACE_DEBUG ((LM_DEBUG, "------------------------------\n")); + for (length = offer_seq.length (), i = 0; i < length; i++) + { + // Call back to the exported object. + TAO_Trader_Test::Remote_Output_var remote_output = + TAO_Trader_Test::Remote_Output::_narrow (offer_seq[i].reference.in () + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + remote_output->confirm (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + TT_Info::dump_properties (offer_seq[i].properties, 1 ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "------------------------------\n")); + } + + ACE_DEBUG ((LM_DEBUG, " Offers in the iterator:\n")); + ACE_DEBUG ((LM_DEBUG, "------------------------------\n")); + if (! CORBA::is_nil (offer_iterator)) + { + length = offer_seq.length (); + CORBA::Boolean any_left = 0; + + do + { + CosTrading::OfferSeq *iter_offers_ptr; + CosTrading::OfferSeq_out iter_offers_out (iter_offers_ptr); + + any_left = offer_iterator->next_n (length, + iter_offers_out + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + CosTrading::OfferSeq_var iter_offers (iter_offers_ptr); + for (length = iter_offers->length (), i = 0; i < length; i++) + { + // Call back to the exported object. + TAO_Trader_Test::Remote_Output_var remote_output = + TAO_Trader_Test::Remote_Output::_narrow (offer_seq[i].reference.in () + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + remote_output->confirm (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + CosTrading::PropertySeq& props = iter_offers[i].properties; + TT_Info::dump_properties (props, 1 ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + ACE_DEBUG ((LM_DEBUG, "------------------------------\n")); + } + + } while (any_left); + + offer_iterator->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_Offer_Importer::display_results"); + ACE_RE_THROW; + } + ACE_ENDTRY; +} diff --git a/TAO/orbsvcs/tests/Trading/Offer_Importer.h b/TAO/orbsvcs/tests/Trading/Offer_Importer.h new file mode 100644 index 00000000000..2a5e78885b3 --- /dev/null +++ b/TAO/orbsvcs/tests/Trading/Offer_Importer.h @@ -0,0 +1,96 @@ +// $Id$ + +// ======================================================================== +// +// = FILE +// Offer_Importer.h +// +// = DESCRIPTION +// Class that tests the Trading Service's Lookup Interface +// +// = AUTHOR +// Seth Widoff <sbw1@cs.wustl.edu> +// +// ======================================================================= + +#ifndef TAO_OFFER_IMPORTER +#define TAO_OFFER_IMPORTER + +#include "TT_Info.h" +#include "ace/Task_T.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "orbsvcs/Trader/Trader_Utils.h" +#include "ttest_export.h" + +class TAO_TTest_Export TAO_Offer_Importer +{ +public: + + TAO_Offer_Importer (CosTrading::Lookup_ptr lookup_if, + CORBA::Boolean verbose = 1); + + void perform_queries (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::IllegalConstraint, + CosTrading::Lookup::IllegalPreference, + CosTrading::Lookup::IllegalPolicyName, + CosTrading::Lookup::PolicyTypeMismatch, + CosTrading::Lookup::InvalidPolicyValue, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTrading::DuplicatePolicyName)); + // Barrage the bootstrapped-to trader with queries. + + void perform_directed_queries (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::IllegalConstraint, + CosTrading::Lookup::IllegalPreference, + CosTrading::Lookup::IllegalPolicyName, + CosTrading::Lookup::PolicyTypeMismatch, + CosTrading::Lookup::InvalidPolicyValue, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTrading::DuplicatePolicyName)); + // Direct a query to a trader two graph edges distant from the + // bootstrapped-to trader. + +private: + + void perform_queries_with_policies (const TAO_Policy_Creator& policy_manager + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::IllegalConstraint, + CosTrading::Lookup::IllegalPreference, + CosTrading::Lookup::IllegalPolicyName, + CosTrading::Lookup::PolicyTypeMismatch, + CosTrading::Lookup::InvalidPolicyValue, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTrading::DuplicatePolicyName)); + // Perform a query on the bootstrapped-to trader given the policies + // pass in <policy_manager>. + + void display_results (const CosTrading::OfferSeq& offer_seq, + CosTrading::OfferIterator_ptr offer_iterator + ACE_ENV_ARG_DECL) const + ACE_THROW_SPEC ((CORBA::SystemException)); + // Display the results of the query to the screen. + + CORBA::Boolean verbose_; + // Output the contents of each returned offer, if true. + + CosTrading::Lookup_ptr lookup_; + // The interface on which to perform all those wonderful queries. +}; + +#endif /* TAO_OFFER_IMPORTER */ diff --git a/TAO/orbsvcs/tests/Trading/README b/TAO/orbsvcs/tests/Trading/README new file mode 100644 index 00000000000..dfc43d6023d --- /dev/null +++ b/TAO/orbsvcs/tests/Trading/README @@ -0,0 +1,3301 @@ +$Id$ + +The TAO Trading Service Tests + +Thank you for your interest in the TAO Trading Service. Documentation +on using the Trading Service and its tests can be found in: + + $TAO_ROOT/docs/releasenotes/trader.html + +Just for reference, a correct execution of the tests is included below: + +Enjoy! + +> export_test + +*** Bootstrap to the Lookup interface. +*** Narrowing the lookup interface. +*** Running the Service Type Exporter tests. +*** TAO_Service_Type_Exporter::removing all types from the Repository. +Service type not yet registered: PostScript_Printer +Service type not yet registered: File_System +Service type not yet registered: Printer +Service type not yet registered: Plotter +Service type not yet registered: Remote_IO +*** TAO_Service_Type_Exporter::adding all types to the Repository. +*** TAO_Service_Type_Exporter::removing all types from the Repository. +*** TAO_Service_Type_Exporter::adding all types to the Repository. +*** TAO_Service_Type_Exporter::listing all types in the Repository. +type name: Plotter +type name: Printer +type name: Remote_IO +type name: File_System +type name: PostScript_Printer +*** TAO_Service_Type_Exporter::describing all types in the Repository. +Type Name: Remote_IO +Interface Name: IDL:TAO_Trader_Test/Remote_Output:1.0 +Property: Miscellaneous Mode: Normal +Property: Trader_Name Mode: Normal +Property: Host_Name Mode: Mandatory +Property: Description Mode: Normal +Property: Location Mode: Mandatory +Property: Name Mode: Mandatory and Readonly +------------------------------ +Type Name: Plotter +Interface Name: IDL:TAO_Trader_Test/Plotter:1.0 +Super Type: Remote_IO +Property: File_Sizes_Pending Mode: Normal +Property: User_Queue Mode: Normal +Property: Model_Number Mode: Read only +Property: Cost_Per_Page Mode: Normal +Property: Auto_Loading Mode: Read only +Property: Num_Colors Mode: Normal +------------------------------ +Type Name: Printer +Interface Name: IDL:TAO_Trader_Test/Printer:1.0 +Super Type: Remote_IO +Property: File_Sizes_Pending Mode: Normal +Property: User_Queue Mode: Normal +Property: Pages_Per_Sec Mode: Read only +Property: Model_Number Mode: Read only +Property: Cost_Per_Page Mode: Normal +Property: Double_Sided Mode: Read only +Property: Color Mode: Mandatory and Readonly +------------------------------ +Type Name: File_System +Interface Name: IDL:TAO_Trader_Test/File_System:1.0 +Super Type: Remote_IO +Property: Permission_Level Mode: Normal +Property: Space_Remaining Mode: Normal +Property: Disk_Space Mode: Mandatory and Readonly +------------------------------ +Type Name: PostScript_Printer +Interface Name: IDL:TAO_Trader_Test/PostScript_Printer:1.0 +Super Type: Printer +Property: Version Mode: Mandatory and Readonly +------------------------------ +*** TAO_Service_Type_Exporter::fully describing all types in the Repository. +Type Name: Remote_IO +Interface Name: IDL:TAO_Trader_Test/Remote_Output:1.0 +Property: Name Mode: Mandatory and Readonly +Property: Location Mode: Mandatory +Property: Description Mode: Normal +Property: Host_Name Mode: Mandatory +Property: Trader_Name Mode: Normal +Property: Miscellaneous Mode: Normal +------------------------------ +Type Name: Plotter +Interface Name: IDL:TAO_Trader_Test/Plotter:1.0 +Super Type: Remote_IO +Property: Name Mode: Mandatory and Readonly +Property: Location Mode: Mandatory +Property: Description Mode: Normal +Property: Host_Name Mode: Mandatory +Property: Trader_Name Mode: Normal +Property: Miscellaneous Mode: Normal +Property: Num_Colors Mode: Normal +Property: Auto_Loading Mode: Read only +Property: Cost_Per_Page Mode: Normal +Property: Model_Number Mode: Read only +Property: User_Queue Mode: Normal +Property: File_Sizes_Pending Mode: Normal +------------------------------ +Type Name: Printer +Interface Name: IDL:TAO_Trader_Test/Printer:1.0 +Super Type: Remote_IO +Property: Name Mode: Mandatory and Readonly +Property: Location Mode: Mandatory +Property: Description Mode: Normal +Property: Host_Name Mode: Mandatory +Property: Trader_Name Mode: Normal +Property: Miscellaneous Mode: Normal +Property: Color Mode: Mandatory and Readonly +Property: Double_Sided Mode: Read only +Property: Cost_Per_Page Mode: Normal +Property: Model_Number Mode: Read only +Property: Pages_Per_Sec Mode: Read only +Property: User_Queue Mode: Normal +Property: File_Sizes_Pending Mode: Normal +------------------------------ +Type Name: File_System +Interface Name: IDL:TAO_Trader_Test/File_System:1.0 +Super Type: Remote_IO +Property: Name Mode: Mandatory and Readonly +Property: Location Mode: Mandatory +Property: Description Mode: Normal +Property: Host_Name Mode: Mandatory +Property: Trader_Name Mode: Normal +Property: Miscellaneous Mode: Normal +Property: Disk_Space Mode: Mandatory and Readonly +Property: Space_Remaining Mode: Normal +Property: Permission_Level Mode: Normal +------------------------------ +Type Name: PostScript_Printer +Interface Name: IDL:TAO_Trader_Test/PostScript_Printer:1.0 +Super Type: Remote_IO +Super Type: Printer +Property: Name Mode: Mandatory and Readonly +Property: Location Mode: Mandatory +Property: Description Mode: Normal +Property: Host_Name Mode: Mandatory +Property: Trader_Name Mode: Normal +Property: Miscellaneous Mode: Normal +Property: Color Mode: Mandatory and Readonly +Property: Double_Sided Mode: Read only +Property: Cost_Per_Page Mode: Normal +Property: Model_Number Mode: Read only +Property: Pages_Per_Sec Mode: Read only +Property: User_Queue Mode: Normal +Property: File_Sizes_Pending Mode: Normal +Property: Version Mode: Mandatory and Readonly +------------------------------ +*** Service Type Exporter tests complete. +*** Running the Offer Exporter tests. +*** TAO_Offer_Exporter::Withdrawing all offers. +TAO_Offer_Exporter::Grabbing all offer ids. +The following offer ids are registered: +*** TAO_Offer_Exporter::Exporting offers. +Registered offer id: 0000000000000001Plotter. +Registered offer id: 0000000000000001Printer. +Registered offer id: 0000000000000001File_System. +Registered offer id: 0000000000000002Plotter. +Registered offer id: 0000000000000002Printer. +Registered offer id: 0000000000000002File_System. +Registered offer id: 0000000000000003Plotter. +Registered offer id: 0000000000000003Printer. +Registered offer id: 0000000000000003File_System. +Registered offer id: 0000000000000004Plotter. +Registered offer id: 0000000000000004Printer. +Registered offer id: 0000000000000004File_System. +Registered offer id: 0000000000000005Plotter. +Registered offer id: 0000000000000005Printer. +Registered offer id: 0000000000000005File_System. +Registered offer id: 0000000000000006Plotter. +Registered offer id: 0000000000000006Printer. +Registered offer id: 0000000000000006File_System. +Registered offer id: 0000000000000007Plotter. +Registered offer id: 0000000000000007Printer. +Registered offer id: 0000000000000007File_System. +Registered offer id: 0000000000000008Plotter. +Registered offer id: 0000000000000008Printer. +Registered offer id: 0000000000000008File_System. +Registered offer id: 0000000000000009Plotter. +Registered offer id: 0000000000000009Printer. +Registered offer id: 0000000000000009File_System. +Registered offer id: 0000000000000010Plotter. +Registered offer id: 0000000000000010Printer. +Registered offer id: 0000000000000010File_System. +Registered offer id: 0000000000000011Plotter. +Registered offer id: 0000000000000011Printer. +Registered offer id: 0000000000000011File_System. +Registered offer id: 0000000000000012Plotter. +Registered offer id: 0000000000000012Printer. +Registered offer id: 0000000000000012File_System. +Registered offer id: 0000000000000013Plotter. +Registered offer id: 0000000000000013Printer. +Registered offer id: 0000000000000013File_System. +Registered offer id: 0000000000000014Plotter. +Registered offer id: 0000000000000014Printer. +Registered offer id: 0000000000000014File_System. +Registered offer id: 0000000000000015Plotter. +Registered offer id: 0000000000000015Printer. +Registered offer id: 0000000000000015File_System. +*** TAO_Offer_Exporter::Describing all offers. +TAO_Offer_Exporter::Grabbing all offer ids. +The following offer ids are registered: +Offer Id: 0000000000000001File_System +Offer Id: 0000000000000002File_System +Offer Id: 0000000000000003File_System +Offer Id: 0000000000000004File_System +Offer Id: 0000000000000005File_System +Offer Id: 0000000000000006File_System +Offer Id: 0000000000000007File_System +Offer Id: 0000000000000008File_System +Offer Id: 0000000000000009File_System +Offer Id: 0000000000000010File_System +Offer Id: 0000000000000011File_System +Offer Id: 0000000000000012File_System +Offer Id: 0000000000000013File_System +Offer Id: 0000000000000014File_System +Offer Id: 0000000000000015File_System +Offer Id: 0000000000000001Printer +Offer Id: 0000000000000002Printer +Offer Id: 0000000000000003Printer +Offer Id: 0000000000000004Printer +Offer Id: 0000000000000005Printer +Offer Id: 0000000000000006Printer +Offer Id: 0000000000000007Printer +Offer Id: 0000000000000008Printer +Offer Id: 0000000000000009Printer +Offer Id: 0000000000000010Printer +Offer Id: 0000000000000011Printer +Offer Id: 0000000000000012Printer +Offer Id: 0000000000000013Printer +Offer Id: 0000000000000014Printer +Offer Id: 0000000000000015Printer +Offer Id: 0000000000000001Plotter +Offer Id: 0000000000000002Plotter +Offer Id: 0000000000000003Plotter +Offer Id: 0000000000000004Plotter +Offer Id: 0000000000000005Plotter +Offer Id: 0000000000000006Plotter +Offer Id: 0000000000000007Plotter +Offer Id: 0000000000000008Plotter +Offer Id: 0000000000000009Plotter +Offer Id: 0000000000000010Plotter +Offer Id: 0000000000000011Plotter +Offer Id: 0000000000000012Plotter +Offer Id: 0000000000000013Plotter +Offer Id: 0000000000000014Plotter +Offer Id: 0000000000000015Plotter +------------------------------ +Offer Id: 0000000000000001File_System +Service Type: File_System +Name : String File System #0 +Location : String Bryan 509 +Description : String File System #0 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 0 +Permission_Level: UShort 1 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000002File_System +Service Type: File_System +Name : String File System #1 +Location : String Bryan 503 +Description : String File System #1 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 2000000 +Permission_Level: UShort 2 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000003File_System +Service Type: File_System +Name : String File System #2 +Location : String Dunker 102 +Description : String File System #2 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 4000000 +Permission_Level: UShort 3 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000004File_System +Service Type: File_System +Name : String File System #3 +Location : String Jolley 408 +Description : String File System #3 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 6000000 +Permission_Level: UShort 4 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000005File_System +Service Type: File_System +Name : String File System #4 +Location : String Lopata 401 +Description : String File System #4 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 8000000 +Permission_Level: UShort 5 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000006File_System +Service Type: File_System +Name : String File System #5 +Location : String January 110 +Description : String File System #5 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 10000000 +Permission_Level: UShort 6 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000007File_System +Service Type: File_System +Name : String File System #6 +Location : String Cupples I 30 +Description : String File System #6 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 12000000 +Permission_Level: UShort 7 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000008File_System +Service Type: File_System +Name : String File System #7 +Location : String Cupples II 201 +Description : String File System #7 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 14000000 +Permission_Level: UShort 8 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000009File_System +Service Type: File_System +Name : String File System #8 +Location : String Urbauer 321 +Description : String File System #8 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 16000000 +Permission_Level: UShort 9 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000010File_System +Service Type: File_System +Name : String File System #9 +Location : String Umrath 302 +Description : String File System #9 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 18000000 +Permission_Level: UShort 10 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000011File_System +Service Type: File_System +Name : String File System #10 +Location : String Wilson 110 +Description : String File System #10 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 20000000 +Permission_Level: UShort 11 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000012File_System +Service Type: File_System +Name : String File System #11 +Location : String Olin 239 +Description : String File System #11 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 22000000 +Permission_Level: UShort 12 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000013File_System +Service Type: File_System +Name : String File System #12 +Location : String Simon 238 +Description : String File System #12 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 24000000 +Permission_Level: UShort 13 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000014File_System +Service Type: File_System +Name : String File System #13 +Location : String Rebstock 232 +Description : String File System #13 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 26000000 +Permission_Level: UShort 14 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000015File_System +Service Type: File_System +Name : String File System #14 +Location : String McMillan 123 +Description : String File System #14 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 28000000 +Permission_Level: UShort 15 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000001Printer +Service Type: Printer +Name : String Printer #0 +Location : String Bryan 509 +Description : String Printer #0 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 0.000000 +Model_Number : String HP238293892bn2398 +Pages_Per_Sec : UShort 0 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000002Printer +Service Type: Printer +Name : String Printer #1 +Location : String Bryan 503 +Description : String Printer #1 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 1.000000 +Model_Number : String PK92839nkse092309 +Pages_Per_Sec : UShort 1 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000003Printer +Service Type: Printer +Name : String Printer #2 +Location : String Dunker 102 +Description : String Printer #2 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 2.000000 +Model_Number : String 8328323n293kljs98 +Pages_Per_Sec : UShort 2 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000004Printer +Service Type: Printer +Name : String Printer #3 +Location : String Jolley 408 +Description : String Printer #3 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 3.000000 +Model_Number : String 29309sjdkq34jksd2 +Pages_Per_Sec : UShort 3 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000005Printer +Service Type: Printer +Name : String Printer #4 +Location : String Lopata 401 +Description : String Printer #4 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 4.000000 +Model_Number : String 09q834efjhqw834q3 +Pages_Per_Sec : UShort 4 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000006Printer +Service Type: Printer +Name : String Printer #5 +Location : String January 110 +Description : String Printer #5 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 5.000000 +Model_Number : String q9834fdkjwq0934kf +Pages_Per_Sec : UShort 5 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000007Printer +Service Type: Printer +Name : String Printer #6 +Location : String Cupples I 30 +Description : String Printer #6 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 6.000000 +Model_Number : String q834jfda09q834djk +Pages_Per_Sec : UShort 6 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000008Printer +Service Type: Printer +Name : String Printer #7 +Location : String Cupples II 201 +Description : String Printer #7 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 7.000000 +Model_Number : String kajsd09q384kjda90 +Pages_Per_Sec : UShort 7 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000009Printer +Service Type: Printer +Name : String Printer #8 +Location : String Urbauer 321 +Description : String Printer #8 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 8.000000 +Model_Number : String 9p83q4jklsdj098q3 +Pages_Per_Sec : UShort 8 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000010Printer +Service Type: Printer +Name : String Printer #9 +Location : String Umrath 302 +Description : String Printer #9 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 9.000000 +Model_Number : String 09a834ojfda09wu3r +Pages_Per_Sec : UShort 9 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000011Printer +Service Type: Printer +Name : String Printer #10 +Location : String Wilson 110 +Description : String Printer #10 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 10.000000 +Model_Number : String 09234kejdfq934jed +Pages_Per_Sec : UShort 10 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000012Printer +Service Type: Printer +Name : String Printer #11 +Location : String Olin 239 +Description : String Printer #11 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 11.000000 +Model_Number : String 0q83kjefd09384jda +Pages_Per_Sec : UShort 11 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000013Printer +Service Type: Printer +Name : String Printer #12 +Location : String Simon 238 +Description : String Printer #12 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 12.000000 +Model_Number : String asdfj0283jkdf0923 +Pages_Per_Sec : UShort 12 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000014Printer +Service Type: Printer +Name : String Printer #13 +Location : String Rebstock 232 +Description : String Printer #13 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 13.000000 +Model_Number : String kladfp72wu34j230f +Pages_Per_Sec : UShort 13 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000015Printer +Service Type: Printer +Name : String Printer #14 +Location : String McMillan 123 +Description : String Printer #14 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 14.000000 +Model_Number : String 9q834jidlj234ujof +Pages_Per_Sec : UShort 14 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000001Plotter +Service Type: Plotter +Name : String Plotter #0 +Location : String Bryan 509 +Description : String Plotter #0 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 0 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 0.000000 +Model_Number : String HP238293892bn2398 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000002Plotter +Service Type: Plotter +Name : String Plotter #1 +Location : String Bryan 503 +Description : String Plotter #1 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 2 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 1.000000 +Model_Number : String PK92839nkse092309 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000003Plotter +Service Type: Plotter +Name : String Plotter #2 +Location : String Dunker 102 +Description : String Plotter #2 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 4 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 2.000000 +Model_Number : String 8328323n293kljs98 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000004Plotter +Service Type: Plotter +Name : String Plotter #3 +Location : String Jolley 408 +Description : String Plotter #3 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 6 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 3.000000 +Model_Number : String 29309sjdkq34jksd2 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000005Plotter +Service Type: Plotter +Name : String Plotter #4 +Location : String Lopata 401 +Description : String Plotter #4 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 8 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 4.000000 +Model_Number : String 09q834efjhqw834q3 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000006Plotter +Service Type: Plotter +Name : String Plotter #5 +Location : String January 110 +Description : String Plotter #5 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 10 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 5.000000 +Model_Number : String q9834fdkjwq0934kf +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000007Plotter +Service Type: Plotter +Name : String Plotter #6 +Location : String Cupples I 30 +Description : String Plotter #6 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 12 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 6.000000 +Model_Number : String q834jfda09q834djk +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000008Plotter +Service Type: Plotter +Name : String Plotter #7 +Location : String Cupples II 201 +Description : String Plotter #7 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 14 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 7.000000 +Model_Number : String kajsd09q384kjda90 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000009Plotter +Service Type: Plotter +Name : String Plotter #8 +Location : String Urbauer 321 +Description : String Plotter #8 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 16 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 8.000000 +Model_Number : String 9p83q4jklsdj098q3 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000010Plotter +Service Type: Plotter +Name : String Plotter #9 +Location : String Umrath 302 +Description : String Plotter #9 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 18 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 9.000000 +Model_Number : String 09a834ojfda09wu3r +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000011Plotter +Service Type: Plotter +Name : String Plotter #10 +Location : String Wilson 110 +Description : String Plotter #10 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 20 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 10.000000 +Model_Number : String 09234kejdfq934jed +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000012Plotter +Service Type: Plotter +Name : String Plotter #11 +Location : String Olin 239 +Description : String Plotter #11 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 22 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 11.000000 +Model_Number : String 0q83kjefd09384jda +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000013Plotter +Service Type: Plotter +Name : String Plotter #12 +Location : String Simon 238 +Description : String Plotter #12 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 24 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 12.000000 +Model_Number : String asdfj0283jkdf0923 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000014Plotter +Service Type: Plotter +Name : String Plotter #13 +Location : String Rebstock 232 +Description : String Plotter #13 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 26 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 13.000000 +Model_Number : String kladfp72wu34j230f +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000015Plotter +Service Type: Plotter +Name : String Plotter #14 +Location : String McMillan 123 +Description : String Plotter #14 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 28 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 14.000000 +Model_Number : String 9q834jidlj234ujof +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +*** TAO_Offer_Exporter::Modifying all offers. +TAO_Offer_Exporter::Grabbing all offer ids. +The following offer ids are registered: +Offer Id: 0000000000000001File_System +Offer Id: 0000000000000002File_System +Offer Id: 0000000000000003File_System +Offer Id: 0000000000000004File_System +Offer Id: 0000000000000005File_System +Offer Id: 0000000000000006File_System +Offer Id: 0000000000000007File_System +Offer Id: 0000000000000008File_System +Offer Id: 0000000000000009File_System +Offer Id: 0000000000000010File_System +Offer Id: 0000000000000011File_System +Offer Id: 0000000000000012File_System +Offer Id: 0000000000000013File_System +Offer Id: 0000000000000014File_System +Offer Id: 0000000000000015File_System +Offer Id: 0000000000000001Printer +Offer Id: 0000000000000002Printer +Offer Id: 0000000000000003Printer +Offer Id: 0000000000000004Printer +Offer Id: 0000000000000005Printer +Offer Id: 0000000000000006Printer +Offer Id: 0000000000000007Printer +Offer Id: 0000000000000008Printer +Offer Id: 0000000000000009Printer +Offer Id: 0000000000000010Printer +Offer Id: 0000000000000011Printer +Offer Id: 0000000000000012Printer +Offer Id: 0000000000000013Printer +Offer Id: 0000000000000014Printer +Offer Id: 0000000000000015Printer +Offer Id: 0000000000000001Plotter +Offer Id: 0000000000000002Plotter +Offer Id: 0000000000000003Plotter +Offer Id: 0000000000000004Plotter +Offer Id: 0000000000000005Plotter +Offer Id: 0000000000000006Plotter +Offer Id: 0000000000000007Plotter +Offer Id: 0000000000000008Plotter +Offer Id: 0000000000000009Plotter +Offer Id: 0000000000000010Plotter +Offer Id: 0000000000000011Plotter +Offer Id: 0000000000000012Plotter +Offer Id: 0000000000000013Plotter +Offer Id: 0000000000000014Plotter +Offer Id: 0000000000000015Plotter +*** TAO_Offer_Exporter::Describing all offers. +TAO_Offer_Exporter::Grabbing all offer ids. +The following offer ids are registered: +Offer Id: 0000000000000001File_System +Offer Id: 0000000000000002File_System +Offer Id: 0000000000000003File_System +Offer Id: 0000000000000004File_System +Offer Id: 0000000000000005File_System +Offer Id: 0000000000000006File_System +Offer Id: 0000000000000007File_System +Offer Id: 0000000000000008File_System +Offer Id: 0000000000000009File_System +Offer Id: 0000000000000010File_System +Offer Id: 0000000000000011File_System +Offer Id: 0000000000000012File_System +Offer Id: 0000000000000013File_System +Offer Id: 0000000000000014File_System +Offer Id: 0000000000000015File_System +Offer Id: 0000000000000001Printer +Offer Id: 0000000000000002Printer +Offer Id: 0000000000000003Printer +Offer Id: 0000000000000004Printer +Offer Id: 0000000000000005Printer +Offer Id: 0000000000000006Printer +Offer Id: 0000000000000007Printer +Offer Id: 0000000000000008Printer +Offer Id: 0000000000000009Printer +Offer Id: 0000000000000010Printer +Offer Id: 0000000000000011Printer +Offer Id: 0000000000000012Printer +Offer Id: 0000000000000013Printer +Offer Id: 0000000000000014Printer +Offer Id: 0000000000000015Printer +Offer Id: 0000000000000001Plotter +Offer Id: 0000000000000002Plotter +Offer Id: 0000000000000003Plotter +Offer Id: 0000000000000004Plotter +Offer Id: 0000000000000005Plotter +Offer Id: 0000000000000006Plotter +Offer Id: 0000000000000007Plotter +Offer Id: 0000000000000008Plotter +Offer Id: 0000000000000009Plotter +Offer Id: 0000000000000010Plotter +Offer Id: 0000000000000011Plotter +Offer Id: 0000000000000012Plotter +Offer Id: 0000000000000013Plotter +Offer Id: 0000000000000014Plotter +Offer Id: 0000000000000015Plotter +------------------------------ +Offer Id: 0000000000000001File_System +Service Type: File_System +Name : String File System #0 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 0 +Permission_Level: UShort 1 +Space_Remaining: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000002File_System +Service Type: File_System +Name : String File System #1 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 2000000 +Permission_Level: UShort 2 +Space_Remaining: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000003File_System +Service Type: File_System +Name : String File System #2 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 4000000 +Permission_Level: UShort 3 +Space_Remaining: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000004File_System +Service Type: File_System +Name : String File System #3 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 6000000 +Permission_Level: UShort 4 +Space_Remaining: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000005File_System +Service Type: File_System +Name : String File System #4 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 8000000 +Permission_Level: UShort 5 +Space_Remaining: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000006File_System +Service Type: File_System +Name : String File System #5 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 10000000 +Permission_Level: UShort 6 +Space_Remaining: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000007File_System +Service Type: File_System +Name : String File System #6 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 12000000 +Permission_Level: UShort 7 +Space_Remaining: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000008File_System +Service Type: File_System +Name : String File System #7 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 14000000 +Permission_Level: UShort 8 +Space_Remaining: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000009File_System +Service Type: File_System +Name : String File System #8 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 16000000 +Permission_Level: UShort 9 +Space_Remaining: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000010File_System +Service Type: File_System +Name : String File System #9 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 18000000 +Permission_Level: UShort 10 +Space_Remaining: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000011File_System +Service Type: File_System +Name : String File System #10 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 20000000 +Permission_Level: UShort 11 +Space_Remaining: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000012File_System +Service Type: File_System +Name : String File System #11 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 22000000 +Permission_Level: UShort 12 +Space_Remaining: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000013File_System +Service Type: File_System +Name : String File System #12 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 24000000 +Permission_Level: UShort 13 +Space_Remaining: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000014File_System +Service Type: File_System +Name : String File System #13 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 26000000 +Permission_Level: UShort 14 +Space_Remaining: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000015File_System +Service Type: File_System +Name : String File System #14 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 28000000 +Permission_Level: UShort 15 +Space_Remaining: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000001Printer +Service Type: Printer +Name : String Printer #0 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 0.000000 +Model_Number : String HP238293892bn2398 +Pages_Per_Sec : UShort 0 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000002Printer +Service Type: Printer +Name : String Printer #1 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 1.000000 +Model_Number : String PK92839nkse092309 +Pages_Per_Sec : UShort 1 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000003Printer +Service Type: Printer +Name : String Printer #2 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 2.000000 +Model_Number : String 8328323n293kljs98 +Pages_Per_Sec : UShort 2 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000004Printer +Service Type: Printer +Name : String Printer #3 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 3.000000 +Model_Number : String 29309sjdkq34jksd2 +Pages_Per_Sec : UShort 3 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000005Printer +Service Type: Printer +Name : String Printer #4 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 4.000000 +Model_Number : String 09q834efjhqw834q3 +Pages_Per_Sec : UShort 4 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000006Printer +Service Type: Printer +Name : String Printer #5 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 5.000000 +Model_Number : String q9834fdkjwq0934kf +Pages_Per_Sec : UShort 5 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000007Printer +Service Type: Printer +Name : String Printer #6 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 6.000000 +Model_Number : String q834jfda09q834djk +Pages_Per_Sec : UShort 6 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000008Printer +Service Type: Printer +Name : String Printer #7 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 7.000000 +Model_Number : String kajsd09q384kjda90 +Pages_Per_Sec : UShort 7 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000009Printer +Service Type: Printer +Name : String Printer #8 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 8.000000 +Model_Number : String 9p83q4jklsdj098q3 +Pages_Per_Sec : UShort 8 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000010Printer +Service Type: Printer +Name : String Printer #9 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 9.000000 +Model_Number : String 09a834ojfda09wu3r +Pages_Per_Sec : UShort 9 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000011Printer +Service Type: Printer +Name : String Printer #10 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 10.000000 +Model_Number : String 09234kejdfq934jed +Pages_Per_Sec : UShort 10 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000012Printer +Service Type: Printer +Name : String Printer #11 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 11.000000 +Model_Number : String 0q83kjefd09384jda +Pages_Per_Sec : UShort 11 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000013Printer +Service Type: Printer +Name : String Printer #12 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 12.000000 +Model_Number : String asdfj0283jkdf0923 +Pages_Per_Sec : UShort 12 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000014Printer +Service Type: Printer +Name : String Printer #13 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 13.000000 +Model_Number : String kladfp72wu34j230f +Pages_Per_Sec : UShort 13 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000015Printer +Service Type: Printer +Name : String Printer #14 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 14.000000 +Model_Number : String 9q834jidlj234ujof +Pages_Per_Sec : UShort 14 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000001Plotter +Service Type: Plotter +Name : String Plotter #0 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 0 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 0.000000 +Model_Number : String HP238293892bn2398 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000002Plotter +Service Type: Plotter +Name : String Plotter #1 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 2 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 1.000000 +Model_Number : String PK92839nkse092309 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000003Plotter +Service Type: Plotter +Name : String Plotter #2 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 4 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 2.000000 +Model_Number : String 8328323n293kljs98 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000004Plotter +Service Type: Plotter +Name : String Plotter #3 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 6 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 3.000000 +Model_Number : String 29309sjdkq34jksd2 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000005Plotter +Service Type: Plotter +Name : String Plotter #4 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 8 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 4.000000 +Model_Number : String 09q834efjhqw834q3 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000006Plotter +Service Type: Plotter +Name : String Plotter #5 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 10 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 5.000000 +Model_Number : String q9834fdkjwq0934kf +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000007Plotter +Service Type: Plotter +Name : String Plotter #6 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 12 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 6.000000 +Model_Number : String q834jfda09q834djk +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000008Plotter +Service Type: Plotter +Name : String Plotter #7 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 14 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 7.000000 +Model_Number : String kajsd09q384kjda90 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000009Plotter +Service Type: Plotter +Name : String Plotter #8 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 16 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 8.000000 +Model_Number : String 9p83q4jklsdj098q3 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000010Plotter +Service Type: Plotter +Name : String Plotter #9 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 18 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 9.000000 +Model_Number : String 09a834ojfda09wu3r +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000011Plotter +Service Type: Plotter +Name : String Plotter #10 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 20 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 10.000000 +Model_Number : String 09234kejdfq934jed +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000012Plotter +Service Type: Plotter +Name : String Plotter #11 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 22 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 11.000000 +Model_Number : String 0q83kjefd09384jda +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000013Plotter +Service Type: Plotter +Name : String Plotter #12 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 24 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 12.000000 +Model_Number : String asdfj0283jkdf0923 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000014Plotter +Service Type: Plotter +Name : String Plotter #13 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 26 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 13.000000 +Model_Number : String kladfp72wu34j230f +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +Offer Id: 0000000000000015Plotter +Service Type: Plotter +Name : String Plotter #14 +Location : String MODIFIED +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 28 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 14.000000 +Model_Number : String 9q834jidlj234ujof +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +Miscellaneous : String MODIFIED +------------------------------ +*** TAO_Offer_Exporter::Withdrawing with constraint. +Constraint: (not exist Description) and (Location == 'MODIFIED') and (exist Name) +*** TAO_Offer_Exporter::Describing all offers. +TAO_Offer_Exporter::Grabbing all offer ids. +The following offer ids are registered: +------------------------------ +*** TAO_Offer_Exporter::Withdrawing all offers. +TAO_Offer_Exporter::Grabbing all offer ids. +The following offer ids are registered: +*** TAO_Offer_Exporter::Exporting offers. +Registered offer id: 0000000000000001Plotter. +Registered offer id: 0000000000000001Printer. +Registered offer id: 0000000000000001File_System. +Registered offer id: 0000000000000002Plotter. +Registered offer id: 0000000000000002Printer. +Registered offer id: 0000000000000002File_System. +Registered offer id: 0000000000000003Plotter. +Registered offer id: 0000000000000003Printer. +Registered offer id: 0000000000000003File_System. +Registered offer id: 0000000000000004Plotter. +Registered offer id: 0000000000000004Printer. +Registered offer id: 0000000000000004File_System. +Registered offer id: 0000000000000005Plotter. +Registered offer id: 0000000000000005Printer. +Registered offer id: 0000000000000005File_System. +Registered offer id: 0000000000000006Plotter. +Registered offer id: 0000000000000006Printer. +Registered offer id: 0000000000000006File_System. +Registered offer id: 0000000000000007Plotter. +Registered offer id: 0000000000000007Printer. +Registered offer id: 0000000000000007File_System. +Registered offer id: 0000000000000008Plotter. +Registered offer id: 0000000000000008Printer. +Registered offer id: 0000000000000008File_System. +Registered offer id: 0000000000000009Plotter. +Registered offer id: 0000000000000009Printer. +Registered offer id: 0000000000000009File_System. +Registered offer id: 0000000000000010Plotter. +Registered offer id: 0000000000000010Printer. +Registered offer id: 0000000000000010File_System. +Registered offer id: 0000000000000011Plotter. +Registered offer id: 0000000000000011Printer. +Registered offer id: 0000000000000011File_System. +Registered offer id: 0000000000000012Plotter. +Registered offer id: 0000000000000012Printer. +Registered offer id: 0000000000000012File_System. +Registered offer id: 0000000000000013Plotter. +Registered offer id: 0000000000000013Printer. +Registered offer id: 0000000000000013File_System. +Registered offer id: 0000000000000014Plotter. +Registered offer id: 0000000000000014Printer. +Registered offer id: 0000000000000014File_System. +Registered offer id: 0000000000000015Plotter. +Registered offer id: 0000000000000015Printer. +Registered offer id: 0000000000000015File_System. +*** TAO_Offer_Exporter::Describing all offers. +TAO_Offer_Exporter::Grabbing all offer ids. +The following offer ids are registered: +Offer Id: 0000000000000001File_System +Offer Id: 0000000000000002File_System +Offer Id: 0000000000000003File_System +Offer Id: 0000000000000004File_System +Offer Id: 0000000000000005File_System +Offer Id: 0000000000000006File_System +Offer Id: 0000000000000007File_System +Offer Id: 0000000000000008File_System +Offer Id: 0000000000000009File_System +Offer Id: 0000000000000010File_System +Offer Id: 0000000000000011File_System +Offer Id: 0000000000000012File_System +Offer Id: 0000000000000013File_System +Offer Id: 0000000000000014File_System +Offer Id: 0000000000000015File_System +Offer Id: 0000000000000001Printer +Offer Id: 0000000000000002Printer +Offer Id: 0000000000000003Printer +Offer Id: 0000000000000004Printer +Offer Id: 0000000000000005Printer +Offer Id: 0000000000000006Printer +Offer Id: 0000000000000007Printer +Offer Id: 0000000000000008Printer +Offer Id: 0000000000000009Printer +Offer Id: 0000000000000010Printer +Offer Id: 0000000000000011Printer +Offer Id: 0000000000000012Printer +Offer Id: 0000000000000013Printer +Offer Id: 0000000000000014Printer +Offer Id: 0000000000000015Printer +Offer Id: 0000000000000001Plotter +Offer Id: 0000000000000002Plotter +Offer Id: 0000000000000003Plotter +Offer Id: 0000000000000004Plotter +Offer Id: 0000000000000005Plotter +Offer Id: 0000000000000006Plotter +Offer Id: 0000000000000007Plotter +Offer Id: 0000000000000008Plotter +Offer Id: 0000000000000009Plotter +Offer Id: 0000000000000010Plotter +Offer Id: 0000000000000011Plotter +Offer Id: 0000000000000012Plotter +Offer Id: 0000000000000013Plotter +Offer Id: 0000000000000014Plotter +Offer Id: 0000000000000015Plotter +------------------------------ +Offer Id: 0000000000000001File_System +Service Type: File_System +Name : String File System #0 +Location : String Bryan 509 +Description : String File System #0 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 0 +Permission_Level: UShort 1 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000002File_System +Service Type: File_System +Name : String File System #1 +Location : String Bryan 503 +Description : String File System #1 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 2000000 +Permission_Level: UShort 2 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000003File_System +Service Type: File_System +Name : String File System #2 +Location : String Dunker 102 +Description : String File System #2 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 4000000 +Permission_Level: UShort 3 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000004File_System +Service Type: File_System +Name : String File System #3 +Location : String Jolley 408 +Description : String File System #3 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 6000000 +Permission_Level: UShort 4 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000005File_System +Service Type: File_System +Name : String File System #4 +Location : String Lopata 401 +Description : String File System #4 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 8000000 +Permission_Level: UShort 5 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000006File_System +Service Type: File_System +Name : String File System #5 +Location : String January 110 +Description : String File System #5 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 10000000 +Permission_Level: UShort 6 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000007File_System +Service Type: File_System +Name : String File System #6 +Location : String Cupples I 30 +Description : String File System #6 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 12000000 +Permission_Level: UShort 7 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000008File_System +Service Type: File_System +Name : String File System #7 +Location : String Cupples II 201 +Description : String File System #7 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 14000000 +Permission_Level: UShort 8 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000009File_System +Service Type: File_System +Name : String File System #8 +Location : String Urbauer 321 +Description : String File System #8 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 16000000 +Permission_Level: UShort 9 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000010File_System +Service Type: File_System +Name : String File System #9 +Location : String Umrath 302 +Description : String File System #9 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 18000000 +Permission_Level: UShort 10 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000011File_System +Service Type: File_System +Name : String File System #10 +Location : String Wilson 110 +Description : String File System #10 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 20000000 +Permission_Level: UShort 11 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000012File_System +Service Type: File_System +Name : String File System #11 +Location : String Olin 239 +Description : String File System #11 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 22000000 +Permission_Level: UShort 12 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000013File_System +Service Type: File_System +Name : String File System #12 +Location : String Simon 238 +Description : String File System #12 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 24000000 +Permission_Level: UShort 13 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000014File_System +Service Type: File_System +Name : String File System #13 +Location : String Rebstock 232 +Description : String File System #13 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 26000000 +Permission_Level: UShort 14 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000015File_System +Service Type: File_System +Name : String File System #14 +Location : String McMillan 123 +Description : String File System #14 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 28000000 +Permission_Level: UShort 15 +Space_Remaining: Dynamic Property +------------------------------ +Offer Id: 0000000000000001Printer +Service Type: Printer +Name : String Printer #0 +Location : String Bryan 509 +Description : String Printer #0 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 0.000000 +Model_Number : String HP238293892bn2398 +Pages_Per_Sec : UShort 0 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000002Printer +Service Type: Printer +Name : String Printer #1 +Location : String Bryan 503 +Description : String Printer #1 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 1.000000 +Model_Number : String PK92839nkse092309 +Pages_Per_Sec : UShort 1 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000003Printer +Service Type: Printer +Name : String Printer #2 +Location : String Dunker 102 +Description : String Printer #2 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 2.000000 +Model_Number : String 8328323n293kljs98 +Pages_Per_Sec : UShort 2 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000004Printer +Service Type: Printer +Name : String Printer #3 +Location : String Jolley 408 +Description : String Printer #3 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 3.000000 +Model_Number : String 29309sjdkq34jksd2 +Pages_Per_Sec : UShort 3 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000005Printer +Service Type: Printer +Name : String Printer #4 +Location : String Lopata 401 +Description : String Printer #4 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 4.000000 +Model_Number : String 09q834efjhqw834q3 +Pages_Per_Sec : UShort 4 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000006Printer +Service Type: Printer +Name : String Printer #5 +Location : String January 110 +Description : String Printer #5 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 5.000000 +Model_Number : String q9834fdkjwq0934kf +Pages_Per_Sec : UShort 5 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000007Printer +Service Type: Printer +Name : String Printer #6 +Location : String Cupples I 30 +Description : String Printer #6 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 6.000000 +Model_Number : String q834jfda09q834djk +Pages_Per_Sec : UShort 6 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000008Printer +Service Type: Printer +Name : String Printer #7 +Location : String Cupples II 201 +Description : String Printer #7 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 7.000000 +Model_Number : String kajsd09q384kjda90 +Pages_Per_Sec : UShort 7 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000009Printer +Service Type: Printer +Name : String Printer #8 +Location : String Urbauer 321 +Description : String Printer #8 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 8.000000 +Model_Number : String 9p83q4jklsdj098q3 +Pages_Per_Sec : UShort 8 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000010Printer +Service Type: Printer +Name : String Printer #9 +Location : String Umrath 302 +Description : String Printer #9 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 9.000000 +Model_Number : String 09a834ojfda09wu3r +Pages_Per_Sec : UShort 9 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000011Printer +Service Type: Printer +Name : String Printer #10 +Location : String Wilson 110 +Description : String Printer #10 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 10.000000 +Model_Number : String 09234kejdfq934jed +Pages_Per_Sec : UShort 10 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000012Printer +Service Type: Printer +Name : String Printer #11 +Location : String Olin 239 +Description : String Printer #11 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 11.000000 +Model_Number : String 0q83kjefd09384jda +Pages_Per_Sec : UShort 11 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000013Printer +Service Type: Printer +Name : String Printer #12 +Location : String Simon 238 +Description : String Printer #12 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 12.000000 +Model_Number : String asdfj0283jkdf0923 +Pages_Per_Sec : UShort 12 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000014Printer +Service Type: Printer +Name : String Printer #13 +Location : String Rebstock 232 +Description : String Printer #13 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 13.000000 +Model_Number : String kladfp72wu34j230f +Pages_Per_Sec : UShort 13 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000015Printer +Service Type: Printer +Name : String Printer #14 +Location : String McMillan 123 +Description : String Printer #14 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 14.000000 +Model_Number : String 9q834jidlj234ujof +Pages_Per_Sec : UShort 14 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000001Plotter +Service Type: Plotter +Name : String Plotter #0 +Location : String Bryan 509 +Description : String Plotter #0 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 0 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 0.000000 +Model_Number : String HP238293892bn2398 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000002Plotter +Service Type: Plotter +Name : String Plotter #1 +Location : String Bryan 503 +Description : String Plotter #1 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 2 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 1.000000 +Model_Number : String PK92839nkse092309 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000003Plotter +Service Type: Plotter +Name : String Plotter #2 +Location : String Dunker 102 +Description : String Plotter #2 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 4 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 2.000000 +Model_Number : String 8328323n293kljs98 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000004Plotter +Service Type: Plotter +Name : String Plotter #3 +Location : String Jolley 408 +Description : String Plotter #3 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 6 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 3.000000 +Model_Number : String 29309sjdkq34jksd2 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000005Plotter +Service Type: Plotter +Name : String Plotter #4 +Location : String Lopata 401 +Description : String Plotter #4 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 8 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 4.000000 +Model_Number : String 09q834efjhqw834q3 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000006Plotter +Service Type: Plotter +Name : String Plotter #5 +Location : String January 110 +Description : String Plotter #5 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 10 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 5.000000 +Model_Number : String q9834fdkjwq0934kf +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000007Plotter +Service Type: Plotter +Name : String Plotter #6 +Location : String Cupples I 30 +Description : String Plotter #6 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 12 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 6.000000 +Model_Number : String q834jfda09q834djk +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000008Plotter +Service Type: Plotter +Name : String Plotter #7 +Location : String Cupples II 201 +Description : String Plotter #7 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 14 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 7.000000 +Model_Number : String kajsd09q384kjda90 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000009Plotter +Service Type: Plotter +Name : String Plotter #8 +Location : String Urbauer 321 +Description : String Plotter #8 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 16 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 8.000000 +Model_Number : String 9p83q4jklsdj098q3 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000010Plotter +Service Type: Plotter +Name : String Plotter #9 +Location : String Umrath 302 +Description : String Plotter #9 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 18 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 9.000000 +Model_Number : String 09a834ojfda09wu3r +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000011Plotter +Service Type: Plotter +Name : String Plotter #10 +Location : String Wilson 110 +Description : String Plotter #10 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 20 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 10.000000 +Model_Number : String 09234kejdfq934jed +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000012Plotter +Service Type: Plotter +Name : String Plotter #11 +Location : String Olin 239 +Description : String Plotter #11 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 22 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 11.000000 +Model_Number : String 0q83kjefd09384jda +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000013Plotter +Service Type: Plotter +Name : String Plotter #12 +Location : String Simon 238 +Description : String Plotter #12 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 24 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 12.000000 +Model_Number : String asdfj0283jkdf0923 +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000014Plotter +Service Type: Plotter +Name : String Plotter #13 +Location : String Rebstock 232 +Description : String Plotter #13 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 26 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 13.000000 +Model_Number : String kladfp72wu34j230f +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +Offer Id: 0000000000000015Plotter +Service Type: Plotter +Name : String Plotter #14 +Location : String McMillan 123 +Description : String Plotter #14 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 28 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 14.000000 +Model_Number : String 9q834jidlj234ujof +User_Queue : Dynamic Property +File_Sizes_Pending: Dynamic Property +------------------------------ +*** Offer Exporter tests complete. +*** Now serving dynamic properties. + +> import_test + +Bootstrap to the Lookup interface. +Narrowing the lookup interface. +Running the Offer Importer tests. +*** TAO_Offer_Importer::Federated Query. + +*** Performing query for Remote_IO. +*** Query: +*** Preferences: +*** Results: + +------------------------------ +Offers in the sequence: +------------------------------ +Name : String File System #0 +Location : String Bryan 509 +Description : String File System #0 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 0 +Permission_Level: UShort 1 +Space_Remaining: ULong 0 +------------------------------ +Name : String File System #1 +Location : String Bryan 503 +Description : String File System #1 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 2000000 +Permission_Level: UShort 2 +Space_Remaining: ULong 4434343 +------------------------------ +Name : String File System #2 +Location : String Dunker 102 +Description : String File System #2 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 4000000 +Permission_Level: UShort 3 +Space_Remaining: ULong 8868686 +------------------------------ +Name : String File System #3 +Location : String Jolley 408 +Description : String File System #3 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 6000000 +Permission_Level: UShort 4 +Space_Remaining: ULong 13303029 +------------------------------ +Name : String File System #4 +Location : String Lopata 401 +Description : String File System #4 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 8000000 +Permission_Level: UShort 5 +Space_Remaining: ULong 17737372 +------------------------------ +Name : String File System #5 +Location : String January 110 +Description : String File System #5 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 10000000 +Permission_Level: UShort 6 +Space_Remaining: ULong 22171715 +------------------------------ +Name : String File System #6 +Location : String Cupples I 30 +Description : String File System #6 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 12000000 +Permission_Level: UShort 7 +Space_Remaining: ULong 26606058 +------------------------------ +Name : String File System #7 +Location : String Cupples II 201 +Description : String File System #7 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 14000000 +Permission_Level: UShort 8 +Space_Remaining: ULong 31040401 +------------------------------ + Offers in the iterator: +------------------------------ +Name : String File System #8 +Location : String Urbauer 321 +Description : String File System #8 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 16000000 +Permission_Level: UShort 9 +Space_Remaining: ULong 35474744 +------------------------------ +Name : String File System #9 +Location : String Umrath 302 +Description : String File System #9 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 18000000 +Permission_Level: UShort 10 +Space_Remaining: ULong 39909087 +------------------------------ +Name : String File System #10 +Location : String Wilson 110 +Description : String File System #10 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 20000000 +Permission_Level: UShort 11 +Space_Remaining: ULong 44343430 +------------------------------ +Name : String File System #11 +Location : String Olin 239 +Description : String File System #11 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 22000000 +Permission_Level: UShort 12 +Space_Remaining: ULong 48777773 +------------------------------ +Name : String File System #12 +Location : String Simon 238 +Description : String File System #12 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 24000000 +Permission_Level: UShort 13 +Space_Remaining: ULong 53212116 +------------------------------ +Name : String File System #13 +Location : String Rebstock 232 +Description : String File System #13 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 26000000 +Permission_Level: UShort 14 +Space_Remaining: ULong 57646459 +------------------------------ +Name : String File System #14 +Location : String McMillan 123 +Description : String File System #14 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 28000000 +Permission_Level: UShort 15 +Space_Remaining: ULong 62080802 +------------------------------ +Name : String Printer #0 +Location : String Bryan 509 +Description : String Printer #0 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 0.000000 +Model_Number : String HP238293892bn2398 +Pages_Per_Sec : UShort 0 +User_Queue : sbw1 schmidt naga alex +File_Sizes_Pending: 0 10000 20000 30000 +------------------------------ +Name : String Printer #1 +Location : String Bryan 503 +Description : String Printer #1 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 1.000000 +Model_Number : String PK92839nkse092309 +Pages_Per_Sec : UShort 1 +User_Queue : mk1 marina sumedh sergio +File_Sizes_Pending: 40000 50000 60000 70000 +------------------------------ +Name : String Printer #2 +Location : String Dunker 102 +Description : String Printer #2 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 2.000000 +Model_Number : String 8328323n293kljs98 +Pages_Per_Sec : UShort 2 +User_Queue : coryan cdgill levine jxh +File_Sizes_Pending: 80000 90000 100000 110000 +------------------------------ +Name : String Printer #3 +Location : String Jolley 408 +Description : String Printer #3 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 3.000000 +Model_Number : String 29309sjdkq34jksd2 +Pages_Per_Sec : UShort 3 +User_Queue : irfan nanbor eea1 sbw1 +File_Sizes_Pending: 120000 130000 140000 0 +------------------------------ +Name : String Printer #4 +Location : String Lopata 401 +Description : String Printer #4 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 4.000000 +Model_Number : String 09q834efjhqw834q3 +Pages_Per_Sec : UShort 4 +User_Queue : schmidt naga alex mk1 +File_Sizes_Pending: 10000 20000 30000 40000 +------------------------------ +Name : String Printer #5 +Location : String January 110 +Description : String Printer #5 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 5.000000 +Model_Number : String q9834fdkjwq0934kf +Pages_Per_Sec : UShort 5 +User_Queue : marina sumedh sergio coryan +File_Sizes_Pending: 50000 60000 70000 80000 +------------------------------ +Name : String Printer #6 +Location : String Cupples I 30 +Description : String Printer #6 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 6.000000 +Model_Number : String q834jfda09q834djk +Pages_Per_Sec : UShort 6 +User_Queue : cdgill levine jxh irfan +File_Sizes_Pending: 90000 100000 110000 120000 +------------------------------ +Name : String Printer #7 +Location : String Cupples II 201 +Description : String Printer #7 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 7.000000 +Model_Number : String kajsd09q384kjda90 +Pages_Per_Sec : UShort 7 +User_Queue : nanbor eea1 sbw1 schmidt +File_Sizes_Pending: 130000 140000 0 10000 +------------------------------ +Name : String Printer #8 +Location : String Urbauer 321 +Description : String Printer #8 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 8.000000 +Model_Number : String 9p83q4jklsdj098q3 +Pages_Per_Sec : UShort 8 +User_Queue : naga alex mk1 marina +File_Sizes_Pending: 20000 30000 40000 50000 +------------------------------ +Name : String Printer #9 +Location : String Umrath 302 +Description : String Printer #9 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 9.000000 +Model_Number : String 09a834ojfda09wu3r +Pages_Per_Sec : UShort 9 +User_Queue : sumedh sergio coryan cdgill +File_Sizes_Pending: 60000 70000 80000 90000 +------------------------------ +Name : String Printer #10 +Location : String Wilson 110 +Description : String Printer #10 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 10.000000 +Model_Number : String 09234kejdfq934jed +Pages_Per_Sec : UShort 10 +User_Queue : levine jxh irfan nanbor +File_Sizes_Pending: 100000 110000 120000 130000 +------------------------------ +Name : String Printer #11 +Location : String Olin 239 +Description : String Printer #11 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 11.000000 +Model_Number : String 0q83kjefd09384jda +Pages_Per_Sec : UShort 11 +User_Queue : eea1 sbw1 schmidt naga +File_Sizes_Pending: 140000 0 10000 20000 +------------------------------ +Name : String Printer #12 +Location : String Simon 238 +Description : String Printer #12 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 12.000000 +Model_Number : String asdfj0283jkdf0923 +Pages_Per_Sec : UShort 12 +User_Queue : alex mk1 marina sumedh +File_Sizes_Pending: 30000 40000 50000 60000 +------------------------------ +Name : String Printer #13 +Location : String Rebstock 232 +Description : String Printer #13 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 13.000000 +Model_Number : String kladfp72wu34j230f +Pages_Per_Sec : UShort 13 +User_Queue : sergio coryan cdgill levine +File_Sizes_Pending: 70000 80000 90000 100000 +------------------------------ +Name : String Printer #14 +Location : String McMillan 123 +Description : String Printer #14 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 14.000000 +Model_Number : String 9q834jidlj234ujof +Pages_Per_Sec : UShort 14 +User_Queue : jxh irfan nanbor eea1 +File_Sizes_Pending: 110000 120000 130000 140000 +------------------------------ +Name : String Plotter #0 +Location : String Bryan 509 +Description : String Plotter #0 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 0 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 0.000000 +Model_Number : String HP238293892bn2398 +User_Queue : sbw1 schmidt naga alex +File_Sizes_Pending: 0 10000 20000 30000 +------------------------------ +Name : String Plotter #1 +Location : String Bryan 503 +Description : String Plotter #1 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 2 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 1.000000 +Model_Number : String PK92839nkse092309 +User_Queue : mk1 marina sumedh sergio +File_Sizes_Pending: 40000 50000 60000 70000 +------------------------------ +Name : String Plotter #2 +Location : String Dunker 102 +Description : String Plotter #2 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 4 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 2.000000 +Model_Number : String 8328323n293kljs98 +User_Queue : coryan cdgill levine jxh +File_Sizes_Pending: 80000 90000 100000 110000 +------------------------------ +Name : String Plotter #3 +Location : String Jolley 408 +Description : String Plotter #3 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 6 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 3.000000 +Model_Number : String 29309sjdkq34jksd2 +User_Queue : irfan nanbor eea1 sbw1 +File_Sizes_Pending: 120000 130000 140000 0 +------------------------------ +Name : String Plotter #4 +Location : String Lopata 401 +Description : String Plotter #4 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 8 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 4.000000 +Model_Number : String 09q834efjhqw834q3 +User_Queue : schmidt naga alex mk1 +File_Sizes_Pending: 10000 20000 30000 40000 +------------------------------ +Name : String Plotter #5 +Location : String January 110 +Description : String Plotter #5 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 10 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 5.000000 +Model_Number : String q9834fdkjwq0934kf +User_Queue : marina sumedh sergio coryan +File_Sizes_Pending: 50000 60000 70000 80000 +------------------------------ +Name : String Plotter #6 +Location : String Cupples I 30 +Description : String Plotter #6 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 12 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 6.000000 +Model_Number : String q834jfda09q834djk +User_Queue : cdgill levine jxh irfan +File_Sizes_Pending: 90000 100000 110000 120000 +------------------------------ +Name : String Plotter #7 +Location : String Cupples II 201 +Description : String Plotter #7 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 14 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 7.000000 +Model_Number : String kajsd09q384kjda90 +User_Queue : nanbor eea1 sbw1 schmidt +File_Sizes_Pending: 130000 140000 0 10000 +------------------------------ +Name : String Plotter #8 +Location : String Urbauer 321 +Description : String Plotter #8 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 16 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 8.000000 +Model_Number : String 9p83q4jklsdj098q3 +User_Queue : naga alex mk1 marina +File_Sizes_Pending: 20000 30000 40000 50000 +------------------------------ +Name : String Plotter #9 +Location : String Umrath 302 +Description : String Plotter #9 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 18 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 9.000000 +Model_Number : String 09a834ojfda09wu3r +User_Queue : sumedh sergio coryan cdgill +File_Sizes_Pending: 60000 70000 80000 90000 +------------------------------ +Name : String Plotter #10 +Location : String Wilson 110 +Description : String Plotter #10 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 20 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 10.000000 +Model_Number : String 09234kejdfq934jed +User_Queue : levine jxh irfan nanbor +File_Sizes_Pending: 100000 110000 120000 130000 +------------------------------ +Name : String Plotter #11 +Location : String Olin 239 +Description : String Plotter #11 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 22 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 11.000000 +Model_Number : String 0q83kjefd09384jda +User_Queue : eea1 sbw1 schmidt naga +File_Sizes_Pending: 140000 0 10000 20000 +------------------------------ +Name : String Plotter #12 +Location : String Simon 238 +Description : String Plotter #12 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 24 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 12.000000 +Model_Number : String asdfj0283jkdf0923 +User_Queue : alex mk1 marina sumedh +File_Sizes_Pending: 30000 40000 50000 60000 +------------------------------ +Name : String Plotter #13 +Location : String Rebstock 232 +Description : String Plotter #13 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 26 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 13.000000 +Model_Number : String kladfp72wu34j230f +User_Queue : sergio coryan cdgill levine +File_Sizes_Pending: 70000 80000 90000 100000 +------------------------------ +Name : String Plotter #14 +Location : String McMillan 123 +Description : String Plotter #14 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 28 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 14.000000 +Model_Number : String 9q834jidlj234ujof +User_Queue : jxh irfan nanbor eea1 +File_Sizes_Pending: 110000 120000 130000 140000 +------------------------------ + +*** Performing query for Remote_IO. +*** Query: Location ~ 'Cupples' +*** Preferences: +*** Results: + +------------------------------ +Offers in the sequence: +------------------------------ +Name : String File System #6 +Location : String Cupples I 30 +Description : String File System #6 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 12000000 +Permission_Level: UShort 7 +Space_Remaining: ULong 26606058 +------------------------------ +Name : String File System #7 +Location : String Cupples II 201 +Description : String File System #7 is a File System. It stores stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Disk_Space : ULong 14000000 +Permission_Level: UShort 8 +Space_Remaining: ULong 31040401 +------------------------------ +Name : String Printer #6 +Location : String Cupples I 30 +Description : String Printer #6 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 6.000000 +Model_Number : String q834jfda09q834djk +Pages_Per_Sec : UShort 6 +User_Queue : cdgill levine jxh irfan +File_Sizes_Pending: 90000 100000 110000 120000 +------------------------------ +Name : String Printer #7 +Location : String Cupples II 201 +Description : String Printer #7 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 7.000000 +Model_Number : String kajsd09q384kjda90 +Pages_Per_Sec : UShort 7 +User_Queue : nanbor eea1 sbw1 schmidt +File_Sizes_Pending: 130000 140000 0 10000 +------------------------------ +Name : String Plotter #6 +Location : String Cupples I 30 +Description : String Plotter #6 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 12 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 6.000000 +Model_Number : String q834jfda09q834djk +User_Queue : cdgill levine jxh irfan +File_Sizes_Pending: 90000 100000 110000 120000 +------------------------------ +Name : String Plotter #7 +Location : String Cupples II 201 +Description : String Plotter #7 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 14 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 7.000000 +Model_Number : String kajsd09q384kjda90 +User_Queue : nanbor eea1 sbw1 schmidt +File_Sizes_Pending: 130000 140000 0 10000 +------------------------------ + Offers in the iterator: +------------------------------ + +*** Performing query for Plotter. +*** Query: 'sbw1' in User_Queue +*** Preferences: min Cost_Per_Page +*** Results: + +------------------------------ +Offers in the sequence: +------------------------------ +Name : String Plotter #0 +Location : String Bryan 509 +Description : String Plotter #0 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 0 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 0.000000 +Model_Number : String HP238293892bn2398 +User_Queue : sbw1 schmidt naga alex +File_Sizes_Pending: 0 10000 20000 30000 +------------------------------ +Name : String Plotter #3 +Location : String Jolley 408 +Description : String Plotter #3 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 6 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 3.000000 +Model_Number : String 29309sjdkq34jksd2 +User_Queue : irfan nanbor eea1 sbw1 +File_Sizes_Pending: 120000 130000 140000 0 +------------------------------ +Name : String Plotter #7 +Location : String Cupples II 201 +Description : String Plotter #7 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 14 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 7.000000 +Model_Number : String kajsd09q384kjda90 +User_Queue : nanbor eea1 sbw1 schmidt +File_Sizes_Pending: 130000 140000 0 10000 +------------------------------ +Name : String Plotter #11 +Location : String Olin 239 +Description : String Plotter #11 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 22 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 11.000000 +Model_Number : String 0q83kjefd09384jda +User_Queue : eea1 sbw1 schmidt naga +File_Sizes_Pending: 140000 0 10000 20000 +------------------------------ + Offers in the iterator: +------------------------------ + +*** Performing query for Plotter. +*** Query: Num_Colors > 1 and Location ~ 'Cupples' +*** Preferences: min Cost_Per_Page +*** Results: + +------------------------------ +Offers in the sequence: +------------------------------ +Name : String Plotter #6 +Location : String Cupples I 30 +Description : String Plotter #6 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 12 +Auto_Loading : Boolean FALSE +Cost_Per_Page : Float 6.000000 +Model_Number : String q834jfda09q834djk +User_Queue : cdgill levine jxh irfan +File_Sizes_Pending: 90000 100000 110000 120000 +------------------------------ +Name : String Plotter #7 +Location : String Cupples II 201 +Description : String Plotter #7 is a plotter. It plots stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Num_Colors : Long 14 +Auto_Loading : Boolean TRUE +Cost_Per_Page : Float 7.000000 +Model_Number : String kajsd09q384kjda90 +User_Queue : nanbor eea1 sbw1 schmidt +File_Sizes_Pending: 130000 140000 0 10000 +------------------------------ + Offers in the iterator: +------------------------------ + +*** Performing query for Printer. +*** Query: Pages_Per_Sec > 3 and Color == TRUE +*** Preferences: with 'sbw1' in User_Queue +*** Results: + +------------------------------ +Offers in the sequence: +------------------------------ +Name : String Printer #11 +Location : String Olin 239 +Description : String Printer #11 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 11.000000 +Model_Number : String 0q83kjefd09384jda +Pages_Per_Sec : UShort 11 +User_Queue : eea1 sbw1 schmidt naga +File_Sizes_Pending: 140000 0 10000 20000 +------------------------------ +Name : String Printer #7 +Location : String Cupples II 201 +Description : String Printer #7 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 7.000000 +Model_Number : String kajsd09q384kjda90 +Pages_Per_Sec : UShort 7 +User_Queue : nanbor eea1 sbw1 schmidt +File_Sizes_Pending: 130000 140000 0 10000 +------------------------------ +Name : String Printer #5 +Location : String January 110 +Description : String Printer #5 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 5.000000 +Model_Number : String q9834fdkjwq0934kf +Pages_Per_Sec : UShort 5 +User_Queue : marina sumedh sergio coryan +File_Sizes_Pending: 50000 60000 70000 80000 +------------------------------ +Name : String Printer #9 +Location : String Umrath 302 +Description : String Printer #9 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 9.000000 +Model_Number : String 09a834ojfda09wu3r +Pages_Per_Sec : UShort 9 +User_Queue : sumedh sergio coryan cdgill +File_Sizes_Pending: 60000 70000 80000 90000 +------------------------------ +Name : String Printer #13 +Location : String Rebstock 232 +Description : String Printer #13 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 13.000000 +Model_Number : String kladfp72wu34j230f +Pages_Per_Sec : UShort 13 +User_Queue : sergio coryan cdgill levine +File_Sizes_Pending: 70000 80000 90000 100000 +------------------------------ + Offers in the iterator: +------------------------------ + +*** Performing query for Printer. +*** Query: Color == TRUE or Double_Sided == TRUE +*** Preferences: random +*** Results: + +------------------------------ +Offers in the sequence: +------------------------------ +Name : String Printer #14 +Location : String McMillan 123 +Description : String Printer #14 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 14.000000 +Model_Number : String 9q834jidlj234ujof +Pages_Per_Sec : UShort 14 +User_Queue : jxh irfan nanbor eea1 +File_Sizes_Pending: 110000 120000 130000 140000 +------------------------------ +Name : String Printer #13 +Location : String Rebstock 232 +Description : String Printer #13 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 13.000000 +Model_Number : String kladfp72wu34j230f +Pages_Per_Sec : UShort 13 +User_Queue : sergio coryan cdgill levine +File_Sizes_Pending: 70000 80000 90000 100000 +------------------------------ +Name : String Printer #12 +Location : String Simon 238 +Description : String Printer #12 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 12.000000 +Model_Number : String asdfj0283jkdf0923 +Pages_Per_Sec : UShort 12 +User_Queue : alex mk1 marina sumedh +File_Sizes_Pending: 30000 40000 50000 60000 +------------------------------ +Name : String Printer #11 +Location : String Olin 239 +Description : String Printer #11 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 11.000000 +Model_Number : String 0q83kjefd09384jda +Pages_Per_Sec : UShort 11 +User_Queue : eea1 sbw1 schmidt naga +File_Sizes_Pending: 140000 0 10000 20000 +------------------------------ +Name : String Printer #10 +Location : String Wilson 110 +Description : String Printer #10 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 10.000000 +Model_Number : String 09234kejdfq934jed +Pages_Per_Sec : UShort 10 +User_Queue : levine jxh irfan nanbor +File_Sizes_Pending: 100000 110000 120000 130000 +------------------------------ +Name : String Printer #9 +Location : String Umrath 302 +Description : String Printer #9 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 9.000000 +Model_Number : String 09a834ojfda09wu3r +Pages_Per_Sec : UShort 9 +User_Queue : sumedh sergio coryan cdgill +File_Sizes_Pending: 60000 70000 80000 90000 +------------------------------ +Name : String Printer #8 +Location : String Urbauer 321 +Description : String Printer #8 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 8.000000 +Model_Number : String 9p83q4jklsdj098q3 +Pages_Per_Sec : UShort 8 +User_Queue : naga alex mk1 marina +File_Sizes_Pending: 20000 30000 40000 50000 +------------------------------ +Name : String Printer #7 +Location : String Cupples II 201 +Description : String Printer #7 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 7.000000 +Model_Number : String kajsd09q384kjda90 +Pages_Per_Sec : UShort 7 +User_Queue : nanbor eea1 sbw1 schmidt +File_Sizes_Pending: 130000 140000 0 10000 +------------------------------ + Offers in the iterator: +------------------------------ +Name : String Printer #6 +Location : String Cupples I 30 +Description : String Printer #6 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 6.000000 +Model_Number : String q834jfda09q834djk +Pages_Per_Sec : UShort 6 +User_Queue : cdgill levine jxh irfan +File_Sizes_Pending: 90000 100000 110000 120000 +------------------------------ +Name : String Printer #5 +Location : String January 110 +Description : String Printer #5 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 5.000000 +Model_Number : String q9834fdkjwq0934kf +Pages_Per_Sec : UShort 5 +User_Queue : marina sumedh sergio coryan +File_Sizes_Pending: 50000 60000 70000 80000 +------------------------------ +Name : String Printer #4 +Location : String Lopata 401 +Description : String Printer #4 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 4.000000 +Model_Number : String 09q834efjhqw834q3 +Pages_Per_Sec : UShort 4 +User_Queue : schmidt naga alex mk1 +File_Sizes_Pending: 10000 20000 30000 40000 +------------------------------ +Name : String Printer #3 +Location : String Jolley 408 +Description : String Printer #3 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 3.000000 +Model_Number : String 29309sjdkq34jksd2 +Pages_Per_Sec : UShort 3 +User_Queue : irfan nanbor eea1 sbw1 +File_Sizes_Pending: 120000 130000 140000 0 +------------------------------ +Name : String Printer #2 +Location : String Dunker 102 +Description : String Printer #2 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 2.000000 +Model_Number : String 8328323n293kljs98 +Pages_Per_Sec : UShort 2 +User_Queue : coryan cdgill levine jxh +File_Sizes_Pending: 80000 90000 100000 110000 +------------------------------ +Name : String Printer #1 +Location : String Bryan 503 +Description : String Printer #1 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 1.000000 +Model_Number : String PK92839nkse092309 +Pages_Per_Sec : UShort 1 +User_Queue : mk1 marina sumedh sergio +File_Sizes_Pending: 40000 50000 60000 70000 +------------------------------ +Name : String Printer #0 +Location : String Bryan 509 +Description : String Printer #0 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 0.000000 +Model_Number : String HP238293892bn2398 +Pages_Per_Sec : UShort 0 +User_Queue : sbw1 schmidt naga alex +File_Sizes_Pending: 0 10000 20000 30000 +------------------------------ + +*** Performing query for Printer. +*** Query: (Color or Double_Sided) and 'sbw1' in User_Queue +*** Preferences: with Location ~ 'Cupples' +*** Results: + +------------------------------ +Offers in the sequence: +------------------------------ +Name : String Printer #7 +Location : String Cupples II 201 +Description : String Printer #7 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 7.000000 +Model_Number : String kajsd09q384kjda90 +Pages_Per_Sec : UShort 7 +User_Queue : nanbor eea1 sbw1 schmidt +File_Sizes_Pending: 130000 140000 0 10000 +------------------------------ +Name : String Printer #0 +Location : String Bryan 509 +Description : String Printer #0 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean FALSE +Double_Sided : Boolean TRUE +Cost_Per_Page : Float 0.000000 +Model_Number : String HP238293892bn2398 +Pages_Per_Sec : UShort 0 +User_Queue : sbw1 schmidt naga alex +File_Sizes_Pending: 0 10000 20000 30000 +------------------------------ +Name : String Printer #3 +Location : String Jolley 408 +Description : String Printer #3 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 3.000000 +Model_Number : String 29309sjdkq34jksd2 +Pages_Per_Sec : UShort 3 +User_Queue : irfan nanbor eea1 sbw1 +File_Sizes_Pending: 120000 130000 140000 0 +------------------------------ +Name : String Printer #11 +Location : String Olin 239 +Description : String Printer #11 is a printer. It prints stuff. +Host_Name : String sophocles.cimds.ri.cmu.edu +Trader_Name : String Default +Color : Boolean TRUE +Double_Sided : Boolean FALSE +Cost_Per_Page : Float 11.000000 +Model_Number : String 0q83kjefd09384jda +Pages_Per_Sec : UShort 11 +User_Queue : eea1 sbw1 schmidt naga +File_Sizes_Pending: 140000 0 10000 20000 +------------------------------ + Offers in the iterator: +------------------------------ + diff --git a/TAO/orbsvcs/tests/Trading/Service_Type_Exporter.cpp b/TAO/orbsvcs/tests/Trading/Service_Type_Exporter.cpp new file mode 100644 index 00000000000..282c96ae920 --- /dev/null +++ b/TAO/orbsvcs/tests/Trading/Service_Type_Exporter.cpp @@ -0,0 +1,518 @@ +// $Id$ + +#include "Service_Type_Exporter.h" + +ACE_RCSID(Trading, Service_Type_Exporter, "$Id$") + +TAO_Service_Type_Exporter:: +TAO_Service_Type_Exporter (CosTrading::Lookup_ptr lookup_if, + CORBA::Boolean verbose + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)) + : verbose_ (verbose), + lookup_ (lookup_if) +{ + // Obtain the Service Type Repository. + CosTrading::TypeRepository_var obj = lookup_if->type_repos (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + // Narrow the Service Type Repository. + this->repos_ = CosTradingRepos::ServiceTypeRepository::_narrow (obj.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + // Build the service type descriptions. + this->create_types (); +} + +void +TAO_Service_Type_Exporter::remove_all_types (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTradingRepos::ServiceTypeRepository::HasSubTypes)) +{ + ACE_DEBUG ((LM_DEBUG, "*** TAO_Service_Type_Exporter::removing all" + " types from the Repository.\n")); + + for (int i = NUM_TYPES - 1; i >= 0; i--) + { + ACE_TRY + { + this->repos_->remove_type (TT_Info::INTERFACE_NAMES[i] ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCH (CosTrading::UnknownServiceType, excp) + { + if (this->verbose_) + { + if (excp.type.in () != 0) + ACE_DEBUG ((LM_DEBUG, "Service type not yet registered: %s\n", excp.type.in ())); + } + + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "TAO_Service_Type_Exporter::remove_all_types"); + } + ACE_ENDTRY; + ACE_CHECK; + } +} + +void +TAO_Service_Type_Exporter::add_all_types (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTradingRepos::ServiceTypeRepository::ServiceTypeExists, + CosTradingRepos::ServiceTypeRepository::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition, + CosTrading::UnknownServiceType, + CosTradingRepos::ServiceTypeRepository::DuplicateServiceTypeName)) + +{ + ACE_DEBUG ((LM_DEBUG, "*** TAO_Service_Type_Exporter::" + "adding all types to the Repository.\n")); + this->add_all_types_to (this->repos_.in () ACE_ENV_ARG_PARAMETER); + // ACE_CHECK; +} + +void +TAO_Service_Type_Exporter::add_all_types_to_all (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTradingRepos::ServiceTypeRepository::ServiceTypeExists, + CosTradingRepos::ServiceTypeRepository::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition, + CosTrading::UnknownServiceType, + CosTradingRepos::ServiceTypeRepository::DuplicateServiceTypeName)) +{ + ACE_DEBUG ((LM_DEBUG, "*** TAO_Service_Type_Exporter::" + "add all types to all repositories.\n")); + + ACE_DEBUG ((LM_DEBUG, "Obtaining link interface.\n")); + CosTrading::Link_var link_if = this->lookup_->link_if (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + ACE_DEBUG ((LM_DEBUG, "Obtaining references to traders directly" + " linked to the root trader.\n")); + CosTrading::LinkNameSeq_var link_name_seq = link_if->list_links (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + ACE_DEBUG ((LM_DEBUG, "Exporting service types with each of the linked" + " traders.\n")); + for (CORBA::ULong i = link_name_seq->length () - 1; i > 0; i--) + { + CosTradingRepos::ServiceTypeRepository_ptr str = 0; + ACE_TRY + { + ACE_DEBUG ((LM_DEBUG, "Getting link information for %s\n", + static_cast<const char*> (link_name_seq[i]))); + CosTrading::Link::LinkInfo_var link_info = + link_if->describe_link (link_name_seq[i] ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + ACE_DEBUG ((LM_DEBUG, "Adding service types to %s\n", + static_cast<const char*> (link_name_seq[i]))); + + CosTrading::TypeRepository_var remote_repos = + link_info->target->type_repos (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + str = + CosTradingRepos::ServiceTypeRepository::_narrow (remote_repos.in () + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + } + ACE_CATCHANY + { + // @@ Seth, Ignore all these exceptions? + } + ACE_ENDTRY; + ACE_CHECK; + + // @@ Seth, But this one? + this->add_all_types_to (str ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } +} + +void +TAO_Service_Type_Exporter:: +add_all_types_to (CosTradingRepos::ServiceTypeRepository_ptr repos + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTradingRepos::ServiceTypeRepository::ServiceTypeExists, + CosTradingRepos::ServiceTypeRepository::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition, + CosTrading::UnknownServiceType, + CosTradingRepos::ServiceTypeRepository::DuplicateServiceTypeName)) +{ + for (int i = 0; i < NUM_TYPES; i++) + { + ACE_TRY + { + repos->add_type (TT_Info::INTERFACE_NAMES[i], + this->type_structs_[i].if_name, + this->type_structs_[i].props, + this->type_structs_[i].super_types + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCH (CosTradingRepos::ServiceTypeRepository::ServiceTypeExists, ste) + { + ACE_PRINT_EXCEPTION (ste, "TAO_Service_Type_Exporter::add_all_types"); + + if (ste.name.in () != 0) + ACE_DEBUG ((LM_DEBUG, "Invalid name: %s\n", ste.name.in ())); + } + ACE_CATCH (CosTrading::IllegalPropertyName, excp) + { + ACE_PRINT_EXCEPTION (excp, "TAO_Service_Type_Exporter::add_all_types"); + + if (excp.name.in () != 0) + ACE_DEBUG ((LM_DEBUG, "Invalid name: %s\n", excp.name.in ())); + } + ACE_CATCH (CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition, vtr) + { + ACE_PRINT_EXCEPTION (vtr, "TAO_Service_Type_Exporter::add_all_types"); + + if (vtr.type_1.in () != 0) + ACE_DEBUG ((LM_DEBUG, "Type One: %s\n", vtr.type_2.in ())); + if (vtr.type_2.in () != 0) + ACE_DEBUG ((LM_DEBUG, "Type Two: %s\n", vtr.type_2.in ())); + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "TAO_Service_Type_Exporter::add_all_types"); + ACE_RE_THROW; + } + ACE_ENDTRY; + ACE_CHECK; + } +} + +void +TAO_Service_Type_Exporter::list_all_types (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + ACE_TRY + { + CosTradingRepos::ServiceTypeRepository::SpecifiedServiceTypes sst; + ACE_DEBUG ((LM_DEBUG, "*** TAO_Service_Type_Exporter::" + "listing all types in the Repository.\n")); + + sst.all_ (1); + CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq_var type_names = + this->repos_->list_types (sst ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + CORBA::ULong l = type_names->length (); + for (CORBA::ULong i = 0; i != l; ++i) + { + CORBA::ULong index = l - 1 - i; + if (this->verbose_) + { + ACE_DEBUG ((LM_DEBUG, "type name: %s\n", + static_cast<const char *> (type_names[index]))); + } + } + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "TAO_Service_Type_Exporter::list_all_types"); + ACE_RE_THROW; + } + ACE_ENDTRY; + // ACE_CHECK; +} + +void +TAO_Service_Type_Exporter::describe_all_types (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType)) +{ + ACE_TRY + { + ACE_DEBUG ((LM_DEBUG, "*** TAO_Service_Type_Exporter::" + "describing all types in the Repository.\n")); + + for (int i = 0; i < NUM_TYPES; i++) + { + CosTradingRepos::ServiceTypeRepository::TypeStruct_var type_struct = + this->repos_->describe_type (TT_Info::INTERFACE_NAMES[i] + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (this->verbose_) + { + this->dump_typestruct (TT_Info::INTERFACE_NAMES[i], type_struct.in ()); + ACE_DEBUG ((LM_DEBUG, "------------------------------\n")); + } + } + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "TAO_Service_Type_Exporter::describe_all_types"); + ACE_RE_THROW; + } + ACE_ENDTRY; +} + +void +TAO_Service_Type_Exporter::fully_describe_all_types (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType)) +{ + ACE_TRY + { + ACE_DEBUG ((LM_DEBUG, "*** TAO_Service_Type_Exporter::" + "fully describing all types in the Repository.\n")); + + for (int i = 0; i < NUM_TYPES; i++) + { + CosTradingRepos::ServiceTypeRepository::TypeStruct_var type_struct = + this->repos_->fully_describe_type (TT_Info::INTERFACE_NAMES[i] + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (this->verbose_) + { + this->dump_typestruct (TT_Info::INTERFACE_NAMES[i], type_struct.in ()); + ACE_DEBUG ((LM_DEBUG, "------------------------------\n")); + } + } + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "TAO_Service_Type_Exporter::fully_describe_all_types"); + ACE_RE_THROW; + } + ACE_ENDTRY; +} + +void +TAO_Service_Type_Exporter:: +dump_typestruct (const char* type_name, + const CosTradingRepos::ServiceTypeRepository::TypeStruct& type_struct) const +{ + const char* mode_str[] = + { + "Normal", + "Read only", + "Mandatory", + "Mandatory and Readonly" + }; + + ACE_DEBUG ((LM_DEBUG, "Type Name: %s\n", type_name)); + ACE_DEBUG ((LM_DEBUG, "Interface Name: %s\n", type_struct.if_name.in ())); + + int i = 0; + for (i = type_struct.super_types.length () - 1; i >= 0; i--) + { + ACE_DEBUG ((LM_DEBUG, "Super Type: %s\n", + (const char *) type_struct.super_types[i])); + } + + for (i = type_struct.props.length () - 1; i >= 0; i--) + { + ACE_DEBUG ((LM_DEBUG, "Property: %-20s Mode: %-24s\n", + type_struct.props[i].name.in (), + mode_str[type_struct.props[i].mode])); + } +} + +void +TAO_Service_Type_Exporter::create_types (void) +{ + TT_Info::Remote_Output ro; + this->type_structs_[TT_Info::REMOTE_IO].props.length (6); + this->type_structs_[TT_Info::REMOTE_IO].props[0].name = + TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::NAME]; + this->type_structs_[TT_Info::REMOTE_IO].props[0].value_type = + CORBA::TypeCode::_duplicate (CORBA::_tc_string); + this->type_structs_[TT_Info::REMOTE_IO].props[0].mode = + CosTradingRepos::ServiceTypeRepository::PROP_MANDATORY_READONLY; + this->type_structs_[TT_Info::REMOTE_IO].props[1].name = + TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::LOCATION]; + this->type_structs_[TT_Info::REMOTE_IO].props[1].value_type = + CORBA::TypeCode::_duplicate (CORBA::_tc_string); + this->type_structs_[TT_Info::REMOTE_IO].props[1].mode = + CosTradingRepos::ServiceTypeRepository::PROP_MANDATORY; + this->type_structs_[TT_Info::REMOTE_IO].props[2].name = + TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::DESCRIPTION]; + this->type_structs_[TT_Info::REMOTE_IO].props[2].value_type = + CORBA::TypeCode::_duplicate (CORBA::_tc_string); + this->type_structs_[TT_Info::REMOTE_IO].props[2].mode = + CosTradingRepos::ServiceTypeRepository::PROP_NORMAL; + this->type_structs_[TT_Info::REMOTE_IO].props[3].name = + TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::HOST_NAME]; + this->type_structs_[TT_Info::REMOTE_IO].props[3].value_type = + CORBA::TypeCode::_duplicate (CORBA::_tc_string); + this->type_structs_[TT_Info::REMOTE_IO].props[3].mode = + CosTradingRepos::ServiceTypeRepository::PROP_MANDATORY; + this->type_structs_[TT_Info::REMOTE_IO].props[4].name = + TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::TRADER_NAME]; + this->type_structs_[TT_Info::REMOTE_IO].props[4].value_type = + CORBA::TypeCode::_duplicate (CORBA::_tc_string); + this->type_structs_[TT_Info::REMOTE_IO].props[4].mode = + CosTradingRepos::ServiceTypeRepository::PROP_NORMAL; + this->type_structs_[TT_Info::REMOTE_IO].props[5].name = + TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::MISCELLANEOUS]; + this->type_structs_[TT_Info::REMOTE_IO].props[5].value_type = + CORBA::TypeCode::_duplicate (CORBA::_tc_string); + this->type_structs_[TT_Info::REMOTE_IO].props[5].mode = + CosTradingRepos::ServiceTypeRepository::PROP_NORMAL; + + this->type_structs_[TT_Info::REMOTE_IO].if_name = + ro._interface_repository_id (); + + TT_Info::Plotter pl; + this->type_structs_[TT_Info::PLOTTER].props.length (6); + this->type_structs_[TT_Info::PLOTTER].super_types.length (1); + this->type_structs_[TT_Info::PLOTTER].super_types[0] = + TT_Info::INTERFACE_NAMES[TT_Info::REMOTE_IO]; + this->type_structs_[TT_Info::PLOTTER].props[0].name = + TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_NUM_COLORS]; + this->type_structs_[TT_Info::PLOTTER].props[0].value_type = + CORBA::TypeCode::_duplicate (CORBA::_tc_long); + this->type_structs_[TT_Info::PLOTTER].props[0].mode = + CosTradingRepos::ServiceTypeRepository::PROP_NORMAL; + this->type_structs_[TT_Info::PLOTTER].props[1].name = + TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_AUTO_LOADING]; + this->type_structs_[TT_Info::PLOTTER].props[1].value_type = + CORBA::TypeCode::_duplicate (CORBA::_tc_boolean); + this->type_structs_[TT_Info::PLOTTER].props[1].mode = + CosTradingRepos::ServiceTypeRepository::PROP_READONLY; + this->type_structs_[TT_Info::PLOTTER].props[2].name = + TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_COST_PER_PAGE]; + this->type_structs_[TT_Info::PLOTTER].props[2].value_type = + CORBA::TypeCode::_duplicate (CORBA::_tc_float); + this->type_structs_[TT_Info::PLOTTER].props[2].mode = + CosTradingRepos::ServiceTypeRepository::PROP_NORMAL; + this->type_structs_[TT_Info::PLOTTER].props[3].name = + TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_MODEL_NUMBER]; + this->type_structs_[TT_Info::PLOTTER].props[3].value_type = + CORBA::TypeCode::_duplicate (CORBA::_tc_string); + this->type_structs_[TT_Info::PLOTTER].props[3].mode = + CosTradingRepos::ServiceTypeRepository::PROP_READONLY; + this->type_structs_[TT_Info::PLOTTER].props[4].name = + TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_USER_QUEUE]; + this->type_structs_[TT_Info::PLOTTER].props[4].value_type = + CORBA::TypeCode::_duplicate (TAO_Trader_Test::_tc_StringSeq); + this->type_structs_[TT_Info::PLOTTER].props[4].mode = + CosTradingRepos::ServiceTypeRepository::PROP_NORMAL; + this->type_structs_[TT_Info::PLOTTER].props[5].name = + TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_FILE_SIZES_PENDING]; + this->type_structs_[TT_Info::PLOTTER].props[5].value_type = + CORBA::TypeCode::_duplicate (TAO_Trader_Test::_tc_ULongSeq); + this->type_structs_[TT_Info::PLOTTER].props[5].mode = + CosTradingRepos::ServiceTypeRepository::PROP_NORMAL; + this->type_structs_[TT_Info::PLOTTER].if_name = + pl._interface_repository_id (); + + TT_Info::Printer pr; + this->type_structs_[TT_Info::PRINTER].props.length (7); + this->type_structs_[TT_Info::PRINTER].super_types.length (1); + this->type_structs_[TT_Info::PRINTER].super_types[0] = + TT_Info::INTERFACE_NAMES[TT_Info::REMOTE_IO]; + this->type_structs_[TT_Info::PRINTER].props[0].name = + TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_COLOR]; + this->type_structs_[TT_Info::PRINTER].props[0].value_type = + CORBA::TypeCode::_duplicate (CORBA::_tc_boolean); + this->type_structs_[TT_Info::PRINTER].props[0].mode = + CosTradingRepos::ServiceTypeRepository::PROP_MANDATORY_READONLY; + this->type_structs_[TT_Info::PRINTER].props[1].name = + TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_DOUBLE_SIDED]; + this->type_structs_[TT_Info::PRINTER].props[1].value_type = + CORBA::TypeCode::_duplicate (CORBA::_tc_boolean); + this->type_structs_[TT_Info::PRINTER].props[1].mode = + CosTradingRepos::ServiceTypeRepository::PROP_READONLY; + this->type_structs_[TT_Info::PRINTER].props[2].name = + TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_COST_PER_PAGE]; + this->type_structs_[TT_Info::PRINTER].props[2].value_type = + CORBA::TypeCode::_duplicate (CORBA::_tc_float); + this->type_structs_[TT_Info::PRINTER].props[2].mode = + CosTradingRepos::ServiceTypeRepository::PROP_NORMAL; + this->type_structs_[TT_Info::PRINTER].props[3].name = + TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_MODEL_NUMBER]; + this->type_structs_[TT_Info::PRINTER].props[3].value_type = + CORBA::TypeCode::_duplicate (CORBA::_tc_string); + this->type_structs_[TT_Info::PRINTER].props[3].mode = + CosTradingRepos::ServiceTypeRepository::PROP_READONLY; + this->type_structs_[TT_Info::PRINTER].props[4].name = + TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_PAGES_PER_SEC]; + this->type_structs_[TT_Info::PRINTER].props[4].value_type = + CORBA::TypeCode::_duplicate (CORBA::_tc_ushort); + this->type_structs_[TT_Info::PRINTER].props[4].mode = + CosTradingRepos::ServiceTypeRepository::PROP_READONLY; + this->type_structs_[TT_Info::PRINTER].props[5].name = + TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_USER_QUEUE]; + this->type_structs_[TT_Info::PRINTER].props[5].value_type = + CORBA::TypeCode::_duplicate (TAO_Trader_Test::_tc_StringSeq); + this->type_structs_[TT_Info::PRINTER].props[5].mode = + CosTradingRepos::ServiceTypeRepository::PROP_NORMAL; + this->type_structs_[TT_Info::PRINTER].props[6].name = + TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_FILE_SIZES_PENDING]; + this->type_structs_[TT_Info::PRINTER].props[6].value_type = + CORBA::TypeCode::_duplicate (TAO_Trader_Test::_tc_ULongSeq); + this->type_structs_[TT_Info::PRINTER].props[6].mode = + CosTradingRepos::ServiceTypeRepository::PROP_NORMAL; + this->type_structs_[TT_Info::PRINTER].if_name = + pr._interface_repository_id (); + + TT_Info::File_System fs; + this->type_structs_[TT_Info::FILESYSTEM].props.length (3); + this->type_structs_[TT_Info::FILESYSTEM].super_types.length (1); + this->type_structs_[TT_Info::FILESYSTEM].super_types[0] = + TT_Info::INTERFACE_NAMES[TT_Info::REMOTE_IO]; + this->type_structs_[TT_Info::FILESYSTEM].props[0].name = + TT_Info::FILESYSTEM_PROPERTY_NAMES[TT_Info::DISK_SIZE]; + this->type_structs_[TT_Info::FILESYSTEM].props[0].value_type = + CORBA::TypeCode::_duplicate (CORBA::_tc_ulong); + this->type_structs_[TT_Info::FILESYSTEM].props[0].mode = + CosTradingRepos::ServiceTypeRepository::PROP_MANDATORY_READONLY; + this->type_structs_[TT_Info::FILESYSTEM].props[1].name = + TT_Info::FILESYSTEM_PROPERTY_NAMES[TT_Info::SPACE_REMAINING]; + this->type_structs_[TT_Info::FILESYSTEM].props[1].value_type = + CORBA::TypeCode::_duplicate (CORBA::_tc_ulong); + this->type_structs_[TT_Info::FILESYSTEM].props[1].mode = + CosTradingRepos::ServiceTypeRepository::PROP_NORMAL; + this->type_structs_[TT_Info::FILESYSTEM].props[2].name = + TT_Info::FILESYSTEM_PROPERTY_NAMES[TT_Info::PERMISSION_LEVEL]; + this->type_structs_[TT_Info::FILESYSTEM].props[2].value_type = + CORBA::TypeCode::_duplicate (CORBA::_tc_ushort); + this->type_structs_[TT_Info::FILESYSTEM].props[2].mode = + CosTradingRepos::ServiceTypeRepository::PROP_NORMAL; + this->type_structs_[TT_Info::FILESYSTEM].if_name = + fs._interface_repository_id (); + + TT_Info::PostScript_Printer ps; + this->type_structs_[TT_Info::PS_PRINTER].props.length (1); + this->type_structs_[TT_Info::PS_PRINTER].super_types.length (1); + this->type_structs_[TT_Info::PS_PRINTER].super_types[0] = + TT_Info::INTERFACE_NAMES[TT_Info::PRINTER]; + this->type_structs_[TT_Info::PS_PRINTER].props[0].name = + TT_Info::PS_PRINTER_PROPERTY_NAMES[TT_Info::VERSION]; + this->type_structs_[TT_Info::PS_PRINTER].props[0].value_type = + CORBA::TypeCode::_duplicate (CORBA::_tc_ushort); + this->type_structs_[TT_Info::PS_PRINTER].props[0].mode = + CosTradingRepos::ServiceTypeRepository::PROP_MANDATORY_READONLY; + this->type_structs_[TT_Info::PS_PRINTER].if_name = + ps._interface_repository_id (); +} diff --git a/TAO/orbsvcs/tests/Trading/Service_Type_Exporter.h b/TAO/orbsvcs/tests/Trading/Service_Type_Exporter.h new file mode 100644 index 00000000000..a4a0e011e77 --- /dev/null +++ b/TAO/orbsvcs/tests/Trading/Service_Type_Exporter.h @@ -0,0 +1,122 @@ +// $Id$ + +// ======================================================================== +// +// = FILE +// Offer_Exporter.h +// +// = DESCRIPTION +// Class that tests the Trading Service's Service Type Repository +// +// = AUTHOR +// Seth Widoff <sbw1@cs.wustl.edu> +// +// ======================================================================= + +#ifndef TAO_SERVICE_TYPE_EXPORTER_H +#define TAO_SERVICE_TYPE_EXPORTER_H + +#include "TT_Info.h" +#include "ttest_export.h" + +class TAO_TTest_Export TAO_Service_Type_Exporter +{ +public: + + TAO_Service_Type_Exporter (CosTrading::Lookup_ptr lookup_if, + CORBA::Boolean verbose + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + void remove_all_types (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTradingRepos::ServiceTypeRepository::HasSubTypes)); + // Remove all service types from the trading service instance. + + void add_all_types (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTradingRepos::ServiceTypeRepository::ServiceTypeExists, + CosTradingRepos::ServiceTypeRepository::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition, + CosTrading::UnknownServiceType, + CosTradingRepos::ServiceTypeRepository::DuplicateServiceTypeName)); + // Add all the generated service types to the trading service instance. + + void add_all_types_to_all (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTradingRepos::ServiceTypeRepository::ServiceTypeExists, + CosTradingRepos::ServiceTypeRepository::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition, + CosTrading::UnknownServiceType, + CosTradingRepos::ServiceTypeRepository::DuplicateServiceTypeName)); + // Add all the generated service types to all the trading service + // instances linked to the trading service we bootstrapped to. + + void list_all_types (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + // List all the service types registered with the trading service + // instance. + + void describe_all_types (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType)); + // Describe all the service types registered with the trading + // service instance. + + void fully_describe_all_types (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType)); + // Same as describe_all_types, but fully describe lists the + // properties of all service types the described service type + // inherits from. + +private: + + void create_types (void); + // Generate the service type description structures. + + void add_all_types_to (CosTradingRepos::ServiceTypeRepository_ptr repos + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTradingRepos::ServiceTypeRepository::ServiceTypeExists, + CosTradingRepos::ServiceTypeRepository::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition, + CosTrading::UnknownServiceType, + CosTradingRepos::ServiceTypeRepository::DuplicateServiceTypeName)); + // Add all types to a sepcified service type repository reference. + + void + dump_typestruct (const char* type_name, + const CosTradingRepos::ServiceTypeRepository::TypeStruct& type_struct) const; + // Dump the contents of a service type description to standard + // output. + + CORBA::Boolean verbose_; + // True if the user want profuse output. + + CosTrading::Lookup_ptr lookup_; + // A reference to the lookup interface of the trading service + // instance. + + CosTradingRepos::ServiceTypeRepository_var repos_; + // A reference to a service type repository instance. + + CosTradingRepos::ServiceTypeRepository::TypeStruct type_structs_[NUM_TYPES]; + // Descriptions of all the service types whose property names are + // defined in TT_Info. +}; + +#endif /* TAO_SERVICE_TYPE_EXPORTER_H */ diff --git a/TAO/orbsvcs/tests/Trading/Simple_Dynamic.cpp b/TAO/orbsvcs/tests/Trading/Simple_Dynamic.cpp new file mode 100644 index 00000000000..c28feb6e4f3 --- /dev/null +++ b/TAO/orbsvcs/tests/Trading/Simple_Dynamic.cpp @@ -0,0 +1,30 @@ +// $Id$ + +#ifndef TAO_SIMPLE_DYNAMIC_C +#define TAO_SIMPLE_DYNAMIC_C + +#include "Simple_Dynamic.h" + +ACE_RCSID(Trading, Simple_Dynamic, "$Id$") + +template <class T> +TAO_Simple_Dynamic_Property<T>::TAO_Simple_Dynamic_Property (const T& dp) + : dp_ (dp) +{ +} + +template <class T> CORBA::Any* +TAO_Simple_Dynamic_Property<T>::evalDP (const char*, + CORBA::TypeCode_ptr, + const CORBA::Any& + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CosTradingDynamic::DPEvalFailure)) +{ + CORBA::Any* return_value = 0; + ACE_NEW_RETURN (return_value, CORBA::Any, 0); + + (*return_value) <<= this->dp_; + return return_value; +} + +#endif /* TAO_SIMPLE_DYNAMIC_C */ diff --git a/TAO/orbsvcs/tests/Trading/Simple_Dynamic.h b/TAO/orbsvcs/tests/Trading/Simple_Dynamic.h new file mode 100644 index 00000000000..0f7e395b8f5 --- /dev/null +++ b/TAO/orbsvcs/tests/Trading/Simple_Dynamic.h @@ -0,0 +1,51 @@ +// $Id$ + +// ======================================================================== +// +// = FILE +// Simple_Dyanmic.h +// +// = DESCRIPTION +// Class that implements a really simple dynamic property. +// +// = AUTHOR +// Seth Widoff <sbw1@cs.wustl.edu> +// +// ======================================================================= + +#ifndef TAO_SIMPLE_DYNAMIC_H +#define TAO_SIMPLE_DYNAMIC_H + +#include "orbsvcs/Trader/Trader_Utils.h" + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4250) +#endif /* _MSC_VER */ + +template<class T> +class TAO_Simple_Dynamic_Property : public TAO_Dynamic_Property +{ +public: + + TAO_Simple_Dynamic_Property (const T& dp); + + virtual CORBA::Any* evalDP (const char* /* name */, + CORBA::TypeCode_ptr /* returned_type */, + const CORBA::Any& /* extra_info */ + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CosTradingDynamic::DPEvalFailure)); + +private: + T dp_; +}; + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif /* _MSC_VER */ + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "Simple_Dynamic.cpp" +#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ + +#endif /* TAO_SIMPLE_DYNAMIC_H */ diff --git a/TAO/orbsvcs/tests/Trading/TT_Info.cpp b/TAO/orbsvcs/tests/Trading/TT_Info.cpp new file mode 100644 index 00000000000..e13b3b0766b --- /dev/null +++ b/TAO/orbsvcs/tests/Trading/TT_Info.cpp @@ -0,0 +1,354 @@ +// $Id$ + +#include "TT_Info.h" +#include "orbsvcs/Trader/Trader_Utils.h" +#include "ace/OS_NS_stdio.h" +#include "ace/OS_NS_string.h" + +ACE_RCSID(Trading, TT_Info, "$Id$") + +const char* TT_Info::INTERFACE_NAMES[] = +{ + "TAO_Trader_Test::Remote_IO", + "TAO_Trader_Test::Plotter", + "TAO_Trader_Test::Printer", + "TAO_Trader_Test::File_System", + "TAO_Trader_Test::PostScript_Printer" +}; + +const char* TT_Info::REMOTE_IO_NAME = "Remote_IO"; + +const char* TT_Info::REMOTE_IO_PROPERTY_NAMES[] = +{ + "Name", + "Location", + "Description", + "Host_Name", + "Trader_Name", + "Miscellaneous" +}; + +const char* TT_Info::PLOTTER_NAME = "Plotter"; + +const char* TT_Info::PLOTTER_PROPERTY_NAMES[] = +{ + "Num_Colors", + "Auto_Loading", + "Cost_Per_Page", + "Model_Number", + "User_Queue", + "File_Sizes_Pending" +}; + +const char* TT_Info::PRINTER_NAME = "Printer"; + +const char* TT_Info::PRINTER_PROPERTY_NAMES[] = +{ + "Color", + "Double_Sided", + "Cost_Per_Page", + "Model_Number", + "Pages_Per_Sec", + "User_Queue", + "File_Sizes_Pending" +}; + +const char* TT_Info::FILESYSTEM_NAME = "File_System"; + +const char* TT_Info::FILESYSTEM_PROPERTY_NAMES[] = +{ + "Disk_Space", + "Space_Remaining", + "Permission_Level" +}; + +const char* TT_Info::PS_PRINTER_PROPERTY_NAMES[] = +{ + "Version" +}; + +const char* TT_Info::PS_PRINTER_NAME = "PostScript_Printer"; + +const char* TT_Info::LOCATIONS[] = +{ + "Bryan 509", + "Bryan 503", + "Dunker 102", + "Jolley 408", + "Lopata 401", + "January 110", + "Cupples I 30", + "Cupples II 201", + "Urbauer 321", + "Umrath 302", + "Wilson 110", + "Olin 239", + "Simon 238", + "Rebstock 232", + "McMillan 123" +}; + +const char* TT_Info::USERS[] = +{ + "sbw1", + "schmidt", + "naga", + "alex", + "mk1", + "marina", + "sumedh", + "sergio", + "coryan", + "cdgill", + "levine", + "jxh", + "irfan", + "nanbor", + "eea1", + "brunsch" +}; + +const char* TT_Info::MODEL_NUMBERS[] = +{ + "HP238293892bn2398", + "PK92839nkse092309", + "8328323n293kljs98", + "29309sjdkq34jksd2", + "09q834efjhqw834q3", + "q9834fdkjwq0934kf", + "q834jfda09q834djk", + "kajsd09q384kjda90", + "9p83q4jklsdj098q3", + "09a834ojfda09wu3r", + "09234kejdfq934jed", + "0q83kjefd09384jda", + "asdfj0283jkdf0923", + "kladfp72wu34j230f", + "9q834jidlj234ujof" +}; + +const int TT_Info::NUM_QUERIES = 7; +const char* TT_Info::QUERIES[][3] = +{ + {INTERFACE_NAMES[REMOTE_IO], "", ""}, + {INTERFACE_NAMES[REMOTE_IO], "'Cupples' ~ Location", ""}, + {INTERFACE_NAMES[PLOTTER], "'sbw1' in User_Queue", "min Cost_Per_Page"}, + {INTERFACE_NAMES[PLOTTER], "Num_Colors > 1 and 'Cupples' ~ Location", "min Cost_Per_Page"}, + {INTERFACE_NAMES[PRINTER], "Pages_Per_Sec > 3 and Color == TRUE", "with 'sbw1' in User_Queue"}, + {INTERFACE_NAMES[PRINTER], "Color == TRUE or Double_Sided == TRUE", "random"}, + {INTERFACE_NAMES[PRINTER], "(Color or Double_Sided) and 'sbw1' in User_Queue", "with 'Cupples' ~ Location"} +}; + +void +TT_Info::dump_properties (const CosTrading::PropertySeq& prop_seq, + CORBA::Boolean print_dynamic + ACE_ENV_ARG_DECL) +{ + TAO_Property_Evaluator prop_eval (prop_seq); + + for (int length = prop_seq.length (), k = 0; k < length; k++) + { + CORBA::ULong seq_length = 0, i= 0; + CORBA::Any* value = 0; + CORBA::TypeCode_ptr tc = 0; + ACE_DEBUG ((LM_DEBUG, "%-15s: ", prop_seq[k].name.in ())); + ACE_TRY + { + CORBA::Boolean is_dynamic = prop_eval.is_dynamic_property (k); + ACE_TRY_CHECK; + + if (print_dynamic || ! is_dynamic) + { + value = prop_eval.property_value(k ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + tc = value->type (); + } + else + { + ACE_DEBUG ((LM_DEBUG, "Dynamic Property\n")); + } + } + ACE_CATCHANY + { + // @@ Seth, don't pass the exceptions back? + ACE_DEBUG ((LM_DEBUG, "Error retrieving property value.\n")); + } + ACE_ENDTRY; + ACE_CHECK; + + if (tc == 0) + continue; + int check = tc->equal (TAO_Trader_Test::_tc_StringSeq ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + if (check) + { + TAO_Trader_Test::StringSeq* str_seq; + (*value) >>= str_seq; + + for (seq_length = str_seq->length (), i = 0; i < seq_length; i++) + ACE_DEBUG ((LM_DEBUG, "%s ", (const char *) (*str_seq)[i])); + + ACE_DEBUG ((LM_DEBUG, "\n")); + } + else + { + check = tc->equal (TAO_Trader_Test::_tc_ULongSeq ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + if (check) + { + TAO_Trader_Test::ULongSeq* ulong_seq; + (*value) >>= ulong_seq; + + for (seq_length = ulong_seq->length (), i = 0; i < seq_length; i++) + ACE_DEBUG ((LM_DEBUG, "%d ", (*ulong_seq)[i])); + + ACE_DEBUG ((LM_DEBUG, "\n")); + } + else + { + // @@ Print the any value... + CORBA::Char char_val; + CORBA::Octet octet_val; + CORBA::Boolean boolean_val; + CORBA::Short short_val; + CORBA::UShort ushort_val; + CORBA::Long long_val; + CORBA::ULong ulong_val; + CORBA::Float float_val; + CORBA::Double double_val; + const char * string_val; + + if ((*value) >>= CORBA::Any::to_char (char_val)) + { + ACE_DEBUG ((LM_DEBUG, "%c\n", char_val)); + } + else if ((*value) >>= CORBA::Any::to_octet (octet_val)) + { + ACE_DEBUG ((LM_DEBUG, "%c\n", octet_val)); + } + else if ((*value) >>= CORBA::Any::to_boolean (boolean_val)) + { + ACE_DEBUG ((LM_DEBUG, "%s\n", + boolean_val?"TRUE":"FALSE")); + } + else if ((*value) >>= short_val) + { + ACE_DEBUG ((LM_DEBUG, "%d\n", short_val)); + } + else if ((*value) >>= ushort_val) + { + ACE_DEBUG ((LM_DEBUG, "%ld\n", ushort_val)); + } + else if ((*value) >>= long_val) + { + ACE_DEBUG ((LM_DEBUG, "%d\n", long_val)); + } + else if ((*value) >>= ulong_val) + { + ACE_DEBUG ((LM_DEBUG, "%ld\n", ulong_val)); + } + else if ((*value) >>= float_val) + { + ACE_DEBUG ((LM_DEBUG, "%f\n", long_val)); + } + else if ((*value) >>= double_val) + { + ACE_DEBUG ((LM_DEBUG, "%f\n", double_val)); + } + else if ((*value) >>= string_val) + { + ACE_DEBUG ((LM_DEBUG, "%s\n", string_val)); + } + } + } + } +} + +TT_Parse_Args::TT_Parse_Args (int& argc, char** argv) + : federated_ (0), + quiet_ (0), + ior_ (0) +{ + ACE_Arg_Shifter arg_shifter (argc, argv); + + while (arg_shifter.is_anything_left ()) + { + const char *current_arg = arg_shifter.get_current (); + + if (ACE_OS::strcmp (current_arg, "-f") == 0 || + ACE_OS::strcmp (current_arg, "-federate") == 0) + { + arg_shifter.consume_arg (); + this->federated_ = 1; + } + else if (ACE_OS::strcmp (current_arg, "-q") == 0 || + ACE_OS::strcmp (current_arg, "-quiet") == 0) + { + arg_shifter.consume_arg (); + this->quiet_ = 1; + } + else if (ACE_OS::strcmp (current_arg, "-i") == 0 || + ACE_OS::strcmp (current_arg, "-iorfile") == 0) + { + arg_shifter.consume_arg (); + FILE* ior_file = 0; + + if (arg_shifter.is_parameter_next ()) + { + const char* file_name = arg_shifter.get_current (); + ior_file = ACE_OS::fopen (file_name, "r"); + + if (ior_file == 0) + ACE_ERROR ((LM_ERROR, + "Unable to open %s for reading: %p\n", + file_name)); + + arg_shifter.consume_arg (); + } + else + ior_file = ACE_OS::fdopen (ACE_STDIN, "r"); + + if (ior_file != 0) + { + ACE_Read_Buffer read_buffer (ior_file, 1); + this->ior_ = read_buffer.read (); + } + else + ACE_ERROR ((LM_ERROR, "Couldn't load ior.\n")); + } + else + { + ACE_DEBUG ((LM_DEBUG, "Ignoring argument <%s>\n", + current_arg)); + arg_shifter.consume_arg (); + } + } +} + +TT_Parse_Args::~TT_Parse_Args () +{ + // Reclaim the ior string's memory. + ACE_Allocator* alloc = ACE_Allocator::instance (); + alloc->free (this->ior_); +} + +int +TT_Parse_Args::federated () const +{ + return this->federated_; +} + +int +TT_Parse_Args::quiet () const +{ + return this->quiet_; +} + +char* +TT_Parse_Args::ior () const +{ + return this->ior_; +} diff --git a/TAO/orbsvcs/tests/Trading/TT_Info.h b/TAO/orbsvcs/tests/Trading/TT_Info.h new file mode 100644 index 00000000000..de4935df75c --- /dev/null +++ b/TAO/orbsvcs/tests/Trading/TT_Info.h @@ -0,0 +1,206 @@ +// $Id$ + +#ifndef TAO_TRADER_TEST_UTILS_H +#define TAO_TRADER_TEST_UTILS_H + +#include "TTestS.h" +#include "ace/Arg_Shifter.h" +#include "ace/Read_Buffer.h" +#include "orbsvcs/CosTradingC.h" +#include "orbsvcs/CosTradingReposC.h" +#include "orbsvcs/CosTradingDynamicC.h" +#include "ttest_export.h" + +class TAO_TTest_Export TT_Info +{ +public: + + static void dump_properties (const CosTrading::PropertySeq& prop_seq, + CORBA::Boolean print_dynamic = 1 + ACE_ENV_ARG_DECL_WITH_DEFAULTS); + // Dump the contents of this property sequence. + + enum INTERFACES + { + REMOTE_IO, + PLOTTER, + PRINTER, + FILESYSTEM, + PS_PRINTER + }; + + // = Test servants. + + class Remote_Output : + public POA_TAO_Trader_Test::Remote_Output + { + public: + + Remote_Output (void) {} + + virtual void confirm (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) {} + // Method to test that the importer received a valid reference to + // the exported object. + }; + + class TAO_TTest_Export Printer : + public POA_TAO_Trader_Test::Printer + { + public: + + Printer (void) {} + + virtual void confirm (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) {} + // Method to test that the importer received a valid reference to + // the exported object. + }; + + class TAO_TTest_Export Plotter : + public POA_TAO_Trader_Test::Plotter + { + public: + Plotter (void) {} + + virtual void confirm (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) {} + // Method to test that the importer received a valid reference to + // the exported object. + }; + + class TAO_TTest_Export File_System : + public POA_TAO_Trader_Test::File_System + { + public: + File_System (void) {} + + virtual void confirm (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) {} + // Method to test that the importer received a valid reference to + // the exported object. + }; + + class TAO_TTest_Export PostScript_Printer : + public POA_TAO_Trader_Test::PostScript_Printer + { + public: + PostScript_Printer (void) {} + + virtual void confirm (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) {} + // Method to test that the importer received a valid reference to + // the exported object. + }; + +#define NUM_TYPES 5 + static const char* INTERFACE_NAMES[]; + + // = Remote IO property descriptions + + enum REMOTE_IO_PROPERTIES + { + NAME, + LOCATION, + DESCRIPTION, + HOST_NAME, + TRADER_NAME, + MISCELLANEOUS + }; + + static const char* REMOTE_IO_NAME; + static const char* REMOTE_IO_PROPERTY_NAMES[]; + + // = Plotter property descriptions + + enum PLOTTER_PROPERTIES + { + PLOTTER_NUM_COLORS, + PLOTTER_AUTO_LOADING, + PLOTTER_COST_PER_PAGE, + PLOTTER_MODEL_NUMBER, + PLOTTER_USER_QUEUE, + PLOTTER_FILE_SIZES_PENDING + }; + + static const char* PLOTTER_NAME; + static const char* PLOTTER_PROPERTY_NAMES[]; + + // = Printer property descriptions + + enum PRINTER_PROPERTIES + { + PRINTER_COLOR, + PRINTER_DOUBLE_SIDED, + PRINTER_COST_PER_PAGE, + PRINTER_MODEL_NUMBER, + PRINTER_PAGES_PER_SEC, + PRINTER_USER_QUEUE, + PRINTER_FILE_SIZES_PENDING + }; + + static const char* PRINTER_NAME; + static const char* PRINTER_PROPERTY_NAMES[]; + + // = File System Property Descriptions + + enum FILESYSTEM_PROPERTIES + { + DISK_SIZE, + SPACE_REMAINING, + PERMISSION_LEVEL + }; + + static const char* FILESYSTEM_NAME; + static const char* FILESYSTEM_PROPERTY_NAMES[]; + + // = PostScript Printer property descriptions. + + enum PS_PRINTER_PROPERTIES + { + VERSION + }; + + static const char* PS_PRINTER_NAME; + static const char* PS_PRINTER_PROPERTY_NAMES[]; + + // = Offer Info + +#define NUM_OFFERS 15 + static const char* LOCATIONS[]; + static const char* USERS[]; + static const char* MODEL_NUMBERS[]; + + // = Query info + + static const int NUM_QUERIES; + static const char* QUERIES[][3]; +}; + +class TAO_TTest_Export TT_Parse_Args + // = TITLE + // Utility to parse the command-line arguments to the trading service tests. +{ + public: + + TT_Parse_Args (int& argc, char** argv); + + ~TT_Parse_Args (); + + int federated () const; + // True if the test should test the federated features of the trading + // service. + + int quiet () const; + // True if the tests should supress all but the most essential output. + + char* ior () const; + // Not null if the test user supplied an explicit ior. + + private: + + int federated_, quiet_; + char* ior_; +}; + +#endif /* TAO_TRADER_TEST_UTILS_H */ diff --git a/TAO/orbsvcs/tests/Trading/TTest.idl b/TAO/orbsvcs/tests/Trading/TTest.idl new file mode 100644 index 00000000000..d518aa1b58f --- /dev/null +++ b/TAO/orbsvcs/tests/Trading/TTest.idl @@ -0,0 +1,44 @@ +// $Id$ + +#include <orb.idl> + +module TAO_Trader_Test +{ + +interface Remote_Output +{ + // Ensure that the object reference returned from the query actually + // works. + void confirm (); +}; + +interface Plotter : Remote_Output +{ +}; + +interface Printer : Remote_Output +{ +}; + +interface File_System : Remote_Output +{ +}; + +interface PostScript_Printer : Remote_Output +{ +}; + +// Sequences used to test sequence type equivalence in the trader. +typedef sequence<short> ShortSeq; +typedef sequence<unsigned short> UShortSeq; +typedef sequence<long> LongSeq; +typedef sequence<unsigned long> ULongSeq; +typedef sequence<boolean> BooleanSeq; +typedef sequence<float> FloatSeq; +typedef sequence<double> DoubleSeq; +typedef sequence<string> StringSeq; +}; + + + + diff --git a/TAO/orbsvcs/tests/Trading/Trading.mpc b/TAO/orbsvcs/tests/Trading/Trading.mpc new file mode 100644 index 00000000000..008ef7449a7 --- /dev/null +++ b/TAO/orbsvcs/tests/Trading/Trading.mpc @@ -0,0 +1,61 @@ +// -*- MPC -*- +// $Id$ + +project(*Test Lib): orbsvcslib, trading_serv, naming, utils, pi, codecfactory { + sharedname = TTest + idlflags += -I..\..\.. -I..\..\..\orbsvcs -Sc -Wb,export_macro=TAO_TTest_Export -Wb,export_include=ttest_export.h + dynamicflags = TAO_TTEST_BUILD_DLL + + Source_Files { + TT_Info.cpp + Service_Type_Exporter.cpp + Offer_Exporter.cpp + Offer_Importer.cpp + Simple_Dynamic.cpp + } + Header_Files { + ttest_export.h + TT_Info.h + Service_Type_Exporter.h + Offer_Exporter.h + Offer_Importer.h + Simple_Dynamic.h + } +} + +project(*export test): namingexe, trading_serv, utils { + after += Trading_Test_Lib + libs += TTest + + IDL_Files { + } + + Source_Files { + export_test.cpp + } +} + +project(*import test): namingexe, trading_serv, utils { + after += Trading_Test_Lib + libs += TTest + + IDL_Files { + } + + Source_Files { + import_test.cpp + } +} + +project(*colocated test): namingexe, trading_serv, utils { + after += Trading_Test_Lib + libs += TTest + + IDL_Files { + } + + Source_Files { + colocated_test.cpp + } +} + diff --git a/TAO/orbsvcs/tests/Trading/colocated_test.cpp b/TAO/orbsvcs/tests/Trading/colocated_test.cpp new file mode 100644 index 00000000000..67d9232a315 --- /dev/null +++ b/TAO/orbsvcs/tests/Trading/colocated_test.cpp @@ -0,0 +1,133 @@ +// $Id$ + +#include "ace/Auto_Ptr.h" +#include "ace/Get_Opt.h" +#include "tao/Utils/ORB_Manager.h" +#include "Offer_Exporter.h" +#include "Offer_Importer.h" +#include "Service_Type_Exporter.h" +#include "orbsvcs/Trader/Trader.h" +#include "orbsvcs/Trader/Service_Type_Repository.h" + +ACE_RCSID (Trading, + colocated_test, + "$Id$") + +void +parse_args (int argc, char *argv[], + CORBA::Boolean& verbose) +{ + int opt; + ACE_Get_Opt get_opt (argc, argv, "fq"); + + verbose = 1; + while ((opt = get_opt ()) != EOF) + { + if (opt == 'q') + verbose = 0; + } +} + +int +main (int argc, char** argv) +{ + ACE_TRY_NEW_ENV + { + TAO_ORB_Manager orb_manager; + orb_manager.init (argc, argv ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + // Command line argument interpretation. + CORBA::Boolean verbose = 0; + ::parse_args (argc, argv, verbose); + + // Initialize ORB. + CORBA::ORB_var orb = orb_manager.orb (); + + // Create a Service Type Repository and a Trader Object. + TAO_Service_Type_Repository type_repos; + auto_ptr<TAO_Trader_Factory::TAO_TRADER> trader (TAO_Trader_Factory::create_trader (argc, argv)); + TAO_Support_Attributes_i& sup_attr = trader->support_attributes (); + TAO_Trading_Components_i& trd_comp = trader->trading_components (); + + // Set the service type repository + sup_attr.type_repos (type_repos._this (ACE_ENV_SINGLE_ARG_PARAMETER)); + ACE_TRY_CHECK; + + // Run the Service Type Exporter tests + ACE_DEBUG ((LM_DEBUG, "*** Running the Service Type Exporter tests.\n")); + TAO_Service_Type_Exporter type_exporter + (CosTrading::Lookup::_duplicate (trd_comp.lookup_if ()), + verbose + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + type_exporter.remove_all_types (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + type_exporter.add_all_types (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + type_exporter.list_all_types (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + type_exporter.describe_all_types (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + type_exporter.fully_describe_all_types (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + // Run the Offer Exporter tests + ACE_DEBUG ((LM_DEBUG, "*** Running the Offer Exporter tests.\n")); + TAO_Offer_Exporter offer_exporter + (CosTrading::Lookup::_duplicate (trd_comp.lookup_if ()), + verbose + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + offer_exporter.withdraw_offers (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + offer_exporter.export_offers (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + offer_exporter.describe_offers (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + offer_exporter.modify_offers (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + offer_exporter.describe_offers (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + offer_exporter.withdraw_offers_using_constraints (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + offer_exporter.describe_offers (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + offer_exporter.withdraw_offers (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + offer_exporter.export_offers (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + offer_exporter.describe_offers (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + // Run the Offer Importer tests + ACE_DEBUG ((LM_DEBUG, "*** Running the Offer Importer tests.\n")); + TAO_Offer_Importer offer_importer + (CosTrading::Lookup::_duplicate (trd_comp.lookup_if ()), verbose); + + offer_importer.perform_queries (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "Trader Export Tests Failed"), -1); + } + ACE_ENDTRY; + + return 0; +} diff --git a/TAO/orbsvcs/tests/Trading/export_test.cpp b/TAO/orbsvcs/tests/Trading/export_test.cpp new file mode 100644 index 00000000000..9078aa74b23 --- /dev/null +++ b/TAO/orbsvcs/tests/Trading/export_test.cpp @@ -0,0 +1,158 @@ +// $Id$ + +#include "tao/Utils/ORB_Manager.h" +#include "Offer_Exporter.h" +#include "Offer_Importer.h" +#include "Service_Type_Exporter.h" +#include "ace/Auto_Ptr.h" +#include "orbsvcs/Trader/Trader.h" +#include "orbsvcs/Trader/Service_Type_Repository.h" + +ACE_RCSID (Trading, + export_test, + "$Id$") + +int +main (int argc, char** argv) +{ + ACE_TRY_NEW_ENV + { + TAO_ORB_Manager orb_manager; + orb_manager.init (argc, argv ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + // Command line argument interpretation. + TT_Parse_Args parse_args (argc, argv); + + // Init the orb and bootstrap to the trading service. + CORBA::ORB_var orb = orb_manager.orb (); + ACE_DEBUG ((LM_ERROR, "*** Bootstrap to the Lookup interface.\n")); + + char* ior = parse_args.ior (); + CORBA::Object_var trading_obj = (ior == 0) ? + orb->resolve_initial_references ("TradingService") : + orb->string_to_object (ior ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (CORBA::is_nil (trading_obj.in ())) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to bootstrap to the Trading Service.\n"), + -1); + + // Narrow the lookup interface. + ACE_DEBUG ((LM_DEBUG, "*** Narrowing the lookup interface.\n")); + CosTrading::Lookup_var lookup_if = + CosTrading::Lookup::_narrow (trading_obj.in () ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + // Run the Service Type Exporter tests + ACE_DEBUG ((LM_DEBUG, "*** Running the Service Type Exporter tests.\n")); + TAO_Service_Type_Exporter type_exporter (lookup_if.in (), + ! parse_args.quiet () + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + type_exporter.remove_all_types (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + type_exporter.add_all_types (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + type_exporter.remove_all_types (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + type_exporter.add_all_types (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (parse_args.federated ()) + { + type_exporter.add_all_types_to_all (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } + + type_exporter.list_all_types (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + type_exporter.describe_all_types (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + type_exporter.fully_describe_all_types (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + ACE_DEBUG ((LM_DEBUG, "*** Service Type Exporter tests complete.\n")); + + // Run the Offer Exporter tests + ACE_DEBUG ((LM_DEBUG, "*** Running the Offer Exporter tests.\n")); + TAO_Offer_Exporter offer_exporter (lookup_if.in (), ! parse_args.quiet () ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + // = Test series. + + offer_exporter.withdraw_offers (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + offer_exporter.export_offers (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + offer_exporter.describe_offers (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + offer_exporter.modify_offers (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + offer_exporter.describe_offers (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + offer_exporter.withdraw_offers_using_constraints (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + offer_exporter.describe_offers (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + offer_exporter.withdraw_offers (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + offer_exporter.export_offers (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (parse_args.federated ()) + { + offer_exporter.export_offers_to_all (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } + + offer_exporter.describe_offers (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + ACE_DEBUG ((LM_DEBUG, "*** Offer Exporter tests complete.\n")); + ACE_DEBUG ((LM_DEBUG, "*** Now serving dynamic properties.\n")); + + size_t offset = 0; + char file[1024]; + ACE_OS::strcpy(file, argv[0]); + if ((offset = (size_t)ACE_OS::strrchr(file, '/')) != 0) { + offset -= ((size_t)file - 1); + } + ACE_OS::strcpy(file + offset, "export_test_ready"); + + FILE *ready_file = + ACE_OS::fopen (file, "w"); + if (ready_file != 0) { + ACE_OS::fprintf (ready_file, "The export test is ready\n"); + ACE_OS::fclose (ready_file); + } + else { + ACE_DEBUG ((LM_WARNING, "Unable to open %s for output.\n", file)); + } + + orb_manager.run (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + ACE_ERROR_RETURN ((LM_ERROR, "Trader Export Tests Failed"), -1); + } + ACE_ENDTRY; + + return 0; +} diff --git a/TAO/orbsvcs/tests/Trading/import_test.cpp b/TAO/orbsvcs/tests/Trading/import_test.cpp new file mode 100644 index 00000000000..f303d292998 --- /dev/null +++ b/TAO/orbsvcs/tests/Trading/import_test.cpp @@ -0,0 +1,60 @@ +// $Id$ + +#include "tao/Utils/ORB_Manager.h" +#include "Offer_Importer.h" + +ACE_RCSID(Trading, import_test, "$Id$") + +int +main (int argc, char** argv) +{ + ACE_TRY_NEW_ENV + { + TAO_ORB_Manager orb_manager; + orb_manager.init (argc, argv ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + // Command line argument interpretation. + TT_Parse_Args parse_args (argc, argv); + + // Initialize the ORB and bootstrap to the Lookup interface. + CORBA::ORB_var orb = orb_manager.orb (); + ACE_DEBUG ((LM_ERROR, "*** Bootstrap to the Lookup interface.\n")); + char* ior = parse_args.ior (); + CORBA::Object_var trading_obj = (ior == 0) ? + orb->resolve_initial_references ("TradingService") : + orb->string_to_object (ior ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (CORBA::is_nil (trading_obj.in ())) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to initialize the Trading Service.\n"), + -1); + + // Narrow the lookup interface. + ACE_DEBUG ((LM_DEBUG, "*** Narrowing the lookup interface.\n")); + CosTrading::Lookup_var lookup_if = + CosTrading::Lookup::_narrow (trading_obj.in () ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + // Run the Offer Importer tests + ACE_DEBUG ((LM_DEBUG, "*** Running the Offer Importer tests.\n")); + TAO_Offer_Importer offer_importer (lookup_if.in (), ! parse_args.quiet ()); + + offer_importer.perform_queries (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (parse_args.federated ()) + { + offer_importer.perform_directed_queries (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } + } + ACE_CATCHANY + { + ACE_ERROR_RETURN ((LM_ERROR, "Trader Import Tests Failed."), -1); + } + ACE_ENDTRY; + + return 0; +} diff --git a/TAO/orbsvcs/tests/Trading/run_test.pl b/TAO/orbsvcs/tests/Trading/run_test.pl new file mode 100755 index 00000000000..845aff2f28c --- /dev/null +++ b/TAO/orbsvcs/tests/Trading/run_test.pl @@ -0,0 +1,63 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +use lib '../../../../bin'; +use PerlACE::Run_Test; + +$ior = PerlACE::LocalFile ("trading.ior"); +$ready_file = PerlACE::LocalFile ("export_test_ready"); +$sleeptime = 20; +$port = PerlACE::random_port(); + +unlink $ior; +unlink $ready_file; + +## Specify and endpoint so that we may test the corbaloc in the +## -ORBInitRef. We retain one -ORBInitRef using the file just to test +## both ways. +$TS = new PerlACE::Process ("../../Trading_Service/Trading_Service", + "-ORBEndpoint iiop://:$port -TSdumpior $ior"); +$E = new PerlACE::Process ("export_test", + "-ORBInitRef TradingService=corbaloc:::$port/TradingService -quiet"); +$I = new PerlACE::Process ("import_test", + "-ORBInitRef TradingService=file://$ior -quiet"); + +if ($TS->Spawn () == -1) { + exit 1; +} + +if (PerlACE::waitforfile_timed ($ior, $sleeptime) == -1) { + print STDERR "ERROR: waiting for trading service IOR file\n"; + $TS->Kill (); + exit 1; +} + +if ($E->Spawn () == -1) { + $TS->Kill (); + exit 1; +} + +if (PerlACE::waitforfile_timed ($ready_file, 120) == -1) { + print STDERR "ERROR: waiting for the export test to finish\n"; + $E->Kill (); + $TS->Kill (); + exit 1; +} + +$test = $I->SpawnWaitKill (60); +$E->Kill (); +$TS->Kill (); + +unlink $ior; +unlink $ready_file; + +if ($test != 0) { + print STDERR "ERROR: import test returned $test\n"; + exit 1; +} + +exit 0; diff --git a/TAO/orbsvcs/tests/Trading/ttest_export.h b/TAO/orbsvcs/tests/Trading/ttest_export.h new file mode 100644 index 00000000000..630a38f0c14 --- /dev/null +++ b/TAO/orbsvcs/tests/Trading/ttest_export.h @@ -0,0 +1,40 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl +// ------------------------------ +#ifndef TAO_TTEST_EXPORT_H +#define TAO_TTEST_EXPORT_H + +#include "ace/config-all.h" + +#if defined (TAO_AS_STATIC_LIBS) +# if !defined (TAO_TTEST_HAS_DLL) +# define TAO_TTEST_HAS_DLL 0 +# endif /* ! TAO_TTEST_HAS_DLL */ +#else +# if !defined (TAO_TTEST_HAS_DLL) +# define TAO_TTEST_HAS_DLL 1 +# endif /* ! TAO_TTEST_HAS_DLL */ +#endif + +#if defined (TAO_TTEST_HAS_DLL) && (TAO_TTEST_HAS_DLL == 1) +# if defined (TAO_TTEST_BUILD_DLL) +# define TAO_TTest_Export ACE_Proper_Export_Flag +# define TAO_TTest_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define TAO_TTest_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* TAO_TTEST_BUILD_DLL */ +# define TAO_TTest_Export ACE_Proper_Import_Flag +# define TAO_TTest_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define TAO_TTest_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* TAO_TTEST_BUILD_DLL */ +#else /* TAO_TTEST_HAS_DLL == 1 */ +# define TAO_TTest_Export +# define TAO_TTest_SINGLETON_DECLARATION(T) +# define TAO_TTest_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* TAO_TTEST_HAS_DLL == 1 */ + +#endif /* TAO_TTEST_EXPORT_H */ + +// End of auto generated file. |