archive/v1/client/method.js
function(resolve, reject) {
			var fn = _client.client.VimService.VimPort[name];
			fn(args, function(err, result, raw, soapHeader) {
				if (err) {
					
					// emit an error and handle the error
					_client.emit('method.error', err);
					_client.errorHandler(err, name, args, resolve, reject);
				}
				else {
					_client.retry = 0;
					
					// emit an event and resolve the output
					_client.emit('method.result', result);
					resolve(_.get(result, 'returnval'));
				}
			});
		}
function(resolve, reject) {
			var fn = _client.client.VimService.VimPort[name];
			fn(args, function(err, result, raw, soapHeader) {
				if (err) {
					
					// emit an error and handle the error
					_client.emit('method.error', err);
					_client.errorHandler(err, name, args, resolve, reject);
				}
				else {
					_client.retry = 0;
					
					// emit an event and resolve the output
					_client.emit('method.result', result);
					resolve(_.get(result, 'returnval'));
				}
			});
		}
function ( resolve , reject ) { var fn = _client . client . VimService . VimPort [ name ] ; fn ( args , function ( err , result , raw , soapHeader ) { if ( err ) { // emit an error and handle the error _client . emit ( 'method.error' , err ) ; _client . errorHandler ( err , name , args , resolve , reject ) ; } else { _client . retry = 0 ; // emit an event and resolve the output _client . emit ( 'method.result' , result ) ; resolve ( _ . get ( result , 'returnval' ) ) ; } } ) ; }
executes the function
executes the function