Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
    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)
Ejemplo n.º 3
0
    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={})))
Ejemplo n.º 4
0
    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={})))
Ejemplo n.º 5
0
    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']))