Debian Codegraph @

neutron_lib/api/definitions/taas.py

raw
1 # Copyright (C) 2015 Ericsson AB
2 # Copyright (c) 2015 Gigamon
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License"); you may
5 # not use this file except in compliance with the License. You may obtain
6 # a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 # License for the specific language governing permissions and limitations
14 # under the License.
15
16
17 DIRECTION_IN = 'IN'
18 DIRECTION_OUT = 'OUT'
19 DIRECTION_BOTH = 'BOTH'
20 DIRECTION_ENUM = [DIRECTION_IN, DIRECTION_OUT, DIRECTION_BOTH]
21 DIRECTION_IN_BOTH = [DIRECTION_IN, DIRECTION_BOTH]
22 DIRECTION_OUT_BOTH = [DIRECTION_OUT, DIRECTION_BOTH]
23
24 '''
25 Resource Attribute Map:
26
27 Note:
28
29 'tap_services' data model refers to the Tap Service created.
30 port_id specifies destination port to which the mirrored data is sent.
31 '''
32
33 ALIAS = 'taas'
34 IS_SHIM_EXTENSION = False
35 IS_STANDARD_ATTR_EXTENSION = False
36 NAME = "Neutron Tap as a Service"
37 DESCRIPTION = "Neutron Tap as a Service Extension."
38 UPDATED_TIMESTAMP = "2015-01-14T10:00:00-00:00"
39 RESOURCE_NAME = 'tap_service'
40 COLLECTION_NAME = 'tap_services'
41 TAP_FLOW = 'tap_flow'
42 TAP_FLOWS = 'tap_flows'
43
44 RESOURCE_ATTRIBUTE_MAP = {
45 COLLECTION_NAME: {
46 'id': {'allow_post': False, 'allow_put': False,
47 'validate': {'type:uuid': None}, 'is_visible': True,
48 'primary_key': True},
49 'tenant_id': {'allow_post': True, 'allow_put': False,
50 'validate': {'type:string': None},
51 'required_by_policy': True, 'is_visible': True},
52 'name': {'allow_post': True, 'allow_put': True,
53 'validate': {'type:string': None},
54 'is_visible': True, 'default': ''},
55 'description': {'allow_post': True, 'allow_put': True,
56 'validate': {'type:string': None},
57 'is_visible': True, 'default': ''},
58 'port_id': {'allow_post': True, 'allow_put': False,
59 'validate': {'type:uuid': None},
60 'is_visible': True},
61 'status': {'allow_post': False, 'allow_put': False,
62 'is_visible': True}
63 },
64 TAP_FLOWS: {
65 'id': {'allow_post': False, 'allow_put': False,
66 'validate': {'type:uuid': None}, 'is_visible': True,
67 'primary_key': True},
68 'tenant_id': {'allow_post': True, 'allow_put': False,
69 'validate': {'type:string': None},
70 'required_by_policy': True, 'is_visible': True},
71 'name': {'allow_post': True, 'allow_put': True,
72 'validate': {'type:string': None},
73 'is_visible': True, 'default': ''},
74 'description': {'allow_post': True, 'allow_put': True,
75 'validate': {'type:string': None},
76 'is_visible': True, 'default': ''},
77 'tap_service_id': {'allow_post': True, 'allow_put': False,
78 'validate': {'type:uuid': None},
79 'required_by_policy': True, 'is_visible': True},
80 'source_port': {'allow_post': True, 'allow_put': False,
81 'validate': {'type:uuid': None},
82 'required_by_policy': True, 'is_visible': True},
83 'direction': {'allow_post': True, 'allow_put': False,
84 'validate': {'type:values': DIRECTION_ENUM},
85 'is_visible': True},
86 'status': {'allow_post': False, 'allow_put': False,
87 'is_visible': True}
88 }
89 }
90 SUB_RESOURCE_ATTRIBUTE_MAP = None
91 ACTION_MAP = {}
92 ACTION_STATUS = {}
93 REQUIRED_EXTENSIONS = []
94 OPTIONAL_EXTENSIONS = []