コード例 #1
0
ファイル: ce.py プロジェクト: emekoi/compiler-explorer-image
def pick_instance(args):
    instances = Instance.elb_instances(target_group_arn_for(args))
    if len(instances) == 1:
        return instances[0]
    while True:
        print_instances(instances, number=True)
        inst = input('Which instance? ')
        try:
            return instances[int(inst)]
        except:
            pass
コード例 #2
0
def pick_instance(cfg: Config):
    elb_instances = Instance.elb_instances(target_group_arn_for(cfg))
    if len(elb_instances) == 1:
        return elb_instances[0]
    while True:
        print_instances(elb_instances, number=True)
        inst = input('Which instance? ')
        try:
            return elb_instances[int(inst)]
        except (ValueError, IndexError):
            pass
コード例 #3
0
ファイル: ce.py プロジェクト: emekoi/compiler-explorer-image
def pick_instances(args):
    # TODO, maybe something in args to select only some?
    return Instance.elb_instances(target_group_arn_for(args))
コード例 #4
0
ファイル: ce.py プロジェクト: emekoi/compiler-explorer-image
def instances_status_cmd(args):
    print_instances(Instance.elb_instances(target_group_arn_for(args)), number=False)
コード例 #5
0
def pick_instances(cfg: Config):
    return Instance.elb_instances(target_group_arn_for(cfg))
コード例 #6
0
def instances_status(cfg: Config):
    """Get the status of the instances."""
    print_instances(Instance.elb_instances(target_group_arn_for(cfg)),
                    number=False)