Return-Path: Delivered-To: apmail-incubator-deltacloud-commits-archive@minotaur.apache.org Received: (qmail 20975 invoked from network); 8 Jul 2010 23:22:22 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Jul 2010 23:22:22 -0000 Received: (qmail 60679 invoked by uid 500); 8 Jul 2010 23:22:22 -0000 Delivered-To: apmail-incubator-deltacloud-commits-archive@incubator.apache.org Received: (qmail 60661 invoked by uid 500); 8 Jul 2010 23:22:22 -0000 Mailing-List: contact deltacloud-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: deltacloud-dev@incubator.apache.org Delivered-To: mailing list deltacloud-commits@incubator.apache.org Received: (qmail 60654 invoked by uid 99); 8 Jul 2010 23:22:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jul 2010 23:22:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jul 2010 23:22:19 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 066B02388BB6; Thu, 8 Jul 2010 23:21:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r962078 - /incubator/deltacloud/trunk/drivers/rhevm/lib/rhevm_driver.rb Date: Thu, 08 Jul 2010 23:21:25 -0000 To: deltacloud-commits@incubator.apache.org From: lutter@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100708232126.066B02388BB6@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: lutter Date: Thu Jul 8 23:21:25 2010 New Revision: 962078 URL: http://svn.apache.org/viewvc?rev=962078&view=rev Log: Hook credentials up. Modified: incubator/deltacloud/trunk/drivers/rhevm/lib/rhevm_driver.rb Modified: incubator/deltacloud/trunk/drivers/rhevm/lib/rhevm_driver.rb URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/drivers/rhevm/lib/rhevm_driver.rb?rev=962078&r1=962077&r2=962078&view=diff ============================================================================== --- incubator/deltacloud/trunk/drivers/rhevm/lib/rhevm_driver.rb (original) +++ incubator/deltacloud/trunk/drivers/rhevm/lib/rhevm_driver.rb Thu Jul 8 23:21:25 2010 @@ -38,7 +38,10 @@ class RHEVMDriver < DeltaCloud::BaseDriv end def genArgString(credentials, args) - commonArgs = [SCRIPT_DIR_ARG, "vdcadmin", "123456", "demo"] + if ( credentials[:name].nil? || credentials[:password].nil? || credentials[:name] == '' || credentials[:password] == '' ) + raise DeltaCloud::AuthException.new + end + commonArgs = [SCRIPT_DIR_ARG, credentials[:name], credentials[:password], "demo"] commonArgs.concat(args) commonArgs.join(" ") end @@ -191,8 +194,8 @@ class RHEVMDriver < DeltaCloud::BaseDriv def create_instance(credentials, image_id, opts) name = opts[:name] - name ||= "New Instance" - vm = execute(credentials, "addVm.ps1", image_id, opts[:name], opts[:realm_id]) + name = "NewInstance" if (name.nil? or name.empty?) + vm = execute(credentials, "addVm.ps1", image_id, name, opts[:realm_id]) vm_to_instance(vm[0]) end