Merge lp:~flacoste/maas/vdenv-print into lp:~maas-committers/maas/trunk

Proposed by Francis J. Lacoste
Status: Merged
Approved by: Francis J. Lacoste
Approved revision: no longer in the source branch.
Merged at revision: 248
Proposed branch: lp:~flacoste/maas/vdenv-print
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 65 lines (+8/-8)
2 files modified
vdenv/api-list.py (+4/-4)
vdenv/setup.py (+4/-4)
To merge this branch: bzr merge lp:~flacoste/maas/vdenv-print
Reviewer Review Type Date Requested Status
Francis J. Lacoste (community) Approve
Review via email: mp+96846@code.launchpad.net

Commit message

(In vdenv) convert print statement to functions.

Description of the change

(In vdenv) convert print statement to functions.

To post a comment you must log in.
Revision history for this message
Francis J. Lacoste (flacoste) wrote :

Self-reviewing this.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'vdenv/api-list.py'
2--- vdenv/api-list.py 2012-03-09 20:44:46 +0000
3+++ vdenv/api-list.py 2012-03-09 22:12:20 +0000
4@@ -31,17 +31,17 @@
5 token = server.login(user, password)
6
7 distros = server.get_distros()
8-print "::::::::::: distros :::::::::::"
9+print("::::::::::: distros :::::::::::")
10 for d in server.get_distros():
11 print("%s: breed=%s, os_version=%s, mgmt_classes=%s" %
12 (d['name'], d['breed'], d['os_version'], d['mgmt_classes']))
13
14 profiles = server.get_profiles()
15-print "\n::::::::::: profiles :::::::::::"
16+print("\n::::::::::: profiles :::::::::::")
17 for d in server.get_profiles():
18 print("%s: distro=%s parent=%s kickstart=%s" %
19 (d['name'], d['distro'], d['parent'], d['kickstart']))
20
21-print "\n::::::::::: servers :::::::::::"
22+print("\n::::::::::: servers :::::::::::")
23 for s in server.get_systems():
24- print s['interfaces']
25+ print(s['interfaces'])
26
27=== modified file 'vdenv/setup.py'
28--- vdenv/setup.py 2012-03-09 20:44:46 +0000
29+++ vdenv/setup.py 2012-03-09 22:12:20 +0000
30@@ -122,7 +122,7 @@
31 searchList=[config['network'],
32 {'all_systems': allsys }]).respond())
33
34- print "defined network %s " % netname
35+ print("defined network %s " % netname)
36
37 cob = System(config, "zimmer")
38 systems = [ cob ]
39@@ -141,7 +141,7 @@
40 conn.defineXML(system.toLibVirtXml())
41 if isinstance(system,Node):
42 subprocess.check_call(qcow_create % system.disk0, shell=True)
43- print "defined domain %s" % system.name
44+ print("defined domain %s" % system.name)
45
46 def cobbler_addsystem(server, token, system, profile, hostip):
47 eth0 = {
48@@ -164,7 +164,7 @@
49 if len(server.find_system({"name": system.name})):
50 server.remove_system(system.name,token)
51 server.update()
52- print "removed existing %s" % system.name
53+ print("removed existing %s" % system.name)
54
55 sid = server.new_system(token)
56 for key, val in items.iteritems():
57@@ -175,7 +175,7 @@
58 ret = server.save_system(sid,token)
59 if not ret:
60 raise Exception("failed to save %s" % system.name)
61- print "added %s" % system.name
62+ print("added %s" % system.name)
63
64
65 def get_profile_arch():