So if it is defined un the configuration, because it is supported, it is
used. And if it is not defined it is skipped.
This is not very elegant but we need a working code not an elegant code.

Ricardo

-- Sent from my mobile, please excuse typos --
El 04/04/2014 22:54, "myco" <notifications@github.com> escribió:

> In WorkloadManagementSystem/Client/AmazonImage.py:
>
> >      try:
> > -      reservation = self.__vmImage.run( min_count = numImages,
> > +      if self.imageConfig[ 'contextMethod' ] == 'amiconfig':
> > +        userDataPath = self.imageConfig[ 'contextConfig' ].get( 'ex_userdata', None )
> > +        keyname  = self.imageConfig[ 'contextConfig' ].get( 'ex_keyname' , None )
> > +        userData = ""
> > +        with open( userDataPath, 'r' ) as userDataFile:
> > +          userData = ''.join( userDataFile.readlines() )
> > +        reservation = self.__vmImage.run( min_count = numImages,
> > +                                        max_count = numImages,
> > +                                        user_data = userData,
> > +                                        key_name = keyname,
> > +                                        instance_type = instanceType )
>
> Can be optional. Private clouds still have problems to support it
> correctly, but we could operate it optional.
> Maybe new feature branch for this, to refactor whole startInstances method.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/DIRACGrid/VMDIRAC/pull/70/files#r11313313>
> .
>