Did I find the right examples for you? yes no

All Samples(34)  |  Call(32)  |  Derive(0)  |  Import(2)

src/m/i/mistral-extra-0.0.2/examples/webhooks/api/controllers/resource.py   mistral-extra(Download)
LOG = logging.getLogger(__name__)
 
API_STATUS = wtypes.Enum(str, 'SUPPORTED', 'CURRENT', 'DEPRECATED')
 
 

src/m/i/mistral-extra-0.0.2/examples/webhooks/api/controllers/root.py   mistral-extra(Download)
LOG = logging.getLogger(__name__)
 
API_STATUS = wtypes.Enum(str, 'SUPPORTED', 'CURRENT', 'DEPRECATED')
 
 
class APIVersion(resource.Resource):
    """API Version."""
 
    id = wtypes.text
    status = API_STATUS

src/c/e/ceilometer-HEAD/ceilometer/api/controllers/v2.py   ceilometer(Download)
 
state_kind = ["ok", "alarm", "insufficient data"]
state_kind_enum = wtypes.Enum(str, *state_kind)
operation_kind = wtypes.Enum(str, 'lt', 'le', 'eq', 'ne', 'ge', 'gt')
 
    def __init__(self, name, *args, **kwargs):
        self._name = '_advenum_%s' % name
        self._default = kwargs.pop('default', None)
        mandatory = kwargs.pop('mandatory', False)
        enum = wtypes.Enum(*args, **kwargs)
    "The unique name for the meter"
 
    type = wtypes.Enum(str, *sample.TYPES)
    "The meter type (see :ref:`measurements`)"
 
    "The meter name this sample is for."
 
    type = wtypes.Enum(str, *sample.TYPES)
    "The meter type (see :ref:`measurements`)"
 

src/i/r/ironic-HEAD/ironic/api/controllers/v1/types.py   ironic(Download)
    path = wtypes.wsattr(wtypes.StringType(pattern='^(/[\w-]+)+$'),
                         mandatory=True)
    op = wtypes.wsattr(wtypes.Enum(str, 'add', 'replace', 'remove'),
                       mandatory=True)
    value = wtypes.text

src/l/i/libra-HEAD/libra/api/model/validators.py   libra(Download)
from wsme import types as wtypes
from wsme import wsattr
from wsme.types import Base, Enum
 
 
class LBNode(Base):
    port = wsattr(int, mandatory=True)
    address = wsattr(wtypes.text, mandatory=True)
    condition = Enum(wtypes.text, 'ENABLED', 'DISABLED')
    backup = Enum(wtypes.text, 'TRUE', 'FALSE')
class LBNodePut(Base):
    condition = Enum(wtypes.text, 'ENABLED', 'DISABLED')
    weight = int
 
 
    options = wsattr('LBOptions')
    protocol = wtypes.text
    algorithm = Enum(wtypes.text, 'ROUND_ROBIN', 'LEAST_CONNECTIONS')
    port = int
    virtualIps = wsattr(['LBVip'])

src/s/o/solum-HEAD/solum/api/controllers/root.py   solum(Download)
 
 
STATUS_KIND = wtypes.Enum(str, 'SUPPORTED', 'CURRENT', 'DEPRECATED')
 
 
    "The version identifier."
 
    status = STATUS_KIND
    "The status of the API (SUPPORTED, CURRENT or DEPRECATED)."
 

src/s/o/solum-HEAD/solum/api/controllers/v1/datamodel/sensor.py   solum(Download)
 
 
SENSOR_TYPE = wtypes.Enum(str, 'str', 'float', 'int')
 
 
    "Target resource URI to the sensor."
 
    sensor_type = SENSOR_TYPE
    "Sensor data type."
 

src/m/i/mistral-0.0.2/mistral/api/controllers/root.py   mistral(Download)
LOG = logging.getLogger(__name__)
 
API_STATUS = wtypes.Enum(str, 'SUPPORTED', 'CURRENT', 'DEPRECATED')
 
 
class APIVersion(resource.Resource):
    """API Version."""
 
    id = wtypes.text
    status = API_STATUS

src/l/i/libra-HEAD/libra/admin_api/model/validators.py   libra(Download)
from wsme import types as wtypes
from wsme import wsattr
from wsme.types import Base, Enum
 
 
class DevicePut(Base):
    status = Enum(wtypes.text, 'ONLINE', 'ERROR')
    statusDescription = wsattr(wtypes.text, mandatory=True)
 

src/w/s/WSME-0.6/wsme/tests/test_api.py   WSME(Download)
        class Version(object):
            number = types.Enum(str, 'v1', 'v2', None)
 
        class MyWS(WSRoot):
            @expose(str)
        class Version(object):
            number = types.Enum(str, 'v1', 'v2', None)
 
        class MyWS(WSRoot):
            @expose(str)
        class ComplexType(object):
            attr = wsme.types.wsattr(wsme.types.Enum(str, 'or', 'and'),
                                     default='and')
 
        class MyRoot(WSRoot):
        class Version(object):
            number = wsme.types.wsattr(wsme.types.Enum(str, 'v1', 'v2'),
                                       mandatory=True)
 
        class MyWS(WSRoot):

  1 | 2  Next