[Description]
Trying to delete a VLAN that cannot be deleted (because it is the default VLAN), shows atraceback in regiond.log. The traceback, however, is not necessary provided that if we don't allow something a traceback shouldn't be shown. If it were to be an error, then it should be shown.
==> /var/log/maas/regiond.log <==
2016-06-06 12:25:40 [-] Error on request (67) vlan.delete: This VLAN is the default VLAN in the fabric, it cannot be deleted.
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 904, in worker
return target()
File "/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py", line 46, in work
task()
File "/usr/lib/python3/dist-packages/twisted/_threads/_team.py", line 190, in doWork
task()
--- <exception caught here> ---
File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 246, in inContext
result = inContext.theWork()
File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 262, in <lambda>
inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 118, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 81, in callWithContext
return func(*args,**kw)
File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 937, in callInContext
return func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 516, in call_within_transaction
return func_outside_txn(*args, **kwargs)
File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 343, in retrier
return func(*args, **kwargs)
File "/usr/lib/python3.5/contextlib.py", line 30, in inner
return func(*args, **kwds)
File "/usr/lib/python3/dist-packages/maasserver/websockets/handlers/vlan.py", line 86, in delete
vlan.delete()
File "/usr/lib/python3/dist-packages/maasserver/models/vlan.py", line 276, in delete
"This VLAN is the default VLAN in the fabric, "
django.core.exceptions.ValidationError: ['This VLAN is the default VLAN in the fabric, it cannot be deleted.']