wget -N $MONITOR_LOCATION

        if [ -f $MONITOR_FNAME ]; then
        echo "file downloaded successfully"
        echo "setting exec permissions"
        chmod +x $MONITOR_FNAME

        echo "Calling the monitor script now"
        python2 $MONITOR_FNAME $1 $2
        fi
    }

"""

region_list = SimpleVocabulary(
    [SimpleTerm(value=u'us-east-1', title=_(u'us-east-1')),
     SimpleTerm(value=u'us-west-1', title=_(u'us-west-1')),
     SimpleTerm(value=u'us-west-2', title=_(u'us-west-2'))]
    )

instance_type_list = SimpleVocabulary(
    [SimpleTerm(value=u't1.micro', title=_(u't1.micro'))]
)


# Interface class used to define content-type schema.
class IVirtualMachine(form.Schema, IImageScaleTraversable):
    """
    Specification of an EC2 instance
    """
Beispiel #2
0
from Products.CMFCore.utils import getToolByName

from plone.supermodel import model
from cs492.plonemodeling import MessageFactory as _

import string
import random

from cs492.plonemodeling.virtual_machine import IVirtualMachine
import json
from datetime import datetime

import logging

job_status_list = SimpleVocabulary(
    [SimpleTerm(value=u'Queued', title=_(u'Queued')),
     SimpleTerm(value=u'Failed', title=_(u'Failed')),
     SimpleTerm(value=u'Finished', title=_(u'Finished')),
     SimpleTerm(value=u'Running', title=_(u'Running')),
     SimpleTerm(value=u'Terminated', title=_(u'Terminated')),
     SimpleTerm(value=u'Pending', title=_(u'Pending'))]
    )

AUTH_TOKEN_LENGTH = 10


# Interface class; used to define content-type schema.
class IJob(model.Schema, IImageScaleTraversable):
    """
    Job which needs to be run on scientific model
    """