Merge "Fix resource schemas and releated `get_sorts` test cases" into stable/rocky
This commit is contained in:
commit
3282226f41
|
@ -223,13 +223,16 @@ RESOURCE_ATTRIBUTE_MAP = {
|
|||
'validate': {'type:uuid': None},
|
||||
'is_visible': True,
|
||||
'is_filter': True,
|
||||
'is_sort_key': True,
|
||||
'primary_key': True},
|
||||
'name': {'allow_post': True, 'allow_put': True,
|
||||
'is_visible': True, 'default': '', 'is_filter': True,
|
||||
'is_sort_key': True,
|
||||
'validate': {
|
||||
'type:name_not_default': db_const.NAME_FIELD_SIZE}},
|
||||
'tenant_id': {'allow_post': True, 'allow_put': False,
|
||||
'required_by_policy': True,
|
||||
'is_sort_key': True,
|
||||
'validate': {
|
||||
'type:string': db_const.PROJECT_ID_FIELD_SIZE},
|
||||
'is_visible': True, 'is_filter': True},
|
||||
|
@ -241,39 +244,42 @@ RESOURCE_ATTRIBUTE_MAP = {
|
|||
'validate': {'type:uuid': None},
|
||||
'is_visible': True,
|
||||
'is_filter': True,
|
||||
'is_sort_key': True,
|
||||
'primary_key': True},
|
||||
'security_group_id': {'allow_post': True, 'allow_put': False,
|
||||
'is_visible': True, 'required_by_policy': True,
|
||||
'is_filter': True},
|
||||
'is_sort_key': True, 'is_filter': True},
|
||||
'remote_group_id': {'allow_post': True, 'allow_put': False,
|
||||
'default': None, 'is_visible': True,
|
||||
'is_filter': True},
|
||||
'is_sort_key': True, 'is_filter': True},
|
||||
'direction': {'allow_post': True, 'allow_put': False,
|
||||
'is_visible': True, 'is_filter': True,
|
||||
'is_sort_key': True,
|
||||
'validate': {'type:values': ['ingress', 'egress']}},
|
||||
'protocol': {'allow_post': True, 'allow_put': False,
|
||||
'is_visible': True, 'default': None,
|
||||
'is_filter': True,
|
||||
'is_sort_key': True, 'is_filter': True,
|
||||
'convert_to': convert_protocol},
|
||||
'port_range_min': {'allow_post': True, 'allow_put': False,
|
||||
'convert_to': convert_validate_port_value,
|
||||
'default': None, 'is_visible': True,
|
||||
'is_filter': True},
|
||||
'is_sort_key': True, 'is_filter': True},
|
||||
'port_range_max': {'allow_post': True, 'allow_put': False,
|
||||
'convert_to': convert_validate_port_value,
|
||||
'default': None, 'is_visible': True,
|
||||
'is_filter': True},
|
||||
'is_sort_key': True, 'is_filter': True},
|
||||
'ethertype': {'allow_post': True, 'allow_put': False,
|
||||
'is_visible': True, 'default': 'IPv4',
|
||||
'is_filter': True,
|
||||
'is_filter': True, 'is_sort_key': True,
|
||||
'convert_to': convert_ethertype_to_case_insensitive,
|
||||
'validate': {'type:values': sg_supported_ethertypes}},
|
||||
'remote_ip_prefix': {'allow_post': True, 'allow_put': False,
|
||||
'default': None, 'is_visible': True,
|
||||
'is_filter': True,
|
||||
'is_sort_key': True, 'is_filter': True,
|
||||
'convert_to': convert_ip_prefix_to_cidr},
|
||||
'tenant_id': {'allow_post': True, 'allow_put': False,
|
||||
'required_by_policy': True,
|
||||
'is_sort_key': True,
|
||||
'validate': {
|
||||
'type:string': db_const.PROJECT_ID_FIELD_SIZE},
|
||||
'is_visible': True, 'is_filter': True},
|
||||
|
|
|
@ -45,17 +45,20 @@ RESOURCE_ATTRIBUTE_MAP = {
|
|||
'allow_put': False,
|
||||
'validate': {'type:uuid': None},
|
||||
'is_filter': True,
|
||||
'is_sort_key': True,
|
||||
'is_visible': True,
|
||||
'primary_key': True},
|
||||
'tenant_id': {'allow_post': True,
|
||||
'allow_put': False,
|
||||
'validate': {'type:string':
|
||||
db_const.PROJECT_ID_FIELD_SIZE},
|
||||
'is_sort_key': True,
|
||||
'is_visible': False},
|
||||
'network_id': {'allow_post': True,
|
||||
'allow_put': False,
|
||||
'validate': {'type:uuid': None},
|
||||
'is_filter': True,
|
||||
'is_sort_key': True,
|
||||
'is_visible': True},
|
||||
PHYSICAL_NETWORK: {'allow_post': True,
|
||||
'allow_put': False,
|
||||
|
@ -63,23 +66,27 @@ RESOURCE_ATTRIBUTE_MAP = {
|
|||
'validate': {'type:string':
|
||||
providernet.PHYSICAL_NETWORK_MAX_LEN},
|
||||
'is_filter': True,
|
||||
'is_sort_key': True,
|
||||
'is_visible': True},
|
||||
NETWORK_TYPE: {'allow_post': True,
|
||||
'allow_put': False,
|
||||
'validate': {'type:string':
|
||||
providernet.NETWORK_TYPE_MAX_LEN},
|
||||
'is_filter': True,
|
||||
'is_sort_key': True,
|
||||
'is_visible': True},
|
||||
SEGMENTATION_ID: {'allow_post': True,
|
||||
'allow_put': False,
|
||||
'default': constants.ATTR_NOT_SPECIFIED,
|
||||
'convert_to': converters.convert_to_int,
|
||||
'is_sort_key': True,
|
||||
'is_visible': True},
|
||||
'name': {'allow_post': True,
|
||||
'allow_put': True,
|
||||
'default': constants.ATTR_NOT_SPECIFIED,
|
||||
'validate': {'type:string_or_none': NAME_LEN},
|
||||
'is_filter': True,
|
||||
'is_sort_key': True,
|
||||
'is_visible': True}
|
||||
},
|
||||
subnet_def.COLLECTION_NAME: {
|
||||
|
|
Loading…
Reference in New Issue