Merge lp:~rvb/maas/expose-maas-1.2 into lp:maas/1.2

Proposed by Raphaël Badin
Status: Merged
Approved by: Raphaël Badin
Approved revision: no longer in the source branch.
Merged at revision: 1339
Proposed branch: lp:~rvb/maas/expose-maas-1.2
Merge into: lp:maas/1.2
Diff against target: 55 lines (+9/-4)
2 files modified
src/maasserver/api.py (+7/-2)
src/maasserver/urls_api.py (+2/-2)
To merge this branch: bzr merge lp:~rvb/maas/expose-maas-1.2
Reviewer Review Type Date Requested Status
Raphaël Badin (community) Approve
Review via email: mp+140919@code.launchpad.net

Commit message

Fix MAASHandler (add a resource_uri method) so that it is scanned by the CLI.

To post a comment you must log in.
Revision history for this message
Raphaël Badin (rvb) wrote :

This is not a simple backport because the original branch included some drive-by fixes that could not make it into 1.2 but this is simple enough for me to self-review and similar to what was done in the trunk branch (https://code.launchpad.net/~rvb/maas/expose-maas/+merge/140916).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/maasserver/api.py'
--- src/maasserver/api.py 2012-12-13 02:39:45 +0000
+++ src/maasserver/api.py 2012-12-20 15:03:06 +0000
@@ -63,6 +63,7 @@
63 "BootImagesHandler",63 "BootImagesHandler",
64 "FilesHandler",64 "FilesHandler",
65 "get_oauth_token",65 "get_oauth_token",
66 "MaasHandler",
66 "NodeGroupsHandler",67 "NodeGroupsHandler",
67 "NodeGroupInterfaceHandler",68 "NodeGroupInterfaceHandler",
68 "NodeGroupInterfacesHandler",69 "NodeGroupInterfacesHandler",
@@ -1685,8 +1686,8 @@
1685 return ('tags_handler', [])1686 return ('tags_handler', [])
16861687
16871688
1688class MAASHandler(OperationsHandler):1689class MaasHandler(OperationsHandler):
1689 """Manage the MAAS' itself."""1690 """Manage the MAAS server."""
1690 create = read = update = delete = None1691 create = read = update = delete = None
16911692
1692 @operation(idempotent=False)1693 @operation(idempotent=False)
@@ -1715,6 +1716,10 @@
1715 value = Config.objects.get_config(name)1716 value = Config.objects.get_config(name)
1716 return HttpResponse(json.dumps(value), content_type='application/json')1717 return HttpResponse(json.dumps(value), content_type='application/json')
17171718
1719 @classmethod
1720 def resource_uri(cls, *args, **kwargs):
1721 return ('maas_handler', [])
1722
17181723
1719# Title section for the API documentation. Matches in style, format,1724# Title section for the API documentation. Matches in style, format,
1720# etc. whatever render_api_docs() produces, so that you can concatenate1725# etc. whatever render_api_docs() produces, so that you can concatenate
17211726
=== modified file 'src/maasserver/urls_api.py'
--- src/maasserver/urls_api.py 2012-09-20 15:10:28 +0000
+++ src/maasserver/urls_api.py 2012-12-20 15:03:06 +0000
@@ -23,7 +23,7 @@
23 BootImagesHandler,23 BootImagesHandler,
24 describe,24 describe,
25 FilesHandler,25 FilesHandler,
26 MAASHandler,26 MaasHandler,
27 NodeGroupHandler,27 NodeGroupHandler,
28 NodeGroupInterfaceHandler,28 NodeGroupInterfaceHandler,
29 NodeGroupInterfacesHandler,29 NodeGroupInterfacesHandler,
@@ -58,7 +58,7 @@
5858
5959
60# Admin handlers.60# Admin handlers.
61maas_handler = AdminRestrictedResource(MAASHandler, authentication=api_auth)61maas_handler = AdminRestrictedResource(MaasHandler, authentication=api_auth)
62nodegroupinterface_handler = AdminRestrictedResource(62nodegroupinterface_handler = AdminRestrictedResource(
63 NodeGroupInterfaceHandler, authentication=api_auth)63 NodeGroupInterfaceHandler, authentication=api_auth)
64nodegroupinterfaces_handler = AdminRestrictedResource(64nodegroupinterfaces_handler = AdminRestrictedResource(

Subscribers

People subscribed via source and target branches

to status/vote changes: