# Copyright (C) 2014 INRIA
#
# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation;
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# $ cd <path-to-nepi>
# python examples/planetlab/select_nodes.py -s <pl-slice> -u <pl-user> -p <pl-password> -k <pl-ssh-key> -c <country> -o <operating-system> -n <node-count>
+from __future__ import print_function
from nepi.execution.ec import ExperimentController
nodes = []
-for i in xrange(node_count):
+for i in range(node_count):
node = add_node(ec, pl_slice, pl_ssh_key, pl_user, pl_password, country, os)
nodes.append(node)
ec.wait_deployed(nodes)
-print "SELECTED HOSTS"
+print("SELECTED HOSTS")
for node in nodes:
- print ec.get(node, "hostname")
+ print(ec.get(node, "hostname"))
ec.shutdown()