cc1  v2.1
CC1 source code docs
 All Classes Namespaces Files Functions Variables Pages
template.py
Go to the documentation of this file.
1 # -*- coding: utf-8 -*-
2 # @COPYRIGHT_begin
3 #
4 # Copyright [2010-2014] Institute of Nuclear Physics PAN, Krakow, Poland
5 #
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 # http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 #
18 # @COPYRIGHT_end
19 
20 ##
21 # @package src.clm.views.admin_cm.template
22 #
23 
24 from clm.utils.decorators import admin_cm_log, cm_request
25 
26 
27 @admin_cm_log(log=True)
28 @cm_request
29 ##
30 #
31 # Creates template of VM. Template has a name and some description.
32 # It defines VM's hardware parameters: CPU and memory. It also defines
33 # number of points utilized by VM created of it (per hour and overly).
34 #
35 # @clmview_admin_cm
36 # @cm_request_transparent{user.add()}
37 #
38 def add(cm_response, **data):
39  return cm_response
40 
41 
42 @admin_cm_log(log=True, pack=False)
43 @cm_request
44 ##
45 #
46 # Deletes template from available templates.
47 #
48 # @clmview_admin_cm
49 # @cm_request_transparent{user.delete()}
50 #
51 def delete(cm_response, **data):
52  return cm_response
53 
54 
55 @admin_cm_log(log=True)
56 @cm_request
57 ##
58 #
59 # Edits Template's components.
60 #
61 # @clmview_admin_cm
62 # @cm_request_transparent{user.edit()}
63 #
64 def edit(cm_response, **data):
65  return cm_response
66 
67 
68 @admin_cm_log(log=True, pack=False)
69 @cm_request
70 ##
71 #
72 # Returns list of available Templates.
73 #
74 # @clmview_admin_cm
75 # @cm_request_transparent{user.get_list()}
76 #
77 def get_list(cm_response, **data):
78  return cm_response
79 
80 
81 @admin_cm_log(log=False, pack=False)
82 @cm_request
83 ##
84 #
85 # Returns requested Template.
86 #
87 # @clmview_admin_cm
88 # @cm_request_transparent{user.get_by_id()}
89 #
90 def get_by_id(cm_response, **data):
91  return cm_response
92