Merge ~bjornt/maas:bug-1930554-3.0 into maas:3.0

Proposed by Björn Tillenius
Status: Merged
Approved by: Björn Tillenius
Approved revision: 30468017e5f6dc98eca73764a563edc673e67e2b
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~bjornt/maas:bug-1930554-3.0
Merge into: maas:3.0
Diff against target: 66 lines (+8/-8)
2 files modified
src/maasserver/api/pods.py (+4/-4)
src/maasserver/urls_api.py (+4/-4)
Reviewer Review Type Date Requested Status
Björn Tillenius Approve
Review via email: mp+403613@code.launchpad.net

Commit message

LP #1930554: vm-host CLI command is now named vmhost

Commit c57ec00472a1911eac55df79e24e1801f9b89321 renamed the handler,
which caused the API command to remove the -.

(cherry picked from commit 08618ef9c58309390ec358b133759fec7c1e6dc1)

To post a comment you must log in.
Revision history for this message
Björn Tillenius (bjornt) wrote :

Self-approve backport.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/maasserver/api/pods.py b/src/maasserver/api/pods.py
2index bf9729b..fd36ca2 100644
3--- a/src/maasserver/api/pods.py
4+++ b/src/maasserver/api/pods.py
5@@ -40,7 +40,7 @@ DISPLAYED_POD_FIELDS = (
6 )
7
8
9-class VMHostHandler(OperationsHandler):
10+class VmHostHandler(OperationsHandler):
11 """
12 Manage an individual VM host.
13
14@@ -421,7 +421,7 @@ class VMHostHandler(OperationsHandler):
15
16 # Pods are being renamed to VM hosts. Keep the old name on the API as well for
17 # backwards-compatibility.
18-class PodHandler(VMHostHandler):
19+class PodHandler(VmHostHandler):
20 """
21 Manage an individual Pod.
22
23@@ -437,7 +437,7 @@ class PodHandler(VMHostHandler):
24 return ("pod_handler", (pod_id,))
25
26
27-class VMHostsHandler(OperationsHandler):
28+class VmHostsHandler(OperationsHandler):
29 """
30 Manage the collection of all the VM hosts in MAAS.
31 """
32@@ -526,7 +526,7 @@ class VMHostsHandler(OperationsHandler):
33
34 # Pods are being renamed to VM hosts. Keep the old name on the API as well for
35 # backwards-compatibility.
36-class PodsHandler(VMHostsHandler):
37+class PodsHandler(VmHostsHandler):
38 """
39 Manage the collection of all the pods in the MAAS.
40
41diff --git a/src/maasserver/urls_api.py b/src/maasserver/urls_api.py
42index 8a94ed8..e7511ce 100644
43--- a/src/maasserver/urls_api.py
44+++ b/src/maasserver/urls_api.py
45@@ -64,8 +64,8 @@ from maasserver.api.partitions import PartitionHandler, PartitionsHandler
46 from maasserver.api.pods import (
47 PodHandler,
48 PodsHandler,
49- VMHostHandler,
50- VMHostsHandler,
51+ VmHostHandler,
52+ VmHostsHandler,
53 )
54 from maasserver.api.rackcontrollers import (
55 RackControllerHandler,
56@@ -159,8 +159,8 @@ device_handler = RestrictedResource(DeviceHandler, authentication=api_auth)
57 devices_handler = RestrictedResource(DevicesHandler, authentication=api_auth)
58 pod_handler = RestrictedResource(PodHandler, authentication=api_auth)
59 pods_handler = RestrictedResource(PodsHandler, authentication=api_auth)
60-vm_host_handler = RestrictedResource(VMHostHandler, authentication=api_auth)
61-vm_hosts_handler = RestrictedResource(VMHostsHandler, authentication=api_auth)
62+vm_host_handler = RestrictedResource(VmHostHandler, authentication=api_auth)
63+vm_hosts_handler = RestrictedResource(VmHostsHandler, authentication=api_auth)
64 virtual_machine_handler = RestrictedResource(
65 VirtualMachineHandler, authentication=api_auth
66 )

Subscribers

People subscribed via source and target branches