~ubuntu-branches/ubuntu/utopic/maas/utopic-updates

« back to all changes in this revision

Viewing changes to src/maasserver/enum.py

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez, Jeroen Vermeulen, Andres Rodriguez, Jason Hobbs, Raphaël Badin, Louis Bouchard, Gavin Panella
  • Date: 2014-08-21 19:36:30 UTC
  • mfrom: (1.3.1)
  • Revision ID: package-import@ubuntu.com-20140821193630-kertpu5hd8yyss8h
Tags: 1.7.0~beta7+bzr3266-0ubuntu1
* New Upstream Snapshot, Beta 7 bzr3266

[ Jeroen Vermeulen ]
* debian/extras/99-maas-sudoers
  debian/maas-dhcp.postinst
  debian/rules
  - Add second DHCP server instance for IPv6.
* debian/maas-region-controller-min.install
  debian/maas-region-controller-min.lintian-overrides
  - Install deployment user-data: maas_configure_interfaces.py script.
* debian/maas-cluster-controller.links
  debian/maas-cluster-controller.install
  debian/maas-cluster-controller.postinst
  - Reflect Celery removal changes made in trunk r3067.
  - Don't install celeryconfig_cluster.py any longer. 
  - Don't install maas_local_celeryconfig_cluster.py any longer.
  - Don't symlink maas_local_celeryconfig_cluster.py from /etc to /usr.
  - Don't insert UUID into maas_local_celeryconfig_cluster.py.

[ Andres Rodriguez ]
* debian/maas-region-controller-min.postrm: Cleanup lefover files.
* debian/maas-dhcp.postrm: Clean leftover configs.
* Provide new maas-proxy package that replaces the usage of
  squid-deb-proxy:
  - debian/control: New maas-proxy package that replaces the usage
    of squid-deb-proxy; Drop depends on squid-deb-proxy.
  - Add upstrart job.
  - Ensure squid3 is stopped as maas-proxy uses a caching proxy.
* Remove Celery references to cluster controller:
  - Rename upstart job from maas-pserv to maas-cluster; rename
    maas-cluster-celery to maas-cluster-register. Ensure services
    are stopped on upgrade.
  - debian/maintscript: Cleanup config files.
  - Remove all references to the MAAS celery daemon and config
    files as we don't use it like that anymore
* Move some entries in debian/maintscript to
  debian/maas-cluster-controller.maintscript
* Remove usage of txlongpoll and rabbitmq-server. Handle upgrades
  to ensure these are removed correctly.

[ Jason Hobbs ]
* debian/maas-region-controller-min.install: Install
  maas-generate-winrm-cert script.

