Check-in [155c39c9b5]
Not logged in
Overview
Comment:Added function list_briges which disappeared somewhere when create command was incorporated in vws script
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 155c39c9b5c5df06653df3ea13a4b4f767224999
User & Date: vitus on 2015-12-18 08:32:37
Other Links: manifest | tags
Context
2015-12-18
13:14
Expanded config handling. Fixes [00962e4d5d] and [381a103023] check-in: 30d9fa306e user: vitus tags: trunk
08:32
Added function list_briges which disappeared somewhere when create command was incorporated in vws script check-in: 155c39c9b5 user: vitus tags: trunk
05:26
Added try-finally to the vws command execution. Fixes [5a1bd05199] check-in: daa18d8131 user: vitus tags: trunk
Changes

Modified vws from [c15e09c135] to [394f213744].

63
64
65
66
67
68
69


















70
71
72
73
74
75
76
            url=line[n+9:]
            if url.startswith('*:'):
                url="localhost"+url[1:]
    if url is None:
        return None
    return "spice://"+url.rstrip('\r')      



















#
# command implementation
#

def cmd_spiceuri(options):
    print spiceurl(options)








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
            url=line[n+9:]
            if url.startswith('*:'):
                url="localhost"+url[1:]
    if url is None:
        return None
    return "spice://"+url.rstrip('\r')      



def list_bridges():
    lst=[]
	with os.popen("/sbin/brctl show", "r") as f:
		for line in f:
			n = line.find('\t');
			if n <= 0:
				continue
			name = line[:n]
			if name == "bridge name":
				continue
			lst.append(name)
	return lst


print repr(list_bridges())

#
# command implementation
#

def cmd_spiceuri(options):
    print spiceurl(options)