diff --git a/include/RequestManager.h b/include/RequestManager.h index ca45567335..4128b20784 100644 --- a/include/RequestManager.h +++ b/include/RequestManager.h @@ -1048,27 +1048,6 @@ private: /* ---------------------------------------------------------------------- */ - class UserAuthenticate: public xmlrpc_c::method - { - public: - UserAuthenticate(UserPool * _upool):upool(_upool) - { - _signature="A:s"; - _help="Authenticates the user."; - }; - - ~UserAuthenticate(){}; - - void execute( - xmlrpc_c::paramList const& paramList, - xmlrpc_c::value * const retvalP); - - private: - UserPool * upool; - }; - - /* ---------------------------------------------------------------------- */ - class UserInfo: public xmlrpc_c::method { public: diff --git a/share/scripts/ganglia/push_ganglia b/share/scripts/ganglia/push_ganglia new file mode 100755 index 0000000000..6f8e56dc8a --- /dev/null +++ b/share/scripts/ganglia/push_ganglia @@ -0,0 +1,34 @@ +#!/usr/bin/env ruby + +# -------------------------------------------------------------------------- # +# Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org) # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +#--------------------------------------------------------------------------- # + +data=STDIN.read.strip + +data.each_line do |line| + next if !/^([^=]+?)=(.*)$/.match line + + var_name="OPENNEBULA_#{$1}" + var_data=$2 + + var_type=/^\d+$/.match(var_data) ? 'uint32' : 'string' + + command="gmetric -n #{var_name} -v \"#{var_data}\" -t #{var_type}" + + system command +end + + diff --git a/src/cli/onecluster b/src/cli/onecluster index c012c896b8..bda90aac1f 100755 --- a/src/cli/onecluster +++ b/src/cli/onecluster @@ -98,7 +98,7 @@ Any user can list available clusters. Commands: -* create (Creates a new user) +* create (Creates a new cluster) onecluster create clustername * delete (Removes a cluster) diff --git a/src/rm/RequestManager.cc b/src/rm/RequestManager.cc index 8960062ac4..10606df497 100644 --- a/src/rm/RequestManager.cc +++ b/src/rm/RequestManager.cc @@ -300,9 +300,6 @@ void RequestManager::register_xml_methods() xmlrpc_c::methodPtr user_change_password(new RequestManager::UserChangePassword(upool)); - xmlrpc_c::methodPtr user_authenticate(new - RequestManager::UserAuthenticate(upool)); - xmlrpc_c::methodPtr userpool_info(new RequestManager::UserPoolInfo(upool)); @@ -381,7 +378,6 @@ void RequestManager::register_xml_methods() RequestManagerRegistry.addMethod("one.user.delete", user_delete); RequestManagerRegistry.addMethod("one.user.info", user_info); RequestManagerRegistry.addMethod("one.user.passwd", user_change_password); - RequestManagerRegistry.addMethod("one.user.authenticate",user_authenticate); RequestManagerRegistry.addMethod("one.userpool.info", userpool_info); diff --git a/src/rm/RequestManagerUserAuthenticate.cc b/src/rm/RequestManagerUserAuthenticate.cc deleted file mode 100644 index 6b0137e021..0000000000 --- a/src/rm/RequestManagerUserAuthenticate.cc +++ /dev/null @@ -1,79 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org) */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -#include "RequestManager.h" -#include "NebulaLog.h" - -#include "AuthManager.h" - -/* -------------------------------------------------------------------------- */ -/* -------------------------------------------------------------------------- */ - -void RequestManager::UserAuthenticate::execute( - xmlrpc_c::paramList const& paramList, - xmlrpc_c::value * const retval) -{ - string session; - int uid; - - ostringstream oss; - const string method_name = "UserAuthenticate"; - - - /* -- RPC specific vars -- */ - vector arrayData; - xmlrpc_c::value_array * arrayresult; - - NebulaLog::log("ReM",Log::DEBUG,"UserAuthenticate method invoked"); - - // Get the parameters - session = xmlrpc_c::value_string(paramList.getString(0)); - - // Try to authenticate the user - uid = UserAuthenticate::upool->authenticate(session); - - if( uid == -1 ) - { - goto error_common; - } - - //Result - arrayData.push_back(xmlrpc_c::value_boolean( true )); - arrayData.push_back(xmlrpc_c::value_int(uid)); - arrayresult = new xmlrpc_c::value_array(arrayData); - - *retval = *arrayresult; - - delete arrayresult; - - return; - -error_common: - oss.str(authenticate_error(method_name)); - - arrayData.push_back(xmlrpc_c::value_boolean(false)); // FAILURE - arrayData.push_back(xmlrpc_c::value_string(authenticate_error(method_name))); - - NebulaLog::log("ReM",Log::ERROR,oss); - - xmlrpc_c::value_array arrayresult_error(arrayData); - - *retval = arrayresult_error; - return; -} - -/* -------------------------------------------------------------------------- */ -/* -------------------------------------------------------------------------- */ diff --git a/src/rm/SConstruct b/src/rm/SConstruct index b9f285550e..2bdab14e9f 100644 --- a/src/rm/SConstruct +++ b/src/rm/SConstruct @@ -60,7 +60,6 @@ source_files=[ 'RequestManagerUserAllocate.cc', 'RequestManagerUserDelete.cc', 'RequestManagerUserChangePassword.cc', - 'RequestManagerUserAuthenticate.cc', 'RequestManagerUserInfo.cc', 'RequestManagerUserPoolInfo.cc' ] diff --git a/src/vmm_mad/ssh/vmm_sshrc b/src/vmm_mad/ssh/vmm_sshrc index 59f2a2b128..b039809d7b 100644 --- a/src/vmm_mad/ssh/vmm_sshrc +++ b/src/vmm_mad/ssh/vmm_sshrc @@ -15,6 +15,6 @@ #--------------------------------------------------------------------------- # # To change the directory where the VMM scripts are copied on the remote node -# uncomment and change the path of IM_REMOTE_DIR +# uncomment and change the path of VMMM_REMOTE_DIR # #VMM_REMOTE_DIR=/tmp/ne_im_scripts