Detailed Description
- Author
- Maciej Nabożny mn@mn.nosp@m.aboz.nosp@m.ny.pl
Functions for creating and deleting networks.
- Author
- Maciej Nabożny mn@mn.nosp@m.aboz.nosp@m.ny.pl
Functions to manage public leases in database for CM Administrator
Function Documentation
def src.cm.views.admin_cm.network.add |
( |
|
caller_id, |
|
|
|
address, |
|
|
|
mask |
|
) |
| |
Creates new AvailableNetwork.
- Note
- The cm.utils.decorators.admin_cm_log decorator performs CMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: cm.utils.decorators.admin_cm_log
- Parameters
-
http_request | (HttpRequest ) |
caller_id | (POST int ) |
admin_password | (POST string ) |
address | (POST string ) |
mask | (POST int ) |
Definition at line 44 of file network.py.
def src.cm.views.admin_cm.network.delete_available_network |
( |
|
caller_id, |
|
|
|
pool_id |
|
) |
| |
Releases and deletes AvailableNetwork (if not used).
- Note
- The cm.utils.decorators.admin_cm_log decorator performs CMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: cm.utils.decorators.admin_cm_log
- Parameters
-
http_request | (HttpRequest ) |
caller_id | (POST int ) |
admin_password | (POST string ) |
pool_id | (POST int ) id of the AvailableNetwork to delete |
Definition at line 72 of file network.py.
def src.cm.views.admin_cm.network.delete_user_network |
( |
|
caller_id, |
|
|
|
network_id |
|
) |
| |
Releases and deletes UserNetwork (if not used).
- Note
- The cm.utils.decorators.admin_cm_log decorator performs CMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: cm.utils.decorators.admin_cm_log
- Parameters
-
http_request | (HttpRequest ) |
caller_id | (POST int ) |
admin_password | (POST string ) |
network_id | (POST int ) id of the UserNetwork to delete |
Definition at line 89 of file network.py.
def src.cm.views.admin_cm.network.list_available_networks |
( |
|
caller_id | ) |
|
- Note
- The cm.utils.decorators.admin_cm_log decorator performs CMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: cm.utils.decorators.admin_cm_log
- Parameters
-
http_request | (HttpRequest ) |
caller_id | (POST int ) |
admin_password | (POST string ) |
- Returns
- HttpResponse with JSON content:
- response: response status,
- data: (
list(dict)
) AvailableNetwork.dict property for each requested AvailableNetwork
Definition at line 104 of file network.py.
def src.cm.views.admin_cm.network.list_leases |
( |
|
caller_id, |
|
|
|
network_id |
|
) |
| |
- Note
- The cm.utils.decorators.admin_cm_log decorator performs CMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: cm.utils.decorators.admin_cm_log
- Parameters
-
http_request | (HttpRequest ) |
caller_id | (POST int ) |
admin_password | (POST string ) |
network_id | (POST) id of the requested UserNetwork |
- Returns
- HttpResponse with JSON content:
- response: response status,
- data: (
list{dict}
) Lease.dict property for each Lease in specified UserNetwork
Definition at line 150 of file network.py.
def src.cm.views.admin_cm.network.list_user_networks |
( |
|
caller_id, |
|
|
|
user_id = None , |
|
|
|
only_unused = False |
|
) |
| |
- Note
- The cm.utils.decorators.admin_cm_log decorator performs CMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: cm.utils.decorators.admin_cm_log
- Parameters
-
http_request | (HttpRequest ) |
caller_id | (POST int ) |
admin_password | (POST string ) |
user_id | (POST int ) (optional) if specified, only networks belonging to specigied User are fetched. |
only_unused | (POST bool ) (optional) if True, only unused networks are returned |
- Returns
- HttpResponse with JSON content:
- response: response status,
- data: (
list(dict)
) UserNetwork.dict property for each requested UserNetwork
Definition at line 123 of file network.py.
def src.cm.views.admin_cm.network.lock |
( |
|
caller_id, |
|
|
|
pool_id |
|
) |
| |
Sets AvailableNetwork's state as locked.
- Note
- The cm.utils.decorators.admin_cm_log decorator performs CMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: cm.utils.decorators.admin_cm_log
- Parameters
-
http_request | (HttpRequest ) |
caller_id | (POST int ) |
admin_password | (POST string ) |
pool_id | (POST int ) id of the AvailableNetwork to lock |
Definition at line 170 of file network.py.
def src.cm.views.admin_cm.network.unlock |
( |
|
caller_id, |
|
|
|
pool_id |
|
) |
| |
Sets AvailableNetwork's state as ok.
- Note
- The cm.utils.decorators.admin_cm_log decorator performs CMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: cm.utils.decorators.admin_cm_log
- Parameters
-
http_request | (HttpRequest ) |
caller_id | (POST int ) |
admin_password | (POST string ) |
pool_id | (POST int ) id of the AvailableNetwork to unlock |
Definition at line 187 of file network.py.