Revision bf1d3a70 snf-cyclades-app/synnefo/api/management/commands/modifynetwork.py
b/snf-cyclades-app/synnefo/api/management/commands/modifynetwork.py | ||
---|---|---|
51 | 51 |
dest='owner', |
52 | 52 |
metavar='USER_ID', |
53 | 53 |
help="Set network's owner"), |
54 |
make_option('--subnet', |
|
55 |
dest='subnet', |
|
56 |
help="Set network's subnet"), |
|
57 |
make_option('--gateway', |
|
58 |
dest='gateway', |
|
59 |
help="Set network's gateway"), |
|
60 |
make_option('--dhcp', |
|
61 |
dest='dhcp', |
|
62 |
help="Set if network will use nfdhcp"), |
|
54 | 63 |
make_option('--state', |
55 | 64 |
dest='state', |
56 | 65 |
metavar='STATE', |
... | ... | |
75 | 84 |
if owner is not None: |
76 | 85 |
network.userid = owner |
77 | 86 |
|
87 |
subnet = options.get('subnet') |
|
88 |
if subnet is not None: |
|
89 |
network.subnet = subnet |
|
90 |
|
|
91 |
gateway = options.get('gateway') |
|
92 |
if gateway is not None: |
|
93 |
network.gateway = gateway |
|
94 |
|
|
95 |
dhcp = options.get('dhcp') |
|
96 |
if dhcp is not None: |
|
97 |
network.dhcp = dhcp |
|
98 |
|
|
78 | 99 |
state = options.get('state') |
79 | 100 |
if state is not None: |
80 | 101 |
allowed = [x[0] for x in Network.NETWORK_STATES] |
Also available in: Unified diff