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

Functions

def add_ssh_key
def build_in_command_failed
 Method to raise Exception for build in command's failure.
def cmd_exists
def execution_error
 Method to raise Exception for execution error.
def generate_key
 Creates pair of ssh keys on the machine (public - private) and then returns public.
def missing_parameter
 Method to raise Exception for missing parameter.
def reboot
 Tries to restart VM.
def reset_password
 Tries to reset password of ther user.
def set_hostname
def shutdown
 Tries to shutdown VM.
def update_hosts

Variables

int VERSION = 3

Function Documentation

def src.cm.views.ctx.actions.add_ssh_key (   user = None,
  ssh_key = None 
)
Parameters
user(POST)
ssh_key(POST)

Definition at line 185 of file actions.py.

def src.cm.views.ctx.actions.build_in_command_failed (   cmd,
  code 
)

Method to raise Exception for build in command's failure.

Parameters
cmd(POST)
code(POST)

Definition at line 59 of file actions.py.

def src.cm.views.ctx.actions.cmd_exists (   cmd)
Parameters
cmd(POST)

Definition at line 119 of file actions.py.

def src.cm.views.ctx.actions.execution_error (   error)

Method to raise Exception for execution error.

Parameters
error(POST) execution's error

Definition at line 49 of file actions.py.

def src.cm.views.ctx.actions.generate_key (   key_name = "id_rsa")

Creates pair of ssh keys on the machine (public - private) and then returns public.

Parameters
key_name(POST) (optional, "id_rsa" by default)

Definition at line 227 of file actions.py.

def src.cm.views.ctx.actions.missing_parameter (   param)

Method to raise Exception for missing parameter.

Parameters
param(POST) missing parameter

Definition at line 40 of file actions.py.

def src.cm.views.ctx.actions.reboot ( )

Tries to restart VM.

If fails, raises exception.

Definition at line 141 of file actions.py.

def src.cm.views.ctx.actions.reset_password (   user = None)

Tries to reset password of ther user.

Parameters
user(POST)

Definition at line 156 of file actions.py.

def src.cm.views.ctx.actions.set_hostname (   hostname = None)
Parameters
hostname(POST)

Definition at line 107 of file actions.py.

def src.cm.views.ctx.actions.shutdown ( )

Tries to shutdown VM.

If fails, raises exception.

Definition at line 127 of file actions.py.

def src.cm.views.ctx.actions.update_hosts (   hosts_list = None,
  user = 'root' 
)
Parameters
hosts_list(POST)
user(POST) (optional, default: root)

Definition at line 68 of file actions.py.

Variable Documentation

int src.cm.views.ctx.actions.VERSION = 3

Definition at line 27 of file actions.py.