From e522dabcc1db2e8aef96bce9c06e8bd250fcf7f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Wed, 7 Mar 2012 17:45:08 +0100 Subject: [PATCH] Feature #1112, #962: Fix a bunch of typos in error messages --- src/cli/one_helper/oneuser_helper.rb | 2 +- src/cloud/ec2/bin/econe-server | 2 +- src/cloud/occi/bin/occi-server | 2 +- src/cloud/occi/lib/OCCIClient.rb | 4 ++-- src/datastore_mad/remotes/libfs.sh | 2 +- src/dm/DispatchManagerActions.cc | 4 ++-- src/group/GroupPool.cc | 2 +- src/host/test/HostPoolTest.cc | 2 +- src/image/ImageManagerActions.cc | 12 ++++++------ src/mad/Mad.cc | 6 +++--- src/nebula/oned.cc | 4 ++-- src/oca/java/test/oned.conf | 2 +- src/oca/ruby/OpenNebula/Group.rb | 2 +- src/onedb/test/oned_mysql.conf | 4 ++-- src/onedb/test/oned_sqlite.conf | 4 ++-- src/ozones/Server/bin/ozones-server | 2 +- src/ozones/Server/models/OzonesServer.rb | 4 ++-- src/pool/PoolObjectSQL.cc | 2 +- src/rm/RequestManager.cc | 6 +++--- src/rm/RequestManagerDelete.cc | 6 +++--- src/rm/RequestManagerUpdateTemplate.cc | 2 +- src/rm/RequestManagerVirtualMachine.cc | 4 ++-- src/sunstone/bin/sunstone-server | 2 +- src/tm_mad/vmware/functions.sh | 2 +- src/vm/VirtualMachine.cc | 10 +++++----- src/vm/VirtualMachinePool.cc | 2 +- src/vmm_mad/ec2/one_vmm_ec2.rb | 6 +++--- src/vmm_mad/exec/one_vmm_exec.rb | 2 +- src/vmm_mad/remotes/vmware/vmware_driver.rb | 2 +- 29 files changed, 53 insertions(+), 53 deletions(-) diff --git a/src/cli/one_helper/oneuser_helper.rb b/src/cli/one_helper/oneuser_helper.rb index 82a060b44e..2b1a532919 100644 --- a/src/cli/one_helper/oneuser_helper.rb +++ b/src/cli/one_helper/oneuser_helper.rb @@ -34,7 +34,7 @@ class OneUserHelper < OpenNebulaHelper::OneHelper begin password = File.read(arg).split("\n").first rescue - return -1, "Can not read file: #{arg}" + return -1, "Cannot read file: #{arg}" end else password = arg.dup diff --git a/src/cloud/ec2/bin/econe-server b/src/cloud/ec2/bin/econe-server index 2071c168d7..5b1d23a9f2 100755 --- a/src/cloud/ec2/bin/econe-server +++ b/src/cloud/ec2/bin/econe-server @@ -53,7 +53,7 @@ setup() start() { if [ ! -f "$ECONE_SERVER" ]; then - echo "Can not find $ECONE_SERVER." + echo "Cannot find $ECONE_SERVER." exit 1 fi diff --git a/src/cloud/occi/bin/occi-server b/src/cloud/occi/bin/occi-server index c7306756c7..5218f42e77 100755 --- a/src/cloud/occi/bin/occi-server +++ b/src/cloud/occi/bin/occi-server @@ -53,7 +53,7 @@ setup() start() { if [ ! -x "$OCCI_SERVER" ]; then - echo "Can not find $OCCI_SERVER." + echo "Cannot find $OCCI_SERVER." exit 1 fi diff --git a/src/cloud/occi/lib/OCCIClient.rb b/src/cloud/occi/lib/OCCIClient.rb index 4b30b9fb2c..c600599a18 100755 --- a/src/cloud/occi/lib/OCCIClient.rb +++ b/src/cloud/occi/lib/OCCIClient.rb @@ -131,7 +131,7 @@ module OCCIClient file_path="/"+m[1] end elsif !image_info.elements['TYPE'] == "DATABLOCK" - return CloudClient::Error.new("Can not find URL") + return CloudClient::Error.new("Cannot find URL") end if curb @@ -316,7 +316,7 @@ module OCCIClient end if info.elements['ID'] == nil - return CloudClient::Error.new("Can not find RESOURCE ID") + return CloudClient::Error.new("Cannot find RESOURCE ID") end resource_id = info.elements['ID'].text diff --git a/src/datastore_mad/remotes/libfs.sh b/src/datastore_mad/remotes/libfs.sh index 55d5aada37..02f238e050 100644 --- a/src/datastore_mad/remotes/libfs.sh +++ b/src/datastore_mad/remotes/libfs.sh @@ -23,7 +23,7 @@ # @param $3 - Safe dirs # @param $4 - Umask for new file creation (default: 0007) # @return sets the following environment variables -# - RESTRICTED_DIRS: Paths that can not be used to register images +# - RESTRICTED_DIRS: Paths that cannot be used to register images # - SAFE_DIRS: Paths that are safe to specify image paths # - BASE_PATH: Path where the images will be stored #------------------------------------------------------------------------------ diff --git a/src/dm/DispatchManagerActions.cc b/src/dm/DispatchManagerActions.cc index f945c98944..4907ed7194 100644 --- a/src/dm/DispatchManagerActions.cc +++ b/src/dm/DispatchManagerActions.cc @@ -664,7 +664,7 @@ int DispatchManager::resubmit(int vid) { case VirtualMachine::SUSPENDED: NebulaLog::log("DiM",Log::ERROR, - "Can not resubmit a suspended VM. Resume it first"); + "Cannot resubmit a suspended VM. Resume it first"); rc = -2; break; @@ -688,7 +688,7 @@ int DispatchManager::resubmit(int vid) break; case VirtualMachine::DONE: NebulaLog::log("DiM",Log::ERROR, - "Can not resubmit a VM already in DONE state"); + "Cannot resubmit a VM already in DONE state"); rc = -2; break; } diff --git a/src/group/GroupPool.cc b/src/group/GroupPool.cc index a476669b06..b12cda200f 100644 --- a/src/group/GroupPool.cc +++ b/src/group/GroupPool.cc @@ -22,7 +22,7 @@ /* -------------------------------------------------------------------------- */ /* There are two default groups boostrapped by the core: */ -/* - oneadmin can not be removed */ +/* - oneadmin cannot be removed */ /* - users to place regular users by default */ /* The first 100 group IDs are reserved for system groups. Regular ones start */ /* from ID 100 */ diff --git a/src/host/test/HostPoolTest.cc b/src/host/test/HostPoolTest.cc index d3e81a802d..9f02041dfc 100644 --- a/src/host/test/HostPoolTest.cc +++ b/src/host/test/HostPoolTest.cc @@ -267,7 +267,7 @@ public: CPPUNIT_ASSERT( oid_1 == -1 ); CPPUNIT_ASSERT( rc == oid_1 ); - // the hostname can not be repeated if the drivers change + // the hostname cannot be repeated if the drivers change rc = hp->allocate(&oid_1, names[0], im_mad_2, diff --git a/src/image/ImageManagerActions.cc b/src/image/ImageManagerActions.cc index 3b41c8d2c2..ad1b8e2627 100644 --- a/src/image/ImageManagerActions.cc +++ b/src/image/ImageManagerActions.cc @@ -95,7 +95,7 @@ int ImageManager::acquire_image(Image *img, string& error) case Image::USED: if (img->isPersistent()) { - error = "Cannot aquire persistent image, it is already in use"; + error = "Cannot acquire persistent image, it is already in use"; rc = -1; } else @@ -106,15 +106,15 @@ int ImageManager::acquire_image(Image *img, string& error) break; case Image::DISABLED: - error = "Cannot aquire image, it is disabled"; + error = "Cannot acquire image, it is disabled"; rc = -1; break; case Image::LOCKED: - error = "Cannot aquire image, it is locked"; + error = "Cannot acquire image, it is locked"; rc = -1; break; case Image::ERROR: - error = "Cannot aquire image, it is in an error state"; + error = "Cannot acquire image, it is in an error state"; rc = -1; break; default: @@ -276,13 +276,13 @@ int ImageManager::delete_image(int iid, const string& ds_data) if ( img->get_running() != 0 ) { img->unlock(); - return -1; //Can not remove images in use + return -1; //Cannot remove images in use } break; case Image::USED: img->unlock(); - return -1; //Can not remove images in use + return -1; //Cannot remove images in use break; case Image::INIT: diff --git a/src/mad/Mad.cc b/src/mad/Mad.cc index 98388228ee..e33c04cfdb 100644 --- a/src/mad/Mad.cc +++ b/src/mad/Mad.cc @@ -239,13 +239,13 @@ int Mad::start() error_exec: oss.str(""); - oss << "Can not load driver " << executable << ", " << strerror(errno); + oss << "Cannot load driver " << executable << ", " << strerror(errno); NebulaLog::log("MAD", Log::ERROR, oss); exit(-1); error_dup2: oss.str(""); - oss << "Can not duplicate descriptors, " << strerror(errno); + oss << "Cannot duplicate descriptors, " << strerror(errno); NebulaLog::log("MAD", Log::ERROR, oss); exit(-1); @@ -275,7 +275,7 @@ error_attributes: error_pipes: oss.str(""); - oss << "Can not create driver pipes, " << strerror(errno); + oss << "Cannot create driver pipes, " << strerror(errno); NebulaLog::log("MAD", Log::ERROR, oss); return -1; } diff --git a/src/nebula/oned.cc b/src/nebula/oned.cc index 3076c9f4fe..cfe7968607 100644 --- a/src/nebula/oned.cc +++ b/src/nebula/oned.cc @@ -127,7 +127,7 @@ int main(int argc, char **argv) if( fd == -1) { - cerr<< "Error: Can not start oned, opening lock file " << lockfile + cerr<< "Error: Cannot start oned, opening lock file " << lockfile << endl; exit(-1); @@ -186,7 +186,7 @@ int main(int argc, char **argv) return 0; error_chdir: - cerr << "Error: can not change to dir " << wd << "\n"; + cerr << "Error: cannot change to dir " << wd << "\n"; unlink(lockfile.c_str()); exit(-1); diff --git a/src/oca/java/test/oned.conf b/src/oca/java/test/oned.conf index de3fdf51df..7e88254166 100644 --- a/src/oca/java/test/oned.conf +++ b/src/oca/java/test/oned.conf @@ -6,7 +6,7 @@ # Daemon configuration attributes #------------------------------------------------------------------------------- # MANAGER_TIMER: Time in seconds the core uses to evaluate periodical functions. -# HOST_MONITORING_INTERVAL and VM_POLLING_INTERVAL can not have smaller values +# HOST_MONITORING_INTERVAL and VM_POLLING_INTERVAL cannot have smaller values # than MANAGER_TIMER. # # HOST_MONITORING_INTERVAL: Time in seconds between host monitorization. diff --git a/src/oca/ruby/OpenNebula/Group.rb b/src/oca/ruby/OpenNebula/Group.rb index 74d56ddbf3..3fa5a9a41c 100644 --- a/src/oca/ruby/OpenNebula/Group.rb +++ b/src/oca/ruby/OpenNebula/Group.rb @@ -69,7 +69,7 @@ module OpenNebula # Creates ACLs for the group. The ACL rules are described in a file def create_acls(filename = GROUP_DEFAULT) if !File.readable?(filename) - return -1, "Can not read deafult ACL file for group" + return -1, "Cannot read deafult ACL file for group" end msg = String.new diff --git a/src/onedb/test/oned_mysql.conf b/src/onedb/test/oned_mysql.conf index 164abeaf5d..7275333b2c 100644 --- a/src/onedb/test/oned_mysql.conf +++ b/src/onedb/test/oned_mysql.conf @@ -6,7 +6,7 @@ # Daemon configuration attributes #------------------------------------------------------------------------------- # MANAGER_TIMER: Time in seconds the core uses to evaluate periodical functions. -# HOST_MONITORING_INTERVAL and VM_POLLING_INTERVAL can not have smaller values +# HOST_MONITORING_INTERVAL and VM_POLLING_INTERVAL cannot have smaller values # than MANAGER_TIMER. # # HOST_MONITORING_INTERVAL: Time in seconds between host monitorization. @@ -390,7 +390,7 @@ HM_MAD = [ #-------------------------------- ebtables Hook--------------------------------- # You can use these two hooks to isolate networks at the ethernet level so the -# traffic generated in different virtual networks can not be seen in others. +# traffic generated in different virtual networks cannot be seen in others. # # All the network configuration will be done in the cluster nodes, these are the # additional requisites: diff --git a/src/onedb/test/oned_sqlite.conf b/src/onedb/test/oned_sqlite.conf index e8a6aca4f9..09f4189ba0 100644 --- a/src/onedb/test/oned_sqlite.conf +++ b/src/onedb/test/oned_sqlite.conf @@ -6,7 +6,7 @@ # Daemon configuration attributes #------------------------------------------------------------------------------- # MANAGER_TIMER: Time in seconds the core uses to evaluate periodical functions. -# HOST_MONITORING_INTERVAL and VM_POLLING_INTERVAL can not have smaller values +# HOST_MONITORING_INTERVAL and VM_POLLING_INTERVAL cannot have smaller values # than MANAGER_TIMER. # # HOST_MONITORING_INTERVAL: Time in seconds between host monitorization. @@ -390,7 +390,7 @@ HM_MAD = [ #-------------------------------- ebtables Hook--------------------------------- # You can use these two hooks to isolate networks at the ethernet level so the -# traffic generated in different virtual networks can not be seen in others. +# traffic generated in different virtual networks cannot be seen in others. # # All the network configuration will be done in the cluster nodes, these are the # additional requisites: diff --git a/src/ozones/Server/bin/ozones-server b/src/ozones/Server/bin/ozones-server index 9a637cafbb..720aad1742 100755 --- a/src/ozones/Server/bin/ozones-server +++ b/src/ozones/Server/bin/ozones-server @@ -54,7 +54,7 @@ setup() start() { if [ ! -f "$OZONES_SERVER" ]; then - echo "Can not find $OZONES_SERVER." + echo "Cannot find $OZONES_SERVER." exit 1 fi diff --git a/src/ozones/Server/models/OzonesServer.rb b/src/ozones/Server/models/OzonesServer.rb index 1b43ba887b..4b7a952af5 100644 --- a/src/ozones/Server/models/OzonesServer.rb +++ b/src/ozones/Server/models/OzonesServer.rb @@ -217,7 +217,7 @@ class OzonesServer < CloudServer vdc = OZones::OpenNebulaVdc.new(id) rc = vdc.destroy rescue => e - return [404, OZones::Error.new("Error: Can not delete vdc. " \ + return [404, OZones::Error.new("Error: Cannot delete vdc. " \ "Reason: #{e.message}").to_json] end @@ -237,7 +237,7 @@ class OzonesServer < CloudServer rc = zone.destroy else return [404, - OZones::Error.new("Error: Can not delete " \ + OZones::Error.new("Error: Cannot delete " \ "zone. Reason: zone #{id} not found").to_json] end diff --git a/src/pool/PoolObjectSQL.cc b/src/pool/PoolObjectSQL.cc index 2a1706b171..fc45b17dd1 100644 --- a/src/pool/PoolObjectSQL.cc +++ b/src/pool/PoolObjectSQL.cc @@ -172,7 +172,7 @@ int PoolObjectSQL::replace_template(const string& tmpl_str, string& error) if ( new_tmpl == 0 ) { - error = "Can not allocate a new template"; + error = "Cannot allocate a new template"; return -1; } diff --git a/src/rm/RequestManager.cc b/src/rm/RequestManager.cc index 34a14a82e0..9d2099ea18 100644 --- a/src/rm/RequestManager.cc +++ b/src/rm/RequestManager.cc @@ -114,7 +114,7 @@ int RequestManager::setup_socket() { ostringstream oss; - oss << "Can not open server socket: " << strerror(errno); + oss << "Cannot open server socket: " << strerror(errno); NebulaLog::log("ReM",Log::ERROR,oss); return -1; @@ -126,7 +126,7 @@ int RequestManager::setup_socket() { ostringstream oss; - oss << "Can not set socket options: " << strerror(errno); + oss << "Cannot set socket options: " << strerror(errno); NebulaLog::log("ReM",Log::ERROR,oss); close(socket_fd); @@ -146,7 +146,7 @@ int RequestManager::setup_socket() { ostringstream oss; - oss << "Can not bind to port " << port << " : " << strerror(errno); + oss << "Cannot bind to port " << port << " : " << strerror(errno); NebulaLog::log("ReM",Log::ERROR,oss); close(socket_fd); diff --git a/src/rm/RequestManagerDelete.cc b/src/rm/RequestManagerDelete.cc index 9466768c30..34ec4d0393 100644 --- a/src/rm/RequestManagerDelete.cc +++ b/src/rm/RequestManagerDelete.cc @@ -91,7 +91,7 @@ void RequestManagerDelete::request_execute(xmlrpc_c::paramList const& paramList, if ( rc != 0 ) { failure_response(INTERNAL, - request_error("Can not delete "+object_name(auth_object),error_msg), + request_error("Cannot delete "+object_name(auth_object),error_msg), att); return; } @@ -163,7 +163,7 @@ int ImageDelete::drop(int oid, PoolObjectSQL * object, string& error_msg) if ( ds == 0 ) { - error_msg = "Datastore no longer exists can not remove image"; + error_msg = "Datastore no longer exists cannot remove image"; return -1; } @@ -199,7 +199,7 @@ int UserDelete::drop(int oid, PoolObjectSQL * object, string& error_msg) if (oid == 0) { - error_msg = "oneadmin can not be deleted."; + error_msg = "oneadmin cannot be deleted."; object->unlock(); return -1; diff --git a/src/rm/RequestManagerUpdateTemplate.cc b/src/rm/RequestManagerUpdateTemplate.cc index 07226eb0b6..1c8988ccbb 100644 --- a/src/rm/RequestManagerUpdateTemplate.cc +++ b/src/rm/RequestManagerUpdateTemplate.cc @@ -54,7 +54,7 @@ void RequestManagerUpdateTemplate::request_execute( if ( rc != 0 ) { failure_response(INTERNAL, - request_error("Can not update template",error_str), + request_error("Cannot update template",error_str), att); object->unlock(); diff --git a/src/rm/RequestManagerVirtualMachine.cc b/src/rm/RequestManagerVirtualMachine.cc index 82c3f91640..59ef25b9ef 100644 --- a/src/rm/RequestManagerVirtualMachine.cc +++ b/src/rm/RequestManagerVirtualMachine.cc @@ -160,7 +160,7 @@ int RequestManagerVirtualMachine::add_history(VirtualMachine * vm, if ( rc != 0 ) { failure_response(INTERNAL, - request_error("Can not update virtual machine history",""), + request_error("Cannot update virtual machine history",""), att); return -1; @@ -442,7 +442,7 @@ void VirtualMachineSaveDisk::request_execute(xmlrpc_c::paramList const& paramLis if ( iid_orig == -1 ) { failure_response(INTERNAL, - request_error("Can not used selected DISK", error_str), + request_error("Cannot use selected DISK", error_str), att); return; } diff --git a/src/sunstone/bin/sunstone-server b/src/sunstone/bin/sunstone-server index 155ff26260..171a8a6938 100755 --- a/src/sunstone/bin/sunstone-server +++ b/src/sunstone/bin/sunstone-server @@ -53,7 +53,7 @@ setup() start() { if [ ! -f "$SUNSTONE_SERVER" ]; then - echo "Can not find $SUNSTONE_SERVER." + echo "Cannot find $SUNSTONE_SERVER." exit 1 fi diff --git a/src/tm_mad/vmware/functions.sh b/src/tm_mad/vmware/functions.sh index d55effbd78..e66d89ee44 100644 --- a/src/tm_mad/vmware/functions.sh +++ b/src/tm_mad/vmware/functions.sh @@ -24,7 +24,7 @@ function fix_iso { if [ $? -eq 0 ]; then bname=`basename $dst_path` exec_and_log "ln -s $bname $dst_path/$bname.iso" \ - "Can not link ISO file." + "Cannot link ISO file." fi fi } diff --git a/src/vm/VirtualMachine.cc b/src/vm/VirtualMachine.cc index ba168ec86f..38fd4100f0 100644 --- a/src/vm/VirtualMachine.cc +++ b/src/vm/VirtualMachine.cc @@ -183,7 +183,7 @@ int VirtualMachine::select(SqlDB * db) return 0; error_previous_history: - ose << "Can not get previous history record (seq:" << history->seq + ose << "Cannot get previous history record (seq:" << history->seq << ") for VM id: " << oid; log("ONE", Log::ERROR, ose); @@ -380,7 +380,7 @@ int VirtualMachine::parse_context(string& error_str) if (str == 0) { - NebulaLog::log("ONE",Log::ERROR, "Can not marshall CONTEXT"); + NebulaLog::log("ONE",Log::ERROR, "Cannot marshall CONTEXT"); return -1; } @@ -955,15 +955,15 @@ int VirtualMachine::get_disk_images(string& error_str) return 0; error_max_os: - error_str = "VM can not use more than one OS image."; + error_str = "VM cannot use more than one OS image."; goto error_common; error_max_cd: - error_str = "VM can not use more than one CDROM image."; + error_str = "VM cannot use more than one CDROM image."; goto error_common; error_max_db: - error_str = "VM can not use more than 10 DATABLOCK images."; + error_str = "VM cannot use more than 10 DATABLOCK images."; goto error_common; error_common: diff --git a/src/vm/VirtualMachinePool.cc b/src/vm/VirtualMachinePool.cc index 6c5031389b..206d2b4cb4 100644 --- a/src/vm/VirtualMachinePool.cc +++ b/src/vm/VirtualMachinePool.cc @@ -170,7 +170,7 @@ VirtualMachinePool::VirtualMachinePool(SqlDB * db, { ostringstream oss; - oss << "Unkown VM_HOOK " << on << ". Hook not registered!"; + oss << "Unknown VM_HOOK " << on << ". Hook not registered!"; NebulaLog::log("VM",Log::WARNING,oss); } } diff --git a/src/vmm_mad/ec2/one_vmm_ec2.rb b/src/vmm_mad/ec2/one_vmm_ec2.rb index a4ce862b05..dbcd250245 100755 --- a/src/vmm_mad/ec2/one_vmm_ec2.rb +++ b/src/vmm_mad/ec2/one_vmm_ec2.rb @@ -185,7 +185,7 @@ class EC2Driver < VirtualMachineDriver return unless ec2_info if !ec2_value(ec2_info, 'AMI') - msg = "Can not find AMI in deployment file" + msg = "Cannot find AMI in deployment file" send_message(ACTION[:deploy], RESULT[:failure], id, msg) return end @@ -294,7 +294,7 @@ private if !local_dfile send_message(ACTION[:deploy],RESULT[:failure],id, - "Can not open deployment file #{local_dfile}") + "Cannot open deployment file #{local_dfile}") return end @@ -322,7 +322,7 @@ private ec2 = all_ec2_elements[0] else send_message(ACTION[:deploy],RESULT[:failure],id, - "Can not find EC2 element in deployment file "<< + "Cannot find EC2 element in deployment file "<< "#{local_dfile} or couldn't find any EC2 site matching "<< "one of the template.") return diff --git a/src/vmm_mad/exec/one_vmm_exec.rb b/src/vmm_mad/exec/one_vmm_exec.rb index 3570203cef..bd53cfe49e 100755 --- a/src/vmm_mad/exec/one_vmm_exec.rb +++ b/src/vmm_mad/exec/one_vmm_exec.rb @@ -259,7 +259,7 @@ class ExecDriver < VirtualMachineDriver if !local_dfile || File.zero?(local_dfile) send_message(ACTION[:deploy],RESULT[:failure],id, - "Can not open deployment file #{local_dfile}") + "Cannot open deployment file #{local_dfile}") return end diff --git a/src/vmm_mad/remotes/vmware/vmware_driver.rb b/src/vmm_mad/remotes/vmware/vmware_driver.rb index 570b7b0b81..c5be771f11 100644 --- a/src/vmm_mad/remotes/vmware/vmware_driver.rb +++ b/src/vmm_mad/remotes/vmware/vmware_driver.rb @@ -167,7 +167,7 @@ class VMwareDriver # Define the VM dfile = File.dirname(File.dirname(checkpoint)) + "/deployment.0" rescue => e - OpenNebula.log_error("Can not open checkpoint #{e.message}") + OpenNebula.log_error("Cannot open checkpoint #{e.message}") exit -1 end