@@ -47,31 +47,26 @@ Server.prototype._setProperties = function (details) {
4747 case 'BUSYROLE' :
4848 case 'INITIALIZING' :
4949 case 'BUSY' :
50- this . status = 'PROVISIONING' ;
50+ this . status = this . STATUS . provisioning ;
5151 break ;
5252 case 'READYROLE' :
5353 case 'READY' :
54- this . status = 'RUNNING' ;
54+ this . status = this . STATUS . running ;
5555 break ;
5656 case 'STOPPING' :
5757 case 'STOPPED' :
5858 case 'STOPPINGROLE' :
5959 case 'STOPPINGVM' :
6060 case 'STOPPEDVM' :
61- this . status = 'STOPPED' ;
62- break ;
63- case 'STOPPINGROLE' :
64- case 'STOPPINGVM' :
65- case 'STOPPEDVM' :
66- this . status = 'STOPPED' ;
61+ this . status = this . STATUS . stopped ;
6762 break ;
6863 case 'DELETINGVM' :
69- this . status = 'TERMINATED' ;
64+ this . status = this . STATUS . terminated ;
7065 break ;
7166 case 'ROLESTATEUNKNOWN' :
7267 case 'UNKNOWN' :
7368 default :
74- this . status = 'UNKNOWN' ;
69+ this . status = this . STATUS . unknown ;
7570 break ;
7671 }
7772
@@ -81,25 +76,25 @@ Server.prototype._setProperties = function (details) {
8176 case 'DEPLOYING' :
8277 case 'PROVISIONING' :
8378 case 'RUNNINGTRANSITIONING' :
84- this . status = 'PROVISIONING' ;
79+ this . status = this . STATUS . provisioning ;
8580 break ;
8681 case 'RUNNING' :
87- this . status = 'RUNNING' ;
82+ this . status = this . STATUS . running ;
8883 break ;
8984 case 'SUSPENDING' :
9085 case 'SUSPENDED' :
9186 case 'SUSPENDEDTRANSITIONING' :
92- this . status = 'STOPPED' ;
87+ this . status = this . STATUS . stopped ;
9388 break ;
9489 case 'DELETING' :
95- this . status = 'TERMINATED' ;
90+ this . status = this . STATUS . terminated ;
9691 break ;
9792 default :
98- this . status = 'UNKNOWN' ;
93+ this . status = this . STATUS . unknown ;
9994 break ;
10095 }
10196 } else {
102- this . status = 'UNKNOWN' ;
97+ this . status = this . STATUS . unknown ;
10398 }
10499
105100 var addresses = { private : [ ] , public : [ ] } ;
0 commit comments