Revision 91826390 api/actions.py
b/api/actions.py | ||
---|---|---|
264 | 264 |
|
265 | 265 |
return HttpResponse(data, mimetype=mimetype, status=200) |
266 | 266 |
|
267 |
@server_action('firewallProfile') |
|
268 |
def set_firewall_profile(request, vm, args): |
|
269 |
profile = args.get('profile', '') |
|
270 |
if profile not in ('ENABLED', 'DISABLED'): |
|
271 |
raise BadRequest("Unsupported firewall profile") |
|
272 |
backend.set_firewall_profile(vm, profile) |
|
273 |
return HttpResponse(status=202) |
|
274 |
|
|
267 | 275 |
|
268 | 276 |
@network_action('add') |
269 | 277 |
def add(request, net, args): |
Also available in: Unified diff