def terminate(instance): f = Finisher(bellatrix_util.getKey(), bellatrix_util.getSecret(), "terminated") f.finish_instance(instance, f._ec2.terminateInstance) return 0
def run(ami, instance_type, key_name, security_groups, new_size): r = Run(bellatrix_util.getKey(), bellatrix_util.getSecret()) r.startInstance(ami, instance_type, key_name, security_groups, new_size) return 0
def stop(instance): f = Finisher(bellatrix_util.getKey(), bellatrix_util.getSecret(), "stopped") f.finish_instance(instance, f._ec2.stopInstance) return 0
def run(security_group_name, ports_file, cidrs_file): r = Run(bellatrix_util.getKey(), bellatrix_util.getSecret()) r.setSecurityGroupAuth(security_group_name, ports_file, cidrs_file) return 0
def run(instance, config_name, wait): r = Run(bellatrix_util.getKey(), bellatrix_util.getSecret(), bellatrix.APP) new_ami = r.burnInstance(instance, config_name) if wait: r.amiIsReady(new_ami) return 0
def list(): l = Lister(bellatrix_util.getKey(), bellatrix_util.getSecret()) l.list() return 0
def run(configuration=None): r = Bewitch(bellatrix_util.getKey(), bellatrix_util.getSecret(), bellatrix.APP, bellatrix_util.getPrivateKey(), bellatrix_util.getReportsDir()) config = r.ALL_CONFIGS if (not configuration) else configuration exit_code = r.run(config) return exit_code