From 0c601b73125d1bc120e248149bf4d83ecc27f1c2 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 8 Apr 2008 11:19:34 +0000 Subject: * Removing lulurun's perl UGAI from core svn, pending a link to an external repository, as per mailing list discussion. --- share/perl/test/OpenSimTest/AssetTester.pm | 17 ---- share/perl/test/OpenSimTest/Config.pm | 53 ----------- share/perl/test/OpenSimTest/GridTester.pm | 62 ------------- share/perl/test/OpenSimTest/InventoryTester.pm | 116 ------------------------- share/perl/test/OpenSimTest/UserTester.pm | 53 ----------- 5 files changed, 301 deletions(-) delete mode 100644 share/perl/test/OpenSimTest/AssetTester.pm delete mode 100644 share/perl/test/OpenSimTest/Config.pm delete mode 100644 share/perl/test/OpenSimTest/GridTester.pm delete mode 100644 share/perl/test/OpenSimTest/InventoryTester.pm delete mode 100644 share/perl/test/OpenSimTest/UserTester.pm (limited to 'share/perl/test/OpenSimTest') diff --git a/share/perl/test/OpenSimTest/AssetTester.pm b/share/perl/test/OpenSimTest/AssetTester.pm deleted file mode 100644 index ba05205..0000000 --- a/share/perl/test/OpenSimTest/AssetTester.pm +++ /dev/null @@ -1,17 +0,0 @@ -package AssetTester; - -use strict; -use XML::Serializer; -use OpenSim::Utility; - -sub init { - &OpenSimTest::Config::registerHandler("get_asset", \&_get_asset); -} - -sub _get_asset { - my $url = shift || $OpenSimTest::Config::ASSET_SERVER_URL; - my $asset_id = shift; - my $res = &OpenSim::Utility::HttpGetRequest($url . "/assets/" . $asset_id) . "\n"; -} - -1; diff --git a/share/perl/test/OpenSimTest/Config.pm b/share/perl/test/OpenSimTest/Config.pm deleted file mode 100644 index 14ab3ed..0000000 --- a/share/perl/test/OpenSimTest/Config.pm +++ /dev/null @@ -1,53 +0,0 @@ -package OpenSimTest::Config; - -use strict; - -my $apache_server_host = "localhost"; -my $opensim_server_host = "localhost"; - -# REGION -our $SIM_RECV_KEY = ""; -our $SIM_SEND_KEY = ""; -# ASSET -#our $ASSET_SERVER_URL = "http://127.0.0.1:8003/"; -our $ASSET_SERVER_URL = "http://$apache_server_host/opensim/asset.cgi"; -our $ASSET_RECV_KEY = ""; -our $ASSET_SEND_KEY = ""; -# USER -#our $USER_SERVER_URL = "http://127.0.0.1:8001/"; -our $USER_SERVER_URL = "http://$apache_server_host/opensim/user.cgi"; -our $USER_RECV_KEY = ""; -our $USER_SEND_KEY = ""; -# GRID -#our $GRID_SERVER_URL = "http://127.0.0.1:8001/"; -our $GRID_SERVER_URL = "http://$apache_server_host/opensim/grid.cgi"; -our $GRID_RECV_KEY = ""; -our $GRID_SEND_KEY = ""; -# INVENTORY -#our $INVENTORY_SERVER_URL = "http://127.0.0.1:8004"; -our $INVENTORY_SERVER_URL = "http://$apache_server_host/opensim/inventory.cgi"; -# handler list -our %HANDLER_LIST = (); - -our %APACHE_SERVERS = ( - user => "http://$apache_server_host/opensim/user.cgi", - grid => "http://$apache_server_host/opensim/grid.cgi", - asset => "http://$apache_server_host/opensim/asset.cgi", - inventory => "http://$apache_server_host/opensim/inventory.cgi", -); - -our %OPENSIM_SERVERS = ( - user => "http://$opensim_server_host:8002", - grid => "http://$opensim_server_host:8001", - asset => "http://$opensim_server_host:8003", - inventory => "http://$opensim_server_host:8004", -); - -sub registerHandler { - my ($name, $func) = @_; - $HANDLER_LIST{$name} = $func; -} - - -1; - diff --git a/share/perl/test/OpenSimTest/GridTester.pm b/share/perl/test/OpenSimTest/GridTester.pm deleted file mode 100644 index 61fef6b..0000000 --- a/share/perl/test/OpenSimTest/GridTester.pm +++ /dev/null @@ -1,62 +0,0 @@ -package GridTester; - -use strict; -use OpenSim::Utility; - -sub init { - &OpenSimTest::Config::registerHandler("simulator_login", \&_simulator_login); - &OpenSimTest::Config::registerHandler("simulator_data_request", \&_simulator_data_request); - &OpenSimTest::Config::registerHandler("simulator_after_region_moved", \&_simulator_after_region_moved); - &OpenSimTest::Config::registerHandler("map_block", \&_map_block); -} - -sub _simulator_login { - my $url = shift || $OpenSimTest::Config::GRID_SERVER_URL; - my @param = @_; - my %xml_rpc_param = ( - "authkey" => "null", - "UUID" => $param[0], - "sim_ip" => $param[1], - "sim_port" => $param[2], - "region_locx" => 1000, - "region_locy" => 1000, - "sim_name" => "OpenTest", - "http_port" => 9000, - "remoting_port" => 8895, - "map-image-id" => "0e5a5e87-08d9-4b37-9b8e-a4c3c4e409ab", - ); - return &OpenSim::Utility::XMLRPCCall($url, "simulator_login", \%xml_rpc_param); -} - -sub _map_block { - my $url = shift || $OpenSimTest::Config::GRID_SERVER_URL; - my @param = @_; - my %xml_rpc_param = ( - xmin => $param[0], - ymin => $param[1], - xmax => $param[2], - ymax => $param[3], - ); - return &OpenSim::Utility::XMLRPCCall($url, "map_block", \%xml_rpc_param); -} - -sub _simulator_data_request { - my $url = shift || $OpenSimTest::Config::GRID_SERVER_URL; - my @param = @_; - my %xml_rpc_param = ( - region_handle => $param[0], - authkey => undef, - ); - return &OpenSim::Utility::XMLRPCCall($url, "simulator_data_request", \%xml_rpc_param); -} - -sub _simulator_after_region_moved { - my $url = shift || $OpenSimTest::Config::GRID_SERVER_URL; - my @param = @_; - my %xml_rpc_param = ( - UUID => $param[0], - ); - return &OpenSim::Utility::XMLRPCCall($url, "simulator_after_region_moved", \%xml_rpc_param); -} - -1; diff --git a/share/perl/test/OpenSimTest/InventoryTester.pm b/share/perl/test/OpenSimTest/InventoryTester.pm deleted file mode 100644 index 76615b1..0000000 --- a/share/perl/test/OpenSimTest/InventoryTester.pm +++ /dev/null @@ -1,116 +0,0 @@ -package InventoryTester; - -use strict; -use XML::Serializer; -use OpenSim::Utility; - -sub init { - &OpenSimTest::Config::registerHandler("create_inventory", \&_create_inventory); - &OpenSimTest::Config::registerHandler("root_folders", \&_root_folders); - &OpenSimTest::Config::registerHandler("get_inventory", \&_get_inventory); - &OpenSimTest::Config::registerHandler("new_item", \&_new_item); - &OpenSimTest::Config::registerHandler("new_folder", \&_new_folder); -} - -sub _apache_flag { - my $url = shift; - return $url =~ /inventory.cgi/ ? 1 : 0; -} - -sub _new_folder { - my $url = shift || $OpenSimTest::Config::INVENTORY_SERVER_URL; - my $post_data =<<"POSTDATA"; - -New Folder - -b9cb58e8-f3c9-4af5-be47-029762baa68f - - -500ea141-2967-49e2-9e18-fcdedffe68df - - -aa6f9220-c945-0b23-6141-43c9ef734100 - --1 -0 - -POSTDATA - if (&_apache_flag($url)) { - $post_data = "POSTDATA=" . $post_data; # TODO: bad temporary solution - } - my $res = &OpenSim::Utility::HttpPostRequest($url . "/NewFolder/", $post_data) . "\n"; -} - -sub _new_item { - my $url = shift || $OpenSimTest::Config::INVENTORY_SERVER_URL; - my $post_data =<<"POSTDATA"; - - -f975d038-3bd7-4e8b-a945-f46b0c962ee3 - - -5f50f162-1cc6-4907-99be-a4c81d7f5e10 - -6 -6 - -7018dc23-43a9-493f-b3f7-869a6bbad0f3 - - -b9cb58e8-f3c9-4af5-be47-029762baa68f - - -b9cb58e8-f3c9-4af5-be47-029762baa68f - -Primitive - -2147483647 -526053692 -2147483647 -0 - -POSTDATA - if (&_apache_flag($url)) { - $post_data = "POSTDATA=" . $post_data; - } - my $res = &OpenSim::Utility::HttpPostRequest($url . "/NewItem/", $post_data) . "\n"; -} - -sub _get_inventory { - my $url = shift || $OpenSimTest::Config::INVENTORY_SERVER_URL; - my $uuid = shift; - my $serializer = new XML::Serializer($uuid, "guid"); - my $post_data = $serializer->to_string(XML::Serializer::WITH_HEADER); - if (&_apache_flag($url)) { - $post_data = "POSTDATA=" . $post_data; - } - my $res = &OpenSim::Utility::HttpPostRequest($url . "/GetInventory/", $post_data) . "\n"; - return 1; -} - -sub _create_inventory { - my $url = shift || $OpenSimTest::Config::INVENTORY_SERVER_URL; - my $uuid = shift; - my $serializer = new XML::Serializer($uuid, "guid"); - my $post_data = $serializer->to_string(XML::Serializer::WITH_HEADER); - if (&_apache_flag($url)) { - $post_data = "POSTDATA=" . $post_data; - } - my $res = &OpenSim::Utility::HttpPostRequest($url . "/CreateInventory/", $post_data) . "\n"; - return 1; -} - -sub _root_folders { - my $url = shift || $OpenSimTest::Config::INVENTORY_SERVER_URL; - my $uuid = shift; - my $serializer = new XML::Serializer($uuid, "guid"); - my $post_data = $serializer->to_string(XML::Serializer::WITH_HEADER); - if (&_apache_flag($url)) { - $post_data = "POSTDATA=" . $post_data; - } - my $res = &OpenSim::Utility::HttpPostRequest($url . "/RootFolders/", $post_data) . "\n"; - return 1; -} - -1; - diff --git a/share/perl/test/OpenSimTest/UserTester.pm b/share/perl/test/OpenSimTest/UserTester.pm deleted file mode 100644 index 194102a..0000000 --- a/share/perl/test/OpenSimTest/UserTester.pm +++ /dev/null @@ -1,53 +0,0 @@ -package UserTester; - -use strict; -use Digest::MD5; -use OpenSim::Utility; - -my $user_server_url; - -sub init { - &OpenSimTest::Config::registerHandler("login_to_simulator", \&_login_to_simulator); - &OpenSimTest::Config::registerHandler("get_user_by_name", \&_get_user_by_name); - &OpenSimTest::Config::registerHandler("get_user_by_uuid", \&_get_user_by_uuid); - &OpenSimTest::Config::registerHandler("get_avatar_picker_avatar", \&_get_avatar_picker_avatar); -} - -sub _login_to_simulator { - my $url = shift || $OpenSimTest::Config::USER_SERVER_URL; - my @param = @_; - my %xml_rpc_param = ( - first => $param[0], - last => $param[1], - passwd => "\$1\$" . Digest::MD5::md5_hex($param[2]), - start => "last", - version => "1.18.3.5", - mac => "cc82e1e2bfd24e5424d66b4fd3f70d55", - ); - return &OpenSim::Utility::XMLRPCCall($url, "login_to_simulator", \%xml_rpc_param); -} - -sub _get_user_by_name { - my $url = shift || $OpenSimTest::Config::USER_SERVER_URL; - my @param = @_; - my %xml_rpc_param = ( - avatar_name => $param[0], - ); - return &OpenSim::Utility::XMLRPCCall($url, "get_user_by_name", \%xml_rpc_param); -} - -# sample uuid: -# db836502-de98-49c9-9edc-b90a67beb0a8 -sub _get_user_by_uuid { - my $url = shift || $OpenSimTest::Config::USER_SERVER_URL; - my @param = @_; - my %xml_rpc_param = ( - avatar_uuid => $param[0], - ); - return &OpenSim::Utility::XMLRPCCall($url, "get_user_by_uuid", \%xml_rpc_param); -} - -sub _get_avatar_picker_avatar { -} - -1; -- cgit v1.1