~ubuntu-branches/ubuntu/utopic/maas/utopic-security

« back to all changes in this revision

Viewing changes to src/maasserver/enum.py

  • Committer: Package Import Robot
  • Author(s): Julian Edwards, Julian Edwards, Andres Rodriguez
  • Date: 2014-08-21 18:38:27 UTC
  • mfrom: (1.2.34)
  • Revision ID: package-import@ubuntu.com-20140821183827-9xyb5u2o4l8g3zxj
Tags: 1.6.1+bzr2550-0ubuntu1
* New upstream bugfix release:
  - Auto-link node MACs to Networks (LP: #1341619)

[ Julian Edwards ]
* debian/maas-region-controller.postinst: Don't restart RabbitMQ on
  upgrades, just ensure it's running.  Should prevent a race with the
  cluster celery restarting.
* debian/rules: Pull upstream branch from the right place.

[ Andres Rodriguez ]
* debian/maas-region-controller.postinst: Ensure cluster celery is
  started if it also runs on the region.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
__metaclass__ = type
15
15
__all__ = [
16
 
    'COMMISSIONING_DISTRO_SERIES_CHOICES',
17
16
    'COMPONENT',
 
17
    'IPADDRESS_TYPE',
18
18
    'NODEGROUP_STATUS',
19
19
    'NODEGROUP_STATUS_CHOICES',
20
20
    'NODEGROUPINTERFACE_MANAGEMENT',
25
25
    'NODE_STATUS_CHOICES',
26
26
    'NODE_STATUS_CHOICES_DICT',
27
27
    'PRESEED_TYPE',
28
 
    'DISTRO_SERIES',
29
 
    'DISTRO_SERIES_CHOICES',
30
28
    'USERDATA_TYPE',
31
29
    ]
32
30
 
86
84
NODE_STATUS_CHOICES_DICT = OrderedDict(NODE_STATUS_CHOICES)
87
85
 
88
86
 
89
 
class DISTRO_SERIES:
90
 
    """List of supported ubuntu releases."""
91
 
    #:
92
 
    default = ''
93
 
    #:
94
 
    precise = 'precise'
95
 
    #:
96
 
    quantal = 'quantal'
97
 
    #:
98
 
    raring = 'raring'
99
 
    #:
100
 
    saucy = 'saucy'
101
 
    #:
102
 
    trusty = 'trusty'
103
 
 
104
 
DISTRO_SERIES_CHOICES = (
105
 
    (DISTRO_SERIES.default, 'Default Ubuntu Release'),
106
 
    (DISTRO_SERIES.precise, 'Ubuntu 12.04 LTS "Precise Pangolin"'),
107
 
    (DISTRO_SERIES.quantal, 'Ubuntu 12.10 "Quantal Quetzal"'),
108
 
    (DISTRO_SERIES.raring, 'Ubuntu 13.04 "Raring Ringtail"'),
109
 
    (DISTRO_SERIES.saucy, 'Ubuntu 13.10 "Saucy Salamander"'),
110
 
    (DISTRO_SERIES.trusty, 'Ubuntu 14.04 LTS "Trusty Tahr"'),
111
 
)
112
 
 
113
 
 
114
 
COMMISSIONING_DISTRO_SERIES_CHOICES = (
115
 
    (DISTRO_SERIES.trusty, dict(DISTRO_SERIES_CHOICES)[DISTRO_SERIES.trusty]),
116
 
)
117
 
 
118
 
 
119
87
class NODE_PERMISSION:
120
88
    """Permissions relating to nodes."""
121
89
    VIEW = 'view_node'
183
151
 
184
152
NODEGROUPINTERFACE_MANAGEMENT_CHOICES_DICT = (
185
153
    OrderedDict(NODEGROUPINTERFACE_MANAGEMENT_CHOICES))
 
154
 
 
155
 
 
156
class IPADDRESS_TYPE:
 
157
    """The vocabulary of possible types of `StaticIPAddress`."""
 
158
    # Automatically assigned.
 
159
    AUTO = 0
 
160
 
 
161
    # Pre-assigned and permanent until removed.
 
162
    STICKY = 1
 
163
 
 
164
    # Not associated to hardware managed by MAAS.
 
165
    UNMANAGED = 2
 
166
 
 
167
    # Additional IP requested by a user for a node.
 
168
    EXTRA = 3
 
169
 
 
170
    # Reserved by a user, no DHCP map required in MAAS.
 
171
    USER_RESERVED = 4