Skip to content

Commit

Permalink
Merge pull request #111 from mansam/trim-cloud-tenant-fog-errors
Browse files Browse the repository at this point in the history
Trim error messages out of cloud tenant fog responses
  • Loading branch information
aufi authored Oct 12, 2017
2 parents abe951a + 4089aeb commit ba17870
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class ManageIQ::Providers::Openstack::CloudManager::CloudTenant < ::CloudTenant
extend ManageIQ::Providers::Openstack::HelperMethods
has_and_belongs_to_many :miq_templates,
:foreign_key => "cloud_tenant_id",
:join_table => "cloud_tenants_vms",
Expand All @@ -16,7 +17,7 @@ def self.raw_create_cloud_tenant(ext_management_system, options)
{:ems_ref => tenant.id, :name => options[:name]}
rescue => e
_log.error "tenant=[#{options[:name]}], error: #{e}"
raise MiqException::MiqCloudTenantCreateError, e.to_s, e.backtrace
raise MiqException::MiqCloudTenantCreateError, parse_error_message_from_fog_response(e), e.backtrace
end

def raw_update_cloud_tenant(options)
Expand All @@ -25,7 +26,7 @@ def raw_update_cloud_tenant(options)
end
rescue => e
_log.error "tenant=[#{name}], error: #{e}"
raise MiqException::MiqCloudTenantUpdateError, e.to_s, e.backtrace
raise MiqException::MiqCloudTenantUpdateError, parse_error_message_from_fog_response(e), e.backtrace
end

def raw_delete_cloud_tenant
Expand All @@ -34,7 +35,7 @@ def raw_delete_cloud_tenant
end
rescue => e
_log.error "tenant=[#{name}], error: #{e}"
raise MiqException::MiqCloudTenantDeleteError, e.to_s, e.backtrace
raise MiqException::MiqCloudTenantDeleteError, parse_error_message_from_fog_response(e), e.backtrace
end

def self.connection_options
Expand Down

0 comments on commit ba17870

Please sign in to comment.