kvmtools/kvm/action.py
author Jens Kasten <jens@kasten-edv.de>
Tue, 27 Mar 2012 02:52:37 +0200
changeset 105 938d696a213e
parent 77 b8fe98927e41
child 112 0ca5084026ff
permissions -rw-r--r--
restructe:
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
     1
#
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
     2
# Modulde which contain the methodes which can call from commandline
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
     3
#
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
     4
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
     5
"""
105
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 77
diff changeset
     6
(c) 2011-2012 Jens Kasten <jens@kasten-edv.de>
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
     7
"""
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
     8
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
     9
import os
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    10
import sys
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    11
from subprocess import Popen, PIPE
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    12
from time import sleep
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    13
105
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 77
diff changeset
    14
from kvmtools.kvm.domain import Domain
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    15
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    16
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    17
class Action(Domain):
105
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 77
diff changeset
    18
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    19
    def __init__(self):
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    20
        Domain.__init__(self)
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    21
        self.kvm_errors = []
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    22
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    23
    def kvm_error(self, error_message):
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    24
        """Append a error message to error list."""
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    25
        self.kvm_errors.append(error_message)
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    26
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    27
    def available_actions(self):
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    28
        """Return all methods which start with kvm_ and end with _action."""
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    29
        actions = []
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    30
        for action in dir(self):
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    31
            if action.startswith("kvm_") and action.endswith("_action"):
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    32
                methode = action.replace("kvm_", "").replace("_action", "")
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    33
                actions.append(methode)
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    34
        return actions
105
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 77
diff changeset
    35
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    36
    def kvm_show_action(self):
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    37
        """show the command as string"""
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    38
        print self.command[1]
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    39
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    40
    def kvm_modify_action(self):
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    41
        """Modify a domain configuration file."""
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    42
        self.modify()
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    43
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    44
    def kvm_create_action(self):
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    45
        """Create a domain configuration file."""
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    46
        if os.path.isfile(self.kvm_domain_file):
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    47
            self.modify()
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    48
        else:
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    49
            self.create()
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    50
77
b8fe98927e41 uncomment migration method, no use at the moment
Jens Kasten <jens@kasten-edv.de>
parents: 61
diff changeset
    51
    #def kvm_migrate_action(self, command_monitor):
b8fe98927e41 uncomment migration method, no use at the moment
Jens Kasten <jens@kasten-edv.de>
parents: 61
diff changeset
    52
    #    self.kvm_monitor_action(command_monitor)
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    54
    def kvm_monitor_action(self, command_monitor):
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    55
        """Monitor to the qemu-kvm guest on commandline."""
54
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
    56
        if not self.is_running():
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    57
            print ("Guest is not running.")
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    58
            return
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    59
        self.monitor_send(command_monitor)
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    60
        data = self.monitor_recieve()
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    61
        data = "\n".join([i for i in data])
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    62
        print data
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    63
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    64
    def kvm_boot_action(self):
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    65
        """Boot the qemu-kvm guest."""
54
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
    66
        if self.is_running():
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    67
            print ("Guest already running.")
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    68
            return True
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    69
        env = os.environ.copy()
54
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
    70
        # add the  to the enviroment
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    71
        if len(self.bridge) > 0:
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    72
            for key, value in self.bridge.iteritems():
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    73
                env[key] = value
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    74
        try:
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    75
            result = Popen(self.command[0], env=env, stdin=PIPE, stdout=PIPE)
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    76
            result.wait()
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    77
            return (True, "")
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    78
        except OSError, error_msg:
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    79
            return (False, error_msg)
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    80
        except IOError, error_msg:
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    81
            return (False, error_msg)
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    82
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    83
    def kvm_reboot_action(self):
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    84
        """Reboot the guest."""
54
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
    85
        if not self.is_running():
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    86
            print ("Guest is not running.")
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    87
            return False
54
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
    88
        if not self.monitor_send(self.qemu_monitor["reboot"]):
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    89
            print ("Could not send signal reboot to guest.")
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    90
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    91
    def kvm_shutdown_action(self):
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    92
        """Shutdown the guest.
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    93
        Its work for windows and linux guests, 
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    94
        but not on linux when the Xserver is looked.
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    95
        """
