예제 #1
0
class PredicateResult(Names):
    """
    Predicate results.
    """
    yes = NamedConstant()    # Log this
    no = NamedConstant()     # Don't log this
    maybe = NamedConstant()  # No opinion
예제 #2
0
class ENGINE(Names):
    """Constants representing different ENGINE options
    """

    NATIVE = NamedConstant()  # what is configured
    INMEMORY = NamedConstant()  # in memory SQLite
    PERSISTENT = NamedConstant()  # persistent SQLite
예제 #3
0
 class VolumeEndStateTypes(Names):
     """
     Types of volume states to simulate.
     """
     ERROR_STATE = NamedConstant()
     TRANSIT_STATE = NamedConstant()
     DESTINATION_STATE = NamedConstant()
예제 #4
0
class MISSION_STATUS(Names):
    """
    Constants representing various mission status codes.
    """
    NOT_LOADED = NamedConstant()
    LOADED = NamedConstant()
    PLAYING = NamedConstant()
예제 #5
0
파일: model.py 프로젝트: stephamon/otter
class StepResult(Names):
    """
    Constants representing the condition of a step's effect.
    """

    SUCCESS = NamedConstant()
    """
    The step was successful.
    """

    RETRY = NamedConstant()
    """
    Convergence should be retried later.
    """

    LIMITED_RETRY = NamedConstant()
    """
    Converge should be retried, but only a limited number of times.

    This is used when we're waiting for upstream resources to become available
    but aren't certain that they ever will be.
    """

    FAILURE = NamedConstant()
    """
예제 #6
0
class MoreNamedLetters(Names):
    """
    Some more letters, named.
    """

    digamma = NamedConstant()
    zeta = NamedConstant()
예제 #7
0
class NamedLetters(Names):
    """
    Some letters, named.
    """

    alpha = NamedConstant()
    beta = NamedConstant()
예제 #8
0
class FieldName(Names):
    dn = NamedConstant()
    dn.description = u"distinguished name"

    memberDNs = NamedConstant()
    memberDNs.description = u"member DNs"
    memberDNs.multiValue = True
예제 #9
0
class States(Names):
    # The worker isn't attached, or is in the process of attaching.
    DETACHED = NamedConstant()
    # The worker is available to build: either attached, or a latent worker.
    AVAILABLE = NamedConstant()
    # The worker is building.
    BUILDING = NamedConstant()
예제 #10
0
class TestFieldName(Names):
    isAwesome = NamedConstant()
    isAwesome.description = u"is awesome"
    isAwesome.valueType = bool

    isCool = NamedConstant()
    isCool.description = u"is cool"
    isCool.valueType = bool
예제 #11
0
class Color(Names):
    """
    Some colors.
    """
    red = NamedConstant()
    green = NamedConstant()
    blue = NamedConstant()
    black = NamedConstant()
예제 #12
0
파일: ebs.py 프로젝트: jongiddy/flocker
class VolumeOperations(Names):
    """
    Supported EBS backend operations on a volume.
    """
    CREATE = NamedConstant()
    ATTACH = NamedConstant()
    DETACH = NamedConstant()
    DESTROY = NamedConstant()
예제 #13
0
class PILOT_STATE(Names):
    """
    Constants representing pilot states.
    """
    IDLE = NamedConstant()
    SPAWNED = NamedConstant()
    IN_FLIGHT = NamedConstant()
    DEAD = NamedConstant()
예제 #14
0
class SESSION_STATE(Names):
    """
    Constants representing Session States
    """
    CONNECTING = NamedConstant()
    OPEN = NamedConstant()
    CLOSING = NamedConstant()
    CLOSED = NamedConstant()
예제 #15
0
class ProviderType(Names):
    """
    Kinds of compute/storage cloud providers for which this module is able to
    build ``IBlockDeviceAPI`` providers.
    """
    openstack = NamedConstant()
    aws = NamedConstant()
    rackspace = NamedConstant()
예제 #16
0
class Angles(Names):
    """
    The types of angles.
    """
    LATITUDE = NamedConstant()
    LONGITUDE = NamedConstant()
    HEADING = NamedConstant()
    VARIATION = NamedConstant()
예제 #17
0
class Directions(Names):
    """
    The four cardinal directions (north, east, south, west).
    """
    NORTH = NamedConstant()
    EAST = NamedConstant()
    SOUTH = NamedConstant()
    WEST = NamedConstant()
예제 #18
0
 class VolumeAttachDataTypes(Names):
     """
     Types of volume's attach data states to simulate.
     """
     MISSING_ATTACH_DATA = NamedConstant()
     MISSING_INSTANCE_ID = NamedConstant()
     MISSING_DEVICE = NamedConstant()
     ATTACH_SUCCESS = NamedConstant()
     DETACH_SUCCESS = NamedConstant()
예제 #19
0
 class METHOD(Names):
     """
     A container for some named constants to use in unit tests for
     L{Names}.
     """
     GET = NamedConstant()
     PUT = NamedConstant()
     POST = NamedConstant()
     DELETE = NamedConstant()
예제 #20
0
class Operand(Names):
    """
    Contants for common operands.
    """
    OR = NamedConstant()
    AND = NamedConstant()

    OR.description = u"or"
    AND.description = u"and"
예제 #21
0
파일: _loop.py 프로젝트: jongiddy/flocker
class ConvergenceLoopOutputs(Names):
    """
    Converence loop FSM outputs.
    """
    # Store AMP client, desired configuration and cluster state for later
    # use:
    STORE_INFO = NamedConstant()
    # Start an iteration of the covergence loop:
    CONVERGE = NamedConstant()
예제 #22
0
class _CONTROLS(Names):
    """
    Control frame specifiers.
    """

    NORMAL = NamedConstant()
    CLOSE = NamedConstant()
    PING = NamedConstant()
    PONG = NamedConstant()
예제 #23
0
class ProtocolVersion(Names):
    """
    L{ProtocolVersion} provides constants representing each version of the
    SSL/TLS protocol.
    """
    SSLv2 = NamedConstant()
    SSLv3 = NamedConstant()
    TLSv1_0 = NamedConstant()
    TLSv1_1 = NamedConstant()
    TLSv1_2 = NamedConstant()
예제 #24
0
 def test_nonequality(self):
     """
     Two different L{NamedConstant} instances do not compare equal to each
     other.
     """
     first = NamedConstant()
     first._realize(self.container, "bar", None)
     second = NamedConstant()
     second._realize(self.container, "bar", None)
     self.assertFalse(first == second)
     self.assertTrue(first != second)
예제 #25
0
파일: _loop.py 프로젝트: jongiddy/flocker
class ConvergenceLoopStates(Names):
    """
    Convergence loop FSM states.
    """
    # The loop is stopped:
    STOPPED = NamedConstant()
    # Local state is being discovered and changes applied:
    CONVERGING = NamedConstant()
    # Local state is being converged, and once that is done we will
    # immediately stop:
    CONVERGING_STOPPING = NamedConstant()
예제 #26
0
 def test_hash(self):
     """
     Because two different L{NamedConstant} instances do not compare as equal
     to each other, they also have different hashes to avoid collisions when
     added to a C{dict} or C{set}.
     """
     first = NamedConstant()
     first._realize(self.container, "bar", None)
     second = NamedConstant()
     second._realize(self.container, "bar", None)
     self.assertNotEqual(hash(first), hash(second))
예제 #27
0
파일: _loop.py 프로젝트: jongiddy/flocker
class ClusterStatusOutputs(Names):
    """
    Outputs of the cluster status state machine.
    """
    # Store the AMP protocol instance connected to the server:
    STORE_CLIENT = NamedConstant()
    # Notify the convergence loop state machine of new cluster status:
    UPDATE_STATUS = NamedConstant()
    # Stop the convergence loop state machine:
    STOP = NamedConstant()
    # Disconnect the AMP client:
    DISCONNECT = NamedConstant()
예제 #28
0
파일: _loop.py 프로젝트: jongiddy/flocker
class ClusterStatusStates(Names):
    """
    States of the cluster status state machine.
    """
    # The client is currently disconnected:
    DISCONNECTED = NamedConstant()
    # The client is connected, we don't know cluster status:
    IGNORANT = NamedConstant()
    # The client is connected and we know the cluster status:
    KNOWLEDGEABLE = NamedConstant()
    # The system is shut down:
    SHUTDOWN = NamedConstant()
예제 #29
0
파일: _loop.py 프로젝트: jongiddy/flocker
class ClusterStatusInputs(Names):
    """
    Inputs to the cluster status state machine.
    """
    # The client has connected to the control service:
    CONNECTED_TO_CONTROL_SERVICE = NamedConstant()
    # A status update has been received from the control service:
    STATUS_UPDATE = NamedConstant()
    # THe client has disconnected from the control service:
    DISCONNECTED_FROM_CONTROL_SERVICE = NamedConstant()
    # The system is shutting down:
    SHUTDOWN = NamedConstant()
예제 #30
0
파일: _loop.py 프로젝트: jongiddy/flocker
class ConvergenceLoopInputs(Names):
    """
    Inputs for convergence loop FSM.
    """
    # Updated references to latest AMP client, desired configuration and
    # cluster state:
    STATUS_UPDATE = NamedConstant()
    # Stop the convergence loop:
    STOP = NamedConstant()
    # Finished applying necessary changes to local state, a single
    # iteration of the convergence loop:
    ITERATION_DONE = NamedConstant()