Skip to content

Commit

Permalink
[r=blake-rouse][bug=1553791][author=andreserl] Change references of m…
Browse files Browse the repository at this point in the history
…aas-region-admin to maas-region
  • Loading branch information
roaksoax authored and MAAS Lander committed Mar 7, 2016
1 parent f7e0c9f commit ace955d
Show file tree
Hide file tree
Showing 19 changed files with 46 additions and 46 deletions.
14 changes: 7 additions & 7 deletions HACKING.txt
Expand Up @@ -195,7 +195,7 @@ not start by default.

First create a superuser and start all MAAS services::

$ bin/maas-region-admin createadmin
$ bin/maas-region createadmin
$ make run

Substitute your own email. The command will prompt for a choice of password.
Expand Down Expand Up @@ -412,7 +412,7 @@ in ``src/<application>/models/__init__.py``

Generate the migration script with::

$ ./bin/maas-region-admin makemigrations --name description_of_the_change maasserver
$ ./bin/maas-region makemigrations --name description_of_the_change maasserver

This will generate a migration module named
``src/maasserver/migrations/builtin/<auto_number>_description_of_the_change.py``.
Expand All @@ -432,7 +432,7 @@ If you need to perform data migration, very much in the same way, you will need
to run Django's `makemigrations`_ command. For instance, if you want to perform
changes to the ``maasserver`` application, run::

$ ./bin/maas-region-admin makemigrations --empty --name description_of_the_change maasserver
$ ./bin/maas-region makemigrations --empty --name description_of_the_change maasserver

This will generate a migration module named
``src/maasserver/migrations/builtin/<auto_number>_description_of_the_change.py``.
Expand All @@ -458,13 +458,13 @@ the South_ migrations will be skipped because the Django_ migrations already
provide the entire schema in the initial migration. All of this logic is
performed on upgrade by the `dbupgrade` command.::

$ bin/maas-region-admin dbupgrade
$ bin/maas-region dbupgrade

In some testing case you might need to always run the South_ migrations before
the Django_ migrations on a clean database. Using the `always-south` option on
the `dbupgrade` command allows this testing scenario.::

$ bin/maas-region-admin dbupgrade --always-south
$ bin/maas-region dbupgrade --always-south

.. Note::

Expand All @@ -481,14 +481,14 @@ Examining the database manually

If you need to get an interactive ``psql`` prompt, you can use `dbshell`_::

$ bin/maas-region-admin dbshell
$ bin/maas-region dbshell

.. _dbshell: https://docs.djangoproject.com/en/dev/ref/django-admin/#dbshell

If you need to do the same thing with a version of MAAS you have installed
from the package, you can use::

$ sudo maas-region-admin dbshell --installed
$ sudo maas-region dbshell --installed

You can use the ``\dt`` command to list the tables in the MAAS database. You
can also execute arbitrary SQL. For example:::
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.txt
Expand Up @@ -266,7 +266,7 @@ Create a superuser account
Once MAAS is installed, you'll need to create an administrator
account::

$ sudo maas-region-admin createadmin --username=root --email=MYEMAIL@EXAMPLE.COM
$ sudo maas-region createadmin --username=root --email=MYEMAIL@EXAMPLE.COM

Substitute your own email address for MYEMAIL@EXAMPLE.COM. You may also
use a different username for your administrator account, but "root" is a
Expand Down
28 changes: 14 additions & 14 deletions Makefile
Expand Up @@ -53,7 +53,7 @@ build: \
bin/maas \
bin/maas-probe-dhcp \
bin/maas-rack \
bin/maas-region-admin \
bin/maas-region \
bin/twistd.rack \
bin/twistd.region \
bin/test.cli \
Expand Down Expand Up @@ -95,7 +95,7 @@ bin/database: bin/buildout buildout.cfg versions.cfg setup.py
$(buildout) install database
@touch --no-create $@

bin/maas-region-admin bin/twistd.region: \
bin/maas-region bin/twistd.region: \
data bin/buildout buildout.cfg versions.cfg setup.py $(js_enums)
$(buildout) install region
@touch --no-create $@
Expand All @@ -121,10 +121,10 @@ bin/test.e2e: bin/protractor bin/buildout buildout.cfg versions.cfg setup.py
$(buildout) install e2e-test
@touch --no-create $@

# bin/maas-region-admin is needed for South migration tests. bin/flake8 is
# bin/maas-region is needed for South migration tests. bin/flake8 is
# needed for checking lint and bin/sass is needed for checking css.
bin/test.testing: \
bin/maas-region-admin bin/flake8 bin/sass bin/buildout \
bin/maas-region bin/flake8 bin/sass bin/buildout \
buildout.cfg versions.cfg setup.py
$(buildout) install testing-test
@touch --no-create $@
Expand Down Expand Up @@ -277,11 +277,11 @@ copyright:

check: clean test

docs/api.rst: bin/maas-region-admin src/maasserver/api/doc_handler.py syncdb
bin/maas-region-admin generate_api_doc > $@
docs/api.rst: bin/maas-region src/maasserver/api/doc_handler.py syncdb
bin/maas-region generate_api_doc > $@

