class ReceiverUpdateRequest(base.SenlinObject): fields = { 'identity': fields.StringField(), 'name': fields.NameField(nullable=True), 'action': fields.ClusterActionNameField(nullable=True), 'params': fields.JsonField(nullable=True, default={}) }
def setUp(self): super(TestClusterActionName, self).setUp() self.field = senlin_fields.ClusterActionNameField() self.coerce_good_values = [(action, action) for action in consts.CLUSTER_ACTION_NAMES] self.coerce_bad_values = ['BOGUS'] self.to_primitive_values = self.coerce_good_values[0:1] self.from_primitive_values = self.coerce_good_values[0:1]
class ReceiverCreateRequestBody(base.SenlinObject): fields = { 'name': fields.NameField(), 'type': fields.ReceiverTypeField(), 'cluster_id': fields.StringField(nullable=True), 'action': fields.ClusterActionNameField(nullable=True), 'actor': fields.JsonField(nullable=True, default={}), 'params': fields.JsonField(nullable=True, default={}) }