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

Functions

def vm_stats
 Function returns requested statistics for specific 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.admin_cm.monia.vm_stats (   caller_id,
  vm_id,
  stat_name,
  time,
  stat_range,
  resolution 
)

Function returns requested statistics for specific VM.

Stats are returned in format required by CC1 Web Interface's monitoring javascript.

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)
vm_id(POST)
stat_name(POST string|list(string)) type of required statistics
time(POST int) time of last row
stat_range(POST string) time interval between first and last stats
resolution(POST string) statistics resolution
Returns
HttpResponse with JSON content:
  • response: response status,
  • data: (list) usage of VM resources (format required by CC1 Web Interface)

Definition at line 48 of file monia.py.