launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #06686
[Merge] lp:~rvb/maas/maas-cleanup-deploy-options into lp:maas
Raphaël Badin has proposed merging lp:~rvb/maas/maas-cleanup-deploy-options into lp:maas with lp:~rvb/maas/maas-arch-ui as a prerequisite.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~rvb/maas/maas-cleanup-deploy-options/+merge/97367
This clean-up branch:
- uses NodeForm to publish the snippets that will be used on the JavaScript side.
- cleanups up NODE_AFTER_COMMISSIONING_ACTION: we will only support 12.04 for now.
--
https://code.launchpad.net/~rvb/maas/maas-cleanup-deploy-options/+merge/97367
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rvb/maas/maas-cleanup-deploy-options into lp:maas.
=== modified file 'src/maasserver/models.py'
--- src/maasserver/models.py 2012-03-14 10:00:43 +0000
+++ src/maasserver/models.py 2012-03-14 10:53:28 +0000
@@ -146,12 +146,6 @@
CHECK = 1
#:
DEPLOY_12_04 = 2
- #:
- DEPLOY_11_10 = 3
- #:
- DEPLOY_11_04 = 4
- #:
- DEPLOY_10_10 = 5
NODE_AFTER_COMMISSIONING_ACTION_CHOICES = (
@@ -161,12 +155,6 @@
"Check compatibility and hold for future decision"),
(NODE_AFTER_COMMISSIONING_ACTION.DEPLOY_12_04,
"Deploy with Ubuntu 12.04 LTS"),
- (NODE_AFTER_COMMISSIONING_ACTION.DEPLOY_11_10,
- "Deploy with Ubuntu 11.10"),
- (NODE_AFTER_COMMISSIONING_ACTION.DEPLOY_11_04,
- "Deploy with Ubuntu 11.04"),
- (NODE_AFTER_COMMISSIONING_ACTION.DEPLOY_10_10,
- "Deploy with Ubuntu 10.10"),
)
=== modified file 'src/maasserver/templates/maasserver/snippets.html'
--- src/maasserver/templates/maasserver/snippets.html 2012-03-14 10:53:28 +0000
+++ src/maasserver/templates/maasserver/snippets.html 2012-03-14 10:53:28 +0000
@@ -17,22 +17,12 @@
<label for="id_hostname">Hostname
<span class="form-optional">(optional)</span>
</label>
- <input type="text" maxlength="30" name="hostname" id="id_hostname" />
+ {{ node_form.hostname }}
<div class="field-help">Default is MAC-based, e.g. "node-aabbccddeeff"
</div>
</p>
<p>
<label for="id_after_commissioning_action">After commissionning</label>
- <select id="id_after_commissioning_action"
- name="after_commissioning_action">
- <option selected="selected" value="0">Queue for dynamic
- allocation to services</option>
- <option value="1">Check compatibility and hold for future
- decision</option>
- <option value="2">Deploy with Ubuntu 12.04 LTS</option>
- <option value="3">Deploy with Ubuntu 11.10</option>
- <option value="4">Deploy with Ubuntu 11.04</option>
- <option value="5">Deploy with Ubuntu 10.10</option>
- </select>
+ {{ node_form.after_commissioning_action }}
</p>
</script>
=== modified file 'src/maasserver/tests/test_views.py'
--- src/maasserver/tests/test_views.py 2012-03-14 10:53:28 +0000
+++ src/maasserver/tests/test_views.py 2012-03-14 10:53:28 +0000
@@ -88,6 +88,17 @@
self.assertSnippetExistsAndContains(
response.content, '#add-architecture', 'select#id_architecture')
+ def test_hostname(self):
+ response = self.client.get('/')
+ self.assertSnippetExistsAndContains(
+ response.content, '#add-node', 'input#id_hostname')
+
+ def test_after_commissioning_action_snippet(self):
+ response = self.client.get('/')
+ self.assertSnippetExistsAndContains(
+ response.content, '#add-node',
+ 'select#id_after_commissioning_action')
+
class TestComboLoaderView(TestCase):
"""Test combo loader view."""