[ Raphaël Badin ]
* debian/extras/maas-region-admin: Bypass django-admin as it prints
  spurious messages to stdout (LP: #1365130).

[Louis Bouchard]
* debian/maas-cluster-controller.postinst:
  - Exclude /var/log/maas/rsyslog when changing ownership
    (LP: #1346703)

[Gavin Panella]
* debian/maas-cluster-controller.maas-clusterd.upstart:
  - Don't start-up the cluster controller unless a shared-secret has
    been installed.
* debian/maas-cluster-controller.maas-cluster-register.upstart: Drop.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
    'NODEGROUPINTERFACE_MANAGEMENT_CHOICES',
22
22
    'NODEGROUPINTERFACE_MANAGEMENT_CHOICES_DICT',
23
23
    'NODE_PERMISSION',
 
24
    'NODE_BOOT',
24
25
    'NODE_STATUS',
25
26
    'NODE_STATUS_CHOICES',
26
27
    'NODE_STATUS_CHOICES_DICT',
40
41
    """Major moving parts of the application that may have failure states."""
41
42
    PSERV = 'provisioning server'
42
43
    IMPORT_PXE_FILES = 'maas-import-pxe-files script'
 
44
    CLUSTERS = 'clusters'
43
45
 
44
46
 
45
47
class NODE_STATUS:
51
53
    NEW = 0
52
54
    #: Testing and other commissioning steps are taking place.
53
55
    COMMISSIONING = 1
54
 
    #: Smoke or burn-in testing has a found a problem.
55
 
    FAILED_TESTS = 2
 
56
    #: The commissioning step failed.
 
57
    FAILED_COMMISSIONING = 2
56
58
    #: The node can't be contacted.
57
59
    MISSING = 3
58
60
    #: The node is in the general pool ready to be deployed.
59
61
    READY = 4
60
62
    #: The node is ready for named deployment.
61
63
    RESERVED = 5
62
 
    #: The node is powering a service from a charm or is ready for use with
63
 
    #: a fresh Ubuntu install.
64
 
    ALLOCATED = 6
 
64
    #: The node has booted into the operating system of its owner's choice
 
65
    #: and is ready for use.
 
66
    DEPLOYED = 6
65
67
    #: The node has been removed from service manually until an admin
66
68
    #: overrides the retirement.
67
69
    RETIRED = 7
68
70
    #: The node is broken: a step in the node lifecyle failed.
69
71
    #: More details can be found in the node's event log.
70
72
    BROKEN = 8
 
73
    #: The node is being installed.
 
74
    DEPLOYING = 9
 
75
    #: The node has been allocated to a user and is ready for deployment.
 
76
    ALLOCATED = 10
 
77
    #: The deployment of the node failed.
 
78
    FAILED_DEPLOYMENT = 11
 
79
    #: The node is powering down after a release request.
 
80
    RELEASING = 12
 
81
    #: The releasing of the node failed.
 
82
    FAILED_RELEASING = 13
 
83
    #: The node is erasing its disks.
 
84
    DISK_ERASING = 14
 
85
    #: The node failed to erase its disks.
 
86
    FAILED_DISK_ERASING = 15
71
87
 
72
88
 
73
89
# Django choices for NODE_STATUS: sequence of tuples (key, UI
75
91
NODE_STATUS_CHOICES = (
76
92
    (NODE_STATUS.NEW, "New"),
77
93
    (NODE_STATUS.COMMISSIONING, "Commissioning"),
78
 
    (NODE_STATUS.FAILED_TESTS, "Failed tests"),
 
94
    (NODE_STATUS.FAILED_COMMISSIONING, "Failed commissioning"),
79
95
    (NODE_STATUS.MISSING, "Missing"),
80
96
    (NODE_STATUS.READY, "Ready"),
81
97
    (NODE_STATUS.RESERVED, "Reserved"),
82
98
    (NODE_STATUS.ALLOCATED, "Allocated"),
 
99
    (NODE_STATUS.DEPLOYING, "Deploying"),
 
100
    (NODE_STATUS.DEPLOYED, "Deployed"),
83
101
    (NODE_STATUS.RETIRED, "Retired"),
84
102
    (NODE_STATUS.BROKEN, "Broken"),
 
103
    (NODE_STATUS.FAILED_DEPLOYMENT, "Failed deployment"),
 
104
    (NODE_STATUS.RELEASING, "Releasing"),
 
105
    (NODE_STATUS.FAILED_RELEASING, "Releasing failed"),
 
106
    (NODE_STATUS.DISK_ERASING, "Disk erasing"),
 
107
    (NODE_STATUS.FAILED_DISK_ERASING, "Failed disk erasing"),
85
108
)
86
109
 
87
110
 
145
168
    )
146
169
 
147
170
 
 
171
class NODEGROUP_STATE:
 
172
    """The vocabulary of a `NodeGroup`'s possible state."""
 
173
    #:
 
174
    DISCONNECTED = "Disconnected"
 
175
    #:
 
176
    OUT_OF_SYNC = "Out-of-sync"
 
177
    #:
 
178
    SYNCING = "Syncing"
 
179
    #:
 
180
    SYNCED = "Synced"
 
181
 
 
182
 
148
183
class NODEGROUPINTERFACE_MANAGEMENT:
149
184
    """The vocabulary of a `NodeGroupInterface`'s possible statuses."""
150
185
    # A nodegroupinterface starts out as UNMANAGED.
162
197
# representation).
163
198
NODEGROUPINTERFACE_MANAGEMENT_CHOICES = (
164
199
    (NODEGROUPINTERFACE_MANAGEMENT.UNMANAGED, "Unmanaged"),
165
 
    (NODEGROUPINTERFACE_MANAGEMENT.DHCP, "Manage DHCP"),
166
 
    (NODEGROUPINTERFACE_MANAGEMENT.DHCP_AND_DNS, "Manage DHCP and DNS"),
 
200
    (NODEGROUPINTERFACE_MANAGEMENT.DHCP, "DHCP"),
 
201
    (NODEGROUPINTERFACE_MANAGEMENT.DHCP_AND_DNS, "DHCP and DNS"),
167
202
    )
168
203
 
169
204
 
233
268
    )
