Revision a6e6fe48 snf-cyclades-app/synnefo/logic/management/commands/subnet-modify.py
b/snf-cyclades-app/synnefo/logic/management/commands/subnet-modify.py | ||
---|---|---|
1 |
# Copyright 2013 GRNET S.A. All rights reserved. |
|
1 |
# Copyright 2013-2014 GRNET S.A. All rights reserved.
|
|
2 | 2 |
# |
3 | 3 |
# Redistribution and use in source and binary forms, with or |
4 | 4 |
# without modification, are permitted provided that the following |
... | ... | |
66 | 66 |
if not name: |
67 | 67 |
raise CommandError("--name is mandatory") |
68 | 68 |
|
69 |
subnet = common.get_subnet(subnet_id)
|
|
70 |
user_id = common.get_network(subnet.network.id).userid
|
|
69 |
subnet = common.get_resource("subnet", subnet_id, for_update=True)
|
|
70 |
user_id = common.get_resource("network", subnet.network.id).userid
|
|
71 | 71 |
|
72 | 72 |
subnets.update_subnet(sub_id=subnet_id, |
73 | 73 |
name=name, |
Also available in: Unified diff