~jtv/maas/bug-1070775

« back to all changes in this revision

Viewing changes to src/maasserver/api.py

  • Committer: Tarmac
  • Author(s): Jeroen Vermeulen
  • Date: 2012-10-30 09:14:21 UTC
  • mfrom: (1312.2.1 bug-1070774)
  • Revision ID: tarmac-20121030091421-7kdqhx0rr558ymmi
[r=jtv][bug=1070774][author=jtv] Forward-port r1276 from 1.2: Disallow changes to Node.hostname on nodes that are currently allocated. The change would confuse Juju, which will still refer to the node by its old hostname.

Show diffs side-by-side

added added

removed removed

Lines of Context:
509
509
            The default is 'false'.
510
510
        :type power_parameters_skip_validation: basestring
511
511
        """
512
 
 
513
512
        node = Node.objects.get_node_or_404(
514
513
            system_id=system_id, user=request.user, perm=NODE_PERMISSION.EDIT)
515
514
        data = get_overrided_query_dict(model_to_dict(node), request.data)
 
515
 
516
516
        Form = get_node_edit_form(request.user)
517
517
        form = Form(data, instance=node)
518
518
        if form.is_valid():