File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 799799 }
800800 }
801801
802+ //Scale Up Policy
803+ if ( args . data . scaleUpDuration == null || args . data . scaleUpDuration . length == 0 ) {
804+ args . response . error ( "Duration of Scale Up Policy is required." ) ;
805+ return ;
806+ }
802807 if ( args . data . scaleUpDuration < args . data . interval ) {
803808 args . response . error ( "Duration of Scale Up Policy can not be less than Polling Interval." ) ;
804809 return ;
810+ }
811+ if ( scaleUpData . length == 0 ) {
812+ args . response . error ( "At least one condition is required in Scale Up Policy." ) ;
813+ return ;
814+ }
815+
816+ //Scale Down Policy
817+ if ( args . data . scaleDownDuration == null || args . data . scaleDownDuration . length == 0 ) {
818+ args . response . error ( "Duration of Scale Down Policy is required." ) ;
819+ return ;
805820 }
806821 if ( args . data . scaleDownDuration < args . data . interval ) {
807822 args . response . error ( "Duration of Scale Down Policy can not be less than Polling Interval." ) ;
808823 return ;
809- }
824+ }
825+ if ( scaleDownData . length == 0 ) {
826+ args . response . error ( "At least one condition is required in Scale Down Policy." ) ;
827+ return ;
828+ }
810829 //validation (end) *****
811830
812831 var scaleVmProfileResponse = [ ] ;
You can’t perform that action at this time.
0 commit comments