'validate': {'type:uuid': None},
'is_visible': True,
'primary_key': True},
- 'type': {'allow_post': True, 'allow_put': True, 'is_visible': True,
- 'default': '',
- 'validate': {'type:values': VALID_RULE_TYPES}},
'tenant_id': {'allow_post': True, 'allow_put': False,
'required_by_policy': True,
'is_visible': True},
fields = {
'id': obj_fields.UUIDField(),
+ #TODO(QoS): We ought to kill the `type' attribute
'type': obj_fields.StringField(),
'qos_policy_id': obj_fields.UUIDField()
}
post_data = self.serialize(
{'bandwidth_limit_rule': {
'max_kbps': max_kbps,
- 'max_burst_kbps': max_burst_kbps,
- 'type': 'bandwidth_limit'}})
+ 'max_burst_kbps': max_burst_kbps}
+ })
resp, body = self.post(uri, post_data)
self.expected_success(201, resp.status)
body = json.loads(body)
post_data = {
'bandwidth_limit_rule': {
'max_kbps': max_kbps,
- 'max_burst_kbps': max_burst_kbps,
- 'type': 'bandwidth_limit'}}
+ 'max_burst_kbps': max_burst_kbps}
+ }
resp, body = self.put(uri, json.dumps(post_data))
self.expected_success(200, resp.status)
return service_client.ResponseBody(resp, body)