def take_action(self, parsed_args): attrs = v2_utils.get_member_attrs(self.app.client_manager, parsed_args) id = attrs.pop('member_id') pool_id = attrs.pop('pool_id') self.app.client_manager.load_balancer.member_delete(pool_id=pool_id, member_id=id)
def take_action(self, parsed_args): attrs = v2_utils.get_member_attrs(self.app.client_manager, parsed_args) pool_id = attrs.pop('pool_id') member_id = attrs.pop('member_id') post_data = {"member": attrs} self.app.client_manager.load_balancer.member_set(pool_id=pool_id, member_id=member_id, json=post_data)
def take_action(self, parsed_args): rows = const.MEMBER_ROWS attrs = v2_utils.get_member_attrs(self.app.client_manager, parsed_args) member_id = attrs.pop('member_id') pool_id = attrs.pop('pool_id') data = self.app.client_manager.load_balancer.member_show( pool_id=pool_id, member_id=member_id) return (rows, (utils.get_dict_properties(data, rows, formatters={})))
def take_action(self, parsed_args): rows = const.MEMBER_ROWS attrs = v2_utils.get_member_attrs(self.app.client_manager, parsed_args) pool_id = attrs.pop('pool_id') body = {"member": attrs} data = self.app.client_manager.load_balancer.member_create( pool_id=pool_id, json=body) return (rows, (utils.get_dict_properties(data['member'], rows, formatters={})))
def take_action(self, parsed_args): columns = const.MEMBER_COLUMNS attrs = v2_utils.get_member_attrs(self.app.client_manager, parsed_args) pool_id = attrs.pop('pool_id') data = self.app.client_manager.load_balancer.member_list( pool_id=pool_id) return (columns, (utils.get_dict_properties( s, columns, formatters={}, ) for s in data['members']))