sampledata: bin/maas-region-admin bin/database syncdb
$(dbrun) bin/maas-region-admin generate_sample_data
sampledata: bin/maas-region bin/database syncdb
$(dbrun) bin/maas-region generate_sample_data

doc: bin/sphinx docs/api.rst
bin/sphinx
Expand Down Expand Up @@ -357,14 +357,14 @@ clean+db: clean
distclean: clean
$(warning 'distclean' is deprecated; use 'clean')

harness: bin/maas-region-admin bin/database
$(dbrun) bin/maas-region-admin shell --settings=maas.demo
harness: bin/maas-region bin/database
$(dbrun) bin/maas-region shell --settings=maas.demo

dbharness: bin/database
bin/database --preserve shell

syncdb: bin/maas-region-admin bin/database
$(dbrun) bin/maas-region-admin dbupgrade
syncdb: bin/maas-region bin/database
$(dbrun) bin/maas-region dbupgrade

define phony_targets
build
Expand Down Expand Up @@ -495,9 +495,9 @@ services/rackd/@deps: bin/twistd.rack

services/reloader/@deps:

services/regiond/@deps: bin/maas-region-admin
services/regiond/@deps: bin/maas-region

services/regiond2/@deps: bin/maas-region-admin
services/regiond2/@deps: bin/maas-region

#
# Package building
Expand Down
4 changes: 2 additions & 2 deletions buildout.cfg
Expand Up @@ -81,13 +81,13 @@ test-eggs =
eggs =
${region:test-eggs}
entry-points =
maas-region-admin=maasserver:execute_from_command_line
maas-region=maasserver:execute_from_command_line
twistd.region=twisted.scripts.twistd:run
initialization =
${common:initialization}
environ.setdefault("DJANGO_SETTINGS_MODULE", "maas.development")
scripts =
maas-region-admin
maas-region
twistd.region
extra-paths =
${common:extra-paths}
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Expand Up @@ -281,7 +281,7 @@
man_pages = [
('man/maas.8', 'maas', u'MAAS API commandline utility',
[u'Canonical 2013-2014'], 8),
('man/maas-region-admin.8', 'maas-region-admin', u'MAAS administration tool',
('man/maas-region.8', 'maas-region', u'MAAS administration tool',
[u'Canonical 2013-2014'], 8)
]

Expand Down
4 changes: 2 additions & 2 deletions docs/configure.rst
Expand Up @@ -55,9 +55,9 @@ things. First, turn on SSL support in Apache::

Ensure that the Apache config file from ``etc/maas/maas-http.conf`` is
included in ``/etc/apache2/conf.d/``, then set the default URL using the
``maas-region-admin`` command to use ``https`` instead of ``http``::
``maas-region`` command to use ``https`` instead of ``http``::

$ maas-region-admin local_config_set \
$ maas-region local_config_set \
> --maas-url="https://localhost:5240/MAAS"

Now, restart Apache::
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Expand Up @@ -113,7 +113,7 @@ Command-line Tools
.. toctree::
:maxdepth: 1

man/maas-region-admin.8
man/maas-region.8
man/maas.8


Expand Down
2 changes: 1 addition & 1 deletion docs/maascli.rst
Expand Up @@ -40,7 +40,7 @@ command line.
To obtain the key through the command line, run this command on the region
controller (it requires root access)::

$ sudo maas-region-admin apikey --username=my-username
$ sudo maas-region apikey --username=my-username

(Substitute your MAAS user name for my-username).

Expand Down
@@ -1,11 +1,11 @@
maas-region-admin
-----------------
maas-region
-----------


Usage
^^^^^

maas-region-admin [-h, --help] createadmin | changepassword | shell
maas-region [-h, --help] createadmin | changepassword | shell


Description
Expand Down
4 changes: 2 additions & 2 deletions man/maas-region-admin.8 → man/maas-region.8
@@ -1,8 +1,8 @@
.\" Man page generated from reStructuredText.
.
.TH "MAAS-REGION-ADMIN" "8" "October 15, 2015" "dev" "MAAS"
.TH "MAAS-REGION" "8" "October 15, 2015" "dev" "MAAS"
.SH NAME
maas-region-admin \- MAAS administration tool
maas-region \- MAAS administration tool
.
.nr rst2man-indent-level 0
.
Expand Down
4 changes: 2 additions & 2 deletions services/dns/run
Expand Up @@ -34,10 +34,10 @@ bin/py -m provisioningserver.testing.bindfixture -- \

# Create MAAS' DNS config: do not overwrite an existing config file
# as the writing of the full configuration might have happened already.
bin/maas-region-admin set_up_dns --no-clobber
bin/maas-region set_up_dns --no-clobber

# Edit the fixture's named.conf to include MAAS' DNS config.
bin/maas-region-admin get_named_conf \
bin/maas-region get_named_conf \
--edit --config_path "${homedir}/named.conf"

# Run named.
Expand Down
2 changes: 1 addition & 1 deletion src/maas/demo.py
Expand Up @@ -27,7 +27,7 @@
# Connect to the DHCP server. TODO: Use the signals manager instead.
DHCP_CONNECT = True

MAAS_CLI = abspath("bin/maas-region-admin")
MAAS_CLI = abspath("bin/maas-region")

# For demo purposes, give nodes unauthenticated access to their metadata
# even if we can't pass boot parameters. This is not safe; do not
Expand Down
2 changes: 1 addition & 1 deletion src/maas/settings.py
Expand Up @@ -79,7 +79,7 @@ def _get_local_timezone(tzfilename='/etc/timezone'):
DHCP_CONNECT = True

# The MAAS CLI.
MAAS_CLI = 'sudo maas-region-admin'
MAAS_CLI = 'sudo maas-region'

API_URL_REGEXP = '^/api/2[.]0/'
METADATA_URL_REGEXP = '^/metadata/'
Expand Down
6 changes: 3 additions & 3 deletions src/maasserver/dns/zonegenerator.py
Expand Up @@ -94,7 +94,7 @@ class DNSException(MAASException):
"The DNS server will use the address '%s', which is inside the "
"loopback network. This may not be a problem if you're not using "
"MAAS's DNS features or if you don't rely on this information. "
"Consult the 'maas-region-admin local_config_set --maas-url' command "
"Consult the 'maas-region local_config_set --maas-url' command "
"for details on how to set the MAAS URL.")


