Revision a6e6fe48 snf-cyclades-app/synnefo/logic/management/commands/subnet-create.py

b/snf-cyclades-app/synnefo/logic/management/commands/subnet-create.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
......
39 39
from synnefo.management import pprint
40 40
from synnefo.logic import subnets
41 41

  
42
import ipaddr
43

  
44 42
HELP_MSG = """
45 43

  
46 44
Create a new subnet without authenticating the user. The limit of one
......
103 101
        if not cidr:
104 102
            raise CommandError("cidr is mandatory")
105 103

  
106
        user_id = common.get_network(network_id).userid
104
        user_id = common.get_resource("network", network_id).userid
107 105
        name = options["name"] or ""
108 106
        allocation_pools = options["allocation_pools"]
109 107
        ipversion = options["ipversion"] or 4

Also available in: Unified diff