Diff
Not logged in

Differences From Artifact [3d8e33b5ca]:

To Artifact [5a984c38d3]:


1

2
3
4
5
6
7
8
#!/usr/bin/python

""" vws - script to control QEMU/KVM virtual workstations """
# pylint: disable=bad-builtin
from ConfigParser import ConfigParser
from argparse import ArgumentParser, Namespace
import fcntl
import socket, select
import errno

>







1
2
3
4
5
6
7
8
9
#!/usr/bin/python
# -*- encoding: utf-8 -*-
""" vws - script to control QEMU/KVM virtual workstations """
# pylint: disable=bad-builtin
from ConfigParser import ConfigParser
from argparse import ArgumentParser, Namespace
import fcntl
import socket, select
import errno
75
76
77
78
79
80
81


82
83
84
85
86
87
88
89
            continue
        idx = line.find("address:")
        if idx != -1:
            url = line[idx+9:]
            if url.startswith('*:'):
                url = socket.getfqdn()+url[1:]
    if url is None:


        print >>sys.stderr, "ERROR parsing 'info spice' output:",output
        return None
    return "spice://" + url.rstrip('\r')



def list_bridges():
    """ Return list of bridge network interfaces present in the system """







>
>
|







76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
            continue
        idx = line.find("address:")
        if idx != -1:
            url = line[idx+9:]
            if url.startswith('*:'):
                url = socket.getfqdn()+url[1:]
    if url is None:
        if output.endswith('(qemu)'):
            return spiceurl(sock)
        print >>sys.stderr, "ERROR parsing 'info spice' output:«",output,"»"
        return None
    return "spice://" + url.rstrip('\r')



def list_bridges():
    """ Return list of bridge network interfaces present in the system """