Expand All @@ -108,7 +108,7 @@ def get_dns_server_address(rack_controller=None, ipv4=True, ipv6=True):
"""Return the DNS server's IP address.
That address is derived from the config maas_url or rack_controller.url.
Consult the 'maas-region-admin local_config_set --maas-url' command for
Consult the 'maas-region local_config_set --maas-url' command for
details on how to set the MAAS URL.
:param rack_controller: Optional rack controller to which the DNS server
Expand All @@ -127,7 +127,7 @@ def get_dns_server_address(rack_controller=None, ipv4=True, ipv6=True):
"Unable to find MAAS server IP address: %s. MAAS's DNS server "
"requires this IP address for the NS records in its zone files. "
"Make sure that the configuration setting for the MAAS URL has "
"the correct hostname. Consult the 'maas-region-admin "
"the correct hostname. Consult the 'maas-region "
"local_config_set --maas-url' command."
% e.strerror)

Expand Down
2 changes: 1 addition & 1 deletion src/maasserver/management/commands/template.py
Expand Up @@ -40,7 +40,7 @@ def _force_delete_all(verbosity, stdout):
template.delete()
if verbosity > 0:
stdout.write("It would now be wise to run:\n")
stdout.write(" sudo maas-region-admin template update-defaults\n")
stdout.write(" sudo maas-region template update-defaults\n")


class Command(BaseCommand):
Expand Down
2 changes: 1 addition & 1 deletion src/maasserver/server_address.py
Expand Up @@ -40,7 +40,7 @@ def get_maas_facing_server_address(rack_controller=None, ipv4=True, ipv6=True):
"""Return address where nodes and workers can reach the MAAS server.
The address is taken from the configured MAAS URL or `controller.url`.
Consult the 'maas-region-admin local_config_set' command for details on
Consult the 'maas-region local_config_set' command for details on
how to set the MAAS URL.
If there is more than one IP address for the host, the addresses
Expand Down
2 changes: 1 addition & 1 deletion src/maasserver/utils/__init__.py
Expand Up @@ -46,7 +46,7 @@ def absolute_reverse(view_name, query=None, base_url=None, *args, **kwargs):
calls Django's 'reverse' method and prefixes the result of that call with
the configured MAAS URL.
Consult the 'maas-region-admin local_config_set --default-url' command for
Consult the 'maas-region local_config_set --default-url' command for
details on how to set the MAAS URL.
:param view_name: Django's view function name/reference or URL pattern
Expand Down
2 changes: 1 addition & 1 deletion src/maastesting/tests/test_dbupgrade.py
Expand Up @@ -41,7 +41,7 @@ def execute_dbupgrade(self, always_south=False):
env = os.environ.copy()
env["DEV_DB_NAME"] = "test_maas_dbupgrade"
env["MAAS_PREVENT_MIGRATIONS"] = "0"
mra = os.path.join(root, "bin", "maas-region-admin")
mra = os.path.join(root, "bin", "maas-region")
cmd = [mra, "dbupgrade"]
if always_south:
cmd.append("--always-south")
Expand Down
2 changes: 1 addition & 1 deletion utilities/remote-reinstall
Expand Up @@ -90,7 +90,7 @@ echo "Restarting services and ensuring migrations are up to date..."
$ssh_run rm -rf /usr/share/maas/web/static/*
$ssh_run mv /usr/lib/python3/dist-packages/maasserver/static/* /usr/share/maas/web/static/
$ssh_run service maas-regiond stop
$ssh_run maas-region-admin migrate
$ssh_run maas-region migrate
sleep 1
$ssh_run service maas-regiond start
$ssh_run service apache2 restart
Expand Down

0 comments on commit ace955d

Please sign in to comment.