launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #06712
[Merge] lp:~allenap/maas/MaaS-to-MAAS into lp:maas
Gavin Panella has proposed merging lp:~allenap/maas/MaaS-to-MAAS into lp:maas.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~allenap/maas/MaaS-to-MAAS/+merge/97660
Change MaaS to MAAS everywhere, as requested by Mark.
--
https://code.launchpad.net/~allenap/maas/MaaS-to-MAAS/+merge/97660
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~allenap/maas/MaaS-to-MAAS into lp:maas.
=== modified file 'HACKING.txt'
--- HACKING.txt 2012-03-09 21:06:47 +0000
+++ HACKING.txt 2012-03-15 14:01:24 +0000
@@ -1,13 +1,13 @@
************
-Hacking MaaS
+Hacking MAAS
************
Coding style
============
-MaaS follows the `Launchpad Python Style Guide`_, except where it gets
-Launchpad specific, and where it talks about `method naming`_. MaaS
+MAAS follows the `Launchpad Python Style Guide`_, except where it gets
+Launchpad specific, and where it talks about `method naming`_. MAAS
instead adopts `PEP-8`_ naming in all cases, so method names should
usually use the ``lowercase_with_underscores`` form.
@@ -60,7 +60,7 @@
First time using buildout?
==========================
-Buildout is used to develop MaaS. Buildout, if configured so, can
+Buildout is used to develop MAAS. Buildout, if configured so, can
cache downloaded files and built eggs. If you've not already done
something similar, the following snippet will massively improve build
times::
@@ -120,7 +120,7 @@
tests will modify your Cobbler database.
-Development MaaS server setup
+Development MAAS server setup
=============================
Access to the database is configured in ``src/maas/development.py``.
@@ -177,7 +177,7 @@
Adding new dependencies
=======================
-Since MaaS is distributed mainly as Ubuntu package, all runtime dependencies
+Since MAAS is distributed mainly as Ubuntu package, all runtime dependencies
should be packaged and we should develop with the packaged version if
possible. You'll need to add the dependency to the
``allowed-eggs-from-site-packages`` option in the ``buildout.cfg`` file. You
@@ -213,7 +213,7 @@
Acceptance tests
================
-MaaS uses checkbox manual testing infrastructure to verify features
+MAAS uses checkbox manual testing infrastructure to verify features
are implemented according to the spec. They can be found in
the qa/checkbox/ directory.
@@ -226,6 +226,6 @@
$ checkbox-gtk --config='checkbox/plugins/jobs_info/directories=\
/path/to/local/checkbox/jobs/dir' --whitelist-file=
-or run from the root of the MaaS tree::
+or run from the root of the MAAS tree::
$ make checkbox
=== modified file 'LICENSE'
--- LICENSE 2012-02-24 17:37:01 +0000
+++ LICENSE 2012-03-15 14:01:24 +0000
@@ -1,6 +1,6 @@
-MaaS is Copyright 2012 Canonical Ltd.
+MAAS is Copyright 2012 Canonical Ltd.
-Canonical Ltd ("Canonical") distributes the MaaS source code
+Canonical Ltd ("Canonical") distributes the MAAS source code
under the GNU Affero General Public License, version 3 ("AGPLv3").
The full text of this licence is given below.
=== modified file 'README.txt'
--- README.txt 2012-02-24 17:37:01 +0000
+++ README.txt 2012-03-15 14:01:24 +0000
@@ -1,16 +1,16 @@
****
-MaaS
+MAAS
****
-MaaS is the successor to Orchestra. It offers a nice UI to provision your
+MAAS is the successor to Orchestra. It offers a nice UI to provision your
Ubuntu servers. Each physical server (“node”) will
be commissioned automatically on first boot. During the commissioning
process administrators are able to configure hardware settings
manually before an automated smoke test and burn-in test are
done. Once commissioned, a node can be deployed on demand by name, or
allocated to a queue for dynamic allocation to services being deployed
-on this MaaS.
-
-For more information see `MaaS on Launchpad`_.
-
-.. _MaaS on Launchpad: https://launchpad.net/maas
+on this MAAS.
+
+For more information see `MAAS on Launchpad`_.
+
+.. _MAAS on Launchpad: https://launchpad.net/maas
=== modified file 'buildout.cfg'
--- buildout.cfg 2012-03-14 16:01:19 +0000
+++ buildout.cfg 2012-03-15 14:01:24 +0000
@@ -14,7 +14,7 @@
extends = versions.cfg
install-from-cache = false
-# Since MaaS's main deployment target is Ubuntu, all
+# Since MAAS's main deployment target is Ubuntu, all
# runtime dependencies should come from python packages.
# Only development-time dependencies should come from eggs.
# For convenience, we allow some of those to come from site-packages,
=== modified file 'contrib/maas-http.conf'
--- contrib/maas-http.conf 2012-03-14 20:00:17 +0000
+++ contrib/maas-http.conf 2012-03-15 14:01:24 +0000
@@ -1,7 +1,7 @@
-WSGIScriptAlias /MaaS /usr/share/maas/wsgi.py
+WSGIScriptAlias /MAAS /usr/share/maas/wsgi.py
<IfModule mod_expires.c>
- <Location /MaaS>
+ <Location /MAAS>
ExpiresActive On
ExpiresByType text/javascript "access plus 1 years"
ExpiresByType application/javascript "access plus 1 years"
@@ -15,13 +15,13 @@
# This can be safely removed once Django 1.4 is used: admin media
# will be served using staticfiles.
-Alias /MaaS/static/admin/ /usr/share/pyshared/django/contrib/admin/media/
+Alias /MAAS/static/admin/ /usr/share/pyshared/django/contrib/admin/media/
<Directory /usr/share/pyshared/django/contrib/admin/media/>
SetHandler None
</Directory>
# Serve files from staticfiles.
-Alias /MaaS/static/ /usr/share/maas/web/static/
+Alias /MAAS/static/ /usr/share/maas/web/static/
<Directory /usr/share/maas/web/static/>
SetHandler None
</Directory>
=== modified file 'contrib/maas_local_settings_sample.py'
--- contrib/maas_local_settings_sample.py 2012-03-14 09:23:19 +0000
+++ contrib/maas_local_settings_sample.py 2012-03-15 14:01:24 +0000
@@ -2,17 +2,17 @@
DEBUG = False
# Default URL specifying protocol, host, and (if necessary) port where
-# this MaaS can be found. Configuration can, and probably should,
+# this MAAS can be found. Configuration can, and probably should,
# override this.
DEFAULT_MAAS_URL = "http://maas.internal.example.com/"
# Absolute path to the directory static files should be collected to.
STATIC_ROOT = '/var/lib/maas/static/'
-# Prefix to use for MaaS's urls.
+# Prefix to use for MAAS's urls.
# If FORCE_SCRIPT_NAME is None (the default), all the urls will start with
# '/'.
-FORCE_SCRIPT_NAME = '/MaaS'
+FORCE_SCRIPT_NAME = '/MAAS'
# Where to store the user uploaded files.
MEDIA_ROOT = '/var/lib/maas/media/'
=== modified file 'docs/conf.py'
--- docs/conf.py 2012-02-04 22:20:08 +0000
+++ docs/conf.py 2012-03-15 14:01:24 +0000
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# MaaS documentation build configuration file, created by
+# MAAS documentation build configuration file, created by
# sphinx-quickstart on Thu Jan 19 14:48:25 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
@@ -45,8 +45,8 @@
master_doc = 'index'
# General information about the project.
-project = u'MaaS'
-copyright = u'2012, MaaS Developers'
+project = u'MAAS'
+copyright = u'2012, MAAS Developers'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -170,7 +170,7 @@
#html_file_suffix = None
# Output file base name for HTML help builder.
-htmlhelp_basename = 'MaaSdoc'
+htmlhelp_basename = 'MAASdoc'
# -- Options for LaTeX output --------------------------------------------------
@@ -184,8 +184,8 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
- ('index', 'MaaS.tex', u'MaaS Documentation',
- u'MaaS Developers', 'manual'),
+ ('index', 'MAAS.tex', u'MAAS Documentation',
+ u'MAAS Developers', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@@ -217,8 +217,8 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
- ('index', 'maas', u'MaaS Documentation',
- [u'MaaS Developers'], 1)
+ ('index', 'maas', u'MAAS Documentation',
+ [u'MAAS Developers'], 1)
]
=== modified file 'docs/index.rst'
--- docs/index.rst 2012-01-20 15:48:22 +0000
+++ docs/index.rst 2012-03-15 14:01:24 +0000
@@ -1,15 +1,15 @@
-.. MaaS documentation master file, created by
+.. MAAS documentation master file, created by
sphinx-quickstart on Thu Jan 19 14:48:25 2012.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
=============================
-MaaS developer documentation!
+MAAS developer documentation!
=============================
-Welcome to the MaaS developer documentation.
-This documentation is for people who want to hack on MaaS or create a service
-that communicates with a MaaS server using the API.
+Welcome to the MAAS developer documentation.
+This documentation is for people who want to hack on MAAS or create a service
+that communicates with a MAAS server using the API.
Overview
========
@@ -21,10 +21,10 @@
hacking
api
-MaaS API
+MAAS API
========
-Other services interact with a MaaS server using its :doc:`api`.
+Other services interact with a MAAS server using its :doc:`api`.
Code
====
=== modified file 'docs/models.rst'
--- docs/models.rst 2012-02-07 15:46:25 +0000
+++ docs/models.rst 2012-03-15 14:01:24 +0000
@@ -1,5 +1,5 @@
============
-MaaS Objects
+MAAS Objects
============
=== modified file 'qa/checkbox/installer.txt'
--- qa/checkbox/installer.txt 2012-03-12 13:42:06 +0000
+++ qa/checkbox/installer.txt 2012-03-15 14:01:24 +0000
@@ -13,10 +13,10 @@
name: installer/server
description:
PURPOSE:
- This will test that the Ubuntu installer has the option to install the MaaS server from the CD.
+ This will test that the Ubuntu installer has the option to install the MAAS server from the CD.
STEPS:
1. Boot Ubuntu from the CD
- 2. Find the option to install a new MaaS server.
+ 2. Find the option to install a new MAAS server.
VERIFICATION:
- Did the installer offer an option to install a MaaS server?
+ Did the installer offer an option to install a MAAS server?
=== modified file 'qa/checkbox/juju.txt'
--- qa/checkbox/juju.txt 2012-03-12 13:42:06 +0000
+++ qa/checkbox/juju.txt 2012-03-15 14:01:24 +0000
@@ -2,9 +2,9 @@
name: juju/bootstrap
description:
PURPOSE:
- This will test that you can bootstrap a Juju environment using a MaaS server.
+ This will test that you can bootstrap a Juju environment using a MAAS server.
STEPS:
- 1. Bootstrap a new environment using juju pointing to a MaaS server.
+ 1. Bootstrap a new environment using juju pointing to a MAAS server.
2. Run juju status
VERIFICATION:
Can you use juju status and see the available nodes?
@@ -13,10 +13,10 @@
name: juju/deploy
description:
PURPOSE:
- This will test that you can succesfully deploy to MaaS nodes using Juju
+ This will test that you can succesfully deploy to MAAS nodes using Juju
STEPS:
- 1. Bootstrap a new environment using juju pointing to a MaaS server.
+ 1. Bootstrap a new environment using juju pointing to a MAAS server.
2. Run juju deploy $someservice
VERIFICATION:
- Can you use juju deploy $someservice and have it deployed in the MaaS
+ Can you use juju deploy $someservice and have it deployed in the MAAS
node?
=== modified file 'qa/checkbox/maas.txt'
--- qa/checkbox/maas.txt 2012-03-12 13:42:06 +0000
+++ qa/checkbox/maas.txt 2012-03-15 14:01:24 +0000
@@ -2,10 +2,10 @@
name: maas/update-images
description:
PURPOSE:
- This will test that the MaaS server offers an option to periodically update cloud images.
+ This will test that the MAAS server offers an option to periodically update cloud images.
STEPS:
- 1. Open the main page to the MaaS server
- 2. Find the option in the MaaS server preferences to periodically update cloud images.
+ 1. Open the main page to the MAAS server
+ 2. Find the option in the MAAS server preferences to periodically update cloud images.
3. Set it to automatically update
VERIFICATION:
Did you find the option to periodically update cloud images?
@@ -15,10 +15,10 @@
name: maas/cache-archives-locally
description:
PURPOSE:
- This will test that the MaaS server offers an option to cache archives locally.
+ This will test that the MAAS server offers an option to cache archives locally.
STEPS:
- 1. Open the main page to the MaaS server
- 2. Find the option in the MaaS server preferences to cache archives
+ 1. Open the main page to the MAAS server
+ 2. Find the option in the MAAS server preferences to cache archives
locally
3. Enable the option
VERIFICATION:
=== modified file 'scripts/maas-import-isos'
--- scripts/maas-import-isos 2012-03-15 10:27:10 +0000
+++ scripts/maas-import-isos 2012-03-15 14:01:24 +0000
@@ -84,7 +84,7 @@
else
# check archive for an updated ISO, update our cache if necessary
cobbler-ubuntu-import -c $profile && cobbler-ubuntu-import -u $profile
- # Make sure the profile is using the MaaS preseed
+ # Make sure the profile is using the MAAS preseed
cobbler profile edit --name="$profile" --kickstart="$KSDIR/maas.preseed"
fi
@@ -131,16 +131,16 @@
cat <<EOF
Usage: ${0##*/} [ options ]
- import Ubuntu releases and update default MaaS settings
+ import Ubuntu releases and update default MAAS settings
options:
-i | --import-isos Import the Ubuntu ISOs and update default
- settings used for MaaS. (default)
+ settings used for MAAS. (default)
-u | --update-settings Updates all profiles based on new settings
in /etc/maas/import_isos.
The --import process downloads and imports a list of Ubuntu releases,
- adding the default MaaS settings for each of the profiles. If a
+ adding the default MAAS settings for each of the profiles. If a
release has already been imported but is out of date, the updated ISO
will be downloaded again and reimported.
=== modified file 'setup.py'
--- setup.py 2012-03-14 15:52:49 +0000
+++ setup.py 2012-03-15 14:01:24 +0000
@@ -44,7 +44,7 @@
description="Metal as as Service",
long_description=read('README.txt'),
- author="MaaS Developers",
+ author="MAAS Developers",
author_email="juju@xxxxxxxxxxxxxxxx",
packages=find_packages(
=== modified file 'src/maas/settings.py'
--- src/maas/settings.py 2012-03-15 11:16:37 +0000
+++ src/maas/settings.py 2012-03-15 14:01:24 +0000
@@ -56,7 +56,7 @@
LONGPOLL_PATH = 'longpoll/'
# Default URL specifying protocol, host, and (if necessary) port where
-# this MaaS can be found. Configuration can, and probably should,
+# this MAAS can be found. Configuration can, and probably should,
# override this.
DEFAULT_MAAS_URL = "http://%s/" % gethostname()
@@ -87,7 +87,7 @@
AUTH_PROFILE_MODULE = 'maasserver.UserProfile'
AUTHENTICATION_BACKENDS = (
- 'maasserver.models.MaaSAuthorizationBackend',
+ 'maasserver.models.MAASAuthorizationBackend',
)
# Rabbit MQ Configuration.
=== modified file 'src/maasserver/__init__.py'
--- src/maasserver/__init__.py 2012-02-24 10:53:39 +0000
+++ src/maasserver/__init__.py 2012-03-15 14:01:24 +0000
@@ -1,7 +1,7 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""MaaS Server application."""
+"""MAAS Server application."""
from __future__ import (
print_function,
=== modified file 'src/maasserver/api.py'
--- src/maasserver/api.py 2012-03-06 07:55:33 +0000
+++ src/maasserver/api.py 2012-03-15 14:01:24 +0000
@@ -41,8 +41,8 @@
from formencode import validators
from formencode.validators import Invalid
from maasserver.exceptions import (
- MaaSAPIBadRequest,
- MaaSAPINotFound,
+ MAASAPIBadRequest,
+ MAASAPINotFound,
NodesNotAvailable,
NodeStateViolation,
PermissionDenied,
@@ -477,11 +477,11 @@
"""
filename = request.GET.get("filename", None)
if not filename:
- raise MaaSAPIBadRequest("Filename not supplied")
+ raise MAASAPIBadRequest("Filename not supplied")
try:
db_file = FileStorage.objects.get(filename=filename)
except FileStorage.DoesNotExist:
- raise MaaSAPINotFound("File not found")
+ raise MAASAPINotFound("File not found")
return HttpResponse(db_file.data.read(), status=httplib.OK)
@api_exported('add', 'POST')
@@ -495,12 +495,12 @@
"""
filename = request.data.get("filename", None)
if not filename:
- raise MaaSAPIBadRequest("Filename not supplied")
+ raise MAASAPIBadRequest("Filename not supplied")
files = request.FILES
if not files:
- raise MaaSAPIBadRequest("File not supplied")
+ raise MAASAPIBadRequest("File not supplied")
if len(files) != 1:
- raise MaaSAPIBadRequest("Exactly one file must be supplied")
+ raise MAASAPIBadRequest("Exactly one file must be supplied")
uploaded_file = files['file']
# As per the comment in FileStorage, this ought to deal in
@@ -555,8 +555,8 @@
@api_operations
-class MaaSHandler(BaseHandler):
- """Manage the MaaS' itself."""
+class MAASHandler(BaseHandler):
+ """Manage the MAAS' itself."""
allowed_methods = ('POST', 'GET')
@api_exported('set_config', method='POST')
@@ -608,7 +608,7 @@
if add_title:
messages.extend([
'**********************\n',
- 'MaaS API documentation\n',
+ 'MAAS API documentation\n',
'**********************\n',
'\n\n']
)
=== modified file 'src/maasserver/api_auth.py'
--- src/maasserver/api_auth.py 2012-03-06 15:24:01 +0000
+++ src/maasserver/api_auth.py 2012-03-15 14:01:24 +0000
@@ -17,7 +17,7 @@
from piston.utils import rc
-class MaaSAPIAuthentication(OAuthAuthentication):
+class MAASAPIAuthentication(OAuthAuthentication):
"""A piston authentication class that uses the currently logged-in user
if there is one, and defaults to piston's OAuthAuthentication if not.
@@ -28,7 +28,7 @@
return request.user
else:
return super(
- MaaSAPIAuthentication, self).is_authenticated(request)
+ MAASAPIAuthentication, self).is_authenticated(request)
def challenge(self):
# Beware: this returns 401: Unauthorized, not 403: Forbidden
@@ -37,4 +37,4 @@
# OAuth authentication for the APIs.
-api_auth = MaaSAPIAuthentication(realm="MaaS API")
+api_auth = MAASAPIAuthentication(realm="MAAS API")
=== modified file 'src/maasserver/exceptions.py'
--- src/maasserver/exceptions.py 2012-03-05 07:36:52 +0000
+++ src/maasserver/exceptions.py 2012-03-15 14:01:24 +0000
@@ -10,10 +10,10 @@
__metaclass__ = type
__all__ = [
- "MaaSException",
- "MaaSAPIBadRequest",
- "MaaSAPIException",
- "MaaSAPINotFound",
+ "MAASException",
+ "MAASAPIBadRequest",
+ "MAASAPIException",
+ "MAASAPINotFound",
"NodeStateViolation",
"PermissionDenied",
]
@@ -22,16 +22,16 @@
import httplib
-class MaaSException(Exception):
- """Base class for MaaS' exceptions."""
+class MAASException(Exception):
+ """Base class for MAAS' exceptions."""
class CannotDeleteUserException(Exception):
"""User can't be deleted."""
-class MaaSAPIException(Exception):
- """Base class for MaaS' API exceptions.
+class MAASAPIException(Exception):
+ """Base class for MAAS' API exceptions.
:ivar api_error: The HTTP code that should be returned when this error
is raised in the API (defaults to 500: "Internal Server Error").
@@ -40,15 +40,15 @@
api_error = httplib.INTERNAL_SERVER_ERROR
-class MaaSAPIBadRequest(MaaSAPIException):
+class MAASAPIBadRequest(MAASAPIException):
api_error = httplib.BAD_REQUEST
-class MaaSAPINotFound(MaaSAPIException):
+class MAASAPINotFound(MAASAPIException):
api_error = httplib.NOT_FOUND
-class PermissionDenied(MaaSAPIException):
+class PermissionDenied(MAASAPIException):
"""HTTP error 403: Forbidden. User is logged in, but lacks permission.
Do not confuse this with 401: Unauthorized ("you need to be logged in
@@ -58,12 +58,12 @@
api_error = httplib.FORBIDDEN
-class Unauthorized(MaaSAPIException):
+class Unauthorized(MAASAPIException):
"""HTTP error 401: Unauthorized. Login required."""
api_error = httplib.UNAUTHORIZED
-class NodeStateViolation(MaaSAPIException):
+class NodeStateViolation(MAASAPIException):
"""Operation on node not possible given node's current state."""
api_error = httplib.CONFLICT
=== modified file 'src/maasserver/forms.py'
--- src/maasserver/forms.py 2012-03-14 15:30:44 +0000
+++ src/maasserver/forms.py 2012-03-15 14:01:24 +0000
@@ -14,7 +14,7 @@
"HostnameFormField",
"NodeForm",
"MACAddressForm",
- "MaaSAndNetworkForm",
+ "MAASAndNetworkForm",
"UbuntuForm",
]
@@ -140,7 +140,7 @@
class NewUserCreationForm(UserCreationForm):
is_superuser = forms.BooleanField(
- label="MaaS administrator", required=False)
+ label="MAAS administrator", required=False)
def __init__(self, *args, **kwargs):
super(NewUserCreationForm, self).__init__(*args, **kwargs)
@@ -173,7 +173,7 @@
class EditUserForm(UserChangeForm):
# Override the default label.
is_superuser = forms.BooleanField(
- label="MaaS administrator", required=False)
+ label="MAAS administrator", required=False)
last_name = forms.CharField(
label="Full name", max_length=30, required=False)
@@ -216,9 +216,9 @@
return True
-class MaaSAndNetworkForm(ConfigForm):
- """Settings page, MaaS and Network section."""
- maas_name = forms.CharField(label="MaaS name")
+class MAASAndNetworkForm(ConfigForm):
+ """Settings page, MAAS and Network section."""
+ maas_name = forms.CharField(label="MAAS name")
provide_dhcp = forms.BooleanField(
label="Provide DHCP on this subnet", required=False)
=== modified file 'src/maasserver/messages.py'
--- src/maasserver/messages.py 2012-03-14 14:03:33 +0000
+++ src/maasserver/messages.py 2012-03-15 14:01:24 +0000
@@ -10,7 +10,7 @@
__metaclass__ = type
__all__ = [
- "MaaSMessenger",
+ "MAASMessenger",
"MessengerBase",
"get_messaging",
]
@@ -30,9 +30,9 @@
from maasserver.models import Node
from maasserver.rabbit import RabbitMessaging
-# This is the name of the exchange where changes to MaaS's model objects will
+# This is the name of the exchange where changes to MAAS's model objects will
# be published.
-MODEL_EXCHANGE_NAME = "MaaS Model Exchange"
+MODEL_EXCHANGE_NAME = "MAAS Model Exchange"
class MESSENGER_EVENT:
@@ -80,8 +80,8 @@
receiver=self.delete_obj, weak=False, sender=self.model_class)
-class MaaSMessenger(MessengerBase):
- """A messenger tailored to suit MaaS' UI (JavaScript) requirements.
+class MAASMessenger(MessengerBase):
+ """A messenger tailored to suit MAAS' UI (JavaScript) requirements.
The format of the event's payload will be::
@@ -126,7 +126,7 @@
"""
if settings.RABBITMQ_PUBLISH:
messaging = RabbitMessaging(MODEL_EXCHANGE_NAME)
- MaaSMessenger(Node, messaging.getExchange()).register()
+ MAASMessenger(Node, messaging.getExchange()).register()
return messaging
else:
return None
=== modified file 'src/maasserver/middleware.py'
--- src/maasserver/middleware.py 2012-03-12 14:55:15 +0000
+++ src/maasserver/middleware.py 2012-03-15 14:01:24 +0000
@@ -32,7 +32,7 @@
HttpResponseRedirect,
)
from django.utils.http import urlquote_plus
-from maasserver.exceptions import MaaSAPIException
+from maasserver.exceptions import MAASAPIException
def get_relative_path(path):
@@ -53,7 +53,7 @@
Most UI views are visible only to logged-in users, but there are pages
that are accessible to anonymous users (e.g. the login page!) or that
- use other authentication (e.g. the MaaS API, which is managed through
+ use other authentication (e.g. the MAAS API, which is managed through
piston).
"""
@@ -93,7 +93,7 @@
class ExceptionMiddleware:
"""Convert exceptions into appropriate HttpResponse responses.
- For example, a MaaSAPINotFound exception processed by a middleware
+ For example, a MAASAPINotFound exception processed by a middleware
based on this class will result in an http 404 response to the client.
Validation errors become "bad request" responses.
@@ -122,8 +122,8 @@
return None
encoding = b'utf-8'
- if isinstance(exception, MaaSAPIException):
- # The exception is a MaaSAPIException: exception.api_error
+ if isinstance(exception, MAASAPIException):
+ # The exception is a MAASAPIException: exception.api_error
# will give us the proper error type.
return HttpResponse(
content=unicode(exception).encode(encoding),
=== modified file 'src/maasserver/models.py'
--- src/maasserver/models.py 2012-03-14 15:40:45 +0000
+++ src/maasserver/models.py 2012-03-15 14:01:24 +0000
@@ -1,7 +1,7 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""MaaS model objects."""
+"""MAAS model objects."""
from __future__ import (
print_function,
@@ -59,7 +59,7 @@
POWER_TYPE_CHOICES,
)
-# Special users internal to MaaS.
+# Special users internal to MAAS.
SYSTEM_USERS = [
# For nodes' access to the metadata API:
nodeinituser.user_name,
@@ -323,7 +323,7 @@
class Node(CommonInfo):
- """A `Node` represents a physical machine used by the MaaS Server.
+ """A `Node` represents a physical machine used by the MAAS Server.
:ivar system_id: The unique identifier for this `Node`.
(e.g. 'node-41eba45e-4cfa-11e1-a052-00225f89f211').
@@ -463,7 +463,7 @@
return self.mac_address
-GENERIC_CONSUMER = 'MaaS consumer'
+GENERIC_CONSUMER = 'MAAS consumer'
def create_auth_token(user):
@@ -524,7 +524,7 @@
class UserProfile(models.Model):
- """A User profile to store MaaS specific methods and fields.
+ """A User profile to store MAAS specific methods and fields.
:ivar user: The related User_.
@@ -751,7 +751,7 @@
'check_compatibility': False,
'node_power_type': POWER_TYPE.WAKE_ON_LAN,
# The host name or address where the nodes can access the metadata
- # service of this MaaS.
+ # service of this MAAS.
'maas_url': settings.DEFAULT_MAAS_URL,
# Ubuntu section configuration.
'fallback_master_archive': False,
@@ -880,7 +880,7 @@
admin.site.register(SSHKeys)
-class MaaSAuthorizationBackend(ModelBackend):
+class MAASAuthorizationBackend(ModelBackend):
supports_object_permissions = True
=== modified file 'src/maasserver/provisioning.py'
--- src/maasserver/provisioning.py 2012-03-14 11:29:01 +0000
+++ src/maasserver/provisioning.py 2012-03-15 14:01:24 +0000
@@ -35,7 +35,7 @@
"""Return a proxy to the Provisioning API.
If ``PSERV_URL`` is not set, we attempt to return a handle to a fake proxy
- implementation. This will not be available in a packaged version of MaaS,
+ implementation. This will not be available in a packaged version of MAAS,
in which case an error is raised.
"""
url = settings.PSERV_URL
@@ -85,10 +85,10 @@
def name_arch_in_cobbler_style(architecture):
"""Give architecture name as used in cobbler.
- MaaS uses Ubuntu-style architecture names, notably including "amd64"
+ MAAS uses Ubuntu-style architecture names, notably including "amd64"
which in Cobbler terms is "x86_64."
- :param architecture: An architecture name (e.g. as produced by MaaS).
+ :param architecture: An architecture name (e.g. as produced by MAAS).
:type architecture: basestring
:return: An architecture name in Cobbler style.
:rtype: unicode
=== modified file 'src/maasserver/static/js/node_add.js'
--- src/maasserver/static/js/node_add.js 2012-03-14 10:08:11 +0000
+++ src/maasserver/static/js/node_add.js 2012-03-15 14:01:24 +0000
@@ -187,13 +187,13 @@
// Prepare spinnerNode.
this.spinnerNode = Y.Node.create('<img />')
.addClass('spinner')
- .set('src', MaaS_config.uris.statics + 'img/spinner.gif');
+ .set('src', MAAS_config.uris.statics + 'img/spinner.gif');
// Prepare logged-off error message.
this.loggedOffNode = Y.Node.create('<span />')
.set('text', "You have been logged out, please ")
.append(Y.Node.create('<a />')
.set('text', 'log in')
- .set('href', MaaS_config.uris.login))
+ .set('href', MAAS_config.uris.login))
.append(Y.Node.create('<span />')
.set('text', ' again.'));
},
@@ -255,7 +255,7 @@
}
};
var request = module._io.send(
- MaaS_config.uris.nodes_handler, cfg);
+ MAAS_config.uris.nodes_handler, cfg);
}
});
=== modified file 'src/maasserver/static/js/node_views.js'
--- src/maasserver/static/js/node_views.js 2012-02-24 17:37:01 +0000
+++ src/maasserver/static/js/node_views.js 2012-03-15 14:01:24 +0000
@@ -97,7 +97,7 @@
}
};
var request = module._io.send(
- MaaS_config.uris.nodes_handler, cfg);
+ MAAS_config.uris.nodes_handler, cfg);
},
/**
@@ -154,7 +154,7 @@
this.append = config.append;
// Prepare spinnerNode.
this.spinnerNode = Y.Node.create('<img />')
- .set('src', MaaS_config.uris.statics + 'img/spinner.gif');
+ .set('src', MAAS_config.uris.statics + 'img/spinner.gif');
},
/**
=== modified file 'src/maasserver/static/js/prefs.js'
--- src/maasserver/static/js/prefs.js 2012-03-07 14:09:55 +0000
+++ src/maasserver/static/js/prefs.js 2012-03-15 14:01:24 +0000
@@ -42,12 +42,12 @@
.set('id','create_token')
.addClass('button')
.addClass('right')
- .set('text', "+ Add MaaS key");
+ .set('text', "+ Add MAAS key");
this.status_node = Y.Node.create('<div />')
.set('id','create_error');
this.spinnerNode = Y.Node.create('<img />')
.addClass('spinner')
- .set('src', MaaS_config.uris.statics + 'img/spinner.gif');
+ .set('src', MAAS_config.uris.statics + 'img/spinner.gif');
this.get('srcNode').one('#token_creation_placeholder')
.append(this.create_link)
.append(this.status_node);
@@ -113,7 +113,7 @@
}
};
var request = module._io.send(
- MaaS_config.uris.account_handler, cfg);
+ MAAS_config.uris.account_handler, cfg);
},
showSpinner: function() {
@@ -155,7 +155,7 @@
.set('title', 'Delete token')
.set(
'src',
- MaaS_config.uris.statics + 'img/delete.png')))
+ MAAS_config.uris.statics + 'img/delete.png')))
.append(Y.Node.create('<input />')
.set('type', 'text')
.addClass('disabled')
@@ -201,7 +201,7 @@
}
};
var request = module._io.send(
- MaaS_config.uris.account_handler, cfg);
+ MAAS_config.uris.account_handler, cfg);
}
});
=== modified file 'src/maasserver/static/js/tests/test_node_add.html'
--- src/maasserver/static/js/tests/test_node_add.html 2012-03-14 10:08:11 +0000
+++ src/maasserver/static/js/tests/test_node_add.html 2012-03-15 14:01:24 +0000
@@ -14,7 +14,7 @@
<script type="text/javascript" src="test_node_add.js"></script>
<script type="text/javascript">
<!--
- var MaaS_config = {
+ var MAAS_config = {
uris: {
login: '/login/',
statics: '/static/',
=== modified file 'src/maasserver/static/js/tests/test_node_add.js'
--- src/maasserver/static/js/tests/test_node_add.js 2012-03-14 10:08:11 +0000
+++ src/maasserver/static/js/tests/test_node_add.js 2012-03-15 14:01:24 +0000
@@ -18,7 +18,7 @@
var mockXhr = Y.Mock();
Y.Mock.expect(mockXhr, {
method: 'send',
- args: [MaaS_config.uris.nodes_handler, Y.Mock.Value.Any]
+ args: [MAAS_config.uris.nodes_handler, Y.Mock.Value.Any]
});
this.mockIO(mockXhr, module);
},
@@ -86,7 +86,7 @@
var mockXhr = Y.Mock();
Y.Mock.expect(mockXhr, {
method: 'send',
- args: [MaaS_config.uris.nodes_handler, Y.Mock.Value.Any]
+ args: [MAAS_config.uris.nodes_handler, Y.Mock.Value.Any]
});
this.mockIO(mockXhr, module);
module.showAddNodeWidget();
@@ -101,7 +101,7 @@
var mockXhr = Y.Mock();
Y.Mock.expect(mockXhr, {
method: 'send',
- args: [MaaS_config.uris.nodes_handler, Y.Mock.Value.Any]
+ args: [MAAS_config.uris.nodes_handler, Y.Mock.Value.Any]
});
this.mockIO(mockXhr, module);
module.showAddNodeWidget();
@@ -171,7 +171,7 @@
var error_message = panel.get(
'srcNode').one('.form-global-errors').get('innerHTML');
// The link to the login page is present in the error message.
- var link_position = error_message.search(MaaS_config.uris.login);
+ var link_position = error_message.search(MAAS_config.uris.login);
Y.Assert.areNotEqual(-1, link_position);
}
=== modified file 'src/maasserver/static/js/tests/test_node_views.html'
--- src/maasserver/static/js/tests/test_node_views.html 2012-03-07 16:26:04 +0000
+++ src/maasserver/static/js/tests/test_node_views.html 2012-03-15 14:01:24 +0000
@@ -16,7 +16,7 @@
<script type="text/javascript" src="test_node_views.js"></script>
<script type="text/javascript">
<!--
- var MaaS_config = {
+ var MAAS_config = {
uris: {
statics: '/static/',
nodes_handler: '/api/nodes/'
=== modified file 'src/maasserver/static/js/tests/test_node_views.js'
--- src/maasserver/static/js/tests/test_node_views.js 2012-02-24 17:37:01 +0000
+++ src/maasserver/static/js/tests/test_node_views.js 2012-03-15 14:01:24 +0000
@@ -26,7 +26,7 @@
var mockXhr = Y.Mock();
Y.Mock.expect(mockXhr, {
method: 'send',
- args: [MaaS_config.uris.nodes_handler, Y.Mock.Value.Any]
+ args: [MAAS_config.uris.nodes_handler, Y.Mock.Value.Any]
});
this.mockIO(mockXhr, module);
=== modified file 'src/maasserver/static/js/tests/test_prefs.html'
--- src/maasserver/static/js/tests/test_prefs.html 2012-03-07 16:26:04 +0000
+++ src/maasserver/static/js/tests/test_prefs.html 2012-03-15 14:01:24 +0000
@@ -14,7 +14,7 @@
<script type="text/javascript" src="test_prefs.js"></script>
<script type="text/javascript">
<!--
- var MaaS_config = {
+ var MAAS_config = {
uris: {
statics: '/static/',
account_handler: '/api/accounts/prefs/'
=== modified file 'src/maasserver/static/js/tests/test_prefs.js'
--- src/maasserver/static/js/tests/test_prefs.js 2012-03-07 14:09:55 +0000
+++ src/maasserver/static/js/tests/test_prefs.js 2012-03-15 14:01:24 +0000
@@ -40,7 +40,7 @@
var create_link = widget.get('srcNode').one('#create_token');
Y.Assert.isNotNull(create_link);
Y.Assert.areEqual(
- "+ Add MaaS key", create_link.get('text'));
+ "+ Add MAAS key", create_link.get('text'));
// The placeholder node for errors has been created.
var status_node = widget.get('srcNode').one('#create_error');
Y.Assert.isNotNull(status_node);
@@ -61,7 +61,7 @@
var fired = false;
mockXhr.send = function(url, cfg) {
fired = true;
- Y.Assert.areEqual(MaaS_config.uris.account_handler, url);
+ Y.Assert.areEqual(MAAS_config.uris.account_handler, url);
Y.Assert.areEqual(
"op=delete_authorisation_token&token_key=tokenkey1",
cfg.data);
@@ -163,7 +163,7 @@
var fired = false;
mockXhr.send = function(url, cfg) {
fired = true;
- Y.Assert.areEqual(MaaS_config.uris.account_handler, url);
+ Y.Assert.areEqual(MAAS_config.uris.account_handler, url);
Y.Assert.areEqual(
"op=create_authorisation_token",
cfg.data);
=== modified file 'src/maasserver/static/js/tests/test_utils.html'
--- src/maasserver/static/js/tests/test_utils.html 2012-03-07 16:37:05 +0000
+++ src/maasserver/static/js/tests/test_utils.html 2012-03-15 14:01:24 +0000
@@ -14,7 +14,7 @@
<script type="text/javascript" src="test_utils.js"></script>
<script type="text/javascript">
<!--
- var MaaS_config = {
+ var MAAS_config = {
uris: {
maas_handler: '/api/maas/'
}
@@ -26,7 +26,7 @@
<span id="suite">maas.utils.tests</span>
<script type="text/x-template" id="title-form">
<form class="page-title-form">
- <input type="text" value="Test Name MaaS"></input>
+ <input type="text" value="Test Name MAAS"></input>
</form>
</script>
<div id="placeholder"></div>
=== modified file 'src/maasserver/static/js/tests/test_utils.js'
--- src/maasserver/static/js/tests/test_utils.js 2012-03-07 08:15:33 +0000
+++ src/maasserver/static/js/tests/test_utils.js 2012-03-15 14:01:24 +0000
@@ -149,7 +149,7 @@
test_hasSuffix_returns_true_if_suffix: function() {
var widget = this.createWidget();
- widget.set('title', "Sample Title MaaS");
+ widget.set('title', "Sample Title MAAS");
Y.Assert.isTrue(widget.hasSuffix());
},
@@ -161,7 +161,7 @@
test_removeSuffix_removes_suffix: function() {
var widget = this.createWidget();
- widget.set('title', "Sample Title MaaS");
+ widget.set('title', "Sample Title MAAS");
widget.removeSuffix();
Y.Assert.areEqual(
"Sample Title", widget.get('title'));
@@ -180,13 +180,13 @@
widget.set('title', "Sample Title");
widget.addSuffix();
Y.Assert.areEqual(
- "Sample Title MaaS", widget.get('title'));
+ "Sample Title MAAS", widget.get('title'));
},
test_titleEditStart_starts_editing: function() {
var widget = this.createWidget();
widget._editing = false;
- widget.set('title', "Sample Title MaaS");
+ widget.set('title', "Sample Title MAAS");
widget.titleEditStart();
Y.Assert.isTrue(widget._editing);
Y.Assert.areEqual(
@@ -196,11 +196,11 @@
test_titleEditStart_does_nothing_if_already_editing: function() {
var widget = this.createWidget();
widget._editing = true;
- widget.set('title', "Sample Title MaaS");
+ widget.set('title', "Sample Title MAAS");
widget.titleEditStart();
Y.Assert.isTrue(widget._editing);
Y.Assert.areEqual(
- "Sample Title MaaS", widget.get('title'));
+ "Sample Title MAAS", widget.get('title'));
},
test_titleEditEnd_stops_editing_if_currently_editing: function() {
@@ -211,7 +211,7 @@
var fired = false;
mockXhr.send = function(url, cfg) {
fired = true;
- Y.Assert.areEqual(MaaS_config.uris.maas_handler, url);
+ Y.Assert.areEqual(MAAS_config.uris.maas_handler, url);
Y.Assert.areEqual(
"op=set_config&name=maas_name&value=SampleTitle",
cfg.data);
@@ -221,7 +221,7 @@
Y.Assert.isTrue(fired);
Y.Assert.isFalse(widget._editing);
Y.Assert.areEqual(
- "SampleTitle MaaS", widget.get('title'));
+ "SampleTitle MAAS", widget.get('title'));
},
test_titleEditEnd_does_nothing_if_not_editing: function() {
=== modified file 'src/maasserver/static/js/utils.js'
--- src/maasserver/static/js/utils.js 2012-03-07 08:15:33 +0000
+++ src/maasserver/static/js/utils.js 2012-03-15 14:01:24 +0000
@@ -1,7 +1,7 @@
/* Copyright 2012 Canonical Ltd. This software is licensed under the
* GNU Affero General Public License version 3 (see the file LICENSE).
*
- * MaaS utilities.
+ * MAAS utilities.
*
* @module Y.mass.utils
*/
@@ -105,12 +105,12 @@
TitleEditWidget.NAME = 'title-edit-widget';
-TitleEditWidget.TITLE_SUFFIX = ' MaaS';
+TitleEditWidget.TITLE_SUFFIX = ' MAAS';
TitleEditWidget.ATTRS = {
/**
- * MaaS's title input node.
+ * MAAS's title input node.
*
* @attribute input
* @type Node
@@ -122,7 +122,7 @@
},
/**
- * MaaS's title.
+ * MAAS's title.
*
* @attribute title
* @type string
@@ -261,7 +261,7 @@
}
};
var request = module._io.send(
- MaaS_config.uris.maas_handler, cfg);
+ MAAS_config.uris.maas_handler, cfg);
}
});
=== modified file 'src/maasserver/templates/maasserver/api_doc.html'
--- src/maasserver/templates/maasserver/api_doc.html 2012-02-10 11:04:44 +0000
+++ src/maasserver/templates/maasserver/api_doc.html 2012-03-15 14:01:24 +0000
@@ -1,7 +1,7 @@
{% extends "maasserver/base.html" %}
-{% block title %}MaaS API documentation{% endblock %}
-{% block page-title %}MaaS API documentation{% endblock %}
+{% block title %}MAAS API documentation{% endblock %}
+{% block page-title %}MAAS API documentation{% endblock %}
{% block content %}
{{ doc|safe }}
=== modified file 'src/maasserver/templates/maasserver/base.html'
--- src/maasserver/templates/maasserver/base.html 2012-03-05 02:55:44 +0000
+++ src/maasserver/templates/maasserver/base.html 2012-03-15 14:01:24 +0000
@@ -71,7 +71,7 @@
<ul id="main-nav" class="nav">
<li class="icon {% block nav-active-index %}{% endblock %}">
<a href="{% url 'index' %}">
- <img src="{{ STATIC_URL }}img/home.png" alt="MaaS home" />
+ <img src="{{ STATIC_URL }}img/home.png" alt="MAAS home" />
</a>
</li>
<li class="{% block nav-active-node-list %}{% endblock %}">
=== modified file 'src/maasserver/templates/maasserver/index.html'
--- src/maasserver/templates/maasserver/index.html 2012-03-15 11:16:37 +0000
+++ src/maasserver/templates/maasserver/index.html 2012-03-15 14:01:24 +0000
@@ -65,8 +65,8 @@
{% block page-title-block %}
{% if user.is_superuser %}
<form action="" method="" class="page-title-form">
- <input type="text" value="{{ global_options.site_name }} MaaS"
- title="Edit the name of this MaaS" />
+ <input type="text" value="{{ global_options.site_name }} MAAS"
+ title="Edit the name of this MAAS" />
</form>
{% else %}
<h1 id="page-title">{% include "maasserver/site_title.html" %}</h1>
=== modified file 'src/maasserver/templates/maasserver/js-conf.html'
--- src/maasserver/templates/maasserver/js-conf.html 2012-03-13 17:25:11 +0000
+++ src/maasserver/templates/maasserver/js-conf.html 2012-03-15 14:01:24 +0000
@@ -7,7 +7,7 @@
base: '{{ STATIC_URL }}jslibs/yui/{{ YUI_VERSION }}/build/',
comboBase: '{% if FORCE_SCRIPT_NAME %}{{ FORCE_SCRIPT_NAME }}{% endif%}/{{ YUI_COMBO_URL }}?',
};
-var MaaS_config = {
+var MAAS_config = {
uris: {
login: '{% url "login" %}',
statics: '{{ STATIC_URL }}',
=== modified file 'src/maasserver/templates/maasserver/prefs.html'
--- src/maasserver/templates/maasserver/prefs.html 2012-03-05 03:19:36 +0000
+++ src/maasserver/templates/maasserver/prefs.html 2012-03-15 14:01:24 +0000
@@ -20,12 +20,12 @@
<div id="prefs">
<div id="api" class="block size7 first">
<h2>Keys</h2>
- <h3>MaaS keys</h3>
+ <h3>MAAS keys</h3>
<ul class="list">
{% for token in user.get_profile.get_authorisation_tokens %}
<li class="bundle">
<a href="#" class="delete-link icon right">
- <img title="Delete MaaS key"
+ <img title="Delete MAAS key"
src="{{ STATIC_URL }}img/delete.png" />
</a>
<input type="text"
=== modified file 'src/maasserver/templates/maasserver/settings.html'
--- src/maasserver/templates/maasserver/settings.html 2012-03-05 05:52:32 +0000
+++ src/maasserver/templates/maasserver/settings.html 2012-03-15 14:01:24 +0000
@@ -18,7 +18,7 @@
<th>ID</th>
<th>Number of nodes in use</th>
<th>Last seen</th>
- <th>MaaS Admin</th>
+ <th>MAAS Admin</th>
<th></th>
</tr>
</thead>
=== modified file 'src/maasserver/templates/maasserver/site_title.html'
--- src/maasserver/templates/maasserver/site_title.html 2012-02-21 01:01:10 +0000
+++ src/maasserver/templates/maasserver/site_title.html 2012-03-15 14:01:24 +0000
@@ -1,1 +1,1 @@
-{{ global_options.site_name }} MaaS
+{{ global_options.site_name }} MAAS
=== modified file 'src/maasserver/templates/maasserver/user_view.html'
--- src/maasserver/templates/maasserver/user_view.html 2012-03-05 11:28:41 +0000
+++ src/maasserver/templates/maasserver/user_view.html 2012-03-15 14:01:24 +0000
@@ -35,14 +35,14 @@
<span>{{ view_user.email }}</span>
</li>
<li class="block size2 first">
- <h4>MaaS Keys</h4>
+ <h4>MAAS Keys</h4>
<span>
{{ user.get_profile.get_authorisation_tokens.count }}
key{{ user.get_profile.get_authorisation_tokens.count|pluralize }}
</span>
</li>
<li class="block size3">
- <h4>MaaS Administrator</h4>
+ <h4>MAAS Administrator</h4>
<span>{{ view_user.is_superuser }}</span>
</li>
</ul>
=== modified file 'src/maasserver/tests/test_api.py'
--- src/maasserver/tests/test_api.py 2012-03-14 15:49:30 +0000
+++ src/maasserver/tests/test_api.py 2012-03-15 14:01:24 +0000
@@ -930,8 +930,8 @@
self.assertEqual("File not found", response.content)
-class MaaSAPIAnonTest(APIv10TestMixin, TestCase):
- # The MaaS' handler is not accessible to anon users.
+class MAASAPIAnonTest(APIv10TestMixin, TestCase):
+ # The MAAS' handler is not accessible to anon users.
def test_anon_get_config_forbidden(self):
response = self.client.get(
@@ -948,7 +948,7 @@
self.assertEqual(httplib.FORBIDDEN, response.status_code)
-class MaaSAPITest(APITestCase):
+class MAASAPITest(APITestCase):
def test_simple_user_get_config_forbidden(self):
response = self.client.get(
=== modified file 'src/maasserver/tests/test_auth.py'
--- src/maasserver/tests/test_auth.py 2012-03-13 05:34:38 +0000
+++ src/maasserver/tests/test_auth.py 2012-03-15 14:01:24 +0000
@@ -15,7 +15,7 @@
from django.core.urlresolvers import reverse
from maasserver.models import (
- MaaSAuthorizationBackend,
+ MAASAuthorizationBackend,
Node,
NODE_STATUS,
)
@@ -72,39 +72,39 @@
return factory.make_node(owner=owner, status=NODE_STATUS.ALLOCATED)
-class TestMaaSAuthorizationBackend(TestCase):
+class TestMAASAuthorizationBackend(TestCase):
def test_invalid_check_object(self):
- backend = MaaSAuthorizationBackend()
+ backend = MAASAuthorizationBackend()
mac = make_unallocated_node().add_mac_address('AA:BB:CC:DD:EE:FF')
self.assertRaises(
NotImplementedError, backend.has_perm,
factory.make_admin(), 'access', mac)
def test_invalid_check_permission(self):
- backend = MaaSAuthorizationBackend()
+ backend = MAASAuthorizationBackend()
self.assertRaises(
NotImplementedError, backend.has_perm,
factory.make_admin(), 'not-access', make_unallocated_node())
def test_node_init_user_cannot_access(self):
- backend = MaaSAuthorizationBackend()
+ backend = MAASAuthorizationBackend()
self.assertFalse(backend.has_perm(
get_node_init_user(), 'access', make_unallocated_node()))
def test_user_can_access_unowned_node(self):
- backend = MaaSAuthorizationBackend()
+ backend = MAASAuthorizationBackend()
self.assertTrue(backend.has_perm(
factory.make_user(), 'access', make_unallocated_node()))
def test_user_cannot_access_nodes_owned_by_others(self):
- backend = MaaSAuthorizationBackend()
+ backend = MAASAuthorizationBackend()
self.assertFalse(backend.has_perm(
factory.make_user(), 'access', make_allocated_node()))
def test_owned_status(self):
# A non-admin user can access nodes he owns.
- backend = MaaSAuthorizationBackend()
+ backend = MAASAuthorizationBackend()
node = make_allocated_node()
self.assertTrue(backend.has_perm(node.owner, 'access', node))
=== modified file 'src/maasserver/tests/test_messages.py'
--- src/maasserver/tests/test_messages.py 2012-03-13 11:43:09 +0000
+++ src/maasserver/tests/test_messages.py 2012-03-15 14:01:24 +0000
@@ -14,7 +14,7 @@
import json
from maasserver.messages import (
- MaaSMessenger,
+ MAASMessenger,
MESSENGER_EVENT,
MessengerBase,
)
@@ -98,7 +98,7 @@
[[MESSENGER_EVENT.DELETED, obj]], producer.messages)
-class MaaSMessengerTest(TestModelTestCase):
+class MAASMessengerTest(TestModelTestCase):
app = 'maasserver.tests'
@@ -106,14 +106,14 @@
producer = FakeProducer()
event_name = factory.getRandomString()
obj = MessagesTestModel(name=factory.getRandomString())
- messenger = MaaSMessenger(MessagesTestModel, producer)
+ messenger = MAASMessenger(MessagesTestModel, producer)
self.assertEqual(
'%s.%s' % ('MessagesTestModel', event_name),
messenger.event_key(event_name, obj))
def test_create_msg(self):
producer = FakeProducer()
- messenger = MaaSMessenger(Node, producer)
+ messenger = MAASMessenger(Node, producer)
event_name = factory.getRandomString()
obj_name = factory.getRandomString()
obj = MessagesTestModel(name=obj_name)
=== modified file 'src/maasserver/tests/test_middleware.py'
--- src/maasserver/tests/test_middleware.py 2012-03-13 05:34:38 +0000
+++ src/maasserver/tests/test_middleware.py 2012-03-15 14:01:24 +0000
@@ -19,8 +19,8 @@
from django.core.exceptions import ValidationError
from django.test.client import RequestFactory
from maasserver.exceptions import (
- MaaSAPIException,
- MaaSAPINotFound,
+ MAASAPIException,
+ MAASAPINotFound,
)
from maasserver.middleware import (
APIErrorsMiddleware,
@@ -69,7 +69,7 @@
def test_ignores_paths_outside_path_regex(self):
middleware = self.make_middleware(self.make_base_path())
request = fake_request(self.make_base_path())
- exception = MaaSAPINotFound("Huh?")
+ exception = MAASAPINotFound("Huh?")
self.assertIsNone(middleware.process_exception(request, exception))
def test_ignores_unknown_exception(self):
@@ -78,8 +78,8 @@
self.assertIsNone(
self.process_exception(ValueError("Error occurred!")))
- def test_reports_MaaSAPIException_with_appropriate_api_error(self):
- class MyException(MaaSAPIException):
+ def test_reports_MAASAPIException_with_appropriate_api_error(self):
+ class MyException(MAASAPIException):
api_error = httplib.UNAUTHORIZED
exception = MyException("Error occurred!")
@@ -88,8 +88,8 @@
(httplib.UNAUTHORIZED, "Error occurred!"),
(response.status_code, response.content))
- def test_renders_MaaSAPIException_as_unicode(self):
- class MyException(MaaSAPIException):
+ def test_renders_MAASAPIException_as_unicode(self):
+ class MyException(MAASAPIException):
api_error = httplib.UNAUTHORIZED
error_message = "Error %s" % unichr(233)
@@ -118,7 +118,7 @@
def test_handles_error_on_API(self):
middleware = APIErrorsMiddleware()
non_api_request = fake_request("/api/1.0/hello")
- exception = MaaSAPINotFound("Have you looked under the couch?")
+ exception = MAASAPINotFound("Have you looked under the couch?")
response = middleware.process_exception(non_api_request, exception)
self.assertEqual(
(httplib.NOT_FOUND, "Have you looked under the couch?"),
@@ -127,7 +127,7 @@
def test_ignores_error_outside_API(self):
middleware = APIErrorsMiddleware()
non_api_request = fake_request("/middleware/api/hello")
- exception = MaaSAPINotFound("Have you looked under the couch?")
+ exception = MAASAPINotFound("Have you looked under the couch?")
self.assertIsNone(
middleware.process_exception(non_api_request, exception))
=== modified file 'src/maasserver/tests/test_models.py'
--- src/maasserver/tests/test_models.py 2012-03-13 10:41:00 +0000
+++ src/maasserver/tests/test_models.py 2012-03-15 14:01:24 +0000
@@ -686,7 +686,7 @@
self.assertTrue(FileStorage.storage.exists(storage.data.name))
def test_collect_garbage_tolerates_missing_upload_dir(self):
- # When MaaS is freshly installed, the upload directory is still
+ # When MAAS is freshly installed, the upload directory is still
# missing. But...
FileStorage.objects.collect_garbage()
# ...we get through garbage collection without breakage.
=== modified file 'src/maasserver/urls.py'
--- src/maasserver/urls.py 2012-03-15 11:16:37 +0000
+++ src/maasserver/urls.py 2012-03-15 14:01:24 +0000
@@ -79,7 +79,7 @@
def get_proxy_longpoll_enabled():
- """Should MaaS act as a proxy to a txlongpoll server?
+ """Should MAAS act as a proxy to a txlongpoll server?
This should only be true if longpoll is enabled (LONGPOLL_PATH) and
if the url to a txlongpoll is configured (LONGPOLL_SERVER_URL).
=== modified file 'src/maasserver/urls_api.py'
--- src/maasserver/urls_api.py 2012-03-06 15:24:01 +0000
+++ src/maasserver/urls_api.py 2012-03-15 14:01:24 +0000
@@ -20,7 +20,7 @@
AdminRestrictedResource,
api_doc,
FilesHandler,
- MaaSHandler,
+ MAASHandler,
NodeHandler,
NodeMacHandler,
NodeMacsHandler,
@@ -40,7 +40,7 @@
# Admin handlers.
-maas_handler = AdminRestrictedResource(MaaSHandler, authentication=api_auth)
+maas_handler = AdminRestrictedResource(MAASHandler, authentication=api_auth)
# API URLs accessible to anonymous users.
=== modified file 'src/maasserver/views.py'
--- src/maasserver/views.py 2012-03-15 11:27:27 +0000
+++ src/maasserver/views.py 2012-03-15 14:01:24 +0000
@@ -52,7 +52,7 @@
AddArchiveForm,
CommissioningForm,
EditUserForm,
- MaaSAndNetworkForm,
+ MAASAndNetworkForm,
NewUserCreationForm,
ProfileForm,
UbuntuForm,
@@ -257,9 +257,9 @@
def settings(request):
user_list = UserProfile.objects.all_users().order_by('username')
- # Process the MaaS & network form.
+ # Process the MAAS & network form.
maas_and_network_form, response = process_form(
- request, MaaSAndNetworkForm, reverse('settings'), 'maas_and_network',
+ request, MAASAndNetworkForm, reverse('settings'), 'maas_and_network',
"Configuration updated.")
if response is not None:
return response
=== modified file 'src/metadataserver/api.py'
--- src/metadataserver/api.py 2012-03-08 10:19:29 +0000
+++ src/metadataserver/api.py 2012-03-15 14:01:24 +0000
@@ -18,7 +18,7 @@
from django.http import HttpResponse
from maasserver.exceptions import (
- MaaSAPINotFound,
+ MAASAPINotFound,
PermissionDenied,
Unauthorized,
)
@@ -29,11 +29,11 @@
from piston.handler import BaseHandler
-class UnknownMetadataVersion(MaaSAPINotFound):
+class UnknownMetadataVersion(MAASAPINotFound):
"""Not a known metadata version."""
-class UnknownNode(MaaSAPINotFound):
+class UnknownNode(MAASAPINotFound):
"""Not a known node."""
@@ -122,7 +122,7 @@
"""
field = item.split('/')[0]
if field not in self.fields:
- raise MaaSAPINotFound("Unknown metadata attribute: %s" % field)
+ raise MAASAPINotFound("Unknown metadata attribute: %s" % field)
producers = {
'local-hostname': self.local_hostname,
@@ -162,4 +162,4 @@
NodeUserData.objects.get_user_data(node),
mimetype='application/octet-stream')
except NodeUserData.DoesNotExist:
- raise MaaSAPINotFound("No user data available for this node.")
+ raise MAASAPINotFound("No user data available for this node.")
=== modified file 'src/provisioningserver/api.py'
--- src/provisioningserver/api.py 2012-03-14 11:50:36 +0000
+++ src/provisioningserver/api.py 2012-03-15 14:01:24 +0000
@@ -152,7 +152,7 @@
# Preseed data to send to cloud-init. We set this as MAAS_PRESEED in
# ks_meta, and it gets fed straight into debconf.
metadata_preseed_items = [
- ('datasources', 'multiselect', 'MaaS'),
+ ('datasources', 'multiselect', 'MAAS'),
('maas-metadata-url', 'string', '%(maas-metadata-url)s'),
('maas-metadata-credentials', 'string', '%(maas-metadata-credentials)s'),
]
=== modified file 'src/provisioningserver/cobblerclient.py'
--- src/provisioningserver/cobblerclient.py 2012-03-12 14:49:01 +0000
+++ src/provisioningserver/cobblerclient.py 2012-03-15 14:01:24 +0000
@@ -337,7 +337,7 @@
# keep an accurate record of which attributes we use for which types
# of objects.
# Some attributes in Cobbler uses dashes as separators, others use
- # underscores. In MaaS, use only underscores.
+ # underscores. In MAAS, use only underscores.
known_attributes = []
# What attributes does Cobbler require for this type of object?
@@ -381,7 +381,7 @@
def _normalize_attribute(cls, attribute_name, attributes=None):
"""Normalize an attribute name.
- Cobbler mixes dashes and underscores in attribute names. MaaS may
+ Cobbler mixes dashes and underscores in attribute names. MAAS may
pass attributes as keyword arguments internally, where dashes are not
an option. Hide the distinction by looking up the proper name in
`known_attributes` by default, but `attributes` can be passed to
=== modified file 'src/provisioningserver/plugin.py'
--- src/provisioningserver/plugin.py 2012-02-29 11:54:10 +0000
+++ src/provisioningserver/plugin.py 2012-03-15 14:01:24 +0000
@@ -1,7 +1,7 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Twisted Application Plugin code for the MaaS provisioning server"""
+"""Twisted Application Plugin code for the MAAS provisioning server"""
from __future__ import (
print_function,
@@ -150,7 +150,7 @@
broker_vhost = broker_config["vhost"]
# Connecting to RabbitMQ is not yet a required component of a running
- # MaaS installation; skip unless the password has been set explicitly.
+ # MAAS installation; skip unless the password has been set explicitly.
if broker_password is not b"test":
cb_connected = lambda ignored: None # TODO
cb_disconnected = lambda ignored: None # TODO
=== modified file 'src/provisioningserver/services.py'
--- src/provisioningserver/services.py 2012-02-29 11:54:10 +0000
+++ src/provisioningserver/services.py 2012-03-15 14:01:24 +0000
@@ -1,7 +1,7 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Additional services that compose the MaaS Provisioning Server."""
+"""Additional services that compose the MAAS Provisioning Server."""
from __future__ import (
print_function,
=== modified file 'src/provisioningserver/testing/amqpclient.py'
--- src/provisioningserver/testing/amqpclient.py 2012-02-29 11:54:10 +0000
+++ src/provisioningserver/testing/amqpclient.py 2012-03-15 14:01:24 +0000
@@ -72,7 +72,7 @@
@skip(
"RabbitMQ is not yet a required component "
- "of a running MaaS installation.")
+ "of a running MAAS installation.")
def setUp(self):
"""
At each run, we delete the test vhost and recreate it, to be sure to be
=== modified file 'src/provisioningserver/tests/test_fakecobbler.py'
--- src/provisioningserver/tests/test_fakecobbler.py 2012-02-13 14:57:04 +0000
+++ src/provisioningserver/tests/test_fakecobbler.py 2012-03-15 14:01:24 +0000
@@ -383,7 +383,7 @@
def test_normalize_attribute_normalizes_separators(self):
# Based on the Cobbler source, Profile seems to use a mix of
- # underscores and dashes in attribute names. The MaaS Cobbler
+ # underscores and dashes in attribute names. The MAAS Cobbler
# wrapper ignores the difference, and uses whatever Cobbler
# seems to expect in either case.
inputs = [
=== modified file 'templates/test_module.html'
--- templates/test_module.html 2012-03-07 16:26:04 +0000
+++ templates/test_module.html 2012-03-15 14:01:24 +0000
@@ -15,7 +15,7 @@
<script type="text/javascript" src="test_sample.js"></script>
<script type="text/javascript">
<!--
- var MaaS_config = {
+ var MAAS_config = {
uris: {
statics: '/static/',
nodes_handler: '/api/nodes/'
=== modified file 'twisted/plugins/maasps.py'
--- twisted/plugins/maasps.py 2012-02-24 17:37:01 +0000
+++ twisted/plugins/maasps.py 2012-03-15 14:01:24 +0000
@@ -1,7 +1,7 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Twisted Application Plugin for the MaaS provisioning server."""
+"""Twisted Application Plugin for the MAAS provisioning server."""
from __future__ import (
print_function,
=== modified file 'utilities/generate-and-upload-docs'
--- utilities/generate-and-upload-docs 2012-01-24 12:27:35 +0000
+++ utilities/generate-and-upload-docs 2012-03-15 14:01:24 +0000
@@ -2,7 +2,7 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Generate and upload MaaS documentation."""
+"""Generate and upload MAAS documentation."""
from __future__ import (
print_function,
=== modified file 'utilities/maasdb'
--- utilities/maasdb 2012-02-29 11:13:14 +0000
+++ utilities/maasdb 2012-03-15 14:01:24 +0000
@@ -1,6 +1,6 @@
#! /bin/bash -e
#
-# MaaS database control script. See main() at the bottom for usage.
+# MAAS database control script. See main() at the bottom for usage.
#
# Most functions take as their first argument a database cluster's data
# directory. This is where the database's socket, pidfile, log, and data will
@@ -26,7 +26,7 @@
if test -z "$1"
then
- echo "Specify a data directory for the MaaS database cluster." >&2
+ echo "Specify a data directory for the MAAS database cluster." >&2
return 1
fi
if ! echo "$DATADIR" | grep '^/'
@@ -96,7 +96,7 @@
}
-# Initialize a MaaS database.
+# Initialize a MAAS database.
maasdb_init_db() {
local DATADIR DISPOSABLE MARKER
DATADIR="`maasdb_locate "$1"`"
@@ -114,7 +114,7 @@
}
-# Open a psql shell on a MaaS database.
+# Open a psql shell on a MAAS database.
maasdb_shell() {
local DATADIR
DATADIR="`maasdb_locate "$1"`"
@@ -124,7 +124,7 @@
}
-# Execute a query on a MaaS database.
+# Execute a query on a MAAS database.
maasdb_query() {
local DATADIR QUERY
DATADIR="`maasdb_locate "$1"`"
@@ -135,12 +135,12 @@
}
-# Delete an entire MaaS database and cluster. Use only with extreme care!
+# Delete an entire MAAS database and cluster. Use only with extreme care!
maasdb_delete_cluster() {
local DATADIR
DATADIR="`maasdb_locate "$1"`"
- # Before deleting anything, does this at least look like a MaaS database
+ # Before deleting anything, does this at least look like a MAAS database
# cluster?
if test -d "$DATADIR/base"
then
@@ -169,7 +169,7 @@
shell
delete-cluster
-And <cluster-path> is the path to the MaaS development database cluster,
+And <cluster-path> is the path to the MAAS development database cluster,
typically "./db"
EOF
}
=== modified file 'utilities/normalize-spelling'
--- utilities/normalize-spelling 2012-03-15 08:57:30 +0000
+++ utilities/normalize-spelling 2012-03-15 14:01:24 +0000
@@ -7,8 +7,25 @@
# Treat unset variables as an error when substituting.
set -o nounset
-# Normalize the spelling of MaaS to either MaaS or maas, depending on
-# the capitalization of the first letter.
-bzr ls -VR --kind=file --null \
- | xargs -r0 grep -Iil maas --null \
- | xargs -r0 sed -i 's/M[Aa][Aa][Ss]/MAAS/g;s/m[Aa][Aa][Ss]/maas/g'
+cat <<EOF
+This will normalize spelling of MAAS to either 'MAAS' or 'maas'
+depending on the capitalization of the first letter. It pays no heed
+to word boundaries, and will process *all* files in the tree. This
+means two things:
+
+1. Think very hard before using this on a tree with uncommitted
+ changes.
+
+2. Review the changes *carefully* before committing them. At _least_
+ run the test suite.
+
+EOF
+
+read -e -p "Do you really want to run this? [yes/no] " yes_or_no
+
+if [ "${yes_or_no}" == "yes" ]
+then
+ bzr ls -VR --kind=file --null \
+ | xargs -r0 grep -Iil maas --null \
+ | xargs -r0 sed -i 's/M[Aa][Aa][Ss]/MAAS/g;s/m[Aa][Aa][Ss]/maas/g'
+fi