cc1  v2.1
CC1 source code docs
 All Classes Namespaces Files Functions Variables Pages
src.cm.views.user.monia Namespace Reference

Functions

def vm_stats
 Returns statistics for specified VM.

Detailed Description

Note
All functions here are decorated by src.cm.utils.decorators.user_log. It's recommended to read src.cm.utils.decorators.user_log docs before using functions below.
Author
Tomek WojtoƄ

Function Documentation

def src.cm.views.user.monia.vm_stats (   caller_id,
  vm_id,
  stat_name,
  time,
  stat_range,
  resolution 
)

Returns statistics for specified VM.

Note
The cm.utils.decorators.user_log decorator performs User authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: cm.utils.decorators.user_log
Parameters
http_request(HttpRequest)
caller_id(POST int)
vm_id(POST int)
stat_name(POST string) type of required statistics
time(POST string) time of last row
stat_range(POST string) period of time from time to past
resolution(POST string) statistics resolution
Returns
HttpResponse with JSON content:
  • response: response status,
  • data: (dict) list of the total usage of VM resources from start VM

Definition at line 46 of file monia.py.