@@ -24,9 +24,6 @@ const PROGRESS_PREFIX = 'CLOUD_INSTALL_PROGRESS';
2424// Prefix for status updates.
2525const STATUS_PREFIX = 'CLOUD_INSTALL_STATUS' ;
2626
27- // Status indicating that the installer has been canceled.
28- const CANCELED_STATUS = 'CANCELED' ;
29-
3027// Retry timing for SSH connection establishment.
3128const INITIAL_CONNECTION_INTERVAL_MS = 500 ;
3229const MAX_CONNECTION_INTERVAL_MS = 10000 ;
@@ -36,7 +33,6 @@ const MAX_CONNECTION_INTERVAL_MS = 10000;
3633// so that we have fewer paths to test.
3734class CloudInstaller {
3835 constructor ( private dispatchEvent_ : ( name : string , args : Object ) => void ) { }
39- private status_ :string = undefined ;
4036
4137 // Runs the install command via SSH, resolving with the invitation URL.
4238 public install = (
@@ -58,10 +54,6 @@ class CloudInstaller {
5854
5955 let numAttempts = 0 ;
6056 return promises . retryWithExponentialBackoff ( ( ) => {
61- if ( this . status_ === CANCELED_STATUS ) {
62- log . debug ( 'Canceling cloud installer...' ) ;
63- return Promise . reject ( new Error ( 'canceled' ) ) ;
64- }
6557 log . debug ( 'connection attempt %1...' , ( ++ numAttempts ) ) ;
6658 return new Promise < string > ( ( F , R ) => {
6759 const connection = new Client ( ) ;
@@ -93,7 +85,6 @@ class CloudInstaller {
9385 this . dispatchEvent_ ( 'progress' , progress ) ;
9486 }
9587 } else if ( line . indexOf ( STATUS_PREFIX ) === 0 ) {
96- this . status_ = line ;
9788 this . dispatchEvent_ ( 'status' , line ) ;
9889 }
9990 } ) ;
@@ -146,10 +137,6 @@ class CloudInstaller {
146137 } ) ;
147138 } , MAX_CONNECTION_INTERVAL_MS , INITIAL_CONNECTION_INTERVAL_MS ) ;
148139 }
149-
150- public cancel = ( ) : void => {
151- this . status_ = CANCELED_STATUS ;
152- }
153140}
154141
155142export = CloudInstaller ;
0 commit comments