~ubuntu-branches/ubuntu/trusty/quantum/trusty

« back to all changes in this revision

Viewing changes to quantum/plugins/nec/extensions/packetfilter.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Adam Gandelman, Chuck Short
  • Date: 2012-11-23 09:43:14 UTC
  • mfrom: (2.1.16)
  • Revision ID: package-import@ubuntu.com-20121123094314-e1tqsulrwe21b9aq
Tags: 2013.1~g1-0ubuntu1
[ Adam Gandelman ]
* debian/patches/*: Refreshed for opening of Grizzly.

[ Chuck Short ]
* New upstream release.
* debian/rules: FTFBS if there is missing binaries.
* debian/quantum-server.install: Add quantum-debug.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
#    under the License.
16
16
# @author: Ryota MIBU
17
17
 
 
18
from quantum.api import extensions
18
19
from quantum.api.v2 import attributes
19
20
from quantum.api.v2 import base
20
 
from quantum.extensions import extensions
21
21
from quantum.manager import QuantumManager
 
22
from quantum.openstack.common import cfg
22
23
from quantum import quota
23
 
from quantum.openstack.common import cfg
24
24
 
25
25
 
26
26
quota_packet_filter_opts = [
38
38
PACKET_FILTER_PROTOCOL_REGEX = "(?i)^(icmp|tcp|udp|arp|0x[0-9a-fA-F]+|[0-9]+)$"
39
39
PACKET_FILTER_ATTR_MAP = {
40
40
    'id': {'allow_post': False, 'allow_put': False,
41
 
           'validate': {'type:regex': attributes.UUID_PATTERN},
 
41
           'validate': {'type:uuid': None},
42
42
           'is_visible': True},
43
43
    'name': {'allow_post': True, 'allow_put': True, 'default': '',
44
44
             'is_visible': True},
46
46
                  'required_by_policy': True,
47
47
                  'is_visible': True},
48
48
    'network_id': {'allow_post': True, 'allow_put': False,
49
 
                   'validate': {'type:regex': attributes.UUID_PATTERN},
 
49
                   'validate': {'type:uuid': None},
50
50
                   'is_visible': True},
51
51
    'admin_state_up': {'allow_post': True, 'allow_put': True,
52
52
                       'default': True,
63
63
                 'is_visible': True},
64
64
    'in_port': {'allow_post': True, 'allow_put': True,
65
65
                'default': attributes.ATTR_NOT_SPECIFIED,
66
 
                'validate': {'type:regex': attributes.UUID_PATTERN},
 
66
                'validate': {'type:uuid': None},
67
67
                'is_visible': True},
68
68
    'src_mac': {'allow_post': True, 'allow_put': True,
69
69
                'default': attributes.ATTR_NOT_SPECIFIED,