234
269
 
235
270
 
 
271
BOOT_RESOURCE_TYPE_CHOICES_DICT = OrderedDict(BOOT_RESOURCE_TYPE_CHOICES)
 
272
 
 
273
 
236
274
class BOOT_RESOURCE_FILE_TYPE:
237
275
    """The vocabulary of possible file types for `BootResource`."""
238
276
    #: Tarball of root image.
239
 
    TGZ = 'tgz'
 
277
    ROOT_TGZ = 'root-tgz'
240
278
 
241
279
    #: Tarball of dd image.
242
 
    DDTGZ = 'dd-tgz'
 
280
    ROOT_DD = 'root-dd'
243
281
 
244
282
    # Following are not allowed on user upload. Only used for syncing
245
283
    # from another simplestreams source. (Most likely maas.ubuntu.com)
263
301
# Django choices for BOOT_RESOURCE_FILE_TYPE: sequence of tuples (key, UI
264
302
# representation).
265
303
BOOT_RESOURCE_FILE_TYPE_CHOICES = (
266
 
    (BOOT_RESOURCE_FILE_TYPE.TGZ, "Root Image (tar.gz)"),
267
 
    (BOOT_RESOURCE_FILE_TYPE.DDTGZ, "Root Compreseed DD (dd -> tar.gz)"),
 
304
    (BOOT_RESOURCE_FILE_TYPE.ROOT_TGZ, "Root Image (tar.gz)"),
 
305
    (BOOT_RESOURCE_FILE_TYPE.ROOT_DD, "Root Compressed DD (dd -> tar.gz)"),
268
306
    (BOOT_RESOURCE_FILE_TYPE.ROOT_IMAGE, "Compressed Root Image"),
269
307
    (BOOT_RESOURCE_FILE_TYPE.BOOT_KERNEL, "Linux ISCSI Kernel"),
270
308
    (BOOT_RESOURCE_FILE_TYPE.BOOT_INITRD, "Initial ISCSI Ramdisk"),
271
309
    (BOOT_RESOURCE_FILE_TYPE.DI_KERNEL, "Linux DI Kernel"),
272
310
    (BOOT_RESOURCE_FILE_TYPE.DI_INITRD, "Initial DI Ramdisk"),
273
311
    )
274
 
 
275
 
 
276
 
# Django choices for BOOT_RESOURCE_FILE_TYPE: sequence of tuples (key, UI
277
 
# representation). (Choices allowed for user uploading.)
278
 
BOOT_RESOURCE_FILE_TYPE_CHOICES_UPLOAD = (
279
 
    (BOOT_RESOURCE_FILE_TYPE.TGZ, "Root Image (tar.gz)"),
280
 
    (BOOT_RESOURCE_FILE_TYPE.DDTGZ, "Root Compreseed DD (dd -> tar.gz)"),
281
 
    )