We were reading or setting the correct attributes for the public and private certs on the edit user page. Read the correct cert value, and set up the attributes hash to contain the data that cloud_account.update_attributes expects.
Signed-off-by: Chris Lalancette <[email protected]> --- src/app/controllers/cloud_accounts_controller.rb | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/controllers/cloud_accounts_controller.rb b/src/app/controllers/cloud_accounts_controller.rb index 0d8ef57..47863d6 100644 --- a/src/app/controllers/cloud_accounts_controller.rb +++ b/src/app/controllers/cloud_accounts_controller.rb @@ -74,17 +74,19 @@ class CloudAccountsController < ApplicationController attributes.delete :password end @cloud_account.quota.maximum_running_instances = quota_from_string(params[:quota][id][:maximum_running_instances]) - private_cert = attributes[:x509_cert_priv] + private_cert = attributes[:x509_cert_priv_file] if private_cert.nil? attributes.delete :x509_cert_priv else attributes[:x509_cert_priv] = private_cert.read + attributes.delete :x509_cert_priv_file end - public_cert = attributes[:x509_cert_pub] + public_cert = attributes[:x509_cert_pub_file] if public_cert.nil? attributes.delete :x509_cert_pub else attributes[:x509_cert_pub] = public_cert.read + attributes.delete :x509_cert_pub_file end @cloud_account.update_attributes!(attributes) @cloud_account.quota.save! -- 1.7.2.3 _______________________________________________ deltacloud-devel mailing list [email protected] https://fedorahosted.org/mailman/listinfo/deltacloud-devel
