Sha256: d04f642b017640a4483204fba7e2e54417fd7980777002678596f3be52d258b7
Contents?: true
Size: 972 Bytes
Versions: 15
Compression:
Stored size: 972 Bytes
Contents
module VagrantPlugins module VCloud module Action class DisconnectVCloud def initialize(app, env) @app = app @logger = Log4r::Logger.new( 'vagrant_vcloud::action::disconnect_vcloud' ) end def call(env) begin @logger.info('Disconnecting from vCloud Director...') # 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!') end rescue Exception => e # Raise a properly namespaced error for Vagrant raise Errors::VCloudError, :message => e.message end end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems