lib/vagrant-vcloud/action/disconnect_vcloud.rb in vagrant-vcloud-0.1.2 vs lib/vagrant-vcloud/action/disconnect_vcloud.rb in vagrant-vcloud-0.2.0

- old
+ new

@@ -2,29 +2,31 @@ module VCloud module Action class DisconnectVCloud def initialize(app, env) @app = app - @logger = Log4r::Logger.new("vagrant_vcloud::action::disconnect_vcloud") + @logger = Log4r::Logger.new( + 'vagrant_vcloud::action::disconnect_vcloud' + ) end def call(env) begin - @logger.info("Disconnecting from vCloud Director...") + @logger.info('Disconnecting from vCloud Director...') - # Fetch the global vCloud Director connection handle + # Fetch the global vCloud Director connection handle cnx = env[:machine].provider_config.vcloud_cnx.driver # Delete the current vCloud Director Session cnx.logout # If session key doesn't exist, we are disconnected if !cnx.auth_key - @logger.info("Disconnected from vCloud Director successfully!") + @logger.info('Disconnected from vCloud Director successfully!') end rescue Exception => e - #raise a properly namespaced error for Vagrant + # Raise a properly namespaced error for Vagrant raise Errors::VCloudError, :message => e.message end end end end