54
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
    96
        if not self.is_running():
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    97
            print ("Guest is not running.")
60
70e7bfc80074 fix: missing return in kvmtools/kvm/action.py shutdown()
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
    98
            return
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    99
        flag = 0
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   100
        if self.monitor_send(self.qemu_monitor["shutdown"]):
77
b8fe98927e41 uncomment migration method, no use at the moment
Jens Kasten <jens@kasten-edv.de>
parents: 61
diff changeset
   101
            # set a time  out to wait, that the shutdown dialog appears
b8fe98927e41 uncomment migration method, no use at the moment
Jens Kasten <jens@kasten-edv.de>
parents: 61
diff changeset
   102
            sleep(1.5)
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   103
            self.monitor_send(self.qemu_monitor["enter"])
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   104
            print ("Shutdown ...")
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   105
            while True:
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   106
                # some fancy ticker
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   107
                if flag == 0:
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   108
                    sign = "\\" 
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   109
                    flag = 1
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   110
                elif flag == 1:    
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   111
                    sign = "|"
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   112
                    flag = 2
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   113
                elif flag == 2:
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   114
                    sign = "/"
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   115
                    flag = 3
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   116
                elif flag == 3:
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   117
                    sign = "-"
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   118
                    flag = 0
54
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
   119
                if not self.is_running():
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   120
                    sys.stdout.write("Done.         \n")
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   121
                    sys.stdout.flush()
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   122
                    sys.exit(0) 
54
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
   123
                else:
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
   124
                    sys.stdout.write("waiting ... %s\r" % sign)
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
   125
                    sys.stdout.flush()
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
   126
                    sleep(0.05)
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   127
        else:
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   128
            print ("Could not send signal shutdown.")
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   129
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   130
    def kvm_kill_action(self):
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   131
        """Kill the guest.
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   132
        Dangerous option, its simply like pull the power cable out.
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   133
        """
54
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
   134
        if not self.is_running():
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   135
            print ("Guest is not running.")
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   136
            return False
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   137
        try:    
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   138
            os.kill(self.kvm_pid, 9)
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   139
            sleep(0.8)
54
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
   140
            self.is_running()
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   141
            sys.exit(0)
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   142
        except OSError, error_msg:
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   143
            print error_msg
54
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
   144
            self.is_running()
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   145
            sys.exit(1)
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   146
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   147
    def kvm_status_action(self):
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   148
        """Show information about the guest."""
54
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
   149
        if not self.is_running():
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   150
            print ("Guest is not running.")
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   151
            return False
54
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
   152
        self.get_process_information()
61
abba9906ca66 updates and fixes
Jens Kasten <jens@kasten-edv.de>
parents: 60
diff changeset
   153
        print ("Process name: %s" % self.kvm_process_name)
abba9906ca66 updates and fixes
Jens Kasten <jens@kasten-edv.de>
parents: 60
diff changeset
   154
        print ("Domain uuid:  %s" % self.kvm_process_uuid)
abba9906ca66 updates and fixes
Jens Kasten <jens@kasten-edv.de>
parents: 60
diff changeset
   155
        print ("%s :: Process state: %s" % (self.kvm_process_status,
abba9906ca66 updates and fixes
Jens Kasten <jens@kasten-edv.de>
parents: 60
diff changeset
   156
            self.kvm_process_state))
54
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
   157
        print "UID: %s" % self.kvm_process_uid
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
   158
        print "GID: %s" % self.kvm_process_gid
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
   159
        print "Groups: %s" % self.kvm_process_groups
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
   160
        print "PID: %s :: PPID: %s" % (self.kvm_process_pid, 
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
   161
            self.kvm_process_ppid)
61
abba9906ca66 updates and fixes
Jens Kasten <jens@kasten-edv.de>
parents: 60
diff changeset
   162
        print ("VNC information")
abba9906ca66 updates and fixes
Jens Kasten <jens@kasten-edv.de>
parents: 60
diff changeset
   163
        print self.kvm_process_vnc