Rename operation
Issue: #392 (closed)
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
-
circle/dashboard/views/vm.py
723 class VmRenameView(FormOperationMixin, VmOperationView): 724 op = 'rename' 725 icon = 'pencil' 726 effect = 'success' 727 show_in_toolbar = False 728 form_class = VmRenameForm 729 730 def post(self, request, extra=None, *args, **kwargs): 731 if extra is None: 732 extra = {} 733 form = self.form_class(self.request.POST, **self.get_form_kwargs()) 734 if form.is_valid(): 735 extra.update(form.cleaned_data) 736 resp = super(FormOperationMixin, self).post( 737 request, extra, *args, **kwargs) 738 new_name = request.POST.get("new_name") -
Owner
Use cleaned_data, it's cleaner (hehe).
-
-
circle/vm/operations.py
1403 1403 1404 1404 1405 1405 @register_operation 1406 class RenameOperation(InstanceOperation): 1407 id = "rename" 1408 name = _("rename") 1409 description = _("Change the name of virtual machine.") 1410 acl_level = "operator" 1411 required_perms = () 1412 1413 def _operation(self, user, activity, new_name): 1414 -
Owner
no new new line
-
-
Owner
Renaming the VM stops the waiting for agent activity.
-
merged
Toggle commit list