diff -Nru maas-2.4.0~beta2-6865-gec43e47e6/debian/changelog maas-2.4.0~rc1-6959-gd7a158fc3/debian/changelog
--- maas-2.4.0~beta2-6865-gec43e47e6/debian/changelog 2018-04-16 13:12:38.000000000 +0000
+++ maas-2.4.0~rc1-6959-gd7a158fc3/debian/changelog 2018-05-11 18:34:52.000000000 +0000
@@ -1,3 +1,15 @@
+maas (2.4.0~rc1-6959-gd7a158fc3-0ubuntu1) cosmic; urgency=medium
+
+ * New upstream release.
+
+ -- Andres Rodriguez Fri, 11 May 2018 14:34:52 -0400
+
+maas (2.4.0~beta3-6929-g62682abf5-0ubuntu1) bionic; urgency=medium
+
+ * New upstream release.
+
+ -- Andres Rodriguez Thu, 03 May 2018 03:31:14 -0400
+
maas (2.4.0~beta2-6865-gec43e47e6-0ubuntu1) bionic; urgency=medium
* New upstream release. (LP: #1754697)
diff -Nru maas-2.4.0~beta2-6865-gec43e47e6/debian/control maas-2.4.0~rc1-6959-gd7a158fc3/debian/control
--- maas-2.4.0~beta2-6865-gec43e47e6/debian/control 2018-04-16 13:12:38.000000000 +0000
+++ maas-2.4.0~rc1-6959-gd7a158fc3/debian/control 2018-05-11 18:34:52.000000000 +0000
@@ -56,7 +56,8 @@
Package: maas-common
Architecture: all
-Depends: rsyslog,
+Depends: avahi-utils,
+ rsyslog,
${misc:Depends},
${python3:Depends},
python3-maas-provisioningserver
@@ -98,8 +99,7 @@
Package: maas-region-controller
Architecture: all
-Depends: avahi-utils,
- dbconfig-pgsql,
+Depends: dbconfig-pgsql,
iputils-ping,
maas-region-api (= ${binary:Version}),
postgresql (>= 9.1),
@@ -177,6 +177,7 @@
Section: python
Architecture: all
Depends: python3-httplib2,
+ python3-macaroonbakery (>= 1.1.3),
python3-netifaces,
python3-oauth,
python3-tempita,
diff -Nru maas-2.4.0~beta2-6865-gec43e47e6/Makefile maas-2.4.0~rc1-6959-gd7a158fc3/Makefile
--- maas-2.4.0~beta2-6865-gec43e47e6/Makefile 2018-04-15 15:08:20.000000000 +0000
+++ maas-2.4.0~rc1-6959-gd7a158fc3/Makefile 2018-05-11 18:16:39.000000000 +0000
@@ -445,9 +445,9 @@
clean-styles:
$(RM) $(scss_output)
-javascript: $(javascript_output)
+javascript: node_modules $(javascript_output)
-force-javascript: clean-javascript $(javascript_output)
+force-javascript: clean-javascript node_modules $(javascript_output)
lander-javascript: force-javascript
git update-index -q --no-assume-unchanged $(strip $(javascript_output)) 2> /dev/null || true
@@ -455,8 +455,8 @@
# The $(subst ...) uses a pattern rule to ensure Webpack runs just once,
# even if all four output files are out-of-date.
-$(subst .,%,$(javascript_output)): bin/webpack $(javascript_deps)
- bin/webpack
+$(subst .,%,$(javascript_output)): $(javascript_deps)
+ node_modules/.bin/webpack
@touch --no-create $(strip $(javascript_output))
@git update-index -q --assume-unchanged $(strip $(javascript_output)) 2> /dev/null || true
@@ -817,14 +817,16 @@
# secondary so that Make knows this too.
#
-define secondary
+define secondary_binaries
bin/py bin/buildout
bin/node-sass
bin/webpack
bin/sphinx bin/sphinx-build
endef
-.SECONDARY: $(sort $(strip $(secondary)))
+secondary = $(sort $(strip $(secondary_binaries)))
+
+.SECONDARY: $(secondary)
#
# Functions.
diff -Nru maas-2.4.0~beta2-6865-gec43e47e6/src/apiclient/maas_client.py maas-2.4.0~rc1-6959-gd7a158fc3/src/apiclient/maas_client.py
--- maas-2.4.0~beta2-6865-gec43e47e6/src/apiclient/maas_client.py 2018-04-15 15:08:20.000000000 +0000
+++ maas-2.4.0~rc1-6959-gd7a158fc3/src/apiclient/maas_client.py 2018-05-11 18:16:39.000000000 +0000
@@ -161,7 +161,14 @@
# urljoin is very sensitive to leading slashes and when spurious
# slashes appear it removes path parts. This is why joining is
# done manually here.
- return self.url.rstrip("/") + "/" + path.lstrip("/")
+ url = self.url.rstrip('/')
+ path = path.lstrip('/')
+ if url.endswith('MAAS') and path.startswith('MAAS'):
+ # Remove the double '/MAAS/MAAS/' as it should only be
+ # a single MAAS in the url.
+ path = path[4:]
+ path = path.lstrip('/')
+ return url + "/" + path
def _flatten(self, kwargs):
"""Flatten dictionary values if they are not an instance of
diff -Nru maas-2.4.0~beta2-6865-gec43e47e6/src/apiclient/tests/test_maas_client.py maas-2.4.0~rc1-6959-gd7a158fc3/src/apiclient/tests/test_maas_client.py
--- maas-2.4.0~beta2-6865-gec43e47e6/src/apiclient/tests/test_maas_client.py 2018-04-15 15:08:20.000000000 +0000
+++ maas-2.4.0~rc1-6959-gd7a158fc3/src/apiclient/tests/test_maas_client.py 2018-05-11 18:16:39.000000000 +0000
@@ -182,6 +182,13 @@
expected = client.url.rstrip("/") + "/" + path.lstrip("/")
self.assertEqual(expected, client._make_url(path))
+ def test_make_url_removes_duplicate_MAAS(self):
+ path = '/MAAS/api/2.0/machines/'
+ client = make_client(root='http://example.com/MAAS/')
+ self.assertEqual(
+ 'http://example.com/MAAS/api/2.0/machines/',
+ client._make_url(path))
+
def test_make_url_converts_sequence_to_path(self):
path = ['top', 'sub', 'leaf']
client = make_client(root='http://example.com/')
diff -Nru maas-2.4.0~beta2-6865-gec43e47e6/src/maascli/actions/tests/test_boot_resources_create.py maas-2.4.0~rc1-6959-gd7a158fc3/src/maascli/actions/tests/test_boot_resources_create.py
--- maas-2.4.0~beta2-6865-gec43e47e6/src/maascli/actions/tests/test_boot_resources_create.py 2018-04-15 15:08:20.000000000 +0000
+++ maas-2.4.0~rc1-6959-gd7a158fc3/src/maascli/actions/tests/test_boot_resources_create.py 2018-05-11 18:16:39.000000000 +0000
@@ -51,7 +51,7 @@
action_bases = (BootResourcesCreateAction,)
action_ns = {
"action": {'method': 'POST'},
- "handler": {'uri': b'/api/2.0/boot-resources/', 'params': []},
+ "handler": {'uri': b'/MAAS/api/2.0/boot-resources/', 'params': []},
"profile": {'credentials': make_api_credentials()}
}
action_class = type("create", action_bases, action_ns)
diff -Nru maas-2.4.0~beta2-6865-gec43e47e6/src/maascli/actions/tests/test_sshkeys_import.py maas-2.4.0~rc1-6959-gd7a158fc3/src/maascli/actions/tests/test_sshkeys_import.py
--- maas-2.4.0~beta2-6865-gec43e47e6/src/maascli/actions/tests/test_sshkeys_import.py 2018-04-15 15:08:20.000000000 +0000
+++ maas-2.4.0~rc1-6959-gd7a158fc3/src/maascli/actions/tests/test_sshkeys_import.py 2018-05-11 18:16:39.000000000 +0000
@@ -25,7 +25,7 @@
action_bases = (SSHKeysImportAction,)
action_ns = {
"action": {'method': 'POST'},
- "handler": {'uri': b'/api/2.0/sshkeys/', 'params': []},
+ "handler": {'uri': b'/MAAS/api/2.0/sshkeys/', 'params': []},
"profile": {'credentials': make_api_credentials()}
}
action_class = type("import", action_bases, action_ns)
diff -Nru maas-2.4.0~beta2-6865-gec43e47e6/src/maasserver/api/doc_handler.py maas-2.4.0~rc1-6959-gd7a158fc3/src/maasserver/api/doc_handler.py
--- maas-2.4.0~beta2-6865-gec43e47e6/src/maasserver/api/doc_handler.py 2018-04-15 15:08:20.000000000 +0000
+++ maas-2.4.0~rc1-6959-gd7a158fc3/src/maasserver/api/doc_handler.py 2018-05-11 18:16:39.000000000 +0000
@@ -48,7 +48,7 @@
methods will take one special parameter, called `op`, to indicate what it is
you want to do.
-For example, to list all machines, you might GET "/api/2.0/machines".
+For example, to list all machines, you might GET "/MAAS/api/2.0/machines".
"""
__all__ = [
diff -Nru maas-2.4.0~beta2-6865-gec43e47e6/src/maasserver/api/events.py maas-2.4.0~rc1-6959-gd7a158fc3/src/maasserver/api/events.py
--- maas-2.4.0~beta2-6865-gec43e47e6/src/maasserver/api/events.py 2018-04-15 15:08:20.000000000 +0000
+++ maas-2.4.0~rc1-6959-gd7a158fc3/src/maasserver/api/events.py 2018-05-11 18:16:39.000000000 +0000
@@ -9,6 +9,7 @@
import urllib.parse
import urllib.request
+from django.db.models import Q
from formencode.validators import Int
from maasserver.api.nodes import filtered_nodes_list_from_request
from maasserver.api.support import (
@@ -37,15 +38,11 @@
def event_to_dict(event):
"""Convert `Event` to a dictionary."""
return dict(
- username=(
- event.user.username
- if event.user is not None else event.username),
+ username=(event.owner),
node=(
event.node.system_id
if event.node is not None else None),
- hostname=(
- event.node.hostname
- if event.node is not None else event.node_hostname),
+ hostname=(event.hostname),
id=event.id,
level=event.type.level_str,
created=event.created.strftime('%a, %d %b. %Y %H:%M:%S'),
@@ -157,7 +154,7 @@
# Filter events for owner.
if owner is not None:
- events = events.filter(user__username=owner)
+ events = events.filter(Q(user__username=owner) | Q(username=owner))
# Future feature:
# This is where we would filter for events 'since last node deployment'
diff -Nru maas-2.4.0~beta2-6865-gec43e47e6/src/maasserver/api/machines.py maas-2.4.0~rc1-6959-gd7a158fc3/src/maasserver/api/machines.py
--- maas-2.4.0~beta2-6865-gec43e47e6/src/maasserver/api/machines.py 2018-04-15 15:08:20.000000000 +0000
+++ maas-2.4.0~rc1-6959-gd7a158fc3/src/maasserver/api/machines.py 2018-05-11 18:16:39.000000000 +0000
@@ -785,7 +785,7 @@
'mount_point': filesystem.mount_point,
'mount_options': filesystem.mount_options,
}
- for filesystem in machine.special_filesystems.all()
+ for filesystem in machine.get_effective_special_filesystems()
]
@operation(idempotent=False)
diff -Nru maas-2.4.0~beta2-6865-gec43e47e6/src/maasserver/api/nodes.py maas-2.4.0~rc1-6959-gd7a158fc3/src/maasserver/api/nodes.py
--- maas-2.4.0~beta2-6865-gec43e47e6/src/maasserver/api/nodes.py 2018-04-15 15:08:20.000000000 +0000
+++ maas-2.4.0~rc1-6959-gd7a158fc3/src/maasserver/api/nodes.py 2018-05-11 18:16:39.000000000 +0000
@@ -670,7 +670,7 @@
class OwnerDataMixin:
- """Mixin that adds the owner_data classmethod and proves set_owner_data
+ """Mixin that adds the owner_data classmethod and provides set_owner_data
to the handler."""
@classmethod
diff -Nru maas-2.4.0~beta2-6865-gec43e47e6/src/maasserver/api/pods.py maas-2.4.0~rc1-6959-gd7a158fc3/src/maasserver/api/pods.py
--- maas-2.4.0~beta2-6865-gec43e47e6/src/maasserver/api/pods.py 2018-04-15 15:08:20.000000000 +0000
+++ maas-2.4.0~rc1-6959-gd7a158fc3/src/maasserver/api/pods.py 2018-05-11 18:16:39.000000000 +0000
@@ -99,8 +99,11 @@
"""Update a specific Pod.
:param name: Name for the pod (optional).
+ :type name: unicode
:param cpu_over_commit_ratio: CPU over commit ratio (optional).
+ :type cpu_over_commit_ratio: unicode
:param memory_over_commit_ratio: Memory over commit ratio (optional).
+ :type memory_over_commit_ratio: unicode
Note: 'type' cannot be updated on a Pod. The Pod must be deleted and
re-added to change the type.
@@ -174,17 +177,23 @@
All fields below are optional:
:param cores: Minimum number of CPU cores.
+ :type cores: unicode
:param memory: Minimum amount of memory (MiB).
+ :type memory: unicode
:param cpu_speed: Minimum amount of CPU speed (MHz).
+ :type cpu_speed: unicode
:param architecture: Architecture for the machine. Must be an
architecture that the pod supports.
+ :param architecture: unicode
:param storage: A list of storage constraint identifiers, in the form:
-
@@ -113,7 +122,7 @@
Domain summary
-
@@ -172,10 +181,12 @@
-
-
-
+
+
+
+
+
@@ -193,7 +204,11 @@
Type |
TTL |
Data |
-
Actions |
+
+
+ Actions
+
+ |
@@ -219,18 +234,20 @@
{$ row.ttl $} |
(default) |
{$ row.rrdata $} |
-
- |
diff -Nru maas-2.4.0~beta2-6865-gec43e47e6/src/maasserver/static/partials/domains-list.html maas-2.4.0~rc1-6959-gd7a158fc3/src/maasserver/static/partials/domains-list.html
--- maas-2.4.0~beta2-6865-gec43e47e6/src/maasserver/static/partials/domains-list.html 2018-04-15 15:08:20.000000000 +0000
+++ maas-2.4.0~rc1-6959-gd7a158fc3/src/maasserver/static/partials/domains-list.html 2018-05-11 18:16:39.000000000 +0000
@@ -43,7 +43,7 @@
-