def instance_state(cloud, a_key, s_key, instance_id): """ Check on the state of an instance until and return the state. """ if not instance_id: state = {'instance_state': "", 'public_ip': "", 'placement': "", 'error': "Missing instance ID, cannot check the state."} return state cml = CloudManLauncher(a_key, s_key, cloud) return cml.get_status(instance_id)
def instance_state(cloud, a_key, s_key, instance_id): """ Check on the state of an instance until and return the state. """ if not instance_id: state = { "instance_state": "", "public_ip": "", "placement": "", "error": "Missing instance ID, cannot check the state.", } return state cml = CloudManLauncher(a_key, s_key, cloud) return cml.get_status(instance_id)
def instance_state(cloud, a_key, s_key, instance_id): """ Check on the state of an instance until and return the state. """ # Dev code # if instance_id == 'i-l0cal': # state = {'instance_state': "ready", # 'public_ip': "127.0.0.1:42284", # 'placement': "desktop", # 'error': ""} # return state # End dev code if not instance_id: state = {'instance_state': "", 'public_ip': "", 'placement': "", 'error': "Missing instance ID, cannot check the state."} return state cml = CloudManLauncher(a_key, s_key, cloud) return cml.get_status(instance_id)
def instance_state(cloud, a_key, s_key, instance_id): """ Check on the state of an instance until and return the state. """ # Dev code # if instance_id == 'i-l0cal': # state = {'instance_state': "ready", # 'public_ip': "127.0.0.1:42284", # 'placement': "desktop", # 'error': ""} # return state # End dev code if not instance_id: state = { 'instance_state': "", 'public_ip': "", 'placement': "", 'error': "Missing instance ID, cannot check the state." } return state cml = CloudManLauncher(a_key, s_key, cloud) return cml.get_status(instance_id)
def instancestate(request): form = request.session["ec2data"] cml = CloudManLauncher(form["access_key"], form["secret_key"], form['cloud']) state = cml.get_status(form["instance_id"]) return HttpResponse(simplejson.dumps(state), mimetype="application/json")
def instance_state(cloud, a_key, s_key, instance_id): """ Check on the state of an instance until and return the state. """ cml = CloudManLauncher(a_key, s_key, cloud) return cml.get_status(instance_id)