* list active compute resources
* Cloud-like reference API with CLI for demonstrations
* Write CLI client
- * Start compute
+ * Start compute (name, DC, image)
* Stop compute
* Create an Ansible-based automatic installation routine
* Unit tests
def __init__(self, dcs):
self.dcs = dcs
- def compute_action_start(self, dc_name, compute_name):
+ def compute_action_start(self, dc_name, compute_name, image):
# TODO what to return UUID / given name / internal name ?
logging.debug("RPC CALL: compute start")
try:
- c = self.dcs.get(dc_name).startCompute(compute_name)
+ c = self.dcs.get(dc_name).startCompute(compute_name, image=image)
return str(c.name)
except Exception as ex:
logging.exception("RPC error.")
def start(self, args):
r = self.c.compute_action_start(
- args.get("datacenter"), args.get("name"))
+ args.get("datacenter"), args.get("name"), args.get("image"))
pp.pprint(r)
def stop(self, args):
"--datacenter", "-d", dest="datacenter", help="Data center.")
parser.add_argument(
"--name", "-n", dest="name", help="Compute name.")
+parser.add_argument(
+ "--image", "-i", dest="image", help="Name of container image to be used.")
# TODO: IP, image, etc. pp.