def take_action(self, parsed_args): client = get_client(parsed_args) protocols = client.ex_list_protocols_with_default_ports() columns = ('Protocol', 'Port') return (columns, protocols)
def take_action(self, parsed_args): client = get_client(parsed_args) balancer = Placeholder(parsed_args.balancer_id) members = client.balancer_list_members(balancer=balancer) members = [Member(m) for m in members] collection = Collection(members) return collection.generate_output()
def take_action(self, parsed_args): client = get_client(parsed_args) available_algorithms = get_enum_as_dict(Algorithm, True) algorithms = client.list_supported_algorithms() result = [] for algorithm, id in available_algorithms.items(): if id in algorithms: result.append(AlgorithmModel({'id': id, 'algorithm': algorithm})) collection = Collection(result) return collection.generate_output()