 < ? x m l   v e r s i o n = ' 1 . 0 '   e n c o d i n g = ' U T F - 8 ' ? > 
 < w o r k f l o w   x m l n s = " h t t p : / / v m w a r e . c o m / v c o / w o r k f l o w "   x m l n s : x s i = " h t t p : / / w w w . w 3 . o r g / 2 0 0 1 / X M L S c h e m a - i n s t a n c e "   x s i : s c h e m a L o c a t i o n = " h t t p : / / v m w a r e . c o m / v c o / w o r k f l o w   h t t p : / / v m w a r e . c o m / v c o / w o r k f l o w / W o r k f l o w - v 4 . x s d "   r o o t - n a m e = " i t e m 2 "   o b j e c t - n a m e = " w o r k f l o w : n a m e = g e n e r i c "   i d = " a 0 8 1 1 1 9 2 - b b 5 b - 4 4 7 4 - a 5 1 4 - 3 4 2 c 1 6 7 0 5 a d a "   v e r s i o n = " 0 . 0 . 0 "   a p i - v e r s i o n = " 6 . 0 . 0 "   a l l o w e d - o p e r a t i o n s = " v f e "   e d i t o r - v e r s i o n = " 2 . 0 "   r e s t a r t M o d e = " 1 "   r e s u m e F r o m F a i l e d M o d e = " 0 " > 
     < d i s p l a y - n a m e > < ! [ C D A T A [ U p d a t e   C l o u d   A c c o u n t   C e r t i f i c a t e ] ] > < / d i s p l a y - n a m e > 
     < p o s i t i o n   y = " 5 0 . 0 "   x = " 1 0 0 . 0 " / > 
     < i n p u t > 
         < p a r a m   n a m e = " v r a H o s t "   t y p e = " V R A : H o s t " > 
             < d e s c r i p t i o n > < ! [ C D A T A [ T e n a n t   a d m i n   h o s t ] ] > < / d e s c r i p t i o n > 
         < / p a r a m > 
         < p a r a m   n a m e = " c l o u d A c c o u n t s D a t a "   t y p e = " A r r a y / C o m p o s i t e T y p e ( n a m e : s t r i n g , i d : s t r i n g , e n d p o i n t F Q D N : s t r i n g , e n d p o i n t U s e r : s t r i n g , e n d p o i n t U s e r P a s s w o r d : S e c u r e S t r i n g ) : C l o u d A c c o u n t D a t a " / > 
     < / i n p u t > 
     < w o r k f l o w - i t e m   n a m e = " i t e m 0 "   t y p e = " e n d "   e n d - m o d e = " 0 " > 
         < i n - b i n d i n g / > 
         < p o s i t i o n   y = " 5 0 . 0 "   x = " 5 2 0 . 0 " / > 
     < / w o r k f l o w - i t e m > 
     < w o r k f l o w - i t e m   n a m e = " i t e m 2 "   o u t - n a m e = " i t e m 0 "   t y p e = " t a s k " > 
         < d i s p l a y - n a m e > < ! [ C D A T A [ U p d a t e   C l o u d   A c c o u n t s   C e r t i f i c a t e ] ] > < / d i s p l a y - n a m e > 
         < s c r i p t   e n c o d e d = " f a l s e " > < ! [ C D A T A [ v a r   u p d a t e d C l o u d A c c o u n t s   =   [ ] 
 c l o u d A c c o u n t s D a t a . f o r E a c h ( f u n c t i o n   ( c a D a t a )   { 
         i f   ( c a D a t a . e n d p o i n t U s e r P a s s w o r d   ! =   n u l l   & &   c a D a t a . e n d p o i n t U s e r P a s s w o r d . l e n g t h   >   0 )   { 
                 v a r   e r r o r   =   n u l l 
                 t r y   { 
                         S y s t e m . l o g ( " U p d a t e   c e r t i f i c a t e   o f   c l o u d   a c c o u n t :   "   +   c a D a t a . n a m e ) ; 
                         S y s t e m . l o g ( " \ t G e t   e n d p o i n t   "   +   c a D a t a . e n d p o i n t F Q D N   +   "   c e r t i f i c a t e " ) 
                         / /   G e t   v s p h e r e   s e r v e r   c e r t i f i c a t e 
                         v a r   c e r t i f i c a t e   =   S y s t e m . g e t M o d u l e ( " v r a . b r o a d c o m . n e t " ) . g e t V s p h e r e S e r v e r C e r t i f i c a t e ( c a D a t a . e n d p o i n t F Q D N ,   ' 4 4 3 ' ) ; 
                         S y s t e m . l o g ( " \ t U p d a t e   c l o u d   a c c o u n t   "   +   c a D a t a . n a m e ) 
                         / /   U p d a t e   c l o u d   a c c o u n t   c e r t i f i c a t e 
                         S y s t e m . g e t M o d u l e ( " c o m . v m w a r e . v r a . e x t e n s i b i l i t y . p l u g i n . r e s t . i a a s " ) . u p d a t e C l o u d A c c o u n t V s p h e r e C e r t i f i c a t e ( v r a H o s t ,   c a D a t a . i d ,   c a D a t a . e n d p o i n t U s e r ,   c a D a t a . e n d p o i n t U s e r P a s s w o r d ,   c e r t i f i c a t e ) ; 
                         S y s t e m . l o g ( " \ t C l o u d   a c c o u n t   "   +   c a D a t a . n a m e   +   "   u p d a t e d   s u c c e s s f u l l y " ) 
                 }   c a t c h   ( e x )   { 
                         S y s t e m . e r r o r ( e x ) 
                         e r r o r   =   e x ; 
                 } 
                 u p d a t e d C l o u d A c c o u n t s . p u s h ( { 
                         " n a m e " :   c a D a t a . n a m e , 
                         " s t a t u s " :   e r r o r   ! =   n u l l   ?   " f a i l e d "   :   " p a s s e d " , 
                         " e r r o r " :   e r r o r 
                 } ) 
 
 
         }   e l s e   { 
                 S y s t e m . w a r n ( " S k i p   c l o u d   a c c o u n t   u p d a t e :   m i s s i n g   e n d p o i n t   c r e d e n t i a l s   f o r   c l o u d   a c c o u n t :   "   +   c a D a t a . n a m e ) ; 
                 u p d a t e d C l o u d A c c o u n t s . p u s h ( { 
                         " n a m e " :   c a D a t a . n a m e , 
                         " s t a t u s " :   " s k i p p e d " 
                 } ) 
         } 
 } ) 
 
 S y s t e m . l o g ( " " ) 
 S y s t e m . l o g ( " * * * * * * * * * * * * *   S u m m a r y   * * * * * * * * * * * * * " ) 
 u p d a t e d C l o u d A c c o u n t s . f o r E a c h ( f u n c t i o n   ( r e s u l t )   { 
         S y s t e m . l o g ( " C l o u d   a c c o u n t               "   +   r e s u l t . n a m e ) 
         S y s t e m . l o g ( " R e q u e s t   s t a t u s             "   +   r e s u l t . s t a t u s ) 
         i f   ( r e s u l t . s t a t u s   = =   " f a i l e d " )   { 
                 S y s t e m . l o g ( " R e q u e s t   e r r o r               "   +   r e s u l t . e r r o r ) 
         } 
         S y s t e m . l o g ( " " ) 
 } ) 
 
 S y s t e m . l o g ( " C l o s e   t h e   C l o u d   A c c o u n t   i f   i t   i s   o p e n   i n   t h e   U I ,   t h e n   v a l i d a t e   t h e   h e a l t h   o f   t h e   C l o u d   A c c o u n t .   T h i s   m a y   t a k e   1 0   m i n u t e s   t o   f i n i s h   t h e   d a t a   c o l l e c t i o n . " ) 
 
 ] ] > < / s c r i p t > 
         < i n - b i n d i n g > 
             < b i n d   n a m e = " v r a H o s t "   t y p e = " V R A : H o s t "   e x p o r t - n a m e = " v r a H o s t " / > 
             < b i n d   n a m e = " c l o u d A c c o u n t s D a t a "   t y p e = " A r r a y / C o m p o s i t e T y p e ( n a m e : s t r i n g , i d : s t r i n g , e n d p o i n t F Q D N : s t r i n g , e n d p o i n t U s e r : s t r i n g , e n d p o i n t U s e r P a s s w o r d : S e c u r e S t r i n g ) : C l o u d A c c o u n t D a t a "   e x p o r t - n a m e = " c l o u d A c c o u n t s D a t a " / > 
         < / i n - b i n d i n g > 
         < o u t - b i n d i n g / > 
         < d e s c r i p t i o n > < ! [ C D A T A [ S i m p l e   t a s k   w i t h   c u s t o m   s c r i p t   c a p a b i l i t y . ] ] > < / d e s c r i p t i o n > 
         < p o s i t i o n   y = " 6 0 . 0 "   x = " 2 6 0 . 0 " / > 
     < / w o r k f l o w - i t e m > 
     < p r e s e n t a t i o n / > 
 < / w o r k f l o w >