Example #1
0
class MonitorParameter(base.KosmosObject):

    VERSION = '1.0'

    fields = {
        'key': fields.StringField(nullable=False),
        'value': fields.StringField(nullable=True),
    }
Example #2
0
class KosmosOwnedObject(object):
    """Mixin class for objects owned by users.
    This adds the fields that we use in common for most object ownership.
    """
    fields = {
        'project_id': fields.StringField(),
        'domain_id': fields.StringField(),
    }
Example #3
0
class Pool(base.KosmosObject, base.KosmosOwnedObject,
           base.KosmosPersistentObject):

    VERSION = '1.0'

    fields = {
        'name': fields.StringField(),
        'description': fields.StringField(nullable=True),
        'members': fields.ListOfObjectsField('PoolMember', default=[]),
        'status': PoolStatus(),
        'action': fields.KosmosActions(),
    }
class TestObject(objects.base.KosmosObject):

    fields = {
        'text': kosmos_fields.StringField(),
        'uuid': kosmos_fields.UUIDField(),
        'int': kosmos_fields.IntegerField(),
        'read_only': kosmos_fields.StringField(read_only=True),
        'dns_zone_name': kosmos_fields.DNSZoneName(),
        'dns_fqdn': kosmos_fields.DNSFQDN(),
        'pool_member_type': kosmos_fields.PoolMemberType(),
        'monitor_type': kosmos_fields.MonitorType(),
        'enum': TestPreDefinedEnumType()
    }
Example #5
0
class LoadBalancer(base.KosmosObject, base.KosmosOwnedObject,
                   base.KosmosPersistentObject):

    VERSION = '1.0'

    fields = {
        'name': fields.StringField(),
        'description': fields.StringField(nullable=True),
        'fqdn': fields.DNSFQDN(),
        'zone_name': fields.DNSZoneName(),
        'flavor': fields.UUIDField(),
        'appliance_id': fields.StringField(),
        'pool': fields.ObjectField('Pool'),
        'status': LoadBalancerStatus(),
        'action': fields.KosmosActions(),
    }
Example #6
0
class Monitor(base.KosmosObject, base.KosmosOwnedObject,
              base.KosmosPersistentObject):

    VERSION = '1.0'

    fields = {
        'name': fields.StringField(),
        'description': fields.StringField(nullable=True),
        'type': fields.MonitorType(),
        'target': fields.StringField(),
        'auth': fields.BooleanField(),
        'parameters': fields.ListOfObjectsField('MonitorParameter',
                                                default=[]),
        'status': MonitorStatus(),
        'action': fields.KosmosActions